mailsync-5.2.2/0000775000000000000000000000000012021470640010223 5ustar mailsync-5.2.2/configure0000775000000000000000000063315211704530716012154 0ustar #! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.65 for mailsync 5.2.2. # # Report bugs to . # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 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 and $0: tpo_deb@sourcepole.ch about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a $0: 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 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=$?; test $as_status -eq 0 && as_status=1 if test "$3"; then as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi $as_echo "$as_me: error: $1" >&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, 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='mailsync' PACKAGE_TARNAME='mailsync' PACKAGE_VERSION='5.2.2' PACKAGE_STRING='mailsync 5.2.2' PACKAGE_BUGREPORT='tpo_deb@sourcepole.ch' PACKAGE_URL='' ac_unique_file="src/mailsync_main.cc" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS HAVE_CCLIENT_FALSE HAVE_CCLIENT_TRUE CCLIENT_LIBS CCLIENT_INCLUDES CCLIENT_CXXFLAGS HAVE_PAM_FALSE HAVE_PAM_TRUE PAM_LDFLAGS PAM_INCLUDES HAVE_KRB5_GSSAPI_FALSE HAVE_KRB5_GSSAPI_TRUE KRB5_GSSAPI_LIBS KRB5_GSSAPI_CFLAGS HAVE_KRB5_FALSE HAVE_KRB5_TRUE KRB5_LDFLAGS KRB5_CFLAGS KRB5_CONFIG HAVE_OPENSSL_FALSE HAVE_OPENSSL_TRUE OPENSSL_LIBS OPENSSL_LDFLAGS OPENSSL_INCLUDES PREFER_SO_FALSE PREFER_SO_TRUE LIBOBJS EGREP GREP CPP am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE ac_ct_CXX CXXFLAGS CXX am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_dependency_tracking with_so_preference with_openssl with_krb5 with_pam with_c_client ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CXX CXXFLAGS CCC CPP' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=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 mailsync 5.2.2 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/mailsync] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of mailsync 5.2.2:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-so-preference prefer dynamic linking over static (default yes) --with-openssl=prefix enable use of OpenSSL --with-krb5=prefix enable use of kerberos --with-pam enable use of PAM --with-c-client=path enable use of c-client 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 CXX C++ compiler command CXXFLAGS C++ compiler flags CPP C preprocessor Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF mailsync configure 5.2.2 generated by GNU Autoconf 2.65 Copyright (C) 2009 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_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_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_cxx_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_cxx_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; } >/dev/null && { 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_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( cat <<\_ASBOX ## ------------------------------------ ## ## Report this to tpo_deb@sourcepole.ch ## ## ------------------------------------ ## _ASBOX ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_mongrel # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if { as_var=$3; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; test "x$as_lineno_stack" = x && { as_lineno=; unset as_lineno;} } # ac_fn_c_check_header_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || $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 { as_var=$3; eval "test \"\${$as_var+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 mailsync $as_me 5.2.2, which was generated by GNU Autoconf 2.65. 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 cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX 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 cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX 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 cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX 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 cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX 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 ac_site_file1=$CONFIG_SITE 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" 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 am__api_version='1.11' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do for ac_t in install-sh install.sh shtool; do if test -f "$ac_dir/$ac_t"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/$ac_t -c" break 2 fi done done if test -z "$ac_aux_dir"; then as_fn_error "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi test "$2" = conftest.file ) then # Ok. : else as_fn_error "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { 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_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if test "${ac_cv_path_mkdir+set}" = set; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } mkdir_p="$MKDIR_P" case $mkdir_p in [\\/$]* | ?:[\\/]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='mailsync' VERSION='5.2.2' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. AMTAR=${AMTAR-"${am_missing_run}tar"} am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -' ac_config_headers="$ac_config_headers config.h" 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_set_status 77 as_fn_error "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 DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC 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_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # 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_CXX="$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 CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC 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_CXX+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # 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_CXX="$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_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" 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 CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if test "${ac_cv_cxx_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_cxx_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_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_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_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. 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_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if test "${ac_cv_prog_AWK+set}" = set; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done 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.$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.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f 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.$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.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f 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" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if test "${ac_cv_header_stdc+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " eval as_val=\$$as_ac_Header if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in string.h do : ac_fn_c_check_header_mongrel "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" if test "x$ac_cv_header_string_h" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STRING_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if test "${ac_cv_c_const+set}" = set; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } if test "${ac_cv_func_lstat_dereferences_slashed_symlink+set}" = set; then : $as_echo_n "(cached) " >&6 else rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes; then : ac_cv_func_lstat_dereferences_slashed_symlink=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; /* Linux will dereference the symlink and fail, as required by POSIX. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ return lstat ("conftest.sym/", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_lstat_dereferences_slashed_symlink=yes else ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else # If the `ln -s' command failed, then we probably don't even # have an lstat function. ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 $as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && cat >>confdefs.h <<_ACEOF #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 _ACEOF if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then case " $LIBOBJS " in *" lstat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS lstat.$ac_objext" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5 $as_echo_n "checking whether stat accepts an empty string... " >&6; } if test "${ac_cv_func_stat_empty_string_bug+set}" = set; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_stat_empty_string_bug=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; return stat ("", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_stat_empty_string_bug=no else ac_cv_func_stat_empty_string_bug=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 $as_echo "$ac_cv_func_stat_empty_string_bug" >&6; } if test $ac_cv_func_stat_empty_string_bug = yes; then case " $LIBOBJS " in *" stat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS stat.$ac_objext" ;; esac cat >>confdefs.h <<_ACEOF #define HAVE_STAT_EMPTY_STRING_BUG 1 _ACEOF fi for ac_func in getpass memset strchr strdup strerror strtoul do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" eval as_val=\$$as_ac_var if test "x$as_val" = x""yes; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done # default action of AC_CHECK_LIB is to add item to LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5 $as_echo_n "checking for crypt in -lcrypt... " >&6; } if test "${ac_cv_lib_crypt_crypt+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char crypt (); int main () { return crypt (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_crypt_crypt=yes else ac_cv_lib_crypt_crypt=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypt_crypt" >&5 $as_echo "$ac_cv_lib_crypt_crypt" >&6; } if test "x$ac_cv_lib_crypt_crypt" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBCRYPT 1 _ACEOF LIBS="-lcrypt $LIBS" fi no_connect="no" no_gethostbyname="no" ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" if test "x$ac_cv_func_connect" = x""yes; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 $as_echo_n "checking for connect in -lsocket... " >&6; } if test "${ac_cv_lib_socket_connect+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char connect (); int main () { return connect (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_connect=yes else ac_cv_lib_socket_connect=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 $as_echo "$ac_cv_lib_socket_connect" >&6; } if test "x$ac_cv_lib_socket_connect" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSOCKET 1 _ACEOF LIBS="-lsocket $LIBS" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -linet" >&5 $as_echo_n "checking for connect in -linet... " >&6; } if test "${ac_cv_lib_inet_connect+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-linet $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char connect (); int main () { return connect (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_inet_connect=yes else ac_cv_lib_inet_connect=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_inet_connect" >&5 $as_echo "$ac_cv_lib_inet_connect" >&6; } if test "x$ac_cv_lib_inet_connect" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBINET 1 _ACEOF LIBS="-linet $LIBS" else no_connect="yes" fi fi fi ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" if test "x$ac_cv_func_gethostbyname" = x""yes; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl_s" >&5 $as_echo_n "checking for gethostbyname in -lnsl_s... " >&6; } if test "${ac_cv_lib_nsl_s_gethostbyname+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl_s $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nsl_s_gethostbyname=yes else ac_cv_lib_nsl_s_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_s_gethostbyname" >&5 $as_echo "$ac_cv_lib_nsl_s_gethostbyname" >&6; } if test "x$ac_cv_lib_nsl_s_gethostbyname" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBNSL_S 1 _ACEOF LIBS="-lnsl_s $LIBS" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nsl_gethostbyname=yes else ac_cv_lib_nsl_gethostbyname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5 $as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; } if test "x$ac_cv_lib_nsl_gethostbyname" = x""yes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBNSL 1 _ACEOF LIBS="-lnsl $LIBS" else no_gethostbyname="yes" fi fi fi if test "$no_gethostbyname" = "yes" -o "$no_connect" = "yes" ; then as_fn_error "essential functions missing" "$LINENO" 5 else : fi PREFER_SO="yes" # Check whether --with-so-preference was given. if test "${with_so_preference+set}" = set; then : withval=$with_so_preference; PREFER_SO="$withval" fi if test "${PREFER_SO}" = "shared" -o "${PREFER_SO}" = "so" -o "${PREFER_SO}" = "yes" ; then PREFER_SO="yes" : else PREFER_SO="no" : fi if test "${PREFER_SO}" = "yes"; then PREFER_SO_TRUE= PREFER_SO_FALSE='#' else PREFER_SO_TRUE='#' PREFER_SO_FALSE= fi OPENSSLLOCATIONS="/usr,/usr/local,/usr/local/openssl,/opt/openssl,/usr/local/ssl,/usr/lib/ssl,/usr/ssl" HAVE_OPENSSL="no" OPENSSL_LDFLAGS="" OPENSSL_LIBS="" OPENSSL_INCLUDES="" # Check whether --with-openssl was given. if test "${with_openssl+set}" = set; then : withval=$with_openssl; if test "$withval" = "no" ; then OPENSSLLOCATIONS="" else test "$withval" = "yes" || OPENSSLLOCATIONS="$withval,${OPENSSLLOCATIONS}" fi fi if test -z "${OPENSSLLOCATIONS}" ; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libssl" >&5 $as_echo_n "checking for libssl... " >&6; } for p in `eval "echo {${OPENSSLLOCATIONS}}{/lib,/lib64,${LIBDIRS}}"` ; do if test -r "${p}/libssl.a" -o -r "${p}/libssl.so" ; then OPENSSL_LDFLAGS="-L${p}" { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in ${p}" >&5 $as_echo "found in ${p}" >&6; } break fi done if test -z "${OPENSSL_LDFLAGS}" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } : else xLDFLAGS="${LDFLAGS}" LDFLAGS="${LDFLAGS} ${OPENSSL_LDFLAGS}" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lssl" >&5 $as_echo_n "checking for main in -lssl... " >&6; } if test "${ac_cv_lib_ssl_main+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lssl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ssl_main=yes else ac_cv_lib_ssl_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ssl_main" >&5 $as_echo "$ac_cv_lib_ssl_main" >&6; } if test "x$ac_cv_lib_ssl_main" = x""yes; then : OPENSSL_LIBS="${OPENSSL_LIBS} -lssl" else OPENSSL_LIBS="" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lcrypto" >&5 $as_echo_n "checking for main in -lcrypto... " >&6; } if test "${ac_cv_lib_crypto_main+set}" = set; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_crypto_main=yes else ac_cv_lib_crypto_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_crypto_main" >&5 $as_echo "$ac_cv_lib_crypto_main" >&6; } if test "x$ac_cv_lib_crypto_main" = x""yes; then : OPENSSL_LIBS="${OPENSSL_LIBS} -lcrypto" else OPENSSL_LIBS="" fi LDFLAGS="${xLDFLAGS}" if test -z "${OPENSSL_LIBS}" ; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl/ssl.h" >&5 $as_echo_n "checking for openssl/ssl.h... " >&6; } for p in `eval "echo {${OPENSSLLOCATIONS}}{/include,}"` ; do if test -r "${p}/openssl/ssl.h" ; then OPENSSL_INCLUDES="-I${p}" { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in ${p}" >&5 $as_echo "found in ${p}" >&6; } break fi done if test -z "${OPENSSL_INCLUDES}" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } : else HAVE_OPENSSL=yes : fi fi fi fi if test "${HAVE_OPENSSL}" = "yes"; then HAVE_OPENSSL_TRUE= HAVE_OPENSSL_FALSE='#' else HAVE_OPENSSL_TRUE='#' HAVE_OPENSSL_FALSE= fi KRB5LOCATIONS="/usr,/usr/local,/usr/kerberos,/usr/local/kerberos,/usr/krb5,/usr/local/krb5,/opt/kerberos,/opt/krb5" HAVE_KRB5="no" KRB5_CONFIG="" KRB5_CFLAGS="" KRB5_LDFLAGS="" # Check whether --with-krb5 was given. if test "${with_krb5+set}" = set; then : withval=$with_krb5; if test "$withval" = "no" ; then KRB5LOCATIONS="" else test "$withval" = "yes" || KRB5LOCATIONS="$withval,${KRB5LOCATIONS}" fi fi if test -z "${KRB5LOCATIONS}" ; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5-config" >&5 $as_echo_n "checking for krb5-config... " >&6; } for k in `eval "echo {${KRB5LOCATIONS}}{/bin,}/krb5-config"` ; do if test -x "${k}" ; then KRB5_CONFIG="${k}" break fi done if test -z "${KRB5_CONFIG}" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } : else { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${KRB5_CONFIG}" >&5 $as_echo "found ${KRB5_CONFIG}" >&6; } HAVE_KRB5=yes KRB5_CFLAGS="`${KRB5_CONFIG} --cflags`" KRB5_LDFLAGS="`${KRB5_CONFIG} --libs`" : fi fi if test "${HAVE_KRB5}" = "yes"; then HAVE_KRB5_TRUE= HAVE_KRB5_FALSE='#' else HAVE_KRB5_TRUE='#' HAVE_KRB5_FALSE= fi HAVE_KRB5_GSSAPI="no" if test "${HAVE_KRB5}" = "yes" -a "${KRB5_CONFIG}" != "" ; then HAVE_KRB5_GSSAPI="yes" KRB5_GSSAPI_CFLAGS="`${KRB5_CONFIG} --cflags gssapi`" KRB5_GSSAPI_LIBS="`${KRB5_CONFIG} --libs gssapi`" : else : fi if test "${HAVE_KRB5_GSSAPI}" = "yes" ; then HAVE_KRB5_GSSAPI_TRUE= HAVE_KRB5_GSSAPI_FALSE='#' else HAVE_KRB5_GSSAPI_TRUE='#' HAVE_KRB5_GSSAPI_FALSE= fi PAMLOCATIONS="/lib,/usr,/usr/local,/opt/pam" HAVE_PAM="no" PAM_LDFLAGS="" PAM_INCLUDES="" # Check whether --with-pam was given. if test "${with_pam+set}" = set; then : withval=$with_pam; if test "$withval" = "no" ; then PAMLOCATIONS="" else test "$withval" = "yes" || PAMLOCATIONS="$withval,${PAMLOCATIONS}" fi fi if test -z "${PAMLOCATIONS}" ; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam library" >&5 $as_echo_n "checking for pam library... " >&6; } for p in `eval "echo {${PAMLOCATIONS}}{/lib,/lib64}"` ; do if test -r "${p}/libpam.a" -o -r "${p}/libpam.so" ; then PAM_LDFLAGS="-L${p}" { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in ${p}" >&5 $as_echo "found in ${p}" >&6; } break fi done if test -z "${PAM_LDFLAGS}" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pam headers" >&5 $as_echo_n "checking for pam headers... " >&6; } for p in `eval "echo {${PAMLOCATIONS}}{/include,/include/pam,,/pam}"` ; do if test -r "${p}/security/pam_appl.h" ; then PAM_INCLUDES="-I${p}" { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in ${p}" >&5 $as_echo "found in ${p}" >&6; } break fi done if test -z "${PAM_INCLUDES}" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } : else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking if pam test program compiles" >&5 $as_echo_n "checking if pam test program compiles... " >&6; } xLIBS="${LIBS}" xCPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${PAM_INCLUDES}" LIBS="${LIBS} ${PAM_LDFLAGS} -lpam" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include main(int argc,char **argv) { } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } HAVE_PAM="yes" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CPPFLAGS="${xCPPFLAGS}" LIBS="${xLIBS}" 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 "${HAVE_PAM}" = "yes" ; then : fi fi fi fi if test "${HAVE_PAM}" = "yes"; then HAVE_PAM_TRUE= HAVE_PAM_FALSE='#' else HAVE_PAM_TRUE='#' HAVE_PAM_FALSE= fi CCLIENTLOCATIONS="/usr,/usr/local" HAVE_CCLIENT="no" CCLIENT_LIBS="" CCLIENT_INCLUDES="" CCLIENT_CXXFLAGS="" CCLIENT_LINKAGE_C="" CCLIENT_LINKAGE_H="" # Check whether --with-c-client was given. if test "${with_c_client+set}" = set; then : withval=$with_c_client; if test "$withval" = "no" ; then CCLIENTLOCATIONS="" else test "$withval" = "yes" || CCLIENTLOCATIONS="$withval,${CCLIENTLOCATIONS}" fi fi if test -z "${CCLIENTLOCATIONS}" ; then as_fn_error "a working c-client installation is required for building mailsync" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for c-client.h" >&5 $as_echo_n "checking for c-client.h... " >&6; } for p in `eval "echo {${CCLIENTLOCATIONS}}{,/c-client,/lib/c-client,/include/c-client,/include,/include/imap}"` ; do if test -r "${p}/c-client.h" -a -r "${p}/linkage.h" -a -r "${p}/linkage.c" ; then CCLIENT_INCLUDES="-I${p}" CCLIENT_LINKAGE_H="${p}/linkage.h" CCLIENT_LINKAGE_C="${p}/linkage.c" { $as_echo "$as_me:${as_lineno-$LINENO}: result: found in ${p}" >&5 $as_echo "found in ${p}" >&6; } break fi done if test -z "${CCLIENT_INCLUDES}" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } as_fn_error "a working c-client installation is required for building mailsync" "$LINENO" 5 else SOP=".so,.a" test "${PREFER_SO}" = "no" && SOP=".a,.so" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for c-client library" >&5 $as_echo_n "checking for c-client library... " >&6; } for l in `eval "echo {${CCLIENTLOCATIONS}}{,/c-client,/lib/c-client,/lib,/lib64}/{libc-client,libc-client4,c-client}{${SOP}}"` ; do if test -r "$l" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${l}" >&5 $as_echo "found ${l}" >&6; } CCLIENT_LIBS="$l" break fi done if test -z "${CCLIENT_LIBS}" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5 $as_echo "not found" >&6; } as_fn_error "a working c-client installation is required for building mailsync" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether c-client built with kerberos gssapi support" >&5 $as_echo_n "checking whether c-client built with kerberos gssapi support... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <${CCLIENT_LINKAGE_H}> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "auth_gss" >/dev/null 2>&1; then : need_krb=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else need_krb=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: checking if kerberos is required and available for linking against c-client" >&5 $as_echo_n "checking if kerberos is required and available for linking against c-client... " >&6; } if test "${need_krb}" = "yes" -a "${HAVE_KRB5_GSSAPI}" != "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } as_fn_error "a working c-client installation is required for building mailsync" "$LINENO" 5 else if test "${need_krb}" = "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } CCLIENT_LIBS="${CCLIENT_LIBS} ${KRB5_GSSAPI_LIBS}" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: not required" >&5 $as_echo "not required" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether c-client requires ssl linkage" >&5 $as_echo_n "checking whether c-client requires ssl linkage... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <${CCLIENT_LINKAGE_C}> _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "ssl_" >/dev/null 2>&1; then : need_ssl=yes else need_ssl=no fi rm -f conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${need_ssl}" >&5 $as_echo "${need_ssl}" >&6; } if test "${need_ssl}" = "yes" -a "${HAVE_OPENSSL}" != "yes" ; then as_fn_error "a working c-client installation is required for building mailsync" "$LINENO" 5 else CCLIENT_LIBS="${CCLIENT_LIBS} ${OPENSSL_LDFLAGS} ${OPENSSL_LIBS}" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if simple c-client program compiles without pam support" >&5 $as_echo_n "checking if simple c-client program compiles without pam support... " >&6; } 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 xCPPFLAGS="${CPPFLAGS}" xLIBS="${LIBS}" CPPFLAGS="${CPPFLAGS} ${CCLIENT_INCLUDES}" LIBS="${LIBS} ${CCLIENT_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include "c-client.h" #include "linkage.h" main(int argc,char **argv) { #include "linkage.c" } void mm_log(char*a,long b){} void mm_dlog(char*a){} void mm_flags(MAILSTREAM*a,unsigned long b){} void mm_fatal(char*a){} void mm_critical(MAILSTREAM*a){} void mm_nocritical(MAILSTREAM*a){} void mm_notify(MAILSTREAM*a,char*b,long c){} void mm_login(NETMBX*a,char*b,char*c,long d){} long mm_diskerror(MAILSTREAM*a,long b,long c){} void mm_status(MAILSTREAM*a,char*b,MAILSTATUS*c){} void mm_lsub(MAILSTREAM*a,int b,char*c,long d){} void mm_list(MAILSTREAM*a,int b,char*c,long d){} void mm_exists(MAILSTREAM*a,unsigned long b){} void mm_searched(MAILSTREAM*a,unsigned long b){} void mm_expunged(MAILSTREAM*a,unsigned long b){} _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } will_do_without_pam="yes" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } will_do_without_pam="no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "${will_do_without_pam}" = "no" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we've seen pam somewhere around" >&5 $as_echo_n "checking if we've seen pam somewhere around... " >&6; } if test "${HAVE_PAM}" != "yes" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if adding pam helps" >&5 $as_echo_n "checking if adding pam helps... " >&6; } CCLIENT_LIBS="${CCLIENT_LIBS} ${PAM_LDFLAGS} -lpam" LIBS="${xLIBS} ${CCLIENT_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include "c-client.h" #include "linkage.h" main(int argc,char **argv) { #include "linkage.c" } void mm_log(char*a,long b){} void mm_dlog(char*a){} void mm_flags(MAILSTREAM*a,unsigned long b){} void mm_fatal(char*a){} void mm_critical(MAILSTREAM*a){} void mm_nocritical(MAILSTREAM*a){} void mm_notify(MAILSTREAM*a,char*b,long c){} void mm_login(NETMBX*a,char*b,char*c,long d){} long mm_diskerror(MAILSTREAM*a,long b,long c){} void mm_status(MAILSTREAM*a,char*b,MAILSTATUS*c){} void mm_lsub(MAILSTREAM*a,int b,char*c,long d){} void mm_list(MAILSTREAM*a,int b,char*c,long d){} void mm_exists(MAILSTREAM*a,unsigned long b){} void mm_searched(MAILSTREAM*a,unsigned long b){} void mm_expunged(MAILSTREAM*a,unsigned long b){} _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } will_do_with_pam="yes" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } will_do_with_pam="no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi fi CPPFLAGS="${xCPPFLAGS}" LIBS="${xLIBS}" 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 "${will_do_without_pam}" = "no" -a "${will_do_with_pam}" = "no" ; then as_fn_error "a working c-client installation is required for building mailsync" "$LINENO" 5 else ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu xCPPFLAGS="${CPPFLAGS}" xCXXFLAGS="${CXXFLAGS}" CPPFLAGS="${CPPFLAGS} ${CCLIENT_INCLUDES}" opernames_resolved="no" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if c-client works without -fno-operator-names in c++" >&5 $as_echo_n "checking if c-client works without -fno-operator-names in c++... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include "c-client.h" _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } opernames_resolved="yes" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if adding -fno-operator-names helps" >&5 $as_echo_n "checking if adding -fno-operator-names helps... " >&6; } CXXFLAGS="${CXXFLAGS} -fno-operator-names" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include "c-client.h" _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } CCLIENT_CXXFLAGS=-fno-operator-names opernames_resolved="yes" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CXXFLAGS="${xCXXFLAGS}" CPPFLAGS="${xCPPFLAGS}" 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 "${opernames_resolved}" = "no" ; then as_fn_error "a working c-client installation is required for building mailsync" "$LINENO" 5 else HAVE_CCLIENT=yes : fi fi fi fi fi fi fi if test "${HAVE_CCLIENT}" = "yes"; then HAVE_CCLIENT_TRUE= HAVE_CCLIENT_FALSE='#' else HAVE_CCLIENT_TRUE='#' HAVE_CCLIENT_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if c-client includes md5 support" >&5 $as_echo_n "checking if c-client includes md5 support... " >&6; } 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 xCFLAGS="${CFLAGS}" xLIBS="${LIBS}" CFLAGS="${CFLAGS} ${CCLIENT_INCLUDES}" LIBS="${LIBS} ${CCLIENT_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include "c-client.h" #include "linkage.h" #define MD5BLKLEN 64 /* MD5 block length */ typedef struct { unsigned long chigh; /* high 32bits of byte count */ unsigned long clow; /* low 32bits of byte count */ unsigned long state4; /* state (ABCD) */ unsigned char bufMD5BLKLEN; /* input buffer */ unsigned char *ptr; /* buffer position */ } MD5CONTEXT; void md5_init (MD5CONTEXT *ctx); main(int argc,char **argv) { #include "linkage.c" md5_init(NULL); } void mm_log(char*a,long b){} void mm_dlog(char*a){} void mm_flags(MAILSTREAM*a,unsigned long b){} void mm_fatal(char*a){} void mm_critical(MAILSTREAM*a){} void mm_nocritical(MAILSTREAM*a){} void mm_notify(MAILSTREAM*a,char*b,long c){} void mm_login(NETMBX*a,char*b,char*c,long d){} long mm_diskerror(MAILSTREAM*a,long b,long c){} void mm_status(MAILSTREAM*a,char*b,MAILSTATUS*c){} void mm_lsub(MAILSTREAM*a,int b,char*c,long d){} void mm_list(MAILSTREAM*a,int b,char*c,long d){} void mm_exists(MAILSTREAM*a,unsigned long b){} void mm_searched(MAILSTREAM*a,unsigned long b){} void mm_expunged(MAILSTREAM*a,unsigned long b){} _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_MD5 /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext CFLAGS="${xCFLAGS}" LIBS="${xLIBS}" ac_config_files="$ac_config_files Makefile src/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then 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= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${PREFER_SO_TRUE}" && test -z "${PREFER_SO_FALSE}"; then as_fn_error "conditional \"PREFER_SO\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_OPENSSL_TRUE}" && test -z "${HAVE_OPENSSL_FALSE}"; then as_fn_error "conditional \"HAVE_OPENSSL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_KRB5_TRUE}" && test -z "${HAVE_KRB5_FALSE}"; then as_fn_error "conditional \"HAVE_KRB5\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_KRB5_GSSAPI_TRUE}" && test -z "${HAVE_KRB5_GSSAPI_FALSE}"; then as_fn_error "conditional \"HAVE_KRB5_GSSAPI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_PAM_TRUE}" && test -z "${HAVE_PAM_FALSE}"; then as_fn_error "conditional \"HAVE_PAM\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_CCLIENT_TRUE}" && test -z "${HAVE_CCLIENT_FALSE}"; then as_fn_error "conditional \"HAVE_CCLIENT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : ${CONFIG_STATUS=./config.status} ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. 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 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=$?; test $as_status -eq 0 && as_status=1 if test "$3"; then as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3 fi $as_echo "$as_me: error: $1" >&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 mailsync $as_me 5.2.2, which was generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ mailsync config.status 5.2.2 configured by $0, generated by GNU Autoconf 2.65, with options \\"\$ac_cs_config\\" Copyright (C) 2009 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$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"` ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= 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 $(srcdir), # ${srcdir} and @srcdir@ 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[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// 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 :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$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 "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 # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$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_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; 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 $? 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 mailsync-5.2.2/TODO0000664000000000000000000000527610061674737010744 0ustar Bugs ---- * libc-client changed behaveour: instead of: msinfo /home/tpo2/mail/mailsync we now need: msinfo mailsync You're wellcome to implement any of these ----------------------------------------- * maintaining message Status is broken again. Need to fix that. * unless run wit -D a once existent folder will allways be recreated because mailsync remembers it in it's .msinfo store. How to reproduce: * create folder F * store some file there * sync * remove F on both sites * sync * F will be recreated on one site :-/ * refuse to run if .mailsync contains password and permissions are wrong * test and/or find better solution to the problem when encountering a mailbox that does not match our default mailbox delimiter * mailsync can't handle mailboxes that contain messages _and_ submailboxes * why do some errors go to stderr and some to stdout? * ideally sanitize_message_id should not have a side effect, but just return 1 or 0 if the message had to be modified or it should have enough information to print a sufficient error message, i.e. the mailbox where the message is originating from * I'm not sure whether extra mailboxes in read_lasttime_seen and delete_boxes in write_lasttime is consistent * mailsync is using '!' as a hierarchy separator. This is unfortunate. IMAP 4rev1 says mailbox names should be encoded in "modified UTF-7" that is contain only characters 0x20-0x7e. That means we should use a non-"modified UTF-7" character as hierarchy separator for mailsync ideally a character that has special meaning on all platforms as f.ex. newline? * no_expunge runtime/compile option don't mix? * Displaying "=?iso-8859-1?Q?Susanne" in Subject or From: is nonsense * warn should be on by default * spaces should not be replaced by dots in msinfo * escape '<' in mailbox names... * extern msg_string in msgstring.h is ugly Nice to have ------------ * if no emails are being expunged mailsync should shut up * synchronize Status * move CLI options into config file * calculate (direction == ...) immediately in copy_message * provide an integrated function for print_lead, print_... * switch to md5 as default algorithm * include patches for new features from http://bugs.debian.org/mailsync * #mhinbox refers to the "inbox" box in the Mail folder in #mh format. That means that synchronizing INBOX with #mhinbox is impossible right now because strcmp( "INBOX", "#mhinbox") yield false. It'd be nice if we could sync those. If we'd do that then we could as well do a "whatever" to "whatother" mapping (1:1), which would make INBOX <-> #mhinbox just a special case of the more general 1:1 maping. * replace "vector"s by "slist"s mailsync-5.2.2/debian/0000775000000000000000000000000013260672276011464 5ustar mailsync-5.2.2/debian/rules0000775000000000000000000000434411704543354012544 0ustar #!/usr/bin/make -f # Sample debian/rules that uses debhelper. # GNU copyright 1997 to 1999 by Joey Hess. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 # This is the debhelper compatability version to use. export DH_COMPAT=7 DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) export LIBDIRS := /lib/$(DEB_HOST_MULTIARCH) configure: configure-stamp configure-stamp: dh_testdir @# we need depcomp in order to be able to build for i in / -1.4/ -1.5/ -1.6/ -1.7/ -1.11/; do \ if [ ! "$$found" = "1" -a -e /usr/share/automake$${i}depcomp ] ; \ then \ ln -s /usr/share/automake$${i}depcomp depcomp ; \ ln -s /usr/share/automake$${i}install-sh install-sh ; \ ln -s /usr/share/automake$${i}missing missing ; \ ln -s /usr/share/automake$${i}mkinstalldirs mkinstalldirs ; \ found=1 ; \ fi ; \ done @# Add here commands to compile the package. ./configure --prefix=/usr touch configure-stamp build: configure-stamp build-stamp build-stamp: dh_testdir $(MAKE) touch build-stamp clean: dh_testdir @# dh_testroot rm -f build-stamp configure-stamp @# Add here commands to clean up after the build process. -$(MAKE) distclean -rm -f core @# remove symlinks -rm install-sh mkinstalldirs missing depcomp dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs @# Add here commands to install the package into debian/mailsync. install -o root -g root -m 0755 \ src/mailsync $(CURDIR)/debian/mailsync/usr/bin # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. # Build architecture-dependent files here. binary-arch: build install dh_testdir dh_testroot dh_installdocs -XCVS dh_installman doc/mailsync.1 dh_installchangelogs dh_link dh_strip dh_compress dh_fixperms dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install configure mailsync-5.2.2/debian/changelog0000664000000000000000000002370013260672276013340 0ustar mailsync (5.2.2-3.1build1) bionic; urgency=high * No change rebuild to pick up -fPIE compiler default -- Balint Reczey Tue, 03 Apr 2018 12:34:06 +0000 mailsync (5.2.2-3.1) unstable; urgency=medium * Non-maintainer upload. * Add libkrb5-dev as an explicit build-depend to fix FTBFS (Closes: #768736) - Thanks to Simon Elsbrock for the patch -- Scott Kitterman Sat, 15 Nov 2014 01:08:53 -0500 mailsync (5.2.2-3) unstable; urgency=high * set urgency=high because libc-client broke mailsync and the mailsync currently in wheezy and to be released will not even start. See next changelog entry and also #682256 and #686393 * debian/control: rebuild against and depend on libc-client2007e (>= 8:2007f~dfsg-1) since c-client broke its own library version checks. Thanks Fredrik Jonson (Closes: #685897) * debian/copyright: made machine readable * debian/compat: added * debian/control: added * a question to my 23 users (according to popcon): is it worth to maintain this package? Wouldn't it maybe be wiser to migrate to open. If you care about this package then please let me know. -- Tomas Pospisek Tue, 04 Sep 2012 21:50:01 +0200 mailsync (5.2.2-2) unstable; urgency=low * thanks a lot to Gregor Herrmann and Ilya Barygin for the previous NMU * debian/control: migrate from automake1.7 to automake1.11 (Closes: #648586) * thanks to Eric Dorland for pointing out the way forward * debian/control: bump Standards-Version to 3.8.4.0 * doc/examples/mailsync: s#/var/spool/mail#/var/mail# * debian/rules: bump DH_COMPAT to 7 * debian/control: add ${misc:Depends} to "Depends:" field * debian/control: add "Homepage:" field -- Tomas Pospisek Sun, 15 Jan 2012 13:48:23 +0100 mailsync (5.2.2-1.1) unstable; urgency=low * Non-maintainer upload. * Fix "FTBFS: configure: error: a working c-client installation is required for building mailsync": apply patch from Ubuntu / Ilya Barygin: * Fix FTBFS: - debian/rules, acinclude/ac_with_openssl.m4, configure: provide an additional directory to search for libssl. - add missing build dependencies: libssl-dev, libpam0g-dev, libkrb5-dev. (Closes: #642689) * Additionally build depend on dpkg-dev >= 1.16.0. -- gregor herrmann Sat, 12 Nov 2011 15:57:57 +0100 mailsync (5.2.2-1) unstable; urgency=low * remove build-dependency on automake1.6, since it's been removed from the archive (thanks Martin Michlmayr) closes: 355317 -- Tomas Pospisek Sun, 05 Mar 2006 20:36:54 +0100 mailsync (5.2.1-2) unstable; urgency=low * debian: * remove build-dependency on the automake1.5 package, which is no more existant. (Thanks Lamont!) closes: #257379 -- Tomas Pospisek Sat, 03 Jul 2004 15:35:28 +0200 mailsync (5.2.1-1) unstable; urgency=low * new in upstream: closes: #256832 * #mh folders should work better * mailsync shouldn't possibly be messing with flags at all if the mailbox (IMAP f.ex) allows it. Check the "-n" option for most restricted flag handling. * don't delete duplicate messages with empty Message-IDs * not exiting any more on stores without subdirs * don't show message IDs by default * "-n" has a new meaning: do not delete messages * debian: * depend on automake1.5|1.6|1.7 since 1.4 doesn't provide depcomp closes: #191221 * the package should be buildable on woody out of the box. Further docu for compiling under woody is in README.Debian (thanks Mike Crowe). -- Tomas Pospisek Wed, 30 Jun 2004 08:52:26 +0200 mailsync (5.1.1-1) unstable; urgency=high * new in upstream: * not properly expunging emails fixed - visible with #mh folders -- Tomas Pospisek Tue, 15 Apr 2003 09:21:34 +0200 mailsync (5.1.0-3) unstable; urgency=high * new in upstream: * warn about empty Message-IDs when using the default msg id algorithm. * -di debug/log IMAP telemetry/protocol * -dc debug configuration * fixed traversing some boxes twice * debian: * dpkg-buildpackage -i excludes .deps which are needed. Sigh. Hyper-ugly dpkg-buildpackage commandline (included) is now required for building the package. (bugreport: Bdale/builddaemon) closes: #186943 * skipping 5.1.0-2 - upload of that version failed -- Tomas Pospisek Thu, 03 Apr 2003 10:12:16 +0200 mailsync (5.1.0-1) unstable; urgency=high * new upstream: * reengineered source and split in smaller pieces * optional md5 msg-ids * new courier config example * synching of mailboxes containing submailboxes and messages should be possible now * diff mode is documented * Solaris autoconf * debian: * libc-client-dev now contains libkrb5-dev dependency (thanks Ryan Murray, Jonas Smedegaard) closes: #181353 * moved to libc-client 2003 (thanks LaMont, J.Guasch) closes: #185168, #182245 -- Tomas Pospisek Wed, 26 Mar 2003 11:03:33 +0100 mailsync (4.5.3-2) unstable; urgency=high * debian changes: * fixed bug in rules script (thanks for report C.T.Steigies) closes: #180745 -- Tomas Pospisek Wed, 12 Feb 2003 16:03:08 +0100 mailsync (4.5.3-1) unstable; urgency=high * new upstream features: * simulate option * size limit (contributed by Michael Krelin) * better error handling * reading in c-client config * #mh examples * bugfixes (Michael & me) * debian changes: * removed libkrb-dev and libssl-dev from depends since that's pulled in by libc-client2002-dev now (thanks Jaldhar, C.Watson, M.Zimmermann, W.Verhelst) * changed order in which libc-client apears in order to pull in openssl0.9.6 (thanks S.Frost for pointing put the problem) closes: #179999 * added mh store to mailsync config example in docu closes: #150393 -- Tomas Pospisek Wed, 12 Feb 2003 09:55:17 +0100 mailsync (4.4.4-2) unstable; urgency=high * fixed build dependency (thanks lamont) closes: #168161 -- Tomas Pospisek Thu, 07 Nov 2002 18:34:21 +0100 mailsync (4.4.4-1) unstable; urgency=high * new upstream * new upsteam features: * gentler failure * more log options * closes: #167826 (thanks to Steve McIntyre's very good bug report!) -- Tomas Pospisek Wed, 06 Nov 2002 12:00:25 +0100 mailsync (4.4.3-1) unstable; urgency=high * new upstream -- Tomas Pospisek Wed, 16 Oct 2002 14:13:35 +0200 mailsync (4.4.2-1) unstable; urgency=high * new upstream * fixes problem with new messages not getting marked as "new" in mutt -- Tomas Pospisek Wed, 16 Oct 2002 14:13:35 +0200 mailsync (4.4.1-1) unstable; urgency=high * new upstream -- Tomas Pospisek Tue, 27 Aug 2002 16:41:56 +0200 mailsync (4.3.1-3) unstable; urgency=high * censored myself to get this package past the ftpmasters -- Tomas Pospisek Mon, 17 Jun 2002 13:30:52 +0200 mailsync (4.3.1-1) unstable; urgency=high * Debian License Zealotry Addendum (Debian Trade Mark): Linking with OpenSSL is fine (confirmed by both upstream authors Tim and myself) * changed VERSION in source -- Tomas Pospisek Thu, 18 Apr 2002 16:36:30 +0200 mailsync (4.3-1) unstable; urgency=high * moving to main from non-us * fixed segfault (thanks for bugreport Alain Tesio!) closes: #141238 * added RH build docu (thanks Aly Dharshi!) * the _only_ code change is the segfault fix -> please include in woody -- Tomas Pospisek Mon, 15 Apr 2002 20:12:20 +0200 mailsync (4.2.2-1) unstable; urgency=high * new upstream * password can be set in store/channel -- Tomas Pospisek Tue, 29 Jan 2002 15:03:43 +0100 mailsync (4.2-1) unstable; urgency=high * fixed typo in README.Debian * added possibility to have comments in config file * added debug flag * added commented example mailsync config file. This should make it easier to configure mailsync: closes: #110367 * fixed some warnings * fixed bug in mode_diff, better output too * more explicit output and cosmetics * another bug fixed which had to do with delimiters being messed up between 2 sites that use different ones (cyrus & pine-style-mbox folders) -- Tomas Pospisek Mon, 21 Jan 2002 01:44:55 +0100 mailsync (4.1-4) unstable; urgency=high * Added pointer to c-client library for configuration. * new libc-client should fix the connection problems. Gee it even works here ;-), closes: #104253, #96264, #98669 * I tested it with g++-3 and it worked. I only had to add an include path. I guess on a correctly set up g++-3 machine the path should be correctly set by default. closes: #104964 -- Tomas Pospisek Tue, 21 Aug 2001 11:34:40 +0200 mailsync (4.1-3) unstable; urgency=low * fixed my own email address :-/ * made rm use -f(orce) to remove maybe unexisting core files -- Tomas Pospisek Fri, 4 May 2001 16:44:38 -0400 mailsync (4.1-2) unstable; urgency=low * fixed dependency: closes: #94075 -- Tomas Pospisek Sun, 15 Apr 2001 21:29:09 -0400 mailsync (4.1-1) unstable; urgency=low * Initial Release. * Sponsored by Jaldhar H. Vyas -- Tomas Pospisek Mon, 2 Apr 2001 18:28:09 -0400 Local variables: mode: debian-changelog End: mailsync-5.2.2/debian/control0000664000000000000000000000151113260672276013065 0ustar Source: mailsync Section: mail Priority: optional Maintainer: Ubuntu Developers XSBC-Original-Maintainer: Tomas Pospisek # see #685897 #Build-Depends: debhelper (>> 3.0.0), libc-client-dev | libc-client-ssl2001-dev, libc-client-dev | libkrb5-dev, automake1.11, dpkg-dev (>= 1.16.0) Build-Depends: debhelper (>> 3.0.0), libc-client2007e-dev (>= 8:2007f~dfsg-1), automake1.11, dpkg-dev (>= 1.16.0), libkrb5-dev Standards-Version: 3.9.3.1 Homepage: http://mailsync.sourceforge.net/ Package: mailsync Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, libc-client2007e (>= 8:2007f~dfsg-1) Description: Synchronize IMAP mailboxes Mailsync is a way of keeping a collection of mailboxes synchronized. The mailboxes may be on the local filesystem or on an IMAP server. mailsync-5.2.2/debian/docs0000664000000000000000000000006507615457413012341 0ustar AUTHORS THANKS README NEWS doc/ABSTRACT doc/examples mailsync-5.2.2/debian/compat0000664000000000000000000000000212021463650012646 0ustar 7 mailsync-5.2.2/debian/copyright0000664000000000000000000000410312021463052013375 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Source: http://sourceforge.net/projects/mailsync/ Comment: This package was originally debianized by Jaldhar H. Vyas on 2001-04-02 and has been maintained by Tomas Pospisek since then. Mailsync's original author is Tim Culver . Files: * Copyright: 2000-2002 Tim Culver 2002-2012 Tomáš Pospíšek Comment: Tim is mailsync's original author. Tomáš has been maintaining it since 2002. License: GPL-2+ with OpenSSL exception This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . In addition, as a special exception, the author of this program gives permission to link the code of its release with the OpenSSL project's "OpenSSL" library (or with modified versions of it that use the same license as the "OpenSSL" library), and distribute the linked executables. You must obey the GNU General Public License in all respects for all of the code used other than "OpenSSL". If you modify this file, you may extend this exception to your version of the file, but you are not obligated to do so. If you do not wish to do so, delete this exception statement from your 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 package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA . On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. mailsync-5.2.2/debian/README.Debian0000664000000000000000000000077107655461324013533 0ustar Configuration and docu ---------------------- Please see the README for a short introduction to the configuration of mailsync and the libc-client documentation for an in depth discussion of the format of a mailbox specification. Building under woody -------------------- If you want to compile mailsync under woody, you preferably rerun ./configure from the top directory and remove the libkrb5-dev dependency from debian/control. Tomas Pospisek , Mon, 05 May 2003 14:36:55 +0200 mailsync-5.2.2/debian/buildpackage0000775000000000000000000000040007642777471014031 0ustar #!/bin/sh # # I build the Debian source packages with this command # make distclean; ./autogen.sh; make dist # mv mailsync-5.1.0.tar.gz ../mailsync_5.1.0.orig.tar.gz dpkg-buildpackage -iCVS\|\\\.cvsignore\|config\\\.log\|stamp-h1 -rfakeroot -ktpo@spin.ch mailsync-5.2.2/debian/dirs0000664000000000000000000000001007536205632012334 0ustar usr/bin mailsync-5.2.2/debian/CVS/0000775000000000000000000000000010071533133012100 5ustar mailsync-5.2.2/debian/CVS/Entries0000664000000000000000000000051310071533133013433 0ustar /copyright/1.1/Fri Sep 6 20:10:02 2002// /dirs/1.1/Fri Sep 6 20:10:02 2002// /docs/1.2/Tue Jan 28 10:44:27 2003// /buildpackage/1.1/Thu Apr 3 09:30:33 2003// /README.Debian/1.2/Mon May 5 13:10:44 2003// /rules/1.5/Tue Jan 6 19:54:42 2004// /changelog/1.18/Sat Jul 3 13:35:30 2004// /control/1.10/Sat Jul 3 13:35:46 2004// D mailsync-5.2.2/debian/CVS/Repository0000664000000000000000000000002007614077077014215 0ustar mailsync/debian mailsync-5.2.2/debian/CVS/Root0000664000000000000000000000005707614077077012773 0ustar :ext:tpo@cvs.sourceforge.net:/cvsroot/mailsync mailsync-5.2.2/README0000664000000000000000000004361510064516065011123 0ustar Mailsync -------- 1. Compiling mailsync 2. Configuring mailsync 2.1 Mailbox specification 2.2 Stores 2.3 Channels 3. How does mailsync work? 4. Running mailsync 4.1 Verbosity 4.2 Various messages from mailsync 5. Limitations 5.1 Problems with concurrent mailbox access 5.2 Problems wit "New" messages (Mutt) 5.3 Empty Message-ID headers 6. More about the algorithm 6.1 Message id algorithms 7. History 8. Further reading 9. Support and homepage 10. Author, disclaimer, etc. 1. Compiling mailsync --------------------- Mailsync has been built on Linux, FreeBSD and on SGI-Irix 6.5. With a little coaxing, though, it should compile on any unix-like system on which c-client compiles. On a non-unix-like system, you may have to come up with alternatives to a few functions like stat() and getenv(). 1. Download, unpack, and compile the c-client from ftp://ftp.cac.washington.edu/imap. Currently I'm using imap-2002.RC8, which allows linking from a C++ program. If you already have an older version of c-client installed, you can still link it to Mailsync. Just get c-client.h from either the latest IMAP distribution or from http://mailsync.sourceforge.net. If you're building mailsync from CVS you'll need an automake version later than 1.6. The following should do the deal: 2. ./autogen.sh After that the build procedure is the same as building from a released source package: 2. ./configure && make && make install 2. Configuring mailsync ----------------------- To use mailsync, you first have to make a configuration file, which by default is `$HOME/.mailsync'. The config file specifies two kinds of things: "stores" and "channels". Lines in the mailsync configuration file starting with a `#' are regarded as comments and are being ignored. A "store" describes a mailbox and which parts of that mailbox you want to have synchronized. A channel is a pair of stores which you want to get synchronized along with a file where mailsync can save synchronization info. Additionaly mailsync initializes and reads in c-client configuration to fine tune it's behaveour. You will very likely not need to bother about that. Before you tinker with it make sure to read the imaprc.txt documentation file from c-client. 2.1 Mailbox specification ------------------------- Mailsync uses the c-client library for manipulation of mailboxes. Please have a look at the c-client library documentation for details of the format of a mailbox specification. Especially have a look at docs/naming.txt and docs/drivers.txt from it's documentation. Briefly, a mailbox specification looks like this: {imap.unc.edu/user=culver} refers to INBOX by default {imap.unc.edu/user=culver}INBOX.foo a mailbox on a Cyrus server {imap.unc.edu/user=culver}foo a mailbox on a UW or Netscape server mbox the file $HOME/mbox Mail/foo a mailbox in $HOME/Mail /tmp/foo some other file 2.2 Stores ---------- A store is a collection of mail folders. Exactly what kind of collection you can use depends on your IMAP server, but one thing that always works is a bunch of folders in a single directory. Unfortunately there is no general, concise way to specify even this kind of store. I have settled on a fairly general but redundant method. Here are examples of store specifiers that work with some servers I have access to. store cyrus { server {imap.unc.edu/user=culver} ref {imap.unc.edu} pat INBOX.sync.% prefix INBOX.sync. passwd secret } store netscape-or-uw { server {imap.cs.unc.edu/user=culver} ref {imap.cs.unc.edu} pat sync/% prefix sync/ } store localdirectory { pat Mail/% prefix Mail/ } To test a store specification, put it in your .mailsync and run mailsync Mailsync will list the mailboxes it thinks are in the store. (In this mode, it will not touch anything or even open the mailboxes.) The names it returns should be stripped of any store-specific information. `Pat' describes the pattern of the boxes you want to synchronize. It matches names exactly except for: * the delimiter character which is used to delimit hierarchies (folders) in your mailbox and which depends on the mailstore you use (unix filesystems use `/', Cyrus, UW and Netscape use `.'). * `%' is a globing operator. It will match all the items in a hierarchy (folder) but it will not descend down the hierarchy (into folders). * `*' acts like `%' but descends into the hierarchy. Be careful with `*' as it can take a lot of time to traverse a deep hierarchy. If you omit the `prefix' specification, you will see full mailbox names. Whatever you specify in `prefix' is stripped off of these names to form what I shall call a "boxname". Two mailboxes on different stores will be synchronized if and only if they have the same "boxname". Finally, the full c-client name is formed by . `passwd' is the password to use when accessing the box. If you omit it and the store will require a password then mailsync will ask you for it. If you want to use MH files, or some other format, you should check out the "docs/" directory in the imap distribution, particularly naming.txt, drivers.txt, and formats.txt. 2.3 Channels ------------ A channel just specifies two stores that are to be synchronized, and one c-client mailbox `msinfo' which is used by mailsync to remember what messages it has seen (it stores there sets of message-ids in between runs). Any c-client mailbox specification is fine. If one or both of the stores is a local file, then you might as well use a local file for `msinfo': channel local-cyrus localdirectory cyrus { msinfo .msinfo } The message-id list is kept as a message in the mailbox, with the channel tag ("local-cyrus") as the subject. So you can use the same `msinfo' file for many channels, as long as the channels have different names. If, on the other hand, both stores are on remote imap servers, you may consider putting `msinfo' on one or on the other server: channel uw-cyrus netscape-or-uw cyrus { msinfo {imap.cs.unc.edu/user=culver}msinfo passwd secret } The `msinfo' mailbox stores a bunch of message-ids in a mail message. The message is formed without a message-id, so you can even put the `msinfo' inside the store if you like, and mailsync will not copy or delete the `msinfo' message. (This may change, though. Better to keep it separate from the stores.) As for stores `passwd' can be omitted and in case it's required mailsync will ask for it. In the channel specification you can optionally set message size limit. Messages with size exceeding the limit (in bytes) will be skipped when synchronizing: channel uw-cyrus netscape-or-uw cyrus { msinfo {imap.cs.unc.edu/user=culver}msinfo passwd secret sizelimit 81920 } The example above will not synchronize messages bigger than 80k. 3. How does mailsync work? -------------------------- First, it loads the state of the store at the last sync. If a "lasttime" mailbox doesn't exist, it is assumed empty. This is the right thing to do. Then it iterates through every mailbox on either store. In each mailbox, it applies the following 3-way diff algorithm. If a message exists on both stores, it is left alone. If a message exists on one store but not the other, and it is a "new" message (it's not recorded in `msinfo'), it is copied to the other store. If a message exists on one store but not the other, and it is an "old" message (it was recorded in `msinfo' at last synchronization), it is assumed that the message was deliberately deleted from one store, and is removed from the other. Finally, it saves the set of remaining messages to the `msinfo' file. 4. Running mailsync ------------------- There are three modes. "Sync" mode: mailsync [options] Synchronizes the two stores specified by the channel, doing a 3-way diff with the message-ids stashed in the channel's msinfo box. "List" mode: mailsync [options] Simply list the boxnames specified by the given store. Don't change or write anything. Useful when writing the .mailsync config file. "Diff" mode: mailsync [options] or mailsync [options] Compare the messages in the store to the information in the channel's msinfo file. This mode does not disturb any mail. This is useful if, for instance, is local, 's msinfo is a local file, but 's other store is remote and you're not dialed up. Mailsync will tell you how many new messages and deletions would be propagated away from through . It also reports duplicate messages (without deleting them). The options change from time to time, and are described if you just type "mailsync". The `-D' option deletes empty mailboxes after synchronizing (and works only in "Sync" mode). Mailsync doesn't differentiate between empty and missing mailboxes. Suppose you delete a mailbox on store A but not on store B. Without `-D', mailsync will delete all messages on B, but it will also resurrect the mailbox on A. With `-D', both mailboxes will be deleted. Your choice. 4.1 Verbosity ------------- Mailsync knowns a series of log_levels. If you encounter problem with mailsync you should enable those to let mailsync tell you more about what's going on. Run: mailsync --help to see what logging options mailsync offers. The different log levels are described in the c-client documentation "internal.txt" under mm_log. 4.2 Various messages from mailsync ---------------------------------- When running mailsync with the "-m" you'll can see what messages mailsync is copying forth and back. Below is an example session with an explanation of the actions that mailsync is taking: $ mailsync -vw -m inbox Synchronizing stores "local-inbox" <-> "remote-inbox"... Authorizing against {[192.168.1.2]/imap} *** INBOX *** deleted > Wed Jun 9 tony kwami FROM MR TONY KWAMI. duplicate Wed Jun 9 Some Hero Re: comment 1 duplicate for deletion in INBOX/remote-inbox Authorizing against {[192.168.1.2]/imap} ign. del < Wed Jun 9 Mail Delivery System Mail failure - no recipient a copied <- Wed Jun 9 Debian Bug Tracking Sy Bug#253290 acknowledged by de 1 copied remote-inbox->local-inbox. 1 deleted on remote-inbox. 69 messages remain in INBOX Expunged 2 mail(s) in store remote-inbox Above you can see that: * a spam from some "tony kwami" was deleted on the remote mailbox, since I have deleted it locally * "Some Hero" sent me the same message twice - probably he sent it to me and to some mailing list in the "Cc:". Since I'm using msg-id algorithm, the duplicate is detected and automatically deleted. * copying a message from a mail daemon was not done, since it is marked as deleted in the remote mailbox and mailsync by default doesn't copy deleted mails * a mail from the Debian Bug Tracking System was copyied to the local mailbox. 5. Limitations -------------- Mailsync assumes that the message-id is a global unique identifier. If it isn't, then it won't work. Here are some situations where the message-id assumption doesn't quite hold. 1. Two different messages in the same mailbox with the same message-id. Mailsync will delete the one that comes later in the mailbox. 2. Two different messages in different mailboxes with the same message-id. Mailsync will never notice; everything works. 3. A message with no message-id. Mailsync prints a warning and leaves the message alone. It will never be copied to any other store, nor deleted for any reason. 4. A message that resides on both stores which is then edited on one store. The edit will not be propagated to the other store. A workaround is to edit the message-id when you edit the message. This will be interpreted by mailsync as a delete and a new message, and everything will work. Another limitation is that when a message is moved from one mailbox to another, mailsync interprets this by a deletion from one box and a new message in the other. This simplifies the algorithm a lot, but wastes some network bandwidth if you move large messages around between syncs. Workaround: try to put large messages in their final resting place before you run mailsync. 5.1 Problems with concurrent mailbox access ------------------------------------------- Mailsync is not coded with concurrent access in mind. It shouldn't break in a horrible way, since it tries to double-check before it deletes something, but it is not really fit for the task either. Efforts to make it concurrency capable are certainly appreciated. 5.2 Problems wit "New" messages (Mutt) -------------------------------------- The mail header line "Status: O" is interpreted differently depending on which mail client you're using. Pine and it's mailbox manipulation library c-client assume, that a new message is new as long as you have not read it. Mutt and possibly some other clients interpet only a mail with "Status: " as unseen. If you want mutt to see all "new" messages as "new", then you must use the "-n" (do not delete messages) option of mailsync. This will have the effect of not deleting any messages, not even duplicates on either store you're synchronzing. Explanation: c-client's author says the following: "The definition of "Recent" [that is "Status: " - tpo] is that the message has arrived since the last time the mailbox was opened readwrite." Strangely enough appending new messages to a mailbox can be done without opening a mailbox read-write. However any other operation that change anything in a mailbox such as tagging a message as deleted or expunging old messages needs to be done in read-write mode. As soon as that happens *all* messages will be tagged with "Status: O" and hence loose their "Recent" status. That means that if we want to be able to maintain that status, we are not allowed to tag messages as deleted, to expunge messages or similar. 5.3 Empty Message-ID headers ---------------------------- Some mail software produces messages with no or empty Message-ID headers in particular for draft or unsent messages and in particular Microsoft Outlook. That means that mailsync will not be able to uniquely identify such a message using the Message-ID header. If you need to synchronize such messages you should use the md5 message id algorithm. You can achieve this by passing "-t md5" to mailsync. Mailsync deletes duplicate messages by default - assuming that they're the same. However if it finds multiple messages with empty Message-IDs it will display the message: "Not deleting duplicate message with empty Message-ID - see README" and leave that message alone, supposing that this is just another email produced by weird software. 6. More about the algorithm --------------------------- The sync operation is symmetric---it doesn't matter which store you specify first. This is fundamentally different from the IMAP disconnected-mode mail reading model, where there is a primary store, and a client is responsible for synchronizing its local copy with the primary store. There is no limitation to the number of stores you sync with each other. Think of the stores as nodes of a graph, and put links between the stores you want to sync between. If there are no cycles, then everything will work. If there are cycles, some weird things can happen that I haven't totally worked out yet: I think that a message could be passed back as a new message to a store which deleted it, for example. Since both stores can be local, and in different formats, you can also use mailsync as a method for keeping all of your messages accessible by two MUAs, even if neither is IMAP-aware. So mailsync could help you transition between MUAs. 6.1 Message id algorithms ------------------------- By default mailsync uses the Message-ID header to uniquely identify email messages. In case this is not possible (see 5.2) mailsync can use a md5 hash of a number of mailheaders (defined in msgid.c) to identify a message. 7. History ---------- Mailsync-1 was a bunch of shell scripts. Mail was parsed using awk and transferred using ftp. Mailsync-2 was a Java program that suffered from the Second System Effect. It was never completed. Mailsync-3 was written in C over the c-client library. I used it for over a year without any surprises. Mailsync-4 is a C++ program based on mailsync-3. I was able to remove a lot of cruft and make things a little more sensible, safe, and efficient. Mailsync-4.2 and on has seen extended documentation and some reengineering efforts to make it easier to read, patch and understand. 8. Further reading ------------------ RFC 2076 - Common Internet Message Headers RFC 1176 - IMAP v2 RFC 1203 - IMAP v3 RFC 2060 - Internet Message Access Protocol - Version 4rev1 - being updated: http://www.imc.org/draft-crispin-imapv RFC 2342 - NAMESPACES (discovery of where my "*&/%* mailboxes are) http://www.iana.org/assignments/imap4-capabilities http://www.ics.uci.edu/~mh/book/mh/tocs/jump.htm 9. Support, development, new versions and homepage -------------------------------------------------- Mailsync's homepage is at http://sourceforge.net/projects/mailsync. There's also a CVS repository there in which mailsync development happens. Announcements about new versions are usually posted on http://freshmeat.net. If you need help or have a patch or suggestion to contribute then subscribe to the mailsync mailing list and post it there. Instructions on how to do so can be found on mailsyncs homepage. Tomas Pospisek will also provide commercial support if needed (see below). 10. Author, disclaimer, etc. --------------------------- Mailsync's author is Tim Culver . Since version 4.2 Tomas Pospisek maintains the code. Mailsync is copylefted under the GNU General Public License: http://www.gnu.org/copyleft/gpl.html Linking with openssl is explicitly permitted! mailsync-5.2.2/aclocal.m40000664000000000000000000010476611704530657012115 0ustar # generated automatically by aclocal 1.11.1 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],, [m4_warning([this file was generated for autoconf 2.65. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically `autoreconf'.])]) # Copyright (C) 2002, 2003, 2005, 2006, 2007, 2008 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. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.11' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.11.1], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.11.1])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001, 2003, 2005 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. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003, 2004, 2005, 2006, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 9 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 10 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], UPC, [depcc="$UPC" am_compiler_list=], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with # Solaris 8's {/usr,}/bin/sh. touch sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvisualcpp | msvcmsys) # This compiler won't grok `-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. #serial 5 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Autoconf 2.62 quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running `make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n 's/^U = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 8 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, # 2005, 2006, 2008, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 16 # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.62])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if(m4_ifdef([AC_PACKAGE_NAME], 1)m4_ifdef([AC_PACKAGE_VERSION], 1), 11,, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES(OBJC)], [define([AC_PROG_OBJC], defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl ]) _AM_IF_OPTION([silent-rules], [AC_REQUIRE([AM_SILENT_RULES])])dnl dnl The `parallel-tests' driver may need to know about EXEEXT, so add the dnl `am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This macro dnl is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into `_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001, 2003, 2005, 2008 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. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST(install_sh)]) # Copyright (C) 2003, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2009 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from `make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 6 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # Copyright (C) 2003, 2004, 2005, 2006 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. # AM_PROG_MKDIR_P # --------------- # Check for `mkdir -p'. AC_DEFUN([AM_PROG_MKDIR_P], [AC_PREREQ([2.60])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl dnl Automake 1.8 to 1.9.6 used to define mkdir_p. We now use MKDIR_P, dnl while keeping a definition of mkdir_p for backward compatibility. dnl @MKDIR_P@ is magic: AC_OUTPUT adjusts its value for each Makefile. dnl However we cannot define mkdir_p as $(MKDIR_P) for the sake of dnl Makefile.ins that do not define MKDIR_P, so we do our own dnl adjustment using top_builddir (which is defined more often than dnl MKDIR_P). AC_SUBST([mkdir_p], ["$MKDIR_P"])dnl case $mkdir_p in [[\\/$]]* | ?:[[\\/]]*) ;; */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; esac ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003, 2005, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 4 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008 # Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 5 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);; esac # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # Copyright (C) 2001, 2003, 2005 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. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006, 2008 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004, 2005 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # serial 2 # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of `v7', `ustar', or `pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. AM_MISSING_PROG([AMTAR], [tar]) m4_if([$1], [v7], [am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} xf -'], [m4_case([$1], [ustar],, [pax],, [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' _am_tools=${am_cv_prog_tar_$1-$_am_tools} # Do not fold the above two line into one, because Tru64 sh and # Solaris sh will not grok spaces in the rhs of `-'. for _am_tool in $_am_tools do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([acinclude/ac_inet_funcs.m4]) m4_include([acinclude/ac_so_preference.m4]) m4_include([acinclude/ac_with_cclient.m4]) m4_include([acinclude/ac_with_krb5.m4]) m4_include([acinclude/ac_with_md5.m4]) m4_include([acinclude/ac_with_openssl.m4]) m4_include([acinclude/ac_with_pam.m4]) mailsync-5.2.2/acinclude/0000775000000000000000000000000011657504556012174 5ustar mailsync-5.2.2/acinclude/ac_with_krb5.m40000664000000000000000000001043607614100441014762 0ustar dnl AC_WITH_KRB5([ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]) dnl Output: dnl AC_SUBST: @KRB5_LDFLAGS@ @KRB5_CFLAGS@ @KRB5_CONFIG@ dnl AM_CONDITIONAL: HAVE_KRB5 AC_DEFUN(AC_WITH_KRB5,[ KRB5LOCATIONS="/usr,/usr/local,/usr/kerberos,/usr/local/kerberos,/usr/krb5,/usr/local/krb5,/opt/kerberos,/opt/krb5" HAVE_KRB5="no" KRB5_CONFIG="" KRB5_CFLAGS="" KRB5_LDFLAGS="" AC_ARG_WITH(krb5, AC_HELP_STRING([--with-krb5=prefix],[enable use of kerberos]), [ if test "$withval" = "no" ; then KRB5LOCATIONS="" else test "$withval" = "yes" || KRB5LOCATIONS="$withval,${KRB5LOCATIONS}" fi ] ) if test -z "${KRB5LOCATIONS}" ; then ifelse([$2], , :, [$2]) else AC_MSG_CHECKING([for krb5-config]) for k in `eval "echo {${KRB5LOCATIONS}}{/bin,}/krb5-config"` ; do if test -x "${k}" ; then KRB5_CONFIG="${k}" break fi done if test -z "${KRB5_CONFIG}" ; then AC_MSG_RESULT([not found]) ifelse([$2], , :, [$2]) else AC_MSG_RESULT([found ${KRB5_CONFIG}]) HAVE_KRB5=yes KRB5_CFLAGS="`${KRB5_CONFIG} --cflags`" KRB5_LDFLAGS="`${KRB5_CONFIG} --libs`" AC_SUBST(KRB5_CONFIG) AC_SUBST(KRB5_CFLAGS) AC_SUBST(KRB5_LDFLAGS) ifelse([$1], , :, [$1]) fi fi AM_CONDITIONAL(HAVE_KRB5,[test "${HAVE_KRB5}" = "yes"]) ] ) dnl AC_KRB5_GSSAPI([ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]]) dnl Output: dnl AC_SUBST: @KRB5_GSSAPI_LIBS@ @KRB5_GSSAPI_CFLAGS@ dnl AM_CONDITIONAL: HAVE_KRB5_GSSAPI AC_DEFUN(AC_KRB5_GSSAPI,[ HAVE_KRB5_GSSAPI="no" if test "${HAVE_KRB5}" = "yes" -a "${KRB5_CONFIG}" != "" ; then HAVE_KRB5_GSSAPI="yes" KRB5_GSSAPI_CFLAGS="`${KRB5_CONFIG} --cflags gssapi`" KRB5_GSSAPI_LIBS="`${KRB5_CONFIG} --libs gssapi`" AC_SUBST(KRB5_GSSAPI_CFLAGS) AC_SUBST(KRB5_GSSAPI_LIBS) ifelse([$1], , :, [$1]) else ifelse([$2], , :, [$2]) fi AM_CONDITIONAL(HAVE_KRB5_GSSAPI,[test "${HAVE_KRB5_GSSAPI}" = "yes" ]) ]) dnl AC_KRB5_KRB4([ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]]) dnl Output: dnl AC_SUBST: @KRB5_KRB4_LIBS@ @KRB5_KRB4_CFLAGS@ dnl AM_CONDITIONAL: HAVE_KRB5_KRB4 AC_DEFUN(AC_KRB5_KRB4,[ HAVE_KRB5_KRB4="no" if test "${HAVE_KRB5}" = "yes" -a "${KRB5_CONFIG}" != "" ; then HAVE_KRB5_KRB4="yes" KRB5_KRB4_CFLAGS="`${KRB5_CONFIG} --cflags krb4`" KRB5_KRB4_LIBS="`${KRB5_CONFIG} --libs krb4`" AC_SUBST(KRB5_KRB4_CFLAGS) AC_SUBST(KRB5_KRB4_LIBS) ifelse([$1], , :, [$1]) else ifelse([$2], , :, [$2]) fi AM_CONDITIONAL(HAVE_KRB5_KRB4,[test "${HAVE_KRB5_KRB4}" = "yes" ]) ]) dnl AC_KRB5_KADM_CLIENT([ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]]) dnl Output: dnl AC_SUBST: @KRB5_KADM_CLIENT_LIBS@ @KRB5_KADM_CLIENT_CFLAGS@ dnl AM_CONDITIONAL: HAVE_KRB5_KADM_CLIENT AC_DEFUN(AC_KRB5_KADM_CLIENT,[ HAVE_KRB5_KADM_CLIENT="no" if test "${HAVE_KRB5}" = "yes" -a "${KRB5_CONFIG}" != "" ; then HAVE_KRB5_KADM_CLIENT="yes" KRB5_KADM_CLIENT_CFLAGS="`${KRB5_CONFIG} --cflags kadm-client`" KRB5_KADM_CLIENT_LIBS="`${KRB5_CONFIG} --libs kadm-client`" AC_SUBST(KRB5_KADM_CLIENT_CFLAGS) AC_SUBST(KRB5_KADM_CLIENT_LIBS) ifelse([$1], , :, [$1]) else ifelse([$2], , :, [$2]) fi AM_CONDITIONAL(HAVE_KRB5_KADM_CLIENT,[test "${HAVE_KRB5_KADM_CLIENT}" = "yes" ]) ]) dnl AC_KRB5_KADM_SERVER([ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]]) dnl Output: dnl AC_SUBST: @KRB5_KADM_SERVER_LIBS@ @KRB5_KADM_SERVER_CFLAGS@ dnl AM_CONDITIONAL: HAVE_KRB5_KADM_SERVER AC_DEFUN(AC_KRB5_KADM_SERVER,[ HAVE_KRB5_KADM_SERVER="no" if test "${HAVE_KRB5}" = "yes" -a "${KRB5_CONFIG}" != "" ; then HAVE_KRB5_KADM_SERVER="yes" KRB5_KADM_SERVER_CFLAGS="`${KRB5_CONFIG} --cflags kadm-server`" KRB5_KADM_SERVER_LIBS="`${KRB5_CONFIG} --libs kadm-server`" AC_SUBST(KRB5_KADM_SERVER_CFLAGS) AC_SUBST(KRB5_KADM_SERVER_LIBS) ifelse([$1], , :, [$1]) else ifelse([$2], , :, [$2]) fi AM_CONDITIONAL(HAVE_KRB5_KADM_SERVER,[test "${HAVE_KRB5_KADM_SERVER}" = "yes" ]) ]) dnl AC_KRB5_KDB([ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]]) dnl Output: dnl AC_SUBST: @KRB5_KDB_LIBS@ @KRB5_KDB_CFLAGS@ dnl AM_CONDITIONAL: HAVE_KRB5_KDB AC_DEFUN(AC_KRB5_KDB,[ HAVE_KRB5_KDB="no" if test "${HAVE_KRB5}" = "yes" -a "${KRB5_CONFIG}" != "" ; then HAVE_KRB5_KDB="yes" KRB5_KDB_CFLAGS="`${KRB5_CONFIG} --cflags kdb`" KRB5_KDB_LIBS="`${KRB5_CONFIG} --libs kdb`" AC_SUBST(KRB5_KDB_CFLAGS) AC_SUBST(KRB5_KDB_LIBS) ifelse([$1], , :, [$1]) else ifelse([$2], , :, [$2]) fi AM_CONDITIONAL(HAVE_KRB5_KDB,[test "${HAVE_KRB5_KDB}" = "yes" ]) ]) mailsync-5.2.2/acinclude/ac_with_openssl.m40000664000000000000000000000376311657504556015630 0ustar dnl AC_WITH_OPENSSL([ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]]) dnl Output: dnl AC_SUBST: @OPENSSL_INCLUDES@ @OPENSSL_LDFLAGS@ @OPENSSL_LIBS@ dnl AM_CONDITIONAL: HAVE_OPENSSL AC_DEFUN(AC_WITH_OPENSSL,[ OPENSSLLOCATIONS="/usr,/usr/local,/usr/local/openssl,/opt/openssl,/usr/local/ssl,/usr/lib/ssl,/usr/ssl" HAVE_OPENSSL="no" OPENSSL_LDFLAGS="" OPENSSL_LIBS="" OPENSSL_INCLUDES="" AC_ARG_WITH(openssl, AC_HELP_STRING([--with-openssl=prefix],[enable use of OpenSSL]), [ if test "$withval" = "no" ; then OPENSSLLOCATIONS="" else test "$withval" = "yes" || OPENSSLLOCATIONS="$withval,${OPENSSLLOCATIONS}" fi ] ) if test -z "${OPENSSLLOCATIONS}" ; then ifelse([$2], , :, [$2]) else AC_MSG_CHECKING([for libssl]) for p in `eval "echo {${OPENSSLLOCATIONS}}{/lib,/lib64,${LIBDIRS}}"` ; do if test -r "${p}/libssl.a" -o -r "${p}/libssl.so" ; then OPENSSL_LDFLAGS="-L${p}" AC_MSG_RESULT([found in ${p}]) break fi done if test -z "${OPENSSL_LDFLAGS}" ; then AC_MSG_RESULT([not found]) ifelse([$2], , :, [$2]) else xLDFLAGS="${LDFLAGS}" LDFLAGS="${LDFLAGS} ${OPENSSL_LDFLAGS}" AC_CHECK_LIB(ssl,main,[ OPENSSL_LIBS="${OPENSSL_LIBS} -lssl" ],[ OPENSSL_LIBS="" ]) AC_CHECK_LIB(crypto,main,[ OPENSSL_LIBS="${OPENSSL_LIBS} -lcrypto" ],[ OPENSSL_LIBS="" ]) LDFLAGS="${xLDFLAGS}" if test -z "${OPENSSL_LIBS}" ; then ifelse([$2], , :, [$2]) else AC_MSG_CHECKING([for openssl/ssl.h]) for p in `eval "echo {${OPENSSLLOCATIONS}}{/include,}"` ; do if test -r "${p}/openssl/ssl.h" ; then OPENSSL_INCLUDES="-I${p}" AC_MSG_RESULT([found in ${p}]) break fi done if test -z "${OPENSSL_INCLUDES}" ; then AC_MSG_RESULT([not found]) ifelse([$2], , :, [$2]) else HAVE_OPENSSL=yes AC_SUBST(OPENSSL_INCLUDES) AC_SUBST(OPENSSL_LDFLAGS) AC_SUBST(OPENSSL_LIBS) ifelse([$1], , :, [$1]) fi fi fi fi AM_CONDITIONAL(HAVE_OPENSSL,[test "${HAVE_OPENSSL}" = "yes"]) ]) mailsync-5.2.2/acinclude/ac_with_cclient.m40000664000000000000000000001552610061643660015552 0ustar dnl AC_WITH_CCLIENT([ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]]) dnl Output: dnl AC_SUBST: @CCLIENT_INCLUDES@ @CCLIENT_LIBS@ @CCLIENT_CXXFLAGS@ dnl AM_CONDITIONAL: HAVE_CCLIENT AC_DEFUN(AC_WITH_CCLIENT,[ CCLIENTLOCATIONS="/usr,/usr/local" HAVE_CCLIENT="no" CCLIENT_LIBS="" CCLIENT_INCLUDES="" CCLIENT_CXXFLAGS="" CCLIENT_LINKAGE_C="" CCLIENT_LINKAGE_H="" AC_ARG_WITH(c-client, AC_HELP_STRING([--with-c-client=path],[enable use of c-client]), [ if test "$withval" = "no" ; then CCLIENTLOCATIONS="" else test "$withval" = "yes" || CCLIENTLOCATIONS="$withval,${CCLIENTLOCATIONS}" fi ] ) if test -z "${CCLIENTLOCATIONS}" ; then ifelse([$2], , :, [$2]) else dnl dnl Looking for headers c-client headers dnl AC_MSG_CHECKING([for c-client.h]) for p in `eval "echo {${CCLIENTLOCATIONS}}{,/c-client,/lib/c-client,/include/c-client,/include,/include/imap}"` ; do if test -r "${p}/c-client.h" -a -r "${p}/linkage.h" -a -r "${p}/linkage.c" ; then CCLIENT_INCLUDES="-I${p}" CCLIENT_LINKAGE_H="${p}/linkage.h" CCLIENT_LINKAGE_C="${p}/linkage.c" AC_MSG_RESULT([found in ${p}]) break fi done if test -z "${CCLIENT_INCLUDES}" ; then AC_MSG_RESULT([not found]) ifelse([$2], , :, [$2]) else SOP=".so,.a" test "${PREFER_SO}" = "no" && SOP=".a,.so" dnl dnl Looking for c-client libraries dnl AC_MSG_CHECKING([for c-client library]) for l in `eval "echo {${CCLIENTLOCATIONS}}{,/c-client,/lib/c-client,/lib,/lib64}/{libc-client,libc-client4,c-client}{${SOP}}"` ; do if test -r "$l" ; then AC_MSG_RESULT([found ${l}]) CCLIENT_LIBS="$l" break fi done if test -z "${CCLIENT_LIBS}" ; then AC_MSG_RESULT([not found]) ifelse([$2], , :, [$2]) else dnl dnl Checking whether c-client was built with kerberos gssapi support dnl AC_MSG_CHECKING([whether c-client built with kerberos gssapi support]) AC_EGREP_HEADER(auth_gss,${CCLIENT_LINKAGE_H}, [ need_krb=yes AC_MSG_RESULT([yes]) ],[ need_krb=no AC_MSG_RESULT([no]) ] ) dnl dnl Checking if kerberos is required and available for linking against c-client dnl AC_MSG_CHECKING([if kerberos is required and available for linking against c-client]) if test "${need_krb}" = "yes" -a "${HAVE_KRB5_GSSAPI}" != "yes"; then AC_MSG_RESULT([no]) ifelse([$2], , :, [$2]) else if test "${need_krb}" = "yes" ; then AC_MSG_RESULT([yes]) CCLIENT_LIBS="${CCLIENT_LIBS} ${KRB5_GSSAPI_LIBS}" else AC_MSG_RESULT([not required]) fi dnl dnl Checking whether c-client was built with ssl support dnl AC_MSG_CHECKING([whether c-client requires ssl linkage]) AC_EGREP_HEADER(ssl_,${CCLIENT_LINKAGE_C}, [ need_ssl=yes ],[ need_ssl=no ] ) AC_MSG_RESULT([${need_ssl}]) if test "${need_ssl}" = "yes" -a "${HAVE_OPENSSL}" != "yes" ; then ifelse([$2], , :, [$2]) else CCLIENT_LIBS="${CCLIENT_LIBS} ${OPENSSL_LDFLAGS} ${OPENSSL_LIBS}" AC_MSG_CHECKING([if simple c-client program compiles without pam support]) AC_LANG_PUSH(C) xCPPFLAGS="${CPPFLAGS}" xLIBS="${LIBS}" CPPFLAGS="${CPPFLAGS} ${CCLIENT_INCLUDES}" LIBS="${LIBS} ${CCLIENT_LIBS}" AC_LINK_IFELSE( AC_LANG_SOURCE([ #include #include "c-client.h" #include "linkage.h" main(int argc,char **argv) { #include "linkage.c" } void mm_log(char*a,long b){} void mm_dlog(char*a){} void mm_flags(MAILSTREAM*a,unsigned long b){} void mm_fatal(char*a){} void mm_critical(MAILSTREAM*a){} void mm_nocritical(MAILSTREAM*a){} void mm_notify(MAILSTREAM*a,char*b,long c){} void mm_login(NETMBX*a,char*b,char*c,long d){} long mm_diskerror(MAILSTREAM*a,long b,long c){} void mm_status(MAILSTREAM*a,char*b,MAILSTATUS*c){} void mm_lsub(MAILSTREAM*a,int b,char*c,long d){} void mm_list(MAILSTREAM*a,int b,char*c,long d){} void mm_exists(MAILSTREAM*a,unsigned long b){} void mm_searched(MAILSTREAM*a,unsigned long b){} void mm_expunged(MAILSTREAM*a,unsigned long b){} ]),[ AC_MSG_RESULT([yes]) will_do_without_pam="yes" ],[ AC_MSG_RESULT([no]) will_do_without_pam="no" ] ) if test "${will_do_without_pam}" = "no" ; then AC_MSG_CHECKING([if we've seen pam somewhere around]) if test "${HAVE_PAM}" != "yes" ; then AC_MSG_RESULT([no]) else AC_MSG_RESULT([yes]) AC_MSG_CHECKING([if adding pam helps]) CCLIENT_LIBS="${CCLIENT_LIBS} ${PAM_LDFLAGS} -lpam" LIBS="${xLIBS} ${CCLIENT_LIBS}" AC_LINK_IFELSE( AC_LANG_SOURCE([ #include #include "c-client.h" #include "linkage.h" main(int argc,char **argv) { #include "linkage.c" } void mm_log(char*a,long b){} void mm_dlog(char*a){} void mm_flags(MAILSTREAM*a,unsigned long b){} void mm_fatal(char*a){} void mm_critical(MAILSTREAM*a){} void mm_nocritical(MAILSTREAM*a){} void mm_notify(MAILSTREAM*a,char*b,long c){} void mm_login(NETMBX*a,char*b,char*c,long d){} long mm_diskerror(MAILSTREAM*a,long b,long c){} void mm_status(MAILSTREAM*a,char*b,MAILSTATUS*c){} void mm_lsub(MAILSTREAM*a,int b,char*c,long d){} void mm_list(MAILSTREAM*a,int b,char*c,long d){} void mm_exists(MAILSTREAM*a,unsigned long b){} void mm_searched(MAILSTREAM*a,unsigned long b){} void mm_expunged(MAILSTREAM*a,unsigned long b){} ]),[ AC_MSG_RESULT([yes]) will_do_with_pam="yes" ],[ AC_MSG_RESULT([no]) will_do_with_pam="no" ] ) fi fi CPPFLAGS="${xCPPFLAGS}" LIBS="${xLIBS}" AC_LANG_POP(C) if test "${will_do_without_pam}" = "no" -a "${will_do_with_pam}" = "no" ; then ifelse([$2], , :, [$2]) else AC_LANG_PUSH(C++) xCPPFLAGS="${CPPFLAGS}" xCXXFLAGS="${CXXFLAGS}" CPPFLAGS="${CPPFLAGS} ${CCLIENT_INCLUDES}" opernames_resolved="no" AC_MSG_CHECKING([if c-client works without -fno-operator-names in c++]) AC_COMPILE_IFELSE( AC_LANG_SOURCE([ #include #include "c-client.h" ]),[ AC_MSG_RESULT([yes]) opernames_resolved="yes" ],[ AC_MSG_RESULT([no]) AC_MSG_CHECKING([if adding -fno-operator-names helps]) CXXFLAGS="${CXXFLAGS} -fno-operator-names" AC_COMPILE_IFELSE( AC_LANG_SOURCE([ #include #include "c-client.h" ]),[ AC_MSG_RESULT([yes]) CCLIENT_CXXFLAGS=-fno-operator-names opernames_resolved="yes" ],[ AC_MSG_RESULT([no]) ] ) ] ) CXXFLAGS="${xCXXFLAGS}" CPPFLAGS="${xCPPFLAGS}" AC_LANG_POP(C++) if test "${opernames_resolved}" = "no" ; then ifelse([$2], , :, [$2]) else HAVE_CCLIENT=yes AC_SUBST(CCLIENT_CXXFLAGS) AC_SUBST(CCLIENT_INCLUDES) AC_SUBST(CCLIENT_LIBS) ifelse([$1], , :, [$1]) fi fi fi fi fi fi fi AM_CONDITIONAL(HAVE_CCLIENT,[test "${HAVE_CCLIENT}" = "yes"]) ]) mailsync-5.2.2/acinclude/ac_inet_funcs.m40000664000000000000000000000107107636625114015231 0ustar dnl AC_INET_FUNCS([ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]]) dnl Output: dnl -l* added to LIBS AC_DEFUN(AC_INET_FUNCS,[ no_connect="no" no_gethostbyname="no" AC_CHECK_FUNC(connect,,[ AC_CHECK_LIB(socket,connect,,[ AC_CHECK_LIB(inet,connect,,[ no_connect="yes" ]) ]) ]) AC_CHECK_FUNC(gethostbyname,,[ AC_CHECK_LIB(nsl_s,gethostbyname,,[ AC_CHECK_LIB(nsl,gethostbyname,,[ no_gethostbyname="yes" ]) ]) ]) if test "$no_gethostbyname" = "yes" -o "$no_connect" = "yes" ; then ifelse([$2], , :, [$2]) else ifelse([$1], , :, [$1]) fi ]) mailsync-5.2.2/acinclude/ac_with_md5.m40000664000000000000000000000342107642771316014620 0ustar dnl AC_WITH_MD5([ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]) dnl Output: dnl AC_DEFINE: HAVE_MD5 AC_DEFUN(AC_WITH_MD5,[ AC_MSG_CHECKING([if c-client includes md5 support]) AC_LANG_PUSH(C) xCFLAGS="${CFLAGS}" xLIBS="${LIBS}" CFLAGS="${CFLAGS} ${CCLIENT_INCLUDES}" LIBS="${LIBS} ${CCLIENT_LIBS}" AC_LINK_IFELSE( AC_LANG_SOURCE([ #include #include "c-client.h" #include "linkage.h" #define MD5BLKLEN 64 /* MD5 block length */ typedef struct { unsigned long chigh; /* high 32bits of byte count */ unsigned long clow; /* low 32bits of byte count */ unsigned long state[4]; /* state (ABCD) */ unsigned char buf[MD5BLKLEN]; /* input buffer */ unsigned char *ptr; /* buffer position */ } MD5CONTEXT; void md5_init (MD5CONTEXT *ctx); main(int argc,char **argv) { #include "linkage.c" md5_init(NULL); } void mm_log(char*a,long b){} void mm_dlog(char*a){} void mm_flags(MAILSTREAM*a,unsigned long b){} void mm_fatal(char*a){} void mm_critical(MAILSTREAM*a){} void mm_nocritical(MAILSTREAM*a){} void mm_notify(MAILSTREAM*a,char*b,long c){} void mm_login(NETMBX*a,char*b,char*c,long d){} long mm_diskerror(MAILSTREAM*a,long b,long c){} void mm_status(MAILSTREAM*a,char*b,MAILSTATUS*c){} void mm_lsub(MAILSTREAM*a,int b,char*c,long d){} void mm_list(MAILSTREAM*a,int b,char*c,long d){} void mm_exists(MAILSTREAM*a,unsigned long b){} void mm_searched(MAILSTREAM*a,unsigned long b){} void mm_expunged(MAILSTREAM*a,unsigned long b){} ]),[ AC_MSG_RESULT([yes]) AC_DEFINE([HAVE_MD5], [], [Does c-client include md5 support?]) ],[ AC_MSG_RESULT([no]) ] ) CFLAGS="${xCFLAGS}" LIBS="${xLIBS}" ]) mailsync-5.2.2/acinclude/ac_with_pam.m40000664000000000000000000000366507651214376014720 0ustar dnl AC_WITH_PAM([ACTION-IF-FOUND[,ACTION-IF-NOT-FOUND]]) dnl Output: dnl AC_SUBST: @PAM_LDFLAGS@ @PAM_INCLUDES@ dnl AM_CONDITIONAL: HAVE_PAM AC_DEFUN(AC_WITH_PAM,[ PAMLOCATIONS="/lib,/usr,/usr/local,/opt/pam" HAVE_PAM="no" PAM_LDFLAGS="" PAM_INCLUDES="" AC_ARG_WITH(pam, AC_HELP_STRING([--with-pam],[enable use of PAM]), [ if test "$withval" = "no" ; then PAMLOCATIONS="" else test "$withval" = "yes" || PAMLOCATIONS="$withval,${PAMLOCATIONS}" fi ] ) if test -z "${PAMLOCATIONS}" ; then ifelse([$2], , :, [$2]) else AC_MSG_CHECKING([for pam library]) for p in `eval "echo {${PAMLOCATIONS}}{/lib,/lib64}"` ; do if test -r "${p}/libpam.a" -o -r "${p}/libpam.so" ; then PAM_LDFLAGS="-L${p}" AC_MSG_RESULT([found in ${p}]) break fi done if test -z "${PAM_LDFLAGS}" ; then AC_MSG_RESULT([not found]) ifelse([$2], , :, [$2]) else AC_MSG_CHECKING([for pam headers]) for p in `eval "echo {${PAMLOCATIONS}}{/include,/include/pam,,/pam}"` ; do if test -r "${p}/security/pam_appl.h" ; then PAM_INCLUDES="-I${p}" AC_MSG_RESULT([found in ${p}]) break fi done if test -z "${PAM_INCLUDES}" ; then AC_MSG_RESULT([not found]) ifelse([$2], , :, [$2]) else AC_LANG_PUSH(C) AC_MSG_CHECKING([if pam test program compiles]) xLIBS="${LIBS}" xCPPFLAGS="${CPPFLAGS}" CPPFLAGS="${CPPFLAGS} ${PAM_INCLUDES}" LIBS="${LIBS} ${PAM_LDFLAGS} -lpam" AC_LINK_IFELSE( AC_LANG_SOURCE([ #include main(int argc,char **argv) { } ]),[ AC_MSG_RESULT([yes]) HAVE_PAM="yes" ],[ AC_MSG_RESULT([no]) ] ) CPPFLAGS="${xCPPFLAGS}" LIBS="${xLIBS}" AC_LANG_POP(C) if test "${HAVE_PAM}" = "yes" ; then AC_SUBST(PAM_INCLUDES) AC_SUBST(PAM_LDFLAGS) ifelse([$1], , :, [$1]) fi fi fi fi AM_CONDITIONAL(HAVE_PAM,[test "${HAVE_PAM}" = "yes"]) ]) mailsync-5.2.2/acinclude/CVS/0000775000000000000000000000000010061673561012616 5ustar mailsync-5.2.2/acinclude/CVS/Entries0000664000000000000000000000053410061673561014154 0ustar /ac_so_preference.m4/1.2/Thu Jan 23 23:52:26 2003// /ac_with_krb5.m4/1.2/Thu Jan 23 23:56:17 2003// /ac_inet_funcs.m4/1.1/Fri Mar 21 15:05:48 2003// /ac_with_md5.m4/1.3/Thu Apr 3 08:37:34 2003// /ac_with_openssl.m4/1.2/Tue Apr 22 10:26:34 2003// /ac_with_pam.m4/1.2/Tue Apr 22 10:27:10 2003// /ac_with_cclient.m4/1.10/Wed Jun 9 17:24:00 2004// D mailsync-5.2.2/acinclude/CVS/Repository0000664000000000000000000000002307614073620014713 0ustar mailsync/acinclude mailsync-5.2.2/acinclude/CVS/Root0000664000000000000000000000005707614073620013466 0ustar :ext:tpo@cvs.sourceforge.net:/cvsroot/mailsync mailsync-5.2.2/acinclude/ac_so_preference.m40000664000000000000000000000114007614100072015673 0ustar dnl AC_SO_PREFERENCE([DEFAULT[,ACTION-IF-SO-PREFERRED[,ACTION-IF-STATIC-PREFERRED]]]) dnl Output: dnl Environment: PREFER_SO=yes dnl AM_CONDITIONAL: PREFER_SO AC_DEFUN(AC_SO_PREFERENCE,[ PREFER_SO="$1" AC_ARG_WITH(so-preference, AC_HELP_STRING([--with-so-preference],[prefer dynamic linking over static (default $1)]), [ PREFER_SO="$withval" ] ) if test "${PREFER_SO}" = "shared" -o "${PREFER_SO}" = "so" -o "${PREFER_SO}" = "yes" ; then PREFER_SO="yes" ifelse([$2], , :, [$2]) else PREFER_SO="no" ifelse([$3], , :, [$3]) fi AM_CONDITIONAL(PREFER_SO,[test "${PREFER_SO}" = "yes"]) ]) mailsync-5.2.2/src/0000775000000000000000000000000012021470640011012 5ustar mailsync-5.2.2/src/msgstring.c0000664000000000000000000000413710063306606013204 0ustar /* Message string driver for message stringstructs */ /* by Mark Crispin */ /* changes by Tomas Pospisek */ #include // required by c-client.h #include "c-client-header.h" #include "msgstring.h" STRINGDRIVER msg_string = { msg_string_init, /* initialize string structure */ msg_string_next, /* get next byte in string structure */ msg_string_setpos /* set position in string structure */ }; void msg_string_init (STRING *s,void *data,unsigned long size) { MSGDATA *md = (MSGDATA *) data; s->data = data; /* note stream/msgno and header length */ mail_fetchheader_full (md->stream,md->msgno,NIL,&s->data1,FT_PREFETCHTEXT); #if 0 s->size = size; /* message size */ #else /* This kludge is necessary because of broken IMAP servers (sigh!) */ mail_fetchtext_full (md->stream,md->msgno,&s->size,FT_PEEK); /* FT_PEEK - we don't want to modify read * messages in _any_ way */ s->size += s->data1; /* header + body size */ #endif SETPOS (s,0); } char msg_string_next (STRING *s) { char c = *s->curpos++; /* get next byte */ SETPOS (s,GETPOS (s)); /* move to next chunk */ return c; /* return the byte */ } void msg_string_setpos (STRING *s,unsigned long i) { MSGDATA *md = (MSGDATA *) s->data; if (i < s->data1) { /* want header? */ s->chunk = mail_fetchheader (md->stream,md->msgno); s->chunksize = s->data1; /* header length */ s->offset = 0; /* offset is start of message */ } else if (i < s->size) { /* want body */ s->chunk = mail_fetchtext_full (md->stream,md->msgno,NIL,FT_PEEK); /* FT_PEEK - see above */ //s->chunk = mail_fetchtext (md->stream,md->msgno); s->chunksize = s->size - s->data1; s->offset = s->data1; /* offset is end of header */ } else { /* off end of message */ s->chunk = NIL; /* make sure that we crack on this then */ s->chunksize = 1; /* make sure SNX cracks the right way... */ s->offset = i; } /* initial position and size */ s->curpos = s->chunk + (i -= s->offset); s->cursize = s->chunksize - i; } mailsync-5.2.2/src/utils.cc0000664000000000000000000000150107634662222012473 0ustar #include #include #include #include "utils.h" ////////////////////////////////////////////////////////////////////////// // void print_with_escapes( FILE* f, const string& str) // // Prints a string into a file (or std[out|err]) while // replacing " " by "\ " // ////////////////////////////////////////////////////////////////////////// { const char *s = str.c_str(); while ( *s ) { if ( isspace( *s ) ) { fputc( '\\', f); } fputc( *s, f); s++; } } ////////////////////////////////////////////////////////////////////////// // char* nccs( const string& s) // // C-Client doesn't declare anything const // If you're paranoid, you can allocate a new char[] here // ////////////////////////////////////////////////////////////////////////// { return (char*) s.c_str(); } mailsync-5.2.2/src/commandline.h0000664000000000000000000000070607634400226013463 0ustar #ifndef __MAILSYNC_COMMANDLINE__ #include #include #include "options.h" #include "types.h" #include "channel.h" int read_commandline_options( const int argc, char** argv, options_t& options, vector& channels_and_stores, string& config_file); #define __MAILSYNC_COMMANDLINE__ #endif mailsync-5.2.2/src/store.h0000664000000000000000000000327010063306630012322 0ustar #ifndef __MAILSYNC_STORE__ #include #include #include #include #include "c-client-header.h" #include "types.h" #include "msgid.h" ////////////////////////////////////////////////////////////////////////// // class Store // // Structure that holds the pattern for _one_ set of mailboxes to sync // ////////////////////////////////////////////////////////////////////////// { public: string name, server, prefix; string ref, pat; Passwd passwd; int isremote; // I.e. allows OP_HALFOPEN int delim; MAILSTREAM* stream; // c-client mailstream through which the // store can be reached MailboxMap boxes; // boxes with their properties void clear(); Store(): boxes(), name(), server(), prefix(), ref(), pat(), passwd() { clear(); } void print(FILE* f); void set_passwd(string password) { passwd.set_passwd(password);} size_t acquire_mail_list( ); void get_delim(); string full_mailbox_name(const string& box); bool fetch_message_ids(MsgIdPositions& mids, MsgIdSet& remove_set); bool list_contents(); bool flag_message_for_removal( unsigned long msgno, const MsgId& msgid, char * place); MAILSTREAM* mailbox_open( const string& boxname, long c_client_options); MAILSTREAM* store_open( long c_client_options); bool mailbox_create( const string& boxname ); char* driver_name(); void display_driver(); void print_error(const char * cause, const string& mailbox); int mailbox_expunge(string mailbox_name); }; #define __MAILSYNC_STORE__ #endif mailsync-5.2.2/src/types.cc0000664000000000000000000000050507634400237012476 0ustar #include "types.h" ////////////////////////////////////////////////////////////////////////// // // Passwd // ////////////////////////////////////////////////////////////////////////// void Passwd::clear() { text = ""; nopasswd = true; } void Passwd::set_passwd(string passwd) { nopasswd = false; text = passwd; } mailsync-5.2.2/src/msgid.cc0000664000000000000000000001651310063306533012435 0ustar #include "config.h" #include #include #include #include "msgid.h" #include "options.h" #include "c-client-header.h" #include ////////////////////////////////////////////////////////////////////////// // // A MsgId as in the msinfo file has one of the following forms: // // HEADER_MSGID format // <>, md5: MD5_MSGID format // ////////////////////////////////////////////////////////////////////////// extern options_t options; #ifdef HAVE_MD5 #define MD5BLKLEN 64 /* MD5 block length */ #define MD5DIGLEN 16 /* MD5 digest length */ typedef struct { unsigned long chigh; /* high 32bits of byte count */ unsigned long clow; /* low 32bits of byte count */ unsigned long state[4]; /* state (ABCD) */ unsigned char buf[MD5BLKLEN]; /* input buffer */ unsigned char *ptr; /* buffer position */ } MD5CONTEXT; extern "C" { void md5_init (MD5CONTEXT *ctx); void md5_update (MD5CONTEXT *ctx,unsigned char *data,unsigned long len); void md5_final (unsigned char *digest,MD5CONTEXT *ctx); } #endif // HAVE_MD5 ////////////////////////////////////////////////////////////////////////// // MsgId::MsgId(ENVELOPE *envelope) // // Create a message id from an envelope // // depending on the options that are set we use one of the methods for // generating a message identificator. // // Currently there are two methods: // // HEADER_MSGID - use the Message-ID header provided in the mailheader // MD5_MSGID - make a md5 hash from the From, To, Subject, Date // and Message-ID fields // ////////////////////////////////////////////////////////////////////////// { string str; switch( options.msgid_type) { case (HEADER_MSGID) : if ( envelope->message_id && strcmp( envelope->message_id, "") != 0 && strcmp( envelope->message_id, "<>") != 0 ) *this = envelope->message_id; else *this = "<>"; // empty message-id sanitize_message_id(); // some software produces empty Message-IDs f.ex. for draft emails // which makes us unable to differentiaty between such messages if ( *this == "<>") { printf( "Warning: empty Message-ID header in message From: \"%s\" " "Subject: \"%s\" - please consult the README\n", (envelope->from && envelope->from->mailbox) ? envelope->from->mailbox : "", envelope->subject ? envelope->subject : ""); } break; #ifdef HAVE_MD5 case (MD5_MSGID) : char addr[4096]; if (envelope->date) str = string((char*)envelope->date); if (envelope->subject) str += string(envelope->subject); if (envelope->message_id) str += string(envelope->message_id); for (ADDRESS *a = envelope->from; a; a = a->next) { *addr = '\0'; rfc822_address(addr,a); str += string(addr); } for (ADDRESS *a = envelope->to; a; a = a->next) { *addr = '\0'; rfc822_address(addr,a); str += string(addr); } if (str.length() != 0) { unsigned char bdigest[MD5DIGLEN]; MD5CONTEXT ctx; char cdigest[2 * MD5DIGLEN + 2]; md5_init(&ctx); md5_update(&ctx, (unsigned char *) str.c_str(), strlen(str.c_str()) ); md5_final(bdigest, &ctx); for (int i = 0; i < MD5DIGLEN; i++) sprintf(&cdigest[2 * i],"%02x",bdigest[i]); cdigest[2 * MD5DIGLEN] = '\0'; *this = cdigest; } break; #endif // HAVE_MD5 default : assert(0); // this should not happen break; } } ////////////////////////////////////////////////////////////////////////// // void MsgId::sanitize_message_id() // // Some mail software goes out of its way to produce braindammaged // message-ids. // // This function attempts to bring it back to a sane form following RFC822 // that is "". Spaces inside the Message-ID are forbidden // and are replaced by dots: ' '->'.'. // // Iif our msgid starts with '<' we find the corresponding '>' and throw // everything after that away (let's hope there is no braindead sw that has // significant msgid stuff _after_ the '>' or isn't using the '>' _inside_ // the msgid). If we don't find the ending '>' we just put a ">" at the end // of the msgid. // ////////////////////////////////////////////////////////////////////////// { int removed_blanks = 0; int added_brackets = 0; unsigned i; if ((*this)[0] != '<') { *this = '<'+ *this; added_brackets = 1; } for (i=0; (i < this->length()) && ((*this)[i] != '>'); i++) { if (isspace((*this)[i]) || iscntrl((*this)[i])) { (*this)[i] = '.'; removed_blanks = 1; } } // Have we reached end of string? if (i == this->size()) { // if there's no '>' we need to attach if((*this)[i-1] != '>') { *this = *this + '>'; added_brackets = 1; } } // we've found a '>', so let's cut the rubbish that follows else *this = this->substr( 0, i+1); if (options.report_braindammaged_msgids) if (removed_blanks) fprintf( stderr, "Warning: added brackets <> around message id %s\n", this->c_str()); else if (added_brackets) fprintf( stderr, "Warning: replaced blanks with . in message id %s\n", this->c_str()); } ////////////////////////////////////////////////////////////////////////// // string MsgId::from_msinfo_format() // // Read from a msinfo entry the relevant msgid depending on which // format is currently chosen // // Currently there are two formats: // // HEADER_MSGID - message id as in the Message-ID header in a mailheader // MD5_MSGID - message id in md5 hash format // ////////////////////////////////////////////////////////////////////////// { int start; switch( options.msgid_type) { case (HEADER_MSGID) : return this->substr(0, this->find(">") + 1); break; #ifdef HAVE_MD5 case (MD5_MSGID) : start = this->find(">, md5: <") + 9; // 9 == length of ">, md5: <" return this->substr( start, this->find( ">", start) - start); break; #endif // HAVE_MD5 default : assert(0); // this should not happen break; } } ////////////////////////////////////////////////////////////////////////// // string MsgId::to_msinfo_format() // // Return the message id in msinfo format // // Currently there are two formats: // // HEADER_MSGID - message id as in the Message-ID header in a mailheader // MD5_MSGID - message id in md5 hash format // ////////////////////////////////////////////////////////////////////////// { switch( options.msgid_type) { case (HEADER_MSGID) : return *this; break; #ifdef HAVE_MD5 case (MD5_MSGID) : return "<>, md5: <" + *this + ">"; break; #endif // HAVE_MD5 default : assert(0); // this should not happen break; } } ////////////////////////////////////////////////////////////////////////// // bool MsgId::empty() // // Say whether Message-ID is empty // // ////////////////////////////////////////////////////////////////////////// { return string::empty() || *this == "<>"; } mailsync-5.2.2/src/channel.cc0000664000000000000000000003570210340571033012740 0ustar #include "channel.h" #include "utils.h" #include "options.h" #include "types.h" #include "mail_handling.h" #include "c-client-header.h" #include "msgstring.h" #include #include "msgid.h" #include #include extern Passwd* current_context_passwd; extern options_t options; void Channel::print(FILE* f) { fprintf( f, "channel %s %s %s {", name.c_str(), store_a.name.c_str(), store_b.name.c_str()); if (msinfo != "") { fprintf( f, "\n\tmsinfo "); print_with_escapes( f, msinfo ); } if (! passwd.nopasswd) { fprintf( f, "\n\tpasswd "); print_with_escapes( f, passwd.text ); } if(sizelimit) fprintf( f, "\n\tsizelimit %lu", sizelimit ); fprintf( f, "\n}\n" ); return; } ////////////////////////////////////////////////////////////////////////// // bool Channel::read_lasttime_seen( MsgIdsPerMailbox& mids_per_box, MailboxMap& deleted_mailboxes) // // Read from msinfo all the message ids that have been seen during the last // synchronization of this channel and return a hash-map that contains those // message ids indexed with the names of the currently seen mailboxes in // store_a and store_b. // // "deleted_mailboxes" contains mailboxes that were seen at the last sync but // were not included in the set of current mailboxes in store_a and store_b // this time // // If msinfo doesn't exist yet, it will be created. // // This function is used in order to determine which messages to transfer // or to expunge. // // See the msinfo format description for more info. // // returns: // 1 - success // 0 - failure // // mids_per_box - hash of lists with message-ids per mailbox // (indexed by mailbox) // deleted_mailboxes - mailboxes that are not contained in the // mailboxes set // ////////////////////////////////////////////////////////////////////////// { MAILSTREAM* msinfo_stream; ENVELOPE* envelope; unsigned long msgno; unsigned long k; string currentbox = ""; // the box whose msg-id's we're currently reading char* text; unsigned long textlen; if (options.debug) printf( " Reading lasttime of channel \"%s\"\n", this->name.c_str()); // msinfo is the name of the mailbox that contains the sync info current_context_passwd = &this->passwd; { bool tmp_log_error = options.log_error; options.log_error = false; mail_create( NULL, nccs( this->msinfo )); // if one exists no problem options.log_error = tmp_log_error; } if (! (msinfo_stream = mail_open( NULL, nccs( this->msinfo ), OP_READONLY))) { fprintf( stderr, "Error: Couldn't open msinfo box %s.\n", this->msinfo.c_str()); fprintf( stderr, " Aborting!\n"); return 0; } for ( msgno=1; msgno<=msinfo_stream->nmsgs; msgno++ ) { envelope = mail_fetchenvelope( msinfo_stream, msgno ); if (! envelope) { fprintf( stderr, "Error: Couldn't fetch enveloppe #%lu from msinfo box %s\n", msgno, this->msinfo.c_str() ); fprintf( stderr, " Aborting!\n" ); return 0; } // Make sure that the mail is from mailsync if ( ! ( envelope->from && envelope->from->mailbox && envelope->subject) ) { // Mail with missing headers fprintf( stderr, "Info: The msinfo box %s contains a message with" " missing \"From\" or \"Subject\" header information\n", this->msinfo.c_str() ); continue; } if ( strncmp( envelope->from->mailbox, "mailsync", 8) ) { // This is not an email describing a mailsync channel! fprintf( stderr, "Info: The msinfo box %s contains the non-mailsync" "mail: \"From: %s\"\n", this->msinfo.c_str(), envelope->from->mailbox ); continue; } // The subject line contains the name of the channel if ( this->name == envelope->subject ) { // Found our lasttime text = mail_fetchtext_full( msinfo_stream, msgno, &textlen, FT_INTERNAL); if ( text ) text = strdup( text ); else { fprintf( stderr, "Error: Couldn't fetch body #%lu from msinfo box %s\n", msgno, this->msinfo.c_str() ); fprintf( stderr, " Aborting!\n" ); return 0; } // Replace newlines with '\0' // I.e. we transform the text body into c-strings, where // each string is either a mailbox or a message id for ( k=0 ; kfirst.c_str(), mids_per_box[box->first].size() ); } printf( "\n" ); printf( " Store %s:\n", store_b.name.c_str() ); for ( MailboxMap::iterator box = store_b.boxes.begin(); box!=store_b.boxes.end(); box++ ) { printf( " %s(%d) \n", box->first.c_str(), mids_per_box[box->first].size() ); } printf( "\n" ); } mail_close( msinfo_stream ); return 1; exit( 0 ); } ////////////////////////////////////////////////////////////////////////// // bool Channel::open_for_copying( string mailbox_name, enum direction_t direction) // // Opens both stores in the appropriate modes for copying // ////////////////////////////////////////////////////////////////////////// { Store& store_from = (direction == a_to_b) ? store_a : store_b; Store& store_to = (direction == a_to_b) ? store_b : store_a; if(! store_from.mailbox_open( mailbox_name, OP_READONLY ) ) { fprintf( stderr, "Error: Couldn't open mailbox %s in store %s\n", mailbox_name.c_str(), store_from.name.c_str()); return 0; } // strangely enough, following Mark Crispin, if you write into // an open stream then it'll mark new messages as seen. // // So if we want to write to a remote mailbox we have to // HALF_OPEN the stream and if we're working on a local // mailbox then we have to use a NIL stream. if (store_to.isremote) { if(! store_to.store_open( OP_HALFOPEN) ) { fprintf( stderr, "Error: Couldn't open store %s\n", store_to.name.c_str()); return 0; } } else { mail_close( store_to.stream ); store_to.stream = NIL; } return 1; } ////////////////////////////////////////////////////////////////////////// // bool Channel::copy_message( unsigned long msgno, const MsgId& msgid, string mailbox_name, enum direction_t direction) // // Copies the message "msgno" with "msgid" from one store to the other // depending on "direction" // // When appending to a HALF_OPEN stream or to a local mailbox, mailboxb_stream // will be NIL. Therefore we need the full name of the box. // // returns !0 for success // // TODO: ideally sanitize_message_id should not have a side effect, but just // return 1 or 0 if the message had to be modified or it should have // enough information to print a sufficient error message, i.e. the // mailbox where the message is originating from // ////////////////////////////////////////////////////////////////////////// { MSGDATA msgdata; STRING CCstring; char flags[MAILTMPLEN]; char msgdate[MAILTMPLEN]; ENVELOPE *envelope; MESSAGECACHE *elt; bool success = 1; Store& store_from = (direction == a_to_b) ? store_a : store_b; Store& store_to = (direction == a_to_b) ? store_b : store_a; current_context_passwd = &store_from.passwd; envelope = mail_fetchenvelope(store_from.stream, msgno); MsgId msgid_fetched; if (! envelope) { fprintf( stderr, "Error: Couldn't fetch enveloppe #%lu from mailbox box %s\n", msgno, store_from.stream->mailbox ); return 0; } // Check message-id. msgid_fetched = MsgId(envelope); if (msgid_fetched.length() == 0) { printf( "Warning: missing message-id from mailbox %s, message #%lu.\n", store_from.stream->mailbox, msgno); } else { if ( msgid_fetched != msgid ) { printf( "Warning: suspicious message-id from mailbox %s, message #%lu.", store_from.stream->mailbox, msgno); printf( " msgid expected: %s, msgid found: %s. \n", msgid.c_str(), msgid_fetched.c_str()); printf( "Please report this to http://sourceforge.net/tracker/" "?group_id=6374&atid=106374\n"); } } elt = mail_elt(store_from.stream, msgno); // the c-client docu says not to do // this :-/ ? assert(elt->valid); // Should be valid because of // fetchenvelope() // we skip deleted messages unless copying deleted messages is explicitly // demanded if (elt->deleted & ! options.copy_deleted_messages) { print_lead( "ign. del" , direction == a_to_b ? " >" : "< " ); print_from( store_from.stream, msgno ); if ( options.show_message_id ) { print_msgid( msgid.c_str() ); } printf("\n"); return 0; } // Copy message over with all the flags that the original has memset( flags, 0, MAILTMPLEN ); if (elt->seen) strcat (flags," \\Seen"); // why doesn't the following work? // else // strcat (flags," \\New"); if (elt->deleted) strcat (flags," \\Deleted"); if (elt->flagged) strcat (flags," \\Flagged"); if (elt->answered) strcat (flags," \\Answered"); if (elt->draft) strcat (flags," \\Draft"); msgdata.stream = store_from.stream; msgdata.msgno = msgno; if( this->sizelimit && elt->rfc822_size > this->sizelimit ) { print_lead( "too big" , direction == a_to_b ? "->" : "<-" ); print_from( store_from.stream, msgno ); if ( options.show_message_id ) { print_msgid( msgid.c_str() ); } printf("\n"); return 0; } INIT ( &CCstring, msg_string, (void*) &msgdata, elt->rfc822_size ); current_context_passwd = &store_to.passwd; if (!options.simulate) success = mail_append_full( store_to.stream, nccs( store_to.full_mailbox_name(mailbox_name)), &flags[1], mail_date(msgdate,elt), &CCstring ); if (options.show_from) { print_lead( success ? "copied" : "copyfail", direction == a_to_b ? "->" : "<-" ); print_from( store_from.stream, msgno ); if (options.show_message_id) print_msgid( msgid.c_str() ); printf("\n"); } if (options.debug) printf(" Flags: \"%s\"\n", flags); return success; } ////////////////////////////////////////////////////////////////////////// // bool Channel::write_thistime_seen( const MailboxMap& deleted_mailboxes, MsgIdsPerMailbox& thistime) // // Save in channel.msinfo all mailboxes with all msgids (found in // "thistime") they contain. // // deleted_mailboxes - the mailboxes that were deleted since the last sync // thistime - hash indexed by mailbox name containing a list of // msgids for each box // // returns !0 on success // ////////////////////////////////////////////////////////////////////////// { MAILSTREAM* msinfo_stream; ENVELOPE* envelope; unsigned long msgno; // open the msinfo box current_context_passwd = &this->passwd; msinfo_stream = mailbox_open(NIL, nccs(this->msinfo), 0); if (!msinfo_stream) { return 0; } // first delete all the info for the channel we're reading // it will be replaced by a newly created set for ( msgno=1; msgno <= msinfo_stream->nmsgs; msgno++) { envelope = mail_fetchenvelope( msinfo_stream, msgno); if (! envelope) { fprintf( stderr, "Error: Couldn't fetch enveloppe #%lu from mailbox box %s\n", msgno, msinfo_stream->mailbox); return 0; } if ( envelope->subject == this->name ) { char seq[30]; sprintf(seq,"%lu",msgno); mail_setflag(msinfo_stream, seq, "\\Deleted"); } } mail_expunge(msinfo_stream); // Construct a temporary email that contains the new set msgid's that // are alive (not deleted) for each mailbox and then copy that email over // to the msinfo box { FILE* f; long flen; STRING CCstring; // create temporary file containing the email f = tmpfile(); fprintf( f, "From: mailsync\nSubject: %s\n\n", this->name.c_str() ); if (! f) { fprintf( stderr, "Error: Can't create tmp file for new set of msgid's\n"); if (errno) perror( strerror(errno) ); mail_close(msinfo_stream); return 0; } // for each box - if it's not a deleted mailbox: // * first write a line containing it's name // * then dump all the message-id's we've seen the last time into it for ( MsgIdsPerMailbox::const_iterator mailbox = thistime.begin() ; mailbox != thistime.end() ; mailbox++) { if ( deleted_mailboxes.find(mailbox->first) == deleted_mailboxes.end()) { // not found fprintf( f, "%s\n", mailbox->first.c_str() ); print_list_with_delimiter( thistime[ mailbox->first ], f, "\n"); } } // append the constructed email into the msinfo box flen = ftell(f); rewind(f); INIT(&CCstring, file_string, (void*) f, flen); if (!mail_append(msinfo_stream, nccs(this->msinfo), &CCstring)) { fprintf( stderr, "Error: Can't append thistime to msinfo \"%s\"\n", this->msinfo.c_str() ); fclose(f); mail_close(msinfo_stream); return 0; } fclose(f); } mail_close(msinfo_stream); return 1; } mailsync-5.2.2/src/store.cc0000664000000000000000000003234710340571072012471 0ustar #include "options.h" #include "utils.h" #include "store.h" #include "mail_handling.h" #include // only for debuging extern Store* match_pattern_store; extern Passwd* current_context_passwd; extern enum operation_mode_t operation_mode; extern options_t options; extern int expunged_mails; ////////////////////////////////////////////////////////////////////////// // // Store // ////////////////////////////////////////////////////////////////////////// void Store::clear() { name = ""; server = ""; prefix = ""; ref = ""; pat = ""; isremote = 0; delim = '!'; stream = NIL; passwd.clear(); } void Store::print(FILE* f) { fprintf( f, "store %s {", name.c_str() ); if (server != "") { fprintf( f, "\n\tserver "); print_with_escapes( f, server); } if (prefix != "") { fprintf( f, "\n\tprefix "); print_with_escapes( f, prefix); } if (ref != "") { fprintf( f, "\n\tref "); print_with_escapes( f, ref); } if (pat != "") { fprintf( f, "\n\tpat "); print_with_escapes( f, pat); } if (! passwd.nopasswd) { fprintf( f, "\n\tpasswd "); print_with_escapes( f, passwd.text); } fprintf( f, "\n}\n"); } ////////////////////////////////////////////////////////////////////////// // size_t Store::acquire_mail_list() // // Acquire mailbox list for store corresponding to it's pattern // // boxes will be filled up through the callback function "mm_list" // by c-client's mail_list function // // get_mail_list returns the number of mailboxes (that it found) // // This function corresponds to c-client's mail_list // ////////////////////////////////////////////////////////////////////////// { match_pattern_store = this; mail_list( this->stream, nccs(ref), nccs(pat)); match_pattern_store = NULL; return boxes.size(); } ////////////////////////////////////////////////////////////////////////// // void Store::get_delim( ) // // Determine the mailbox delimiter that "stream" is using. // ////////////////////////////////////////////////////////////////////////// { Store store_tmp; store_tmp.stream = this->stream; store_tmp.server = this->server; store_tmp.ref = this->ref; store_tmp.passwd = this->passwd; store_tmp.prefix = ""; store_tmp.pat = "INBOX"; store_tmp.acquire_mail_list(); this->delim = store_tmp.delim; } ////////////////////////////////////////////////////////////////////////// // string Store::full_mailbox_name(const string& box) // // Given the name of a mailbox, return its full IMAP name. // ////////////////////////////////////////////////////////////////////////// { string boxname = box; string fullbox; // Replace our DEFAULT_DELIMITER by the respective store delimiter for (unsigned int i=0; iserver.c_str(), c_client_options | ( options.debug_imap ? OP_DEBUG : 0 )); stream = mail_open( this->stream, nccs(this->server), c_client_options | ( options.debug_imap ? OP_DEBUG : 0 )); if (! this->stream) { fprintf( stderr, "Error: Can't contact server %s\n", this->server.c_str()); } return this->stream; } ////////////////////////////////////////////////////////////////////////// // MAILSTREAM* Store::mailbox_open( const string& boxname, long c_client_options) // // Opens the mailbox "boxname" inside with "c_client_options" options. // // The function will complain to STDERR on error. // // Returns NIL on failure. // ////////////////////////////////////////////////////////////////////////// { string fullboxname = this->full_mailbox_name(boxname); current_context_passwd = &passwd; if (options.debug) printf("Opening %s with options %ld\n", fullboxname.c_str(), c_client_options); stream = ::mailbox_open( this->stream, fullboxname, c_client_options); if (! this->stream) { fprintf( stderr, "Error: Couldn't open %s\n", fullboxname.c_str()); } return this->stream; } ////////////////////////////////////////////////////////////////////////// // bool Store::mailbox_create( const string& boxname ) // // Creates the mailbox "boxname" in the store // // Returns false on failure. // ////////////////////////////////////////////////////////////////////////// { string fullboxname = this->full_mailbox_name(boxname); current_context_passwd = &passwd; if ( options.simulate ) { // just fail if simulating printf( "Creating %s in %s\n", boxname.c_str(), this->name.c_str()); return false; } bool res; bool error_tmp = options.log_error; options.log_error = false; res = mail_create( this->stream, nccs( fullboxname.c_str() ) ); options.log_error = error_tmp; if ( options.debug) { if ( res ) printf( "Created %s in %s\n", boxname.c_str(), this->name.c_str()); else printf( "Failed to create %s in %s\n", boxname.c_str(), name.c_str()); } return res; } ////////////////////////////////////////////////////////////////////////// // bool Store::fetch_message_ids(MsgIdPositions& mids, MsgIdSet& remove_set) // // Fetch all the message ids that the currently open mailbox contains. // // If there are duplicates they will be added to the remove_set // (depending on the compile time option expunge_duplicates) // // returns: // 0 - failure // 1 - success // mids - a hash indexed by msgid containing the // position of the message in the mailbox // ////////////////////////////////////////////////////////////////////////// { // loop and fetch all the message ids from a mailbox unsigned long n = this->stream->nmsgs; unsigned long nabsent = 0, nduplicates = 0; if (options.debug) { printf( " Fetching message id's in mailbox \"%s\"\n", this->stream->mailbox); } for (unsigned long msgno=1; msgno<=n; msgno++) { MsgId msgid; ENVELOPE *envelope; bool isdup; envelope = mail_fetchenvelope( this->stream, msgno); if (! envelope) { fprintf( stderr, "Error: Couldn't fetch enveloppe #%lu from mailbox box %s\n", msgno, this->stream->mailbox); fprintf( stderr, " Aborting!\n"); return 0; } msgid = MsgId(envelope); if (msgid.length() == 0) { print_lead("no msg-id", ""); nabsent++; // Absent message-id. Don't touch message. continue; } isdup = mids.count( msgid ); if (isdup) { if ( options.expunge_duplicates ) { char seq[30]; sprintf( seq, "%lu", msgno); if (! options.simulate ) if ( msgid.empty() ) fprintf( stderr, "Not deleting duplicate message with empty " "Message-ID - see README"); else remove_set.insert( msgid ); // mail_setflag( this->stream, seq, "\\Deleted" ); } nduplicates++; if ( options.show_from ) print_lead( "duplicate", ""); } else { mids.insert(make_pair(msgid, msgno)); } if ( isdup && options.show_from ) { print_from( this->stream, msgno ); if ( options.show_message_id ) print_msgid( msgid.c_str() ); printf("\n"); } } if (nduplicates) { if (options.show_summary) { printf( "%lu duplicate%s", nduplicates, nduplicates==1 ? "" : "s" ); if ( operation_mode != mode_diff ) { printf(" in %s", name.c_str()); } printf(", "); } else { printf( "%lu duplicate%s for deletion in %s\n", nduplicates, nduplicates==1 ? "" : "s", name.c_str() ); } fflush(stdout); } return 1; } ////////////////////////////////////////////////////////////////////////// // bool Store::list_contents() // // Display contents of currently open mailbox // // The mailbox is defined by the name in "box" and by the "store" where the // mailbox resides // // returns: // 0 - failure // 1 - success // mailbox_stream - a stream "to" the mailbox // // This was copied from fetch_message_ids // ////////////////////////////////////////////////////////////////////////// { MsgIdPositions mids; // loop and fetch all the message ids from a mailbox unsigned long n = this->stream->nmsgs; for (unsigned long msgno=1; msgno<=n; msgno++) { MsgId msgid; ENVELOPE *envelope; bool isdup; envelope = mail_fetchenvelope( this->stream, msgno); if (! envelope) { fprintf( stderr, "Error: Couldn't fetch enveloppe #%lu from mailbox box %s\n", msgno, this->stream->mailbox); fprintf( stderr, " Aborting!\n"); return 0; } msgid = MsgId(envelope); if (msgid.length() == 0) print_lead( "no msg-id", ""); else { isdup = mids.count( msgid ); if (isdup) print_lead( "duplicate", ""); else mids.insert( make_pair(msgid, msgno)); if ( options.show_message_id ) print_msgid( msgid.c_str() ); } print_from( this->stream, msgno ); printf( "\n"); } return 1; } ////////////////////////////////////////////////////////////////////////// // bool Store::flag_message_for_removal( unsigned long msgno, const MsgId& msgid, char * place) // // returns !0 on success // ////////////////////////////////////////////////////////////////////////// { MsgId msgid_fetched; ENVELOPE *envelope; bool success = 1; current_context_passwd = &passwd; envelope = mail_fetchenvelope( this->stream, msgno ); if (! envelope) { fprintf( stderr, "Error: Couldn't fetch enveloppe #%lu from mailbox box %s\n", msgno, this->stream->mailbox); return 0; } msgid_fetched = MsgId(envelope); if (msgid_fetched.length() == 0) { printf( "Error: no message-id, so I won't delete the message.\n" ); // Possibly indicates concurrent access? success = 0; } else { if( msgid_fetched != msgid ) { printf( "Error: message-ids %s and %s don't match, " "so I won't delete the message.\n", msgid_fetched.c_str(), msgid.c_str() ); success = 0; } } if (success) { char seq[30]; sprintf( seq, "%lu", msgno); if (! options.simulate ) mail_setflag( this->stream, seq, "\\Deleted" ); } if (options.show_from) { if (success) { print_lead( "deleted", place); } else { print_lead( "deletefail", ""); } print_from( this->stream, msgno ); printf("\n"); } return success; } ////////////////////////////////////////////////////////////////////////// // char* Store::driver_name() // // Return the name of the driver we're using for accessing a store. // // The store must contain at least one valid mailbox name, otherwise the call // will return NULL. // // Returns NULL if no valid driver was found // ////////////////////////////////////////////////////////////////////////// { DRIVER* drv; char* full_name; if ( boxes.size() == 0 ) // boxes list is empty (no box with that name // exists) drv = mail_valid( this->stream, "", NIL); else drv = mail_valid( this->stream, nccs( full_mailbox_name( boxes.begin()->first) ), NIL); if (drv) return drv->name; else return NULL; } ////////////////////////////////////////////////////////////////////////// // void Store::display_driver() // // Display which drivers we're using for accessing a store // // The store must contain at least one valid mailbox name, otherwise the call // will return NULL. // ////////////////////////////////////////////////////////////////////////// { char* the_driver_name = driver_name(); if (the_driver_name) printf( "Using driver %s for store %s\n", the_driver_name, nccs( name)); else printf( "No driver for store %s found\n", nccs( name) ); } ////////////////////////////////////////////////////////////////////////// // void Store::print_error(const char * cause, const string& mailbox) // ////////////////////////////////////////////////////////////////////////// { fprintf( stderr, "Error: Couldn't access mailbox \"%s\" in store \"%s\" for %s\n", mailbox.c_str(), name.c_str(), cause ); fprintf( stderr, " Continuing with next mailbox\n"); } ////////////////////////////////////////////////////////////////////////// // int Store::mailbox_expunge( string mailbox_name ) // ////////////////////////////////////////////////////////////////////////// { expunged_mails = 0; // is manipulated by the c-client callback mm_expunge mail_expunge( this->stream ); return expunged_mails; } mailsync-5.2.2/src/options.h0000664000000000000000000000326610063154056012671 0ustar #ifndef __MAILSYNC_OPTIONS__ using namespace std; // hierarchy delimiter for IMAP #define DEFAULT_DELIMITER '/' typedef enum { HEADER_MSGID, MD5_MSGID } msgid_t; ////////////////////////////////////////////////////////////////////////// // Options, commandline parsing and default settings ////////////////////////////////////////////////////////////////////////// typedef struct options_t { bool log_chatter; bool log_warn; // Show c-client warnings and warnings about bool log_parse; // Log RFC822 parse errors bool show_summary; // 1 line of output per mailbox bool show_from; // 1 line of output per message bool show_message_id; // Implies show_from bool delete_messages; bool delete_empty_mailboxes; bool debug; bool debug_imap; bool debug_config; bool report_braindammaged_msgids; bool copy_deleted_messages; bool simulate; msgid_t msgid_type; // the following options are mandatory bool expunge_duplicates; // Should duplicates be deleted? bool log_error; // Log serious errors options_t(): log_chatter(0), log_warn(0), log_parse(0), show_summary(1), show_from(0), show_message_id(0), delete_messages(1), delete_empty_mailboxes(0), debug(0), debug_imap(0), debug_config(0), report_braindammaged_msgids(0), copy_deleted_messages(0), simulate(0), msgid_type(HEADER_MSGID), expunge_duplicates(1), log_error(1) {}; }; #define __MAILSYNC_OPTIONS__ #endif mailsync-5.2.2/src/Makefile.am0000664000000000000000000000120710070471221013044 0ustar EXTRA_DIST=msgstring.c bin_PROGRAMS=mailsync INCLUDES=@CCLIENT_INCLUDES@ LDADD=@CCLIENT_LIBS@ AM_CXXFLAGS=@CCLIENT_CXXFLAGS@ mailsync_SOURCES=mailsync_main.cc \ options.h \ commandline.cc commandline.h \ configuration.cc configuration.h \ types.cc types.h \ mail_handling.cc mail_handling.h \ c-client_callbacks.cc \ c-client-header.h \ utils.cc utils.h \ store.cc store.h \ channel.cc channel.h \ msgid.cc msgid.h \ msgstring.c msgstring.h mailsync-5.2.2/src/mailsync_main.cc0000664000000000000000000005120210154163445014153 0ustar /// Please use spaces instead of tabs // See the documentation: "HACKING" and "ABSTRACT" #include "config.h" // include autoconf settings #include #include #include extern int errno; // Just in case #include #include #include #include #include using std::string; using std::set; using std::map; using std::vector; using std::make_pair; #include "c-client-header.h" #include "configuration.h" // configuration parsing and setup #include "options.h" // options and default settings #include "commandline.h" // commandline parsing #include "types.h" // MailboxMap, Passwd #include "store.h" // Store #include "channel.h" // Channel #include "mail_handling.h" // functions implementing various // synchronization steps and helper functions //------------------------------- Defines ------------------------------- #define CREATE 1 #define NOCREATE 0 //------------------------ Global Variables ------------------------------ // current operation mode enum operation_mode_t operation_mode = mode_unknown; // options and default settings options_t options; // won't link correctly if this is static - why? Store* match_pattern_store; ////////////////////////////////////////////////////////////////////////// // The password for the current context // Required, because we don't know inside the c-client callback functions // which context (store1, store2, channel) we are in Passwd * current_context_passwd = NULL; ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // int main(int argc, char** argv) // ////////////////////////////////////////////////////////////////////////// { Channel channel; Store& store_a = channel.store_a; Store& store_b = channel.store_b; MsgIdsPerMailbox lasttime, thistime; MailboxMap deleted_mailboxes; // present last time, but not this time MailboxMap empty_mailboxes; int success; bool& debug = options.debug; #include "linkage.c" // // Parse arguments, read config file, choose operation mode // -------------------------------------------------------- { string config_file; vector channels_and_stores; // bad command line parameters if (! read_commandline_options( argc, argv, options, channels_and_stores, config_file) ) exit(1); operation_mode = setup_channel_stores_and_mode( config_file, channels_and_stores, channel); if ( operation_mode == mode_unknown ) exit(1); } store_a.boxes.clear(); store_b.boxes.clear(); // initialize c-client environment (~/.imparc etc.) env_init( getenv("USER"), getenv("HOME")); // open a read only the connection to the first store if ( store_a.isremote ) { if (! store_a.store_open( OP_HALFOPEN | OP_READONLY) ) return 1; } else { store_a.stream = NULL; } // in case we want to sync - open a read only the connection // to the second store if (operation_mode == mode_sync && store_b.isremote) { if (! store_b.store_open( OP_HALFOPEN | OP_READONLY) ) return 1; } else { store_b.stream = NULL; } // Get list of all mailboxes from first store // if (debug) printf( " Items in store \"%s\":\n", store_a.name.c_str() ); if (! store_a.acquire_mail_list() && options.log_warn) { printf( " Store pattern doesn't match any selectable mailbox\n"); } if (store_a.delim == '!') { store_a.get_delim(); } if (store_a.delim == '!') { // this should not happen assert(0); } else if (debug) { // store_b.delim can be '' for INBOXes if ( ! store_a.delim ) printf(" No delimiter found for store \"%s\"\n", store_a.name.c_str()); else printf( " Delimiter for store \"%s\" is '%c'\n", store_a.name.c_str(), store_a.delim ); } // Display which drivers we're using for accessing the first store if (debug) { store_a.display_driver(); } ///////////////////////////// mode_list ////////////////////////////// // Display listing of the first mail store in case we're in list mode if ( operation_mode == mode_list ) { if ( options.show_from | options.show_message_id ) { for ( MailboxMap::iterator curr_mbox = store_a.boxes.begin() ; curr_mbox != store_a.boxes.end() ; curr_mbox++ ) { printf("\nMailbox: %s\n", curr_mbox->first.c_str()); if( curr_mbox->second.no_select ) printf(" not selectable\n"); else { // TODO: shouldn't this be OP_READONLY store_a.stream = store_a.mailbox_open( curr_mbox->first, 0); if (! store_a.stream) break; if (! store_a.list_contents() ) exit(1); } } } else { print_list_with_delimiter(store_a.boxes, stdout, "\n"); } exit(0); } ////////////////////////////////////////////////////////////////////// //////////// from this point on we are only dealing with ///////////// ////////////////// mode_diff or mode_sync //////////////////////////// ////////////////////////////////////////////////////////////////////// ///////////////////////////// mode_sync ////////////////////////////// // Get list of all mailboxes and delimiter from second store // if ( operation_mode == mode_sync ) { store_b.boxes.clear(); if (debug) printf( " Items in store \"%s\":\n", store_b.name.c_str() ); // Get a list of mailboxes from the second store if (! store_b.acquire_mail_list() && options.log_warn ) { printf( " Store pattern doesn't match any selectable mailbox\n"); } // Display which drivers we're using for accessing the second store if (debug) store_b.display_driver(); // Making sure we get ahold of the mailbox-hierarchy delimiter if (store_b.delim == '!') store_b.get_delim(); if (store_a.delim == '!') { // this should not happen assert(0); } else if (debug) { if (! store_b.delim ) printf(" No delimiter found for store \"%s\"\n", store_b.name.c_str()); else printf( " Delimiter for store \"%s\" is '%c'\n", store_b.name.c_str(), store_b.delim); } } //////////////////////// mode_diff or mode_sync ////////////////////// // Display all the mailboxes we've found if (debug) { printf(" All seen mailboxes: \n"); printf(" in first store: \n"); print_list_with_delimiter( store_a.boxes, stdout, " " ); printf(" in second store: \n"); print_list_with_delimiter( store_b.boxes, stdout, " " ); printf("\n"); } // Read in what mailboxes and messages we've seen the last time // we've synchronized if (! channel.read_lasttime_seen( lasttime, deleted_mailboxes) ) exit(1); // failed to read in msinfo or similar // Iterate over all mailboxes and sync or diff each // // our comparison operator for our stores compares lenghts // that means that we're traversing the store from longest to // shortest mailbox name - this makes sure that we'll first see // and create mailboxes with longer "path"names that means // submailboxes first success = 1; // TODO: this is bogus isn't it? for ( MailboxMap::iterator curr_mbox = store_a.boxes.begin(); curr_mbox != store_b.boxes.end(); curr_mbox++ ) { if ( curr_mbox == store_a.boxes.end()) { // if we're done with store_a curr_mbox = store_b.boxes.begin(); // continue with store_b if ( curr_mbox == store_b.boxes.end()) break; } // skip if the current mailbox has allready been synched if ( curr_mbox->second.done) continue; // if mailbox doesn't exist in either one of the stores -> create it if ( store_a.boxes.find( curr_mbox->first ) == store_a.boxes.end() ) if ( ! store_a.mailbox_create( curr_mbox->first ) ) continue; if ( store_b.boxes.find( curr_mbox->first ) == store_b.boxes.end() ) if ( ! store_b.mailbox_create( curr_mbox->first ) ) continue; // when traversing store_a's boxes we don't need to worry about // whether it has been synched yet or not. It isn't unless we're // in store_b that it matters whether the current mailbox has been // traversed in store_a allready store_b.boxes.find(curr_mbox->first)->second.done = true; // skip unselectable (== can't contain mails) boxes if ( store_a.boxes.find( curr_mbox->first )->second.no_select ) { if ( debug ) printf( "%s is not selectable: skipping\n", curr_mbox->first.c_str() ); continue; } if ( store_b.boxes.find( curr_mbox->first )->second.no_select ) { if ( debug ) printf( "%s is not selectable: skipping\n", curr_mbox->first.c_str() ); continue; } if (options.show_from) printf("\n *** %s ***\n", curr_mbox->first.c_str()); MsgIdSet msgids_lasttime( lasttime[curr_mbox->first] ), msgids_union, msgids_now; MsgIdPositions msgidpos_a, msgidpos_b; if (options.show_summary) { printf("%s: ",curr_mbox->first.c_str()); fflush(stdout); } else { printf("\n"); } // fetch_message_ids(): map message-ids to message numbers // and optionally remember duplicates. // // Attention: from here on we're operating on streams to single // _mailboxes_! That means that from here on // streamx_stream is connected to _one_ specific // mailbox. // Messges that should be removed in store_a respectively in store_b MsgIdSet remove_a, remove_b; // open and fetch message ID's from the mailbox in the first store store_a.stream = store_a.mailbox_open( curr_mbox->first, OP_READONLY ); if (! store_a.stream) { store_a.print_error( "opening and writing", curr_mbox->first); continue; } if (! store_a.fetch_message_ids( msgidpos_a , remove_a) ) { store_a.print_error( "fetching of mail ids", curr_mbox->first); continue; } // if we're in sync mode open and fetch message IDs from the // mailbox in the second store if( operation_mode == mode_sync ) { store_b.stream = store_b.mailbox_open( curr_mbox->first, OP_READONLY); if (! store_b.stream) { store_b.print_error( "fetching of mail ids", curr_mbox->first); continue; } if (! store_b.fetch_message_ids( msgidpos_b, remove_b )) { store_b.print_error( "fetching of mail ids", curr_mbox->first); continue; } } else if( operation_mode == mode_diff ) { for( MsgIdSet::iterator i=msgids_lasttime.begin(); i!=msgids_lasttime.end(); i++ ) { msgidpos_b[*i] = 0; } } // Create the set of all seen message IDs in a mailbox: // + message IDs seen the last time // + message IDs seen in the mailbox from store_a // + message IDs seen in the mailbox from store_b // // msgids_union = union(msgids_lasttime, msgids_a, msgids_b) msgids_union = msgids_lasttime; for( MsgIdPositions::iterator i = msgidpos_a.begin(); i != msgidpos_a.end() ; i++ ) { msgids_union.insert(i->first); } for( MsgIdPositions::iterator i = msgidpos_b.begin(); i != msgidpos_b.end(); i++) { msgids_union.insert(i->first); } // Messages that should be copied from store_a to store_b, // from store_b to store_a MsgIdSet copy_a_b, copy_b_a; // Iterate over all messages that were seen in a mailbox last time, // in store_a and in store_b for ( MsgIdSet::iterator i=msgids_union.begin(); i!=msgids_union.end(); i++ ) { // determine first what to do with a message bool in_a = msgidpos_a.count(*i); bool in_b = msgidpos_b.count(*i); bool in_l = msgids_lasttime.count(*i); int a_b_l = ( (in_a ? 0x100 : 0) + (in_b ? 0x010 : 0) + (in_l ? 0x001 : 0) ); switch (a_b_l) { case 0x100: // New message on a copy_a_b.insert(*i); msgids_now.insert(*i); break; case 0x010: // New message on b copy_b_a.insert(*i); msgids_now.insert(*i); break; case 0x111: // Kept message case 0x110: // New message, present in a and b, no copying // necessary msgids_now.insert(*i); break; case 0x101: // Deleted on b remove_a.insert(*i); break; case 0x011: // Deleted on a remove_b.insert(*i); break; case 0x001: // Deleted on both break; case 0x000: // Shouldn't happen default: assert(0); break; } } unsigned long now_n = msgids_now.size(); switch (operation_mode) { /////////////////////////// mode_sync /////////////////////////// case mode_sync: { bool success; unsigned long removed_a = 0, removed_b = 0, copied_a_b = 0, copied_b_a = 0; //////////////////// copying messages /////////////////////// if (debug) printf( " Copying messages from store \"%s\" to store \"%s\"\n", store_a.name.c_str(), store_b.name.c_str() ); if (! channel.open_for_copying( curr_mbox->first, a_to_b) ) exit(1); for ( MsgIdSet::iterator i =copy_a_b.begin(); i !=copy_a_b.end(); i++) { success = channel.copy_message( msgidpos_a[*i], *i, curr_mbox->first, a_to_b ); if (success) copied_a_b++; else msgids_now.erase(*i); // if we've failed to copy the message over we'll pretend that we // haven't seen it at all. That way mailsync will have to rediscover // and resync the same message again next time } if (debug) printf( " Copying messages from store \"%s\" to store \"%s\"\n", store_b.name.c_str(), store_a.name.c_str() ); if (! channel.open_for_copying( curr_mbox->first, b_to_a) ) exit(1); for ( MsgIdSet::iterator i=copy_b_a.begin(); i !=copy_b_a.end(); i++) { success = channel.copy_message( msgidpos_b[*i], *i, curr_mbox->first, b_to_a ); if (success) copied_b_a++; else msgids_now.erase(*i); } printf("\n"); if (copied_a_b) printf( "%lu copied %s->%s.\n", copied_a_b, store_a.name.c_str(), store_b.name.c_str() ); if (copied_b_a) printf( "%lu copied %s->%s.\n", copied_b_a, store_b.name.c_str(), store_a.name.c_str() ); if (removed_a) printf( "%lu deleted on %s.\n", removed_a, store_a.name.c_str() ); if (removed_b) printf( "%lu deleted on %s.\n", removed_b, store_b.name.c_str() ); if (options.show_summary) { printf( "%lu remain%s.\n", now_n, now_n != 1 ? "" : "s"); fflush(stdout); } else { printf( "%lu messages remain in %s\n", now_n, curr_mbox->first.c_str() ); } //////////////////// removing messages /////////////////////// if ( options.delete_messages && (! options.simulate) ) { if (debug) printf( " Removing messages from store \"%s\"\n", store_a.name.c_str() ); // TODO: check first if there are any messages to be removed before // opening store_a.stream = store_a.mailbox_open( curr_mbox->first, 0 ); if (! store_a.stream) { store_a.print_error( "opening for removal ", curr_mbox->first); } else for( MsgIdSet::iterator i =remove_a.begin(); i !=remove_a.end(); i++) { success = store_a.flag_message_for_removal( msgidpos_a[*i], *i, "< "); if (success) removed_a++; } if (debug) printf( " Removing messages from store \"%s\"\n", store_b.name.c_str() ); // TODO: check first if there are any messages to be removed before // opening store_b.stream = store_b.mailbox_open( curr_mbox->first, 0 ); if (! store_b.stream) { store_a.print_error( "opening for removal ", curr_mbox->first); } else for( MsgIdSet::iterator i =remove_b.begin(); i !=remove_b.end(); i++) { success = store_b.flag_message_for_removal( msgidpos_b[*i], *i, "> "); if (success) removed_b++; } //////////////////////// expunging emails ///////////////////////// // this *needs* to be done *after* coying as the *last* step // otherwise the order of the mails will get messed up since // some random messages inbewteen have been deleted in the mean // time and the message numbers we know don't correspond to // messages in the mailbox/store any more if (debug) printf( " Expunging messages\n" ); int n_expunged_a = store_a.mailbox_expunge( curr_mbox->first ); int n_expunged_b = store_b.mailbox_expunge( curr_mbox->first ); if (n_expunged_a) printf( "Expunged %d mail%s in store %s\n" , n_expunged_a , n_expunged_a == 1 ? "" : "s" , store_a.name.c_str() ); if (n_expunged_b) printf( "Expunged %d mail%s in store %s\n" , n_expunged_b , n_expunged_b == 1 ? "" : "s" , store_b.name.c_str() ); } //////////////////////// deleting empty mailboxes ///////////////////////// if (options.delete_empty_mailboxes) { if (now_n == 0) { // add empty mailbox to empty_mailboxes empty_mailboxes[ curr_mbox->first ]; deleted_mailboxes[ curr_mbox->first ]; } } } // end case mode_sync break; /////////////////////////// mode_diff /////////////////////////// case mode_diff: { if ( copy_a_b.size() ) printf( "%d new, ", copy_a_b.size() ); if (remove_b.size()) printf( "%d deleted, ", remove_b.size() ); printf( "%d currently at store %s.\n", msgids_now.size(), store_b.name.c_str()); } break; default: break; } thistime[curr_mbox->first] = msgids_now; // TODO: why do we want to close the boxes? // instead of expunging emails we could also use mail_open(OP_EXPUNGE) instead... // // close local boxes // if (!store_a.isremote) // store_a.stream = mail_close(store_a.stream); // if (store_b.stream && !store_b.isremote) // store_b.stream = mail_close(store_b.stream); } // end loop over all mailboxes if (store_a.isremote) store_a.stream = mail_close(store_a.stream); if (store_b.isremote) store_b.stream = mail_close(store_b.stream); // TODO: which success are we talking about? Above there are two instances // of "success" declared which mask each other out... if (!success) return 1; if ( options.delete_empty_mailboxes && operation_mode==mode_sync ) { string fullboxname; if (store_a.isremote) { store_a.stream = NIL; store_a.store_open( OP_HALFOPEN ); } else { store_a.stream = NULL; } if (store_b.isremote) { store_b.stream = NIL; store_b.store_open( OP_HALFOPEN ); } else { store_b.stream = NULL; } for ( MailboxMap::iterator mailbox = empty_mailboxes.begin() ; mailbox != empty_mailboxes.end() ; mailbox++ ) { fullboxname = store_a.full_mailbox_name( mailbox->first); printf("%s: deleting\n", mailbox->first.c_str()); printf(" %s", fullboxname.c_str()); fflush(stdout); current_context_passwd = &(store_a.passwd); if (mail_delete(store_a.stream, nccs(fullboxname))) printf("\n"); else printf(" failed\n"); fullboxname = store_b.full_mailbox_name( mailbox->first); printf(" %s", fullboxname.c_str()); fflush(stdout); current_context_passwd = &(store_b.passwd); if (mail_delete(store_b.stream, nccs(fullboxname))) printf("\n"); else printf(" failed\n"); } } if (operation_mode==mode_sync) if (!options.simulate) channel.write_thistime_seen( deleted_mailboxes, thistime); return 0; } mailsync-5.2.2/src/.cvsignore0000664000000000000000000000005707614101775013030 0ustar .deps Makefile Makefile.in mailsync mailsync.o mailsync-5.2.2/src/msgid.h0000664000000000000000000000121710063306547012277 0ustar #ifndef __MAILSYNC_MSGID__ #include #include "c-client-header.h" #include "options.h" using namespace std; ////////////////////////////////////////////////////////////////////////// // class MsgId : public string // // MsgId - can contain various identificators for messages // ////////////////////////////////////////////////////////////////////////// { public: MsgId(): string() {}; MsgId(char* m): string(m) {}; MsgId(string m): string(m) {}; MsgId(ENVELOPE *envelope); void sanitize_message_id(); string to_msinfo_format(); string from_msinfo_format(); bool empty(); }; #define __MAILSYNC_MSGID__ #endif mailsync-5.2.2/src/c-client_callbacks.cc0000664000000000000000000001745010063306733015032 0ustar //-------------------------- Callback functions -------------------------- // // Below are the implementations callback functions that are required/called // by c-client functions. // // If we want to manipulate a stream or a mailbox we call a c-client // function which does whatever is necessary and will furnish us the // results piece by piece as the come by calling the respective callback // function. // // The names of the callback functions are fixed and can not be changed. // ////////////////////////////////////////////////////////////////////////// #include // required by c-client.h #include "c-client-header.h" #include "options.h" #include "types.h" #include "store.h" extern options_t options; extern Store* match_pattern_store; extern Passwd* current_context_passwd; // Flag saying in critical code int critical = NIL; // Number of expunged mails int expunged_mails = 0; ////////////////////////////////////////////////////////////////////////// // void mm_list ( MAILSTREAM *stream, int delimiter, char *name_nc, long attributes) // // called by c-client's mail_list to give us a mailbox name that matches // our search pattern together with it's attributes // // mm_list will save the mailbox names inside the store in the boxes // MailboxMap // ////////////////////////////////////////////////////////////////////////// { const char* name = name_nc; MailboxProperties mailbox_properties; if( options.debug) { fputs (" ", stdout); if (stream && stream->mailbox) fputs (stream->mailbox, stdout); if (name) fputs(name, stdout); if (attributes & LATT_NOINFERIORS) fputs (", no inferiors",stdout); if (attributes & LATT_NOSELECT) fputs (", no select",stdout); if (attributes & LATT_MARKED) fputs (", marked",stdout); if (attributes & LATT_UNMARKED) fputs (", unmarked",stdout); putchar ('\n'); } if ( attributes & LATT_NOINFERIORS ) mailbox_properties.no_inferiors = true; if ( attributes & LATT_NOSELECT ) mailbox_properties.no_select = true; if (!match_pattern_store) { fprintf(stderr, "Error: match_pattern_store is NULL?!"); // Internal error abort(); } // Delimiter match_pattern_store->delim = delimiter; if ( *name) { // TODO: is this correct? const char *skip; // Skip over server spec, if present skip = strchr(name,'}'); if (skip) name = skip+1; // Remove prefix if it matches specified prefix skip = match_pattern_store->prefix.c_str(); while (*skip && *skip==*name) { skip++; name++; } // Make sure that name doesn't contain default delimiter and replace // all occurences of the Store delimiter by our default delimiter string name_copy = name; if (delimiter != DEFAULT_DELIMITER) { for (int i = 0; name[i]; i++) { if (name_copy[i] == DEFAULT_DELIMITER) { printf("Error: Name of mailbox %s contains standard delimiter '%c'\n", name, DEFAULT_DELIMITER); printf(" That means that I will not be able to synchronize it!"); return; } else if (name_copy[i] == (char)delimiter) name_copy[i] = DEFAULT_DELIMITER; } } match_pattern_store->boxes[name_copy] = mailbox_properties; } else if (options.debug) fprintf( stderr, "Received empty name while listing contents\n"); } ////////////////////////////////////////////////////////////////////////// // void mm_searched (MAILSTREAM *stream,unsigned long msgno) { } // ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // void mm_exists (MAILSTREAM *stream,unsigned long number) { } // // c-client callback that notifies us, that the number of // messages has changed. // ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // void mm_expunged (MAILSTREAM *stream,unsigned long number) // ////////////////////////////////////////////////////////////////////////// { expunged_mails++; } ////////////////////////////////////////////////////////////////////////// // void mm_flags (MAILSTREAM *stream,unsigned long number) { } // ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // void mm_lsub (MAILSTREAM *stream,int delimiter,char *name,long attributes) { } // ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // void mm_status (MAILSTREAM *stream,char *mailbox,MAILSTATUS *status) { } // ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // void mm_notify (MAILSTREAM *stream,char *s,long errflg) // ////////////////////////////////////////////////////////////////////////// { mm_log (s,errflg); // Just do mm_log action } ////////////////////////////////////////////////////////////////////////// // void mm_log (char *string,long errflg) // ////////////////////////////////////////////////////////////////////////// { switch (errflg) { case BYE: case NIL: // No error if (options.log_chatter) fprintf (stderr,"[%s]\n",string); break; case PARSE: // Parsing problem if (options.log_parse) fprintf (stderr,"Parsing error: %%%s\n",string); break; case WARN: // Warning if (options.log_warn) fprintf (stderr,"Warning: %%%s\n",string); break; case ERROR: // Error default: if (options.log_error) fprintf (stderr,"Error: %s\n",string); break; } } ////////////////////////////////////////////////////////////////////////// // void mm_dlog (char *s) // ////////////////////////////////////////////////////////////////////////// { fprintf (stderr,"%s\n",s); } ////////////////////////////////////////////////////////////////////////// // void mm_login (NETMBX *mb,char *username,char *password,long trial) // ////////////////////////////////////////////////////////////////////////// { printf ("Authorizing against {%s/%s}\n",mb->host,mb->service); if (*mb->user) strcpy (username,mb->user); else { printf (" username: "); fgets (username, 30, stdin); } if( current_context_passwd == NULL || current_context_passwd->nopasswd) { strcpy (password,getpass (" password: ")); } else { strcpy (password, current_context_passwd->text.c_str()); } } ////////////////////////////////////////////////////////////////////////// // void mm_critical (MAILSTREAM *stream) // ////////////////////////////////////////////////////////////////////////// { critical = T; // Note in critical code } ////////////////////////////////////////////////////////////////////////// // void mm_nocritical (MAILSTREAM *stream) // ////////////////////////////////////////////////////////////////////////// { critical = NIL; // Note not in critical code } ////////////////////////////////////////////////////////////////////////// // long mm_diskerror (MAILSTREAM *stream,long errcode,long serious) // // TODO: disk error occured - have a look what pine does // ////////////////////////////////////////////////////////////////////////// { mm_log( strerror(errcode), ERROR); return T; } ////////////////////////////////////////////////////////////////////////// // void mm_fatal (char *st) // // Called by c-client just before crash // // TODO: we should cleanly terminate here :-/ // ////////////////////////////////////////////////////////////////////////// { mm_log( st, ERROR); fprintf (stderr,"A fatal error occured - terminating\n"); // exit(-1); } mailsync-5.2.2/src/channel.h0000664000000000000000000000252407655512416012615 0ustar #ifndef __MAILSYNC_CHANNEL__ #include #include #include "types.h" // Passwd #include "store.h" enum direction_t { a_to_b, b_to_a }; ////////////////////////////////////////////////////////////////////////// // class Channel // // Structure that holds two Stores (sets of mailboxes) that should be synched // ////////////////////////////////////////////////////////////////////////// { public: string name; Store store_a; Store store_b; string msinfo; Passwd passwd; unsigned long sizelimit; Channel(): name(), msinfo(), passwd(), sizelimit(0) {}; void print(FILE* f); void set_passwd(string password) { passwd.set_passwd(password);} void set_sizelimit(const string& sizelim) { sizelimit=strtoul(sizelim.c_str(),NULL,10); } bool read_lasttime_seen( MsgIdsPerMailbox& mids_per_box, MailboxMap& deleted_mailboxes); bool open_for_copying( string mailbox_name, enum direction_t direction); bool copy_message( unsigned long msgno, const MsgId& msgid, string mailbox_name, enum direction_t direction); bool write_thistime_seen( const MailboxMap& deleted_mailboxes, MsgIdsPerMailbox& thistime); }; #define __MAILSYNC_CHANNEL__ #endif mailsync-5.2.2/src/mail_handling.cc0000664000000000000000000001110610063306473014114 0ustar #include // required by c-client.h #include #include "c-client-header.h" #include "options.h" #include "types.h" #include "msgstring.h" #include "utils.h" #include "flstring.h" extern options_t options; extern Passwd* current_context_passwd; //------------------------- Helper functions ----------------------------- ////////////////////////////////////////////////////////////////////////// // void print_list_with_delimiter( const MsgIdSet& msgIds, FILE* f, const string& delim) // // Print the set of strings contained in "msgIds" and terminate each msgId // with the delimiter "delim" // ////////////////////////////////////////////////////////////////////////// { MsgId tmp_msgId; for ( MsgIdSet::iterator msgId = msgIds.begin() ; msgId != msgIds.end() ; msgId++ ) { tmp_msgId = *msgId; fprintf(f, "%s%s", tmp_msgId.to_msinfo_format().c_str(), delim.c_str()); } } ////////////////////////////////////////////////////////////////////////// // void print_list_with_delimiter( const MailboxMap& mailboxes, FILE* f, const string& delim) // // Print the set of strings contained in "mailboxes" and terminate each // item with the delimiter "delim" // ////////////////////////////////////////////////////////////////////////// { for (MailboxMap::const_iterator mailbox = mailboxes.begin() ; mailbox != mailboxes.end() ; mailbox++ ) { fprintf(f, "%s%s", mailbox->first.c_str(), delim.c_str()); } } //--------------------------- Mail handling ------------------------------ ////////////////////////////////////////////////////////////////////////// // Print formats that are being used when showin, what mails are being // transfered or expunged: // // $ mailsync -m inbox // Synchronizing stores "local-inbox" <-> "remote-inbox"... // Authorizing against {my.imap-server/imap} // // *** INBOX *** // // " copied <- Mon Sep 9 Tomas Pospisek test2 // " // // |--lead_format--|-------------from_format------------------| // |--------------------msgid_format-------------------| // // // "lead_format" and // "from_format" are only used/displayed with options -m and/or -M // "msgid_format" is only used/displayed with option -M // ////////////////////////////////////////////////////////////////////////// char lead_format[] = " %-10s %s "; // arguments: action, direction char from_format[] = "%-61s"; char msgid_format[] = "%-65s"; // argument : message-id ////////////////////////////////////////////////////////////////////////// // void print_lead( const char* action, const char* direction) // ////////////////////////////////////////////////////////////////////////// { printf( lead_format, action, direction); } ////////////////////////////////////////////////////////////////////////// // void print_from(MAILSTREAM* stream, const unsigned long msgno) // ////////////////////////////////////////////////////////////////////////// { static char from[66] = ""; MESSAGECACHE* elt; elt = mail_elt(stream, msgno); if (!elt) fprintf(stderr,"Error: Couldn't access message #%lu from mailbox box %s\n", msgno, stream->mailbox); else { mail_cdate(&from[0], elt); mail_fetchfrom(&from[11], stream, msgno, 22); from[33] = ' '; mail_fetchsubject(&from[34], stream, msgno, 65-35-1); from[65] = '\0'; } printf( from_format, &from[0]); } ////////////////////////////////////////////////////////////////////////// // void print_msgid( const char* msgid) // ////////////////////////////////////////////////////////////////////////// { printf( msgid_format, msgid); } ////////////////////////////////////////////////////////////////////////// // /* why can't I use size_type here? g++ will give me a syntax error! */ ////////////////////////////////////////////////////////////////////////// // MAILSTREAM* mailbox_open( MAILSTREAM* stream, const string& fullboxname, long c_client_options) // // Opens mailbox "fullboxname" with "c_client_options" options. // // If possible use the higherlevel function below // // Returns NIL on failure. // ////////////////////////////////////////////////////////////////////////// { return stream = mail_open( stream, nccs(fullboxname), c_client_options | ( options.debug_imap ? OP_DEBUG : 0 ) ); } mailsync-5.2.2/src/Makefile.in0000664000000000000000000004173711704530715013102 0ustar # Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : bin_PROGRAMS = mailsync$(EXEEXT) subdir = src DIST_COMMON = $(srcdir)/Makefile.am $(srcdir)/Makefile.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude/ac_inet_funcs.m4 \ $(top_srcdir)/acinclude/ac_so_preference.m4 \ $(top_srcdir)/acinclude/ac_with_cclient.m4 \ $(top_srcdir)/acinclude/ac_with_krb5.m4 \ $(top_srcdir)/acinclude/ac_with_md5.m4 \ $(top_srcdir)/acinclude/ac_with_openssl.m4 \ $(top_srcdir)/acinclude/ac_with_pam.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" PROGRAMS = $(bin_PROGRAMS) am_mailsync_OBJECTS = mailsync_main.$(OBJEXT) commandline.$(OBJEXT) \ configuration.$(OBJEXT) types.$(OBJEXT) \ mail_handling.$(OBJEXT) c-client_callbacks.$(OBJEXT) \ utils.$(OBJEXT) store.$(OBJEXT) channel.$(OBJEXT) \ msgid.$(OBJEXT) msgstring.$(OBJEXT) mailsync_OBJECTS = $(am_mailsync_OBJECTS) mailsync_LDADD = $(LDADD) mailsync_DEPENDENCIES = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) CXXLD = $(CXX) CXXLINK = $(CXXLD) $(AM_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) \ -o $@ SOURCES = $(mailsync_SOURCES) DIST_SOURCES = $(mailsync_SOURCES) ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CCLIENT_CXXFLAGS = @CCLIENT_CXXFLAGS@ CCLIENT_INCLUDES = @CCLIENT_INCLUDES@ CCLIENT_LIBS = @CCLIENT_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KRB5_CFLAGS = @KRB5_CFLAGS@ KRB5_CONFIG = @KRB5_CONFIG@ KRB5_GSSAPI_CFLAGS = @KRB5_GSSAPI_CFLAGS@ KRB5_GSSAPI_LIBS = @KRB5_GSSAPI_LIBS@ KRB5_LDFLAGS = @KRB5_LDFLAGS@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ OPENSSL_INCLUDES = @OPENSSL_INCLUDES@ OPENSSL_LDFLAGS = @OPENSSL_LDFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PAM_INCLUDES = @PAM_INCLUDES@ PAM_LDFLAGS = @PAM_LDFLAGS@ PATH_SEPARATOR = @PATH_SEPARATOR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = msgstring.c INCLUDES = @CCLIENT_INCLUDES@ LDADD = @CCLIENT_LIBS@ AM_CXXFLAGS = @CCLIENT_CXXFLAGS@ mailsync_SOURCES = mailsync_main.cc \ options.h \ commandline.cc commandline.h \ configuration.cc configuration.h \ types.cc types.h \ mail_handling.cc mail_handling.h \ c-client_callbacks.cc \ c-client-header.h \ utils.cc utils.h \ store.cc store.h \ channel.cc channel.h \ msgid.cc msgid.h \ msgstring.c msgstring.h all: all-am .SUFFIXES: .SUFFIXES: .c .cc .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu src/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu src/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)" @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p; \ then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) mailsync$(EXEEXT): $(mailsync_OBJECTS) $(mailsync_DEPENDENCIES) @rm -f mailsync$(EXEEXT) $(CXXLINK) $(mailsync_OBJECTS) $(mailsync_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/c-client_callbacks.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/channel.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/commandline.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/configuration.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mail_handling.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mailsync_main.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msgid.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/msgstring.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/store.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/types.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/utils.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c $< .c.obj: @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'` .cc.o: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCXX_TRUE@ $(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(bindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-binPROGRAMS clean-generic mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \ clean-generic ctags distclean distclean-compile \ distclean-generic distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-binPROGRAMS \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic pdf pdf-am ps ps-am tags uninstall \ uninstall-am uninstall-binPROGRAMS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: mailsync-5.2.2/src/c-client-header.h0000664000000000000000000000060510063307534014115 0ustar // This serves as a wrap around to c-client.h // It is necessary, since c-client.h defines a lot of stuff in // a incompatible way that is used elsewhere (STL f.ex.) #ifndef __MAILSYNC_C_CLIENT_HEADER__ #define __MAILSYNC_C_CLIENT_HEADER__ #include // C-Client defines the following symbols, which messes up STL, // since it needs them as well #undef max #undef min #endif mailsync-5.2.2/src/utils.h0000664000000000000000000000031607634714712012342 0ustar #ifndef __MAILSYNC_UTILS__ #include #include using namespace std; void print_with_escapes( FILE* f, const string& str); char* nccs( const string& s); #define __MAILSYNC_UTILS__ #endif mailsync-5.2.2/src/mail_handling.h0000664000000000000000000000466110063306511013757 0ustar #ifndef __MAILSYNC_MAILHANDLING__ #include "c-client-header.h" //------------------------- Helper functions ----------------------------- ////////////////////////////////////////////////////////////////////////// // void print_list_with_delimiter( const MsgIdSet& msgIds, FILE* f, const string& delim); // // Print the set of strings contained in "msgIds" and terminate each msgId // with the delimiter "delim" // ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // void print_list_with_delimiter( const MailboxMap& mailboxes, FILE* f, const string& delim); // // Print the set of strings contained in "mailboxes" and terminate each // item with the delimiter "delim" // ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // char* nccs( const string& s); // // C-Client doesn't declare anything const // If you're paranoid, you can allocate a new char[] here // ////////////////////////////////////////////////////////////////////////// //--------------------------- Mail handling ------------------------------ ////////////////////////////////////////////////////////////////////////// // void print_lead( const char* action, const char* direction); // ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // void print_from(MAILSTREAM* stream, const unsigned long msgno); // ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // void print_msgid( const char* msgid); // ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // MAILSTREAM* mailbox_open( MAILSTREAM* stream, const string& fullboxname, long c_client_options); // // Opens mailbox "fullboxname" with "c_client_options" options. // // If possible use the higherlevel function below // // Returns NIL on failure. // ////////////////////////////////////////////////////////////////////////// #define __MAILSYNC_MAILHANDLING__ #endif mailsync-5.2.2/src/configuration.cc0000664000000000000000000003077410063306454014210 0ustar //--------------------- Configuration Parsing ---------------------------- #include #include #include #include // Stat() #include "c-client-header.h" // for MAILTMPLEN #include "configuration.h" #include "options.h" #include "store.h" #include "channel.h" extern options_t options; ////////////////////////////////////////////////////////////////////////// // struct Token { // // A token is a [space|newline|tab] delimited chain of characters which // represents a syntactic element from the configuration file // ////////////////////////////////////////////////////////////////////////// string buf; int eof; int line; }; ////////////////////////////////////////////////////////////////////////// // void die_with_fatal_parse_error( Token* t, char * errorMessage, const char * insertIntoMessage = NULL) // // Fatal error while parsing the config file // Display error message and quit // // errorMessage must contain an error message to be displayed // insertIntoMessage is optional. errorMessage can act as a sprintf format // string in which case insertIntoMessage will be used // as replacement for "%s" inside errorMessage // ////////////////////////////////////////////////////////////////////////// { fprintf(stderr, "Error: "); fprintf(stderr, errorMessage, insertIntoMessage ? insertIntoMessage : ""); fprintf(stderr, "\n"); if (t->eof) { fprintf(stderr, " Unexpected EOF while parsing configuration file"); fprintf(stderr, " While parsing line %d:\n", t->line); } else { fprintf(stderr, " While parsing line %d at token \"%s\"\n", t->line, t->buf.c_str()); } fprintf(stderr, " Quitting!\n"); exit(1); } ////////////////////////////////////////////////////////////////////////// // void get_token( FILE* f, Token* t ) // // Read a token from the config file // ////////////////////////////////////////////////////////////////////////// { int c; t->buf = ""; t->eof = 0; while (1) { if (t->buf.size() > MAILTMPLEN) { // Token too long die_with_fatal_parse_error(t, "Line too long"); } c = getc(f); // Ignore comments if ( t->buf.size() == 0 && c=='#') { while( c != '\n' && c !=EOF) { c = getc(f); } } // Skip newline if (c=='\n') t->line++; // We're done reading the config file if (c==EOF) { t->eof = 1; break; // We've reached a token boundary } else if (isspace(c)) { // The token is non empty so we've acquired something and can return if (t->buf.size()) { break; // Ignore spaces } else { continue; } // Continue on next line... } else if (c=='\\') { t->buf += (char)getc(f); // Add to token } else { t->buf += (char)c; } } if (options.debug_config) printf("\t%s\n",t->buf.c_str()); return; } ////////////////////////////////////////////////////////////////////////// // void parse_config(FILE* f, map& confmap) // // Parse config file // ////////////////////////////////////////////////////////////////////////// { Token token; Token *t; if (options.debug_config) printf(" Parsing config...\n\n"); t = &token; t->line = 0; // Read items from file while (1) { ConfigItem config_item; string name; // Acquire one item get_token(f, t); // End of config file reached if (t->eof) break; // Parse store if (t->buf == "store") { Store* store = new Store(); // Read name (store name) get_token(f, t); if (t->eof) { die_with_fatal_parse_error( t, "Store name missing"); } name = t->buf; store->name = t->buf; // Read "{" get_token(f, t); if (t->eof || t->buf != "{") { die_with_fatal_parse_error( t, "Expected \"{\" while parsing store"); } // Read store configuration (name/value pairs) while (1) { get_token(f, t); // End of store config if (t->buf == "}") break; else if (t->eof) die_with_fatal_parse_error( t, "Expected \"{\" while parsing store: unclosed store"); else if (t->buf == "server") { get_token(f, t); store->server = t->buf; } else if (t->buf == "prefix") { get_token(f, t); store->prefix = t->buf; } else if (t->buf == "ref") { get_token(f, t); store->ref = t->buf; } else if (t->buf == "pat") { get_token(f, t); store->pat = t->buf; } else if (t->buf == "passwd") { get_token(f, t); store->set_passwd(t->buf); } else die_with_fatal_parse_error(t, "Unknown store field"); } if (store->server == "") { store->isremote = 0; } else { store->isremote = 1; } config_item.store = store; config_item.is_store = true; } // Parse a channel else if (t->buf == "channel") { Channel* channel = new Channel(); // Read name (channel name) get_token(f, t); if (t->eof) { die_with_fatal_parse_error( t, "Channel name missing"); } name = t->buf; channel->name = t->buf; // Read stores get_token(f, t); if (t->eof) { die_with_fatal_parse_error( t, "Expected a store name while parsing channel"); } channel->store_a.name = t->buf; get_token(f, t); if (t->eof) { die_with_fatal_parse_error( t, "Expected a store name while parsing channel"); } channel->store_b.name = t->buf; // Read "{" get_token(f, t); if (t->eof || t->buf != "{") { die_with_fatal_parse_error(t, "Expected \"{\" while parsing channel"); } // Read channel config (name/value pairs) while (1) { get_token(f, t); if (t->buf == "}") break; else if (t->eof) die_with_fatal_parse_error(t, "Unclosed channel"); else if (t->buf == "msinfo") { get_token(f, t); channel->msinfo = t->buf; } else if (t->buf == "passwd") { get_token(f, t); channel->set_passwd(t->buf); } else if (t->buf == "sizelimit") { get_token(f, t); channel->set_sizelimit(t->buf); } else die_with_fatal_parse_error(t, "Unknown channel field"); } if (channel->msinfo == "") { die_with_fatal_parse_error( t, "%s: missing msinfo", channel->name.c_str()); } config_item.channel = channel; config_item.is_store = false; } else die_with_fatal_parse_error(t, "unknow configuration element"); if (confmap.count(name)) { die_with_fatal_parse_error( t, "Tag (store or channel name) used twice: %s", name.c_str()); } confmap.insert( make_pair(name, config_item) ); } if (options.debug_config) printf( " End parsing config. Config is OK\n\n" ); return; } ////////////////////////////////////////////////////////////////////////// // bool read_configuration( const string& config_file_name, map& confmap) // // Read and parse config file // // Return true on success // ////////////////////////////////////////////////////////////////////////// { FILE* config; string config_file = config_file_name; if (config_file == "") { char *home; home = getenv( "HOME" ); if (home) { config_file = string( home ) + "/.mailsync"; } else { fprintf( stderr, "Error: Can't get home directory. Use `-f file'.\n" ); return false; } } { struct stat st; stat( config_file.c_str(), &st ); if ( ! S_ISREG( st.st_mode ) || !( config = fopen( config_file.c_str(), "r") ) ) { fprintf( stderr, "Error: Can't open config file %s\n", config_file.c_str()); return false; } } parse_config( config, confmap ); return true; } ////////////////////////////////////////////////////////////////////////// // enum operation_mode_t setup_channel_stores_and_mode( const string& config_file, const vector& chan_stor_names, Channel& channel) // // Parse chan_stor_names for the desired stores or channel and setup // store_a, store_b and channel accordingly // // return mode // ////////////////////////////////////////////////////////////////////////// { vector stores_to_treat; vector channels_to_treat; operation_mode_t operation_mode = mode_unknown; map configured_items; if ( ! read_configuration( config_file, configured_items)) return mode_unknown; // make sure the channel and store names correspond to channel and // store names in the config for ( unsigned i = 0; i < chan_stor_names.size(); i++) { if ( configured_items.count(chan_stor_names[i]) == 0 ) { fprintf( stderr, "Error: A channel or store named \"%s\" has not" "been configured\n", chan_stor_names[i].c_str()); return mode_unknown; } ConfigItem* config_item = &configured_items[chan_stor_names[i]]; if ( config_item->is_store && config_item->store->name == chan_stor_names[i] ) { stores_to_treat.push_back( *config_item->store); } else if ( ! config_item->is_store && config_item->channel->name == chan_stor_names[i]) { channels_to_treat.push_back( *config_item->channel); } } // mode_sync if ( channels_to_treat.size() == 1 && stores_to_treat.size() == 0 ) { channel = channels_to_treat[0]; if ( ! configured_items[channel.store_a.name].is_store || ! configured_items[channel.store_b.name].is_store ) { fprintf( stderr, "Error: Malconfigured channel %s\n", channel.name.c_str()); if( configured_items[ channel.store_a.name ].is_store) { fprintf( stderr, "The configuration doesn't contain a store named \"%s\"\n", channel.store_a.name.c_str()); } else { fprintf( stderr, "The configuration doesn't contain a store named \"%s\"\n", channel.store_b.name.c_str()); } return mode_unknown; } channel.store_a = *(configured_items[channel.store_a.name].store); channel.store_b = *(configured_items[channel.store_b.name].store); operation_mode = mode_sync; } // mode_diff else if (channels_to_treat.size() == 1 && stores_to_treat.size() == 1) { options.expunge_duplicates = 0; channel = channels_to_treat[0]; if ( channel.store_a.name == stores_to_treat[0].name) { channel.store_b = *(configured_items[channel.store_a.name]).store; } else if ( channel.store_b.name == stores_to_treat[0].name) { channel.store_b = *(configured_items[channel.store_b.name]).store; } else { fprintf( stderr, "Diff mode: channel %s doesn't contain store %s.\n", channel.name.c_str(), stores_to_treat[0].name.c_str() ); return mode_unknown; } channel.store_a = stores_to_treat[0]; operation_mode = mode_diff; } // mode_list else if (channels_to_treat.size() == 0 && stores_to_treat.size() == 1) { channel.store_a = stores_to_treat[0]; operation_mode = mode_list; } else { fprintf( stderr, "Don't know what to do with %d channels and %d stores.\n", channels_to_treat.size(), stores_to_treat.size()); return mode_unknown; } // Give feedback on the mode we're in switch( operation_mode ) { case mode_sync: printf( "Synchronizing stores \"%s\" <-> \"%s\"...\n", channel.store_a.name.c_str(), channel.store_b.name.c_str()); break; case mode_diff: printf( "Comparing store \"%s\" <-> \"%s\"...\n", channel.store_a.name.c_str(), channel.store_b.name.c_str()); break; case mode_list: printf( "Listing store \"%s\"\n", channel.store_a.name.c_str() ); break; default: printf( "Panic! Unknown mode - something unexpected happened\n"); } return operation_mode; } mailsync-5.2.2/src/types.h0000664000000000000000000000353110063306645012340 0ustar #ifndef __MAILSYNC_TYPES__ #include #include #include #include #include "c-client-header.h" #include "msgid.h" using namespace std; ////////////////////////////////////////////////////////////////////////// enum operation_mode_t { mode_unknown, mode_sync, mode_list, mode_diff }; typedef struct MailboxProperties { bool no_inferiors; bool no_select; bool contains_messages; bool done; // mailbox has been treated (synced...) MailboxProperties(): no_inferiors(false), no_select(false), contains_messages(false), done(false) {}; }; // we sort our mailboxes by length. That way longer mailboxes and their // submailboxes (!!) will be traversed first struct longer { bool operator()(const string& s1, const string& s2) const { if (s1.length() == s2.length()) return s1 < s2; // if same length return arbitrary order // - in this case alphabetical else return s1.length() > s2.length(); } }; typedef map MailboxMap; typedef set MsgIdSet; typedef map MsgIdPositions; // Map message ids to // positions within a // mailbox typedef map MsgIdsPerMailbox; // A List of message ids // per mailbox(-name) ////////////////////////////////////////////////////////////////////////// // class Passwd // // Structure that holds the password // ////////////////////////////////////////////////////////////////////////// { public: bool nopasswd; string text; void clear(); void set_passwd(string passwd); }; #define __MAILSYNC_TYPES__ #endif mailsync-5.2.2/src/CVS/0000775000000000000000000000000010340571361011451 5ustar mailsync-5.2.2/src/CVS/Entries0000664000000000000000000000205710340571361013011 0ustar /.cvsignore/1.3/Fri Jan 24 00:08:29 2003// /commandline.h/1.1/Fri Mar 14 16:17:26 2003// /configuration.h/1.1/Fri Mar 14 16:17:27 2003// /msgstring.h/1.1/Fri Mar 14 16:17:29 2003// /types.cc/1.1/Fri Mar 14 16:17:35 2003// /utils.cc/1.2/Sat Mar 15 17:36:18 2003// /utils.h/1.2/Sat Mar 15 21:23:22 2003// /channel.h/1.6/Mon May 5 16:45:02 2003// /commandline.cc/1.5/Sun Jun 13 22:42:17 2004// /options.h/1.4/Sun Jun 13 22:41:50 2004// /c-client-header.h/1.1/Mon Jun 14 11:43:24 2004// /c-client_callbacks.cc/1.3/Mon Jun 14 11:36:59 2004// /configuration.cc/1.5/Mon Jun 14 11:34:04 2004// /mail_handling.cc/1.5/Mon Jun 14 11:34:19 2004// /mail_handling.h/1.3/Mon Jun 14 11:34:33 2004// /mailsync_main.cc/1.20/Mon Jun 14 11:37:58 2004// /msgid.cc/1.9/Mon Jun 14 11:34:51 2004// /msgid.h/1.3/Mon Jun 14 11:35:03 2004// /msgstring.c/1.4/Mon Jun 14 11:35:34 2004// /store.h/1.8/Mon Jun 14 11:35:52 2004// /types.h/1.7/Mon Jun 14 11:36:05 2004// /Makefile.am/1.7/Wed Jun 30 07:58:09 2004// /channel.cc/1.15/Tue Nov 22 10:25:31 2005// /store.cc/1.12/Tue Nov 22 10:26:02 2005// D mailsync-5.2.2/src/CVS/Repository0000664000000000000000000000001507614073620013554 0ustar mailsync/src mailsync-5.2.2/src/CVS/Root0000664000000000000000000000005707614073620012326 0ustar :ext:tpo@cvs.sourceforge.net:/cvsroot/mailsync mailsync-5.2.2/src/msgstring.h0000664000000000000000000000064707634400231013212 0ustar #ifndef __MSGSTRING__ /* Message string driver for message stringstructs */ /* by Mark Crispin */ void msg_string_init (STRING *s,void *data,unsigned long size); char msg_string_next (STRING *s); void msg_string_setpos (STRING *s,unsigned long i); typedef struct msg_data { MAILSTREAM *stream; /* stream */ long msgno; /* message number */ } MSGDATA; extern STRINGDRIVER msg_string; #define __MSGSTRING__ #endif mailsync-5.2.2/src/commandline.cc0000664000000000000000000001130410063154111013602 0ustar #include "config.h" #include #include #include #include #include "options.h" #include "types.h" #include "store.h" #include "channel.h" #include "configuration.h" extern options_t options; ////////////////////////////////////////////////////////////////////////// // void usage() // // Mailsync help // ////////////////////////////////////////////////////////////////////////// { printf(PACKAGE_STRING "\n\n"); // autoconf bizzarrerie printf("mailsync [options] channel\n"); printf(" synchronize two stores defined by \"channel\" or\n"); printf("mailsync [options] store\n"); printf(" list mailboxes contained in \"store\"\n"); printf("mailsync [options] channel store\n"); printf(" display changes from last seen messages in \"channel\" to\n"); printf(" those contained in \"store\"\n"); printf("\n"); printf("\n"); printf("Options:\n"); printf(" -cd do copy deleted mailboxes (default is not)\n"); printf(" -n don't delete messages\n"); printf(" -D delete any empty mailboxes after synchronizing\n"); printf(" -m show from, subject, etc. of messages that get expunged or moved\n"); printf(" -M also show message-ids (turns on -m)\n"); printf(" -s simulate\n"); printf(" -d show debug info\n"); printf(" -di debug/log IMAP protocol telemetry\n"); printf(" -dc debug configuration\n"); printf(" -v show imap chatter\n"); printf(" -vb show warning about braindammaged message ids\n"); printf(" -vw show warnings\n"); printf(" -vp show RFC 822 parsing errors\n"); printf(" -f conf use alternate config file\n"); printf(" -t [msgid|md5] msg id type\n"); printf("\n"); return; } ////////////////////////////////////////////////////////////////////////// // // const impossible here? (tpo) vvvv bool read_commandline_options( const int argc, char** argv, options_t& options, vector& channels_and_stores, string& config_file ) // // Read and parse commandline options // ////////////////////////////////////////////////////////////////////////// { int optind = 1; // All options must be given separately // first parse the command line options/switches // that is everything that starts with a "-" like "-w", "-m", etc. while (optind= 2002 and recompile mailsync.\n"); return false; #endif // HAVE_MD5 } else if ( strcmp( argv[optind], "msgid" ) == 0 ) options.msgid_type = HEADER_MSGID; else { usage(); printf("Error: unknown message id format\n"); return false; } break; default: usage(); return false; } optind++; } // we've parsed all the options the rest should consist of // channel and store names // // if there aren't any following then report this as an error if ( argc - optind < 1 ) { usage(); return false; } // read channel and store names from command line for ( ; optind < argc; optind++) { channels_and_stores.push_back( argv[optind] ); } return true; } mailsync-5.2.2/src/configuration.h0000664000000000000000000000247107634400227014046 0ustar #ifndef __MAILSYNC_CONFIGURATION__ #include #include #include #include #include "types.h" #include "store.h" #include "channel.h" ////////////////////////////////////////////////////////////////////////// // struct ConfigItem { // ////////////////////////////////////////////////////////////////////////// Store* store; Channel* channel; bool is_store; }; ////////////////////////////////////////////////////////////////////////// // bool read_configuration( const string& config_file_name, map& confmap); // // Read and parse config file // // Return true on success // ////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////// // enum operation_mode_t setup_channel_stores_and_mode( const string& config_file, const vector& channels_and_stores, Channel& channel); // // Parse channels_and_stores for the desired stores or channel and setup // store_a, store_b and channel accordingly // // return mode // ////////////////////////////////////////////////////////////////////////// #define __MAILSYNC_CONFIGURATION__ #endif mailsync-5.2.2/doc/0000775000000000000000000000000010350351123010765 5ustar mailsync-5.2.2/doc/examples/0000775000000000000000000000000011704535150012613 5ustar mailsync-5.2.2/doc/examples/CVS/0000775000000000000000000000000010340566653013255 5ustar mailsync-5.2.2/doc/examples/CVS/Entries0000664000000000000000000000005310340566653014607 0ustar /mailsync/1.5/Tue Nov 22 10:05:43 2005// D mailsync-5.2.2/doc/examples/CVS/Repository0000664000000000000000000000002607614074234015354 0ustar mailsync/doc/examples mailsync-5.2.2/doc/examples/CVS/Root0000664000000000000000000000005707614074234014124 0ustar :ext:tpo@cvs.sourceforge.net:/cvsroot/mailsync mailsync-5.2.2/doc/examples/mailsync0000664000000000000000000001272211704535150014361 0ustar # adapt this file to your needs and move it to # $HOME/.mailsync # # This is my first try at a commented configuration # file. If you have some other pertinent examples # f.ex. for special configurations or for a mailserver # that needs some tweaks then please mail them to me. # # Tomas Pospisek # # see also: # [1] /usr/share/doc/mailsync/README # [2] /usr/share/doc/libc-client-ssl2001/naming.txt.gz # [3] rfc2060 ###################################################### # Store declarations ###################################################### # # Get all mail from the "example.org" IMAPS (IMAP over SSL) # server for the user "tpo" (IMAP is the default transport). # # WARNING: I STONGLY advice against not validating the SSL # certificate. Depending on your setup, a # man-in-the-middle attack can be very easy to # produce and YOU WILL NOT NOTICE. # # Better get the SSL Certificate from the IMAP # server you are connecting to and install it # locally. # # Here are some pointers on how to do it: # http://www.madboa.com/geek/pine-ssl/ # http://tirian.magd.ox.ac.uk/~nick/openssl-certs/email.shtml # # Get all the mailboxes that start with "INBOX." but do # not recurse into subfolders. Before comparing mailboxes # strip off "INBOX." form their name. When authentificating # use "secret" as password. # # for the exact semantics of the server line see [2] # # (Can anybody lighten me up on what "ref" is?) # store cyrus-store { server {example.org/user=tpo/ssl} ref {example.org} pat INBOX.% prefix INBOX. passwd secret } # # Same as above, but do not validate the SSL certificate. # # WARNING: I STONGLY advice against not validating the SSL # certificate. Depending on your setup, a # man-in-the-middle attack can be very easy to # produce and YOU WILL NOT NOTICE. # # Better get the SSL Certificate from the IMAP # server you are connecting to and install it # locally. # # Here are some pointers on how to do it: # http://www.madboa.com/geek/pine-ssl/ # http://tirian.magd.ox.ac.uk/~nick/openssl-certs/email.shtml # store cyrus-store-enable-man-in-the-middle { server {example.org/user=tpo/ssl/novalidate-cert} ref {example.org} pat INBOX.% prefix INBOX. passwd secret } # # same as before but recurse into subfolders and do # validate the SSL certificate # store other-cyrus-store { server {example.org/user=tpo/ssl} ref {example.org} pat INBOX.* prefix INBOX. } # # *only* the inbox on a cyrus IMAP server # # no prefix! INBOX will be understood as such # by mailsync! # store cyrus-inbox { server {example.org/user=tpo} ref {example.org} pat INBOX } # # courier INBOX over IMAP only # store courier-inbox { server {example.org/user=tpo/imap/norsh} ref {example.org} pat INBOX } # # all IMAP folders on courier INBOX over IMAP only # # (thanks to Holger Krull) # store courier-inbox-2 { server {example.org/user=tpo/imap/norsh} ref {example.org} pat * } # # "My Draft Folder" on a courier IMAP server # # this will ask you for the username and # password since it's not given here # store courier-inbox { server {example.org} ref {example.org} pat INBOX.My\ Draft\ Folder } # # typical netscape or uw store # # only the contents of the folder sync will be # transferred # store netscape-or-uw-store { server {imap.cs.unc.edu/user=culver} ref {imap.cs.unc.edu} pat copy/% prefix copy/ } # # accessing an MH inbox over ssh # # c-client will try to exec the following to # get to the mails: # # ssh example.org exec /etc/rimapd # # That means that you need to point /etc/imapd # to s.th. sensible on the remote machine - i.e.: # # ln -s /usr/sbin/imapd /etc/rimapd # # See the c-client FAQ for more information # store mh-over-ssh-inbox { server {example.org/user=me/secure} ref {example.org} pat #mh/inbox } # # local mail on a unix box contained # in $HOME/Mail/localcopy # store local-directory-Mail { pat Mail/localcopy/% prefix Mail/ } # # local inbox in mh format # # Michale Krelin wrote: # I use `mark +inbox all -sequence beforesync' before mailsyncing and # `mark +inbox notbeforesync -add -sequence unseen` after. # store hacker { pat \#mh/inbox prefix \#mh/inbox } # # local mail on a unix box contained # in $HOME/mail/ # ^^^^ # store local-directory-mail { pat mail/% prefix mail/ } # # local mail in the INBOX # that can be /var/mail/USERNAME or in other # standard inbox places # store local-inbox { pat INBOX } # # one specific folder in the $HOME/mail # directory # store local-oliver { pat mail/oliver prefix mail/ } ###################################################### # Channel declarations ###################################################### # # Let's synchronize our local inbox with the cyrus inbox. The # synchronization info is kept on the remote cyrus server and # "secret" is used for authentication. When synchronizing # mailsync will gladly skip all messages bigger than 80k # channel inbox-local-cyrus local-inbox cyrus-inbox { msinfo {example.org/user=tpo}INBOX.mailsync passwd secret sizelimit 81920 } # # synchronize the mail contained on a netscape or uw # imap server in the folder copy with our local mailfolder # "$HOME/Mail/localcopy". Keep the synchronization info locally # in "Mail/synchronization-info" # # channel dir-local mail local { msinfo Mail/synchronization-info } mailsync-5.2.2/doc/mail_open_close_flowchart2.svg0000664000000000000000000002441310063113075017000 0ustar read_lasttime_seen Open msinfo for reading of seen IDs msinfo_stream = mail_open( NULL, nccs( this->msinfo ), OP_READONLY ) mail_close (msinfo_stream) return stream = mail_open( stream, nccs(fullboxname), c_client_options | ( options.debug_imap ? OP_DEBUG : 0 ) ); MAILSTREAM* Store::store_open( long c_client_options) return stream = mail_open( this->stream, nccs(this->server), c_client_options | ( options.debug_imap ? OP_DEBUG : 0 )); MAILSTREAM* = mailbox_open( MAILSTREAM* stream, const string long c_client_options) mailsync-5.2.2/doc/ABSTRACT0000664000000000000000000000311407536205077012134 0ustar Mailsync is a way of synchronizing a collection of mailboxes. The algorithm is a 3-way diff. Two mailboxes are simultaneously compared to a record of the state of both mailboxes at last sync. New messages and message deletions are propagated between the two mailboxes. If you're familiar with CVS, it's the same principle, except there's no opportunity for conflicts. Mailsync can be used for many things. I wrote it for synchronizing my desktop mail with my laptop. You can also use it if your mail is kept on an IMAP server, but your favorite mail client doesn't totally grok IMAP---for instance, I use VM under Emacs, and VM keeps a copy of my mail in my home directory, and I synchronize that with the IMAP server. You can keep your mail in arbitrarily many places and keep it all consistent. Mailsync is based on the "c-client" library developed at the University of Washington. C-client was designed for writing IMAP clients, but it also can access local mailbox files in many formats, with a nearly consistent API. Mailsync's mailboxes can be on IMAP servers, on the local filesystem in UNIX, MH, or any other format c-client supports. What about "detached client" mode in an IMAP client? Mailsync attempts to solve the same problem in a different way. The "detached client" idea assumes that there's a master server and a periodically-connected client. Mailsync does not designate a server or a client. (In fact, it acts sort of like a client that arbitrates between two servers.) Currently, the concept of message identity is based entirely on the Message-ID field. This may change. mailsync-5.2.2/doc/mailsync.10000664000000000000000000000631510350351123012673 0ustar .\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH MAILSYNC 1 "February 15, 2003" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME mailsync \- Synchronize IMAP mailboxes .SH SYNOPSIS .B mailsync .RI [ options ] " channel" .br or .br .B mailsync .RI [ options ] " store" .br or .br .B mailsync .RI [ options ] " channel store" .br .SH DESCRIPTION This manual page documents briefly the \fBmailsync\fB command. .PP .\" TeX users may be more comfortable with the \fB\fP and .\" \fI\fP escape sequences to invode bold face and italics, .\" respectively. \fBmailsync\fP is a way of keeping a collection of mailboxes synchronized. The mailboxes may be on the local filesystem or on an IMAP server. There are three invocations of \fBmailsync\fP: The first will synchronize two sets of mailboxes - in mailsync referred to as "stores". The second form will list the contents of a store. It's usage is recommended before synchronizing two stores to check whether mailsync is seeing what you are expecting it to see. The third form will show you what has changed in a store since the last sync. .SH OPTIONS A summary of options is included below. .TP .B \-f file Use alternate config file. .TP .B \-n Don't delete messages when synchronizing. .TP .B \-D Delete any empty mailboxes after synchronizing.. .TP .B \-m Show from, subject, etc. of messages that are killed or moved when synchronzing. .TP .B \-M Also show message-ids (turns on \fB\-m\fP). .TP .B \-s Says what would be done without doing it (turns on \fB\-n\fP). Attention: this \fBwill\fP change the "Seen" flag of emails and will create new, empty mailboxes in order to be able to compare them. .TP .B \-v Show IMAP chatter. .TP .B \-vb Show warning about braindammaged message ids .TP .B \-vw Show warnings .TP .B \-vp Show RFC 822 mail parsing errors .TP .B \-h Show help. .TP .B \-d Show debug info. .B \-di Debug/log IMAP protocol telemetry. .B \-dc Debug config. .TP .B \-t mid Use mailsync with specified message-id algorithm. Currently you have the choice between \fBmd5\fP and \fBmsgid\fP (default). \fBmsgid\fP uses the Message-ID in the mail header to identify a message. \fBmd5\fP calculates a MD5 hash from the "From", "To", "Subject", "Date" and "Message-ID" headers and uses that as message identifier. If you use mailclients and servers that allow empty Message-IDs (f.ex. in mail drafts) then you should use the md5 algorithm. .SH SEE ALSO There is more documentation in .IR /usr/share/doc/mailsync , and in .IR /usr/share/doc/libc-clientxxxxxx/internal.txt .SH AUTHOR Originally written by Jaldhar H. Vyas for the Debian GNU/Linux system. Updates by T. Pospisek . mailsync-5.2.2/doc/mail-flags.txt0000664000000000000000000000147010153163271013552 0ustar Status: O --------- MC: UNIX mail reading programs which open a traditional UNIX format mailbox set all existing messages to have "O" (old) status. This is interpreted by Pine as meaning "not recent" ("recent" is an IMAP concept, and Pine is based upon an IMAP used with IMAP). Note that this is not the same as "seen", which is governed by the "R" status flag. As soon as you open a _remote_ stream/mailbox in any other way than HALF_OPEN c-client will attach an "old" flag to the message. As soon as you write to an open _local_ stream/mailbox c-client will attach an "old" flag to the message. Status: R --------- Seen - this means that the user has actually _looked_ at the message. This flag can be set and removed. Sources: -------- http://www.washington.edu/pine/pine-info/2004.01/msg00061.html mailsync-5.2.2/doc/HACKING0000664000000000000000000000602710070472721011770 0ustar DEFINITIONS: ------------ The terminus "mailbox" is used throughout the code in accordance with c-client speak. What c-client calls "mailbox" is commonly referred to as a mail FOLDER. In mailsync a box containing multiple folders is described by a "Store" - have a look at store.h for details. MSINFO format description: -------------------------- ATTENTION: the msinfo format can change without warning! The msinfo file contains synchronization information for channels as defined in the configuration file. Each channel contains the mailboxes associated with it and the message ids of all the mails that have been seen in those mailboxes the last time a sync was done. The msinfo file is a normal mailbox. Each email therein represents a channel. The channel is identified by the "Subject: " email header. The body of an email contains a series of mailbox synchronization entries. Each such entry starts with the name of the mailbox followed by all the message ids that were seen and synchronized. Message ids have the format "" or "<>, tag: ". Example: From tpo@petertosh Fri Oct 4 12:18:13 2002 +0200 From: mailsync Subject: all Status: O X-Status: X-Keywords: X-UID: 2095 linux/apt <1018460459.4617.23.camel@mpav> <1027985024.1352.19.camel@server1> linux/mailsync <001001c1d37a$39ee3d70$e349428e@ludwig> <002b01c1e95c$94957390$e349428e@ludwig> From tpo@petertosh Sat Nov 30 18:21:55 2002 +0100 Status: X-Status: X-Keywords: From: mailsync Subject: inbox INBOX <>, md5: <2292e5bda62ae83acbd11f3d61d62c7b> <>, md5: <24c5f14bd1b8198520736843f369f415> We have here two channels. The first is use for synchronization of all my mailboxes and the second one solely for my inbox. The first channel contains the mailboxes "linux/apt" and "linux/mailsync". Each of those mailboxes has had two mails in it. The first is being synchronized through the standard method, by using Message-IDs to uniquely identify messages and the second one is using md5 checksums. Take care - mailboxes with *empty* names *are* allowed. RELEASE PROCESS --------------- 1. * release CVS tarballs 2. as soon as it seems stable: * make note in NEWS about alpha release * release alpha * make dist and upload 3. after some downloads without complaints: * verify that problems that the release was supposed to fix are actually fixed with the people that had them * update version number to beta in configure.ac * make note in NEWS about beta release * release beta * make dist and upload 4. after enough time: * update version number in configure.ac * make note in NEWS about release and beta period * tag CVS with new release number * release * make dist * double check that the tarball doesn't contain any crap * upload * go through Tracker and tag them as closed in debian/changelog 5. after some time: * go through BTS and tag them as closed in debian/changelog * make debian package with: dpkg-buildpackage -iCVS/*\|.cvsignore -rfakeroot -kFC992520 * double check that the diff doesn't contain any crap * upload mailsync-5.2.2/doc/mail_open_close_flowchart.dia0000664000000000000000000001733010063265745016670 0ustar ‹í]íoÇŃ˙îżâŕ]0ë} ë)’´Ü8xŇ~hľ'‰’ů”"’Šm xţöggď(‰ÔyĽŰ9ŠňşHŇ•W7Ţěüćmgţüý§ëiöÇx±śĚgo_2B_făŮůüb2»zűň_˙üůűňűď^üůb’ë˙ąZä×™˙ŤŮVo_~X­nľ}óćăÇŹdúy™Żć 2ťÜ’ĺřÍ˙ĺÓiţĆozóň»Yöđů*‡ź•?ÍW«Ĺäěv5ÎfůőříËłüü?W‹ůíěâe±«Üw>źÎŮůôíËŻ.Ăź—oĘÇĽŮxÎŽgßäWăłĹ8˙OýŁ©˙ă\›GߌŰŹ˝ľ™/'~ËęóÍŁ-5Ď?ŘSîZúMł«ďľúA~U|¤ň÷ĎŞú µDV×ůâj2{LÇ7Óâ‹ŕÄrÎ×ßĂá$ÎđILńI,đIL–Ł›ůbµČ'«ÇdÎćóé8ź”V‹Űq{:Ëó|ęEf+¬ýÓ/'«Ő|ĎçżĚ§Ë& ?ľ;=‡žÄ«Ĺäb÷AÜŘQ󔏓‹Ő‡Ń§]_%ŞýV<˙3Úó˙,'gÓq“ŮŞóű^?ţsśÇożˇ ‘」DO«Uůćţw¸Ężşť\Ś—{DmsOÍ“>”ŰŢěűÖ·÷5ýbŠmp 1Í?Źĺă˙r˝Yů‚K­óŕ[€ 7<ĎĎţw|ľ*ţy:˙xţ!_¬˛o˛żĚ?˝Ľ7.Ľi1ąxűň=Ý÷mřçy•¸|,Y7ó{ŮâD–ĵ—a svVuĎWůěj:ľ#%T eŐbĚ(˙Łö„ÇÓńőč|ľm8LZAŮěR5řů0ž\}Xí„Jdüú0˙8Ş01°ň&ż¸Ř•ť”ójü©â›ÚÖŹvŐ}3ÁÜÚąe8ÖŤ;?z=ŘĎg«jrđ7Ůe~=™~öź+ź-_fËŐgP#ţôżü·ńôŹńjrž?üúÚ}Ž ‘«|S¶;©m}Ty\ˇĆk ł%çí(n‚Ö– lú+”v'çŤĂ«Ůő¸îĹŽg·×¨ľ‡V%<íµü <©‡ßĽvľČaţ Gä1İ(# ÚWăCLAJ7dÎĂLWĄßż~ńÇíb4Í—«Őäz[®˛‚ŕ×ůőÍ0»Ľťř”­ž8ť{ŹäÜëŐ‰?ţĂ®Ľ-“Fí#(W}ĽRTĎ•¨N4«HĘŇř·ééCWjhiy/EV’~ňĚťylć1hĎZî‚Q)ĎśňĚĎ`4ˇ )ND W=•p•Ž„6N Y€@/Ń*ZRSj(Lé€:¦؉Ál3äţ°0ÎĐÁG–bUĎŢăŐíb–U%uJďŻHë<đŢ^ďsß¶ť´6Ţ^ĺź˙fݞň™äb|v{5š\ç7Ů÷`úń§żüëŻŮ·Í^g݇ µ{´9¨+â6ˇöÓŽł™H`â]Şź"ĺ’‡8,[Mř©†Ů~[Íăoý_ů˙”ú5´ŽĐŞ’ăĐę; e#i%[h‡^˘˙6’jČ,ˇÜVÇzŠiugłéĺ ćë!¬ĺRX+…µžóő é]tfá)®őTâZ.R·L}lL/5Í\¬éq5”śpÍXĆű)ÄŠĂpĂJ,K\ŞÄJŃ-´čÖ]™ňFëţ§ă…W•ˇ®Gá-ô€VŠgőĎ2pOŕÚB:*Á5f@ëĐűŹtł+Á~Č®Ŕ/ër ÔF°˛ŽŤFP]Ôk:,=€+5ÚŻÚQÝ҇ÍtfsŤů¨ruůyv>ň˙gFÎĎkŐÎ.‰i¨r:*śC?AĄ˛Ů§j%ňXÍ4Ă6ÄŞÔK#ĺr(ˇ:Ų;ŕToT«”ę6%ŹŐÉNŰ˙ÇI~=Ý>iÖYx“Tp–ůFx$ľ±ÄÚ’’–!dZ”µÉp–·Ł\mčŁ0Yiâ?îťÁ <:ŃŹ˘XÔ*mÚQ¨7í÷ö‡Pylq?ŇHB ĄÄÓ‡Ž"ł‘“Ér´_ĎWăďxÄ.˝a*ř@@ćU‰çě ŔGu–‚ń®Đ!8ˇő ®ń)qş¤3”ŽŘ°p%3>dD`®`NlěC ö0x’HˇN$¦Áß˙:úŰď~~˙ëOżd˙}xUüuŘ")q¬P ,ˇG ôxşx7™Ť«ĐCtEŹPhĺÍáÝÚÖl„žUÖ%#ť‚j×\ĘJÉv”ĎçłŮh<»µâsćض ŕ%çüfűĂTuúÜőP`Íż}¤Aד}đRę”ŐĽđDłűżö‡ňŁżĚÖżĚ7Ůąú=żŞeÝU”¸Z_”m 3˘Áܱ„YÝÖSX¬>Śö q őĄŮnżXy,ě=—˘—óĹdSßîҵ»Ň]őżwČgĘo˝q0ż]UX9»ćNÄ?¸[Nť\łůŰ4öÉ­;ł& üx}«×»˙Ôż„ôŃ%YÓ–ěačSĹä ňźRťúŘZ1l òţDňłw¤ŞmŚT5ܨÇdHU+ äµĽ)SŐFŘŇzŞş3“ SŐś#§ŞŁ)UÝ« ~–RŐŘţ·`%5Ć&Ľ§TµëśŞfÄqăµ*':<%/’ W±˛ kÔ”u &›&­U Ů>‡íYĘZ/k]Ř€%\%,é'śËiŚÄ5g@xŤn,râÚ(q.‡ ŕŤŃ°Öܸו|î@Ń䞎S}XîÚ'wÍY„ܵ oÍúÍ‘ł×Ú”hđ§­÷=ýZÓ±ˇĆ9ěîL6Ěb'›čŮŘD)ŤŤéF â‚éăH¦O¦OçŠď»‡Ž@‰2¸RËL‘L&6č{u\îH;h„8ą\6g]rŮöąl."ä˛ L‚uŤ.Ě%bB´Xkî֔͢›&´«™¬ßŞ·ĂGő'ä°­Ę•ŇÚŃť‡’Ôk'2VaTh‰~ţŔÜpfť˘ŠRŐSUÔ‹;Î í÷;"’¨H˛ Cyéşsm3E+l:k9‚ΡˇřH›Ť9 Îswîĺ1®3oÝĄ"ůÎÍ}翎WŮt˛\Á|Ő|:]`/łËĹü:»ś,Âč$ď`gyr©±*õ&6yÔ}%¦ąŽŐ–h†ŚĽ Łt jĽd2léČ^SQ Aľ9K‚ Áń^’MŇWL6JywxoČŠ»©§CIËŔŤfTĘ@W3×]ÁĺCČ<Ľ"w"N´îâD«c9Ńť »9/ś[#—µ˘‚Ýí=%ć´r]v»޶BÜĚŠÂdcH‡h ijÇu˛†°­ˇdá`X8á°SM”JŐ۱Mśš.·Ľső6/㝆épńaM‰đÁ†^•@Ů´¦Ü§Öx7źßds˙6=¨¤L˘+“:™LMo1ý%AcÔ°8'áĹ9j‘&i9Ů µ¶p„ „•ă=±T±YďZÁç<9—Ém_ę>ČeŇGr™‹ Ĺ:E¬Čb¬lAÉXaaFKčĄlLXŁşL1l?v„§âÝgŇŞ4zĘ+Mç·‹ĹčÚŻĂ”C<ĽŮ”Ą«MŃm#!Šţt^EĐ ‘-Ěl¤Q߫‹ónŹEGVRňŞ}čEFÂÚҰFF•îL6A—Z;?LąŻÎ?Ś®ÇËe~5M.’Cߡ¶D†cé 4z 4 ´Ä«n«-2hHSRb6¸"ˇ×‚ĺaŤ ť™l芄ĎăaňDž€'ÂJ Á64DTP‘@E@PŇú˙2lP´ Ä˝fO„Ę*¬‘AĄ;“ =‘Ţz& ’\‘>\PCĄjô†*j„t˝×ÝÖ`ÇŻÂÍ( Ä!+B‰kčl‚żęÎdĂ6o µ¨^$Ô裦>T‚xáÚ2›Ě˛˘¬~>[_ČĘňŮE*­GóBX1ĽÇ"x mő†':J>„şă¬umDótČš ¨©Ká—čÉŽ6ÂEhrANL®óĹÖHň=β|™Açé?Ć B „ZUhš¦\ö… &FË1 ~‘mgM6ŽcÉ‚’vJĂx%żv4¬±ăXť™l葸"§ "ţÄÍfă)¤ČčrľđâuóŮ˙MM‚$­ćŁł”‰Ź(ĽÔޏ ý R:ß–„áŹA±{uĹ4¦Wâ))WP˛ZëˇöPÂť0 h &¤Da˛ˇcĺ̨˘S +]—<=€€1"ŚÂuIm›=Dçë’RÔ¶č`ů7OI–”Ľá?Ô’¸°VaŤ 1lX•Ć“?‹Ü9tÚŞÉZŻŕA© PaáČ‚–HG|@©ľ);_›•ş|yÚ—`6J˛ ÄśfC/6N ćíFÂő:b0٬ ËpÖič>\‘ŢeŁZ§á›=ĚjN&ËbřfBŹččÁŕšş8KśŃ =zj¸ ;_UŔťNnĽ (Q*’ňţÇĐŻ™`2¨sg±;.ÔňąC–»ŕL˙MÖ}Ľ5Q7„µm‚ě|ÁUY˙…37p†*QeŃ‚)(i%őаríÂÓŠ‰Âd#×§tÜópŤ˝ĺR36ůÁŃ--‰ŞŔ[2Ş Y2}čd目 Ąl ,ÜŰ1SÄ×”=¸ÉŻL”ukĘ}Ş•'µ=a_'}©ăŞÚ1ćJĂ‹“[mÜQb…ÚŕPu[P> µńKR]o«Ą/© Tµˇ"XF+6PśXa­Ť5%ć)kÁZ„u˛6ľLkŁZú’Ú@U:‚µˇÂ‹ÓŘj㥠6ŔÚjĂśÚHÖ†µQ-}Im ŞŤÎUü “N†ô·mS®Í"ăkJ†(Oi˘" ĘĘžB˛7Yń“»uŇ—ÔŞÚ°’»ĆJŠsŚu¸ÉÝ;JÔşˇ7Ląkëdm|™5!ŐŇ—ÔjMHçu¨éc‚ľ×Ĺ<ńŐ†"Vs(QɆwE‘á{la-ź;˛ö¶CŔńqlׄČCqČ­)&JAÉ~AV4FqTň„âTŠém+ ]lJ†â&ĹMÂőPÜTÉgĺVgŘęěÉ ˛=D«ťŕ‰ZĄX„KCƨŽo­éĄ!Ă×”„˙O”¬‘/ ug˛QeőJ<•Fťz»›Étt>ť/ÇŻTIy&®_“-Ź`Ë—°!Ľc—Ş˘bŰňżO®~ĎŻę ˇÎ•µwEmělě*o.PRPYë)0ś˝YBdŰ‹I‹Ő‡Ń^#¨–Çú­đˇ•űŠÁŤoŐXť/&›2»K^wůĄőżwČgĘo˝~ťß®*0c‘.óérŚiűńú€űŤ?ĆŽTŻ˘ĚđPÖ„ÎRäN‡tM‰™0řI żö&“_c÷:ěĚdĂvë"Y§Ţ§j~óůľŮ!ÜĎrÎS\śŃOFs01,ué©ÓŠ1ĄŁPć,„‡G?©5%ʡ»aą°Ć†ŤÎL¦î†©»aęnŘkwĂR?pď“ Ą'HQ1şŢ)zTO(Ýéuď‰(úRzwĂÎL6ELrDNý†®ß˝Őółů©ŻHt¤ćÍ–H‘śŹŢ"Ęp# }­ vĚŠŻ)ń"fU¨oEZ_«kî|tf2ŬľÜŐĬň1+Ǹ?’Xž`Ł/Ř1‘C&Śko{#Ǭ4_Sb`C) k kdŘčÎd‚Ť/ŞP~×wüéćvv•| ĐPÖÂ'ă}Ť•ę 4l<Đ€Gý€Ěqzć8őL ń…Í#O ŃhŔ¤¦=¶MW.B7ç@§ ć•+r7'×” H%‰Ôp?Dh"n*“Í€C˘·M7,µMďŰńH]ÓŃŔĂC9óGS!xôäqčÎ Akë`÷ Âp{ŤzJ¬¤DŤ‹ő¬ ¬`Ť Ql8ĺ/ÝÇz.aŞâVö6{tA+O÷łđňä’đÂČóHbRÂŁ§^ şóÍ^pXp$ˇ3v’ˇ™ ęÜY6ôę]1ŁeĆ-ňőZ>wáŽlqÇ»˘îÝŇö˝4EîµPÓkHwľb(Âü¸ÂZи&Ń%NřŇ0ϲ¤ěRĺ/ł˘¸NúRŻ!Tüë~·ŃA 50†h+,fÎ;ŰÎB‚Ű!Äk˝50ÖLm6†żZ6«·‹ËŁ€_$ŃDĂ1˙ťYJ¸Ŕ +b¶ -aÇűŤj6«·Â>kNZ2T ÉXNtëX¨@ÇźÄ ~%l}.’‰Ç Öí^ť´@č(âߍ"śŁKa¦X8Ó‡ŃrtTňąk+;V$.ŽtOüfP†×6YŐŘM…”0br\ď@­xëâŠ0ĄŠËęťw5ěm§7? Ń`1DŁ( 5¤ő ëưbÖ”D+w5ˇ˝G%ź»¶zĽ;iéŕ1`%Ľ#(ŘŇÁbF Şľ zv§–É]5/ĘŃŽ7]};»C{j†mbDZË/^a±}"QşELăע-UÉfµÔÚ°Ő~-3ŃxP/l#±»!ÖîšC[]ˇo:ĽąĆ…»|MÉC.ä±%ä±%'TrěÂÝÎL¦ÂÝT¸›ŇÍ…»%r8o§r«ž wŤŠQ¸+CmQŹ©iá®p%%/+ˇp7P–´˝KÔĽp·3“©p7î¦ÂÝ^ w #ĎmU’ Ćut„Â]áBA+x»ąpW˛‚’˛ wĄ …»Řř…»Ő|îÂw¬¨_zŰ%>¨p×›&G)Ü5&FáîZq\“莒% |iUvSÁnK9îž|ánĄôĄÂ]üÁBĆFh\Ţ;R„rě ˛,ďĘ:c†2 ˘ q^k%ćdˇZ&wmőźJČ˝Ąe zcë±ćEÔíË,‡ ě19Ó˛űh¸G#h6ŮGâOh()ËĂѸ*ąÇU‡}4*™Üµ•ą9ş2ĽÚÚúlŽĆ¶ąxŘѰô8IHŁŚ¦śJ¶Ů.) © J˛,Á™oR*ú(˛ŞäłĘsá¬9uŻÉö%‹,ĆthnÍŔqo‚ěéĐ:ĐńpćBy¦ FŢĂlčJ.«·2ŞĂcúäfC»-­¨ű’DA嶺Z‹=ž“9SPŞSΔ_U-đe±šĎšašŚŚź^më4«’:ŚIĺMm_ŰąÖČŁžwěŔz§žS‰9'ĆS’%f¨¶AÝ1čČoPmß:&ë•đ[މ}¶/¨XŻFůb1˙XOUt|ňh:ž]íJJn­Ú‘Ř“ölLˇ•ęđ¶iŚí×ŰČúU2–âp4ç~‡(‡·Îds©śëCqwŹŐSň}˛ZŮÁjQ[ŃPŐ×9×ńbr"Qă™áś«pzt‘ţ2úŽ3A¸ÁľßSËć.Ťŕ·ő~O:ćÇ|ë¤şŽą¬7úđNbL§rÎɱwΓ%!Z\ćsŇ/q˘5áFľI‹;vJ¸ëą/źg¤'ŽZěŤ! ]Q`:‚ ŢŤnK÷€qŤ9|>bµ˙jŻë\s}o Čźd)Tž’ÔkJÜĄ&Ľ ě`Ťzµ7“éjoşÚ›®öâ_m˛DQ ·9`%]íĹ ę:˘0G„/O{źłW,Pb%%iÄ[b…ać­`n&šDa2uJ†xDď0łŻ´*ŔĂ$đč©/„SńâÔŠH‰§ćŇJÂ)pn™†Phs#±o8ŐńąK–;ŔĚńjů·Ë‡äĘă\ŐsÝgjXb,Ř!Ň"űÓˇ{±2’1zN®ć"¬wŘ‚\Çç.ď۶wôŹxAŞK'ŽÓŕÄĹ +×ÂěÜ;§%%C ÍŰ5+)›¶”ű´ëţť 9„V‘ŐŇ—ś Ć“m´x˛‚Pľë#ž ”¸»Ź'+häz‰'wa2Ĺ“S<9Ĺ“ű‹'+ąi§z<ŮĹ' ¸ú®8¨hâ)q»¦äŃ„Ă4: kÓ~Â|óxrg&›Ĺ“•Đ”ˇĆ“5m()žśâÉO0žě,+Ŕ#…“{ '3J#„á¬ÖĹ‹ÓČQ8ˤ„”1eN†uĂĹjŘÜĺ˛ČöŢŃp®KÎ'Ç(‹…óŻŤsÝGÎű´Šëű(v[Ę) ÷<˘pŰŇ—˘p¸řÇ#äS‹ä!”ĂťOU%fyȧJWx3čŤjŮÜeĘuđ˛žNę ±uÎł)0Ł"†8[#Â{¶T#‹łJ†±Ú!„ŹÂÍE ¬4ň5¶j&wµšo†Ś}ÚťŃZ P—uâ}x†öń„{äĂ!ŁÔΩrLb_ń4!Á˘¸{p4«ĎP!îţI}ę{XkXŤŃvBwÍ€YĐő˝5Ë€íSR2NĂÔ^ÖšÂ5É&9N K őÓN¨Ů˙©ç7ăYöęo?Ľűyôţן~yťÍŮt~žOżýĺďﲯóë›aváß›6äÜĎćźĆË%BH’°µš N§,Iä(Qý•rFc4ç˛!Ě«˝'érű!˝¦$ˇ¤ Ęś(ÇŻ•wgňY¶+¨µŔm ŻôÎxŘ!«t ¤Ë€Ô0†őpˇŁ’Íę­’v”ÂăŕŹlčC§3Ś&ëMLđîCÉ´W]˛ăXŤfýJ=%VR˛†•"’G5¬1•d&›(IK´?"Yáϡ¬u5żŻkőFw˛®c[×÷#}4a&Ť:ď+ËhŚIië7gQQ#LżËÂS2€a*‡ íąśt=ĚJ«äs×\Ś}ĂŽią.&Đö`†Ţ, Ćb´ł ć#@» ‰Ü{L¬)q ×zDAąĂ=ÄćÝÇ:3Ů(ÉÓµžçw­gý2Ô8‚čä«ěüv±]űő7__­†—“Ĺr5Čro7ŤÎŇu„ë> ¦qÂ6›—‡“ą„k.ńĄ®Ćń ç…f¸•®F–„BW–Pě?ฒÇ;ý§:J¨(–\ĂŻŐţ«PDjěá×tM‰ĂŻ‹µ&ż–±ŽĎ][5QN mailsync_main.cc store_a.is_remote? store_a.store_open( OP_HALFOPEN | OP_READONLY) store_a.stream = NULL store_b.is_remote? store_b.store_open( OP_HALFOPEN | OP_READONLY) store_b.stream = NULL Get list of all mailboxes from first store a Get list of all mailboxes from first store b Loop over all mailboxes store_a.mailbox_open( curr_mbox->first, OP_READONLY ) store_a.fetch_message_ids store_b.mailbox_open( curr_mbox->first, OP_READONLY ) store_b.fetch_message_ids Get all message ids in boxes on store a and store b mark messages on store a and b as removed channel.open_for_copying( curr_mbox->first, a_to_b) store_from.mailbox_open( mailbox_name, OP_READONLY ) store_to.isremote store_to.store_open( OP_HALFOPEN) Y N Y N Y N mail_close( store_to.stream ); copy messages from a to b channel.open_for_copying( curr_mbox->first, a_to_b) same as above copy messages from b to a store_a.mailbox_expunge store_b.mailbox_expunge store_a.isremote store_a.stream = mail_close(store_a.stream); N store_a.isremote store_a.stream = mail_close(store_a.stream); N store_a.stream = mail_close(store_a.stream); store_a.isremote Y store_a.stream = mail_close(store_a.stream); store_a.isremote Y remote:reopen (HALF_OPEN) or local:NIL store_to.stream = NIL store_a.stream = store_a.mailbox_open( curr_mbox->first, 0 ); store_b.stream = store_b.mailbox_open( curr_mbox->first, 0 ); mailsync-5.2.2/doc/CVS/0000775000000000000000000000000010350351174011426 5ustar mailsync-5.2.2/doc/CVS/Entries0000664000000000000000000000051110350351174012757 0ustar D/examples//// /ABSTRACT/1.1/Fri Sep 6 20:04:15 2002// /mail_open_close_flowchart.dia/1.1/Mon Jun 14 09:12:05 2004/-kb/ /mail_open_close_flowchart.svg/1.1/Mon Jun 14 08:34:24 2004// /mail_open_close_flowchart2.svg/1.1/Sun Jun 13 18:00:29 2004// /HACKING/1.3/Wed Jun 30 08:12:01 2004// /mailsync.1/1.8/Thu Dec 15 20:30:11 2005// mailsync-5.2.2/doc/CVS/Repository0000664000000000000000000000001507614073620013532 0ustar mailsync/doc mailsync-5.2.2/doc/CVS/Root0000664000000000000000000000005707614073620012304 0ustar :ext:tpo@cvs.sourceforge.net:/cvsroot/mailsync mailsync-5.2.2/COPYING0000664000000000000000000000121407613617744011277 0ustar Copyright: mailsync is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License Version 2 as published by the Free Software Foundation. This 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. Please see www.gnu.org for a copy of the GNU General Public License. Alternatively write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. --------------- Linking with OpenSSL is permitted. mailsync-5.2.2/configure.ac0000664000000000000000000000134710111330742012512 0ustar AC_INIT([mailsync], [5.2.2], [tpo_deb@sourcepole.ch]) AM_INIT_AUTOMAKE AM_CONFIG_HEADER(config.h) AC_CONFIG_SRCDIR([src/mailsync_main.cc]) AC_PROG_CC AC_PROG_CXX AC_PROG_INSTALL AC_PROG_AWK AC_PROG_CPP AC_HEADER_STDC AC_CHECK_HEADERS([string.h]) AC_C_CONST AC_FUNC_STAT AC_CHECK_FUNCS([getpass memset strchr strdup strerror strtoul]) # default action of AC_CHECK_LIB is to add item to LIBS AC_CHECK_LIB(crypt,crypt) AC_INET_FUNCS(,[ AC_MSG_ERROR([essential functions missing]) ]) AC_SO_PREFERENCE([yes]) AC_WITH_OPENSSL AC_WITH_KRB5 AC_KRB5_GSSAPI AC_WITH_PAM AC_WITH_CCLIENT(,[ AC_MSG_ERROR([a working c-client installation is required for building mailsync]) ]) AC_WITH_MD5 AC_CONFIG_FILES([ Makefile src/Makefile ]) AC_OUTPUT mailsync-5.2.2/Makefile.am0000664000000000000000000000115510063266510012264 0ustar SUBDIRS=src AUTOMAKE_OPTIONS=foreign EXTRA_DIST=THANKS autogen.sh doc debian acinclude # remove CVS files from examples, debian and acinclude # remove debian autogenerated files # add link from THANKS to AUTHORS dist-hook: rm -rf `find $(distdir) -name CVS -or -name debian/mailsync` rm -rf $(distdir)/debian/mailsync rm -f $(distdir)/debian/files $(distdir)/debian/mailsync.* pkgdocdir=${prefix}/share/doc/@PACKAGE@ pkgdoc_DATA=COPYING NEWS README THANKS TODO doc/ABSTRACT doc/examples/mailsync doc/mailsync.1 doc/mail_open_close_flowchart.dia doc/mail_open_close_flowchart.svg doc/mail_open_close_flowchart2.svg mailsync-5.2.2/.cvsignore0000664000000000000000000000027510111330555012225 0ustar .deps aclocal.m4 autom4te.cache config.h config.h.in config.log config.status configure depcomp install-sh mailsync-*.tar.gz Makefile Makefile.in missing mkinstalldirs stamp-h1 stamp-h.in mailsync-5.2.2/autogen.sh0000775000000000000000000000053310111330646012224 0ustar #!/bin/sh # needed for Gentoo to choose the right automake WANT_AUTOMAKE=1.8 export WANT_AUTOMAKE ( automake --version | head -n 1 | grep -q ' 1\.[678]') || (echo "automake 1.6 or above is required"; exit 1) aclocal -I acinclude && \ autoheader && \ automake -a && \ autoconf && \ ./configure "$@" mailsync-5.2.2/Makefile.in0000664000000000000000000006061611704530715012310 0ustar # Makefile.in generated by automake 1.11.1 from Makefile.am. # @configure_input@ # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, # 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, # Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : subdir = . DIST_COMMON = README $(am__configure_deps) $(srcdir)/Makefile.am \ $(srcdir)/Makefile.in $(srcdir)/config.h.in \ $(top_srcdir)/configure AUTHORS COPYING NEWS THANKS TODO \ depcomp install-sh missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/acinclude/ac_inet_funcs.m4 \ $(top_srcdir)/acinclude/ac_so_preference.m4 \ $(top_srcdir)/acinclude/ac_with_cclient.m4 \ $(top_srcdir)/acinclude/ac_with_krb5.m4 \ $(top_srcdir)/acinclude/ac_with_md5.m4 \ $(top_srcdir)/acinclude/ac_with_openssl.m4 \ $(top_srcdir)/acinclude/ac_with_pam.m4 \ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \ html-recursive info-recursive install-data-recursive \ install-dvi-recursive install-exec-recursive \ install-html-recursive install-info-recursive \ install-pdf-recursive install-ps-recursive install-recursive \ installcheck-recursive installdirs-recursive pdf-recursive \ ps-recursive uninstall-recursive am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__installdirs = "$(DESTDIR)$(pkgdocdir)" DATA = $(pkgdoc_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \ $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \ distdir dist dist-all distcheck ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ { test ! -d "$(distdir)" \ || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -fr "$(distdir)"; }; } am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best distuninstallcheck_listfiles = find . -type f -print distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CCLIENT_CXXFLAGS = @CCLIENT_CXXFLAGS@ CCLIENT_INCLUDES = @CCLIENT_INCLUDES@ CCLIENT_LIBS = @CCLIENT_LIBS@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CXX = @CXX@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ KRB5_CFLAGS = @KRB5_CFLAGS@ KRB5_CONFIG = @KRB5_CONFIG@ KRB5_GSSAPI_CFLAGS = @KRB5_GSSAPI_CFLAGS@ KRB5_GSSAPI_LIBS = @KRB5_GSSAPI_LIBS@ KRB5_LDFLAGS = @KRB5_LDFLAGS@ LDFLAGS = @LDFLAGS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ OPENSSL_INCLUDES = @OPENSSL_INCLUDES@ OPENSSL_LDFLAGS = @OPENSSL_LDFLAGS@ OPENSSL_LIBS = @OPENSSL_LIBS@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PAM_INCLUDES = @PAM_INCLUDES@ PAM_LDFLAGS = @PAM_LDFLAGS@ PATH_SEPARATOR = @PATH_SEPARATOR@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build_alias = @build_alias@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host_alias = @host_alias@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = src AUTOMAKE_OPTIONS = foreign EXTRA_DIST = THANKS autogen.sh doc debian acinclude pkgdocdir = ${prefix}/share/doc/@PACKAGE@ pkgdoc_DATA = COPYING NEWS README THANKS TODO doc/ABSTRACT doc/examples/mailsync doc/mailsync.1 doc/mail_open_close_flowchart.dia doc/mail_open_close_flowchart.svg doc/mail_open_close_flowchart2.svg all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --foreign'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --foreign \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --foreign Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @if test ! -f $@; then \ rm -f stamp-h1; \ $(MAKE) $(AM_MAKEFLAGS) stamp-h1; \ else :; fi stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 install-pkgdocDATA: $(pkgdoc_DATA) @$(NORMAL_INSTALL) test -z "$(pkgdocdir)" || $(MKDIR_P) "$(DESTDIR)$(pkgdocdir)" @list='$(pkgdoc_DATA)'; test -n "$(pkgdocdir)" || list=; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgdocdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgdocdir)" || exit $$?; \ done uninstall-pkgdocDATA: @$(NORMAL_UNINSTALL) @list='$(pkgdoc_DATA)'; test -n "$(pkgdocdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$files" || exit 0; \ echo " ( cd '$(DESTDIR)$(pkgdocdir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(pkgdocdir)" && rm -f $$files # This directory's subdirectories are mostly independent; you can cd # into them and run `make' without going through this Makefile. # To change the values of `make' variables: instead of editing Makefiles, # (1) if the variable is set in `config.status', edit `config.status' # (which will cause the Makefiles to be regenerated when you run `make'); # (2) otherwise, pass the desired values on the `make' command line. $(RECURSIVE_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" $(RECURSIVE_CLEAN_TARGETS): @fail= failcom='exit 1'; \ for f in x $$MAKEFLAGS; do \ case $$f in \ *=* | --[!k]*);; \ *k*) failcom='fail=yes';; \ esac; \ done; \ dot_seen=no; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ rev=''; for subdir in $$list; do \ if test "$$subdir" = "."; then :; else \ rev="$$subdir $$rev"; \ fi; \ done; \ rev="$$rev ."; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done ctags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \ done ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES) list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ mkid -fID $$unique tags: TAGS TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: CTAGS CTAGS: ctags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) \ $(TAGS_FILES) $(LISP) list='$(SOURCES) $(HEADERS) config.h.in $(LISP) $(TAGS_FILES)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | \ $(AWK) '{ files[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in files) print i; }; }'`; \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-hook -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2 $(am__remove_distdir) dist-lzma: distdir tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma $(am__remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz $(am__remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__remove_distdir) dist dist-all: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lzma*) \ lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir); chmod a+w $(distdir) mkdir $(distdir)/_build mkdir $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @$(am__cd) '$(distuninstallcheck_dir)' \ && test `$(distuninstallcheck_listfiles) | wc -l` -le 1 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(DATA) config.h installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(pkgdocdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ `test -z '$(STRIP)' || \ echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-pkgdocDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-pkgdocDATA .MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) all \ ctags-recursive install-am install-strip tags-recursive .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \ all all-am am--refresh check check-am clean clean-generic \ ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \ dist-hook dist-lzma dist-shar dist-tarZ dist-xz dist-zip \ distcheck distclean distclean-generic distclean-hdr \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-pkgdocDATA install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \ tags-recursive uninstall uninstall-am uninstall-pkgdocDATA # remove CVS files from examples, debian and acinclude # remove debian autogenerated files # add link from THANKS to AUTHORS dist-hook: rm -rf `find $(distdir) -name CVS -or -name debian/mailsync` rm -rf $(distdir)/debian/mailsync rm -f $(distdir)/debian/files $(distdir)/debian/mailsync.* # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: mailsync-5.2.2/AUTHORS0000664000000000000000000000001307614205440011273 0ustar see THANKS mailsync-5.2.2/CVS/0000775000000000000000000000000010340571361010662 5ustar mailsync-5.2.2/CVS/Entries0000664000000000000000000000071510340571361012221 0ustar D/doc//// D/src//// D/acinclude//// /COPYING/1.1/Wed Jan 22 22:49:08 2003// D/debian//// /AUTHORS/1.1/Fri Jan 24 09:45:04 2003// /TODO/1.24/Wed Jun 9 20:58:07 2004// /Makefile.am/1.6/Mon Jun 14 09:18:00 2004// /README/1.14/Fri Jun 18 07:39:33 2004// /.cvsignore/1.6/Fri Aug 20 08:08:13 2004// /autogen.sh/1.4/Fri Aug 20 08:09:10 2004// /configure.ac/1.18/Fri Aug 20 08:10:10 2004// /THANKS/1.11/Tue Nov 22 10:26:58 2005// /NEWS/1.32/Tue Nov 22 10:28:05 2005// mailsync-5.2.2/CVS/Repository0000664000000000000000000000001107614070512012756 0ustar mailsync mailsync-5.2.2/CVS/Root0000664000000000000000000000005707614070512011534 0ustar :ext:tpo@cvs.sourceforge.net:/cvsroot/mailsync mailsync-5.2.2/NEWS0000664000000000000000000001502710340571265010736 0ustar New in 5.2.2: * patches for a smooth Gentoo ebuild by Michael * strongly advise AGAINST using novalidate-cert * add missing parameters in printfs in error messages (thanks David Binderman) * ATTENTION: currently we're not closing the box any more New in 5.2.1: * c-client-header.h was not contained in the tarball, strange I got no feedback!? * added some more #mh howto by Michael New in 5.2: * shoving around of code for better comprehension of the code * fixed fix from 5.1.1 * mailsync shouldn't possibly be messing with flags at all if the mailbox (IMAP f.ex) allows it. * support for Linux-lib64 by Heiko Rommel * fixed problem when retrieving delimiter * not exiting any more on stores without subdirs * lasttimes were not computed correctly - this could result in a message being retransmitted if deleted on one side * don't delete duplicate messages with empty Message-IDs (thanks Kunal Chavan for bugreport) * removed [] around config.h in configure.ac - this was causing problems for Akkana Peck for unknown reasons * don't show message IDs by default * we require automake > 1.6 or else we'll complain (thanks Michael, Akkana, Eric!) * added HACKING file * more verbose error message when c-client is linked against kerberos, but kerberos is not installed * small compilation fixes (thanks Heiko) * checking for and adding libcrypt to LIBS * added workflow diagrams showing when mail_open is used with what options * -n has a new meaning: do not delete messages * move c-client.h to its own include file, so that we can clean up the mess it makes in a single place (idea Michael) * since there were so many changes, renaming as 5.2 * RELEASED after 2 weeks test period New in 5.1.1: * not properly expunging emails fixed (Michael fix, Bob testing) visible with #mh folders New in 5.1.0: * option to use md5 hashes of headers as msg ids and/or along with the msgid in the message header (patch by Bob Lindell, adaptation me) * warn about empty Message-IDs when using the default msg id algorithm. * document md5 vs Message-ID in the README * -di debug/log IMAP telemetry/protocol * -dc debug configuration * fix copy/paste bug in ac_with_md5.m4 (Michael, bug by me :-/) * fix rubbuish deletion in dist-hook * fixed traversing some boxes twice New in 5.0.0: * completely reengineered: - really object oriented - grouped sources together that belong together - simplified a lot of things * it should be possible to sync stores which contain folders with messages _and_ submailfolders. However if two stores do not _both_ allow messages _and_ subfolders in folders at the same time, submailboxes will be created first and messages in folders that contain subfolders will no be synchronized! (Detlef Vollmann helped with C++ quirks) * build fixes by Michael * documented diff mode * Solaris autoconf by Michael, Heiner Steven and anonymous (thanks to all ;-) * mailsync forgetting to purge local stores (problem occurs with #mh boxes) fix by Michael New in 4.5.4: * removed acinclude.m4 (Krelin's code-beautycenter, me) * checking right at the start if we've found any boxes to sync * added courier example with foldername including spaces (upon Gonzalo G. Agulló's confusion) * splitted up sources * removed forward references in code New in 4.5.3: * automatic detection whether -fno-operator-names is necessary (bugreport Wolfgang, implementation *Michael*) New in 4.5.2: * added RH's c-client location (thanks Wolfgang Sailer) New in 4.5.1: * fixed build procedure description in REAME (thanks Wolfgang Sailer) New in 4.5: * Simulate option * fixed mapage * sizelimit option for channel contributed by Michael Krelin * minimaly better error handling * reads in and initializes c-client configuration * bugfixes for prefixes that exactly match the mailbox name and therefore end up empty by Michael * msinfo format documented * a little simpler msinfo parsing * added #mh mail format example * added Michael's #mh over ssh example * automatically setting -m when listing store. Bugreport by Andre Srinivasan * autoconfiguration by Michael New in 4.4.4: * Check every fetch operation for success * documented the fact that mailsync is not really fit for concurrent mailbox access * extended loging * reengineering - clearer naming of variables (I hope) - int msgno -> unsigned long msgno (as in c-client) - functions and variables that return/contain only true/false are now booleans New in 4.4.3: * do not copy deleted mails New in 4.4.2: * documented list mode * list mode can display contents of mailboxes * more docu * reordered code to make it more coherent (IMHO) * various functions (fetch_mail_ids, tdc_mail_open) had too many crucial side effects which made the code very hard to follow. Untangled that. * closing a stream before writing in it (c-client logic!) so that new messages are not marked as seen. That means, that mutt users should be happy(er?) now. New in 4.4.1: * more explicit and consistent error messages, more sensible debug output * documented the code and renamed stuff so that it makes sense * messages-ids are sanitized and saved in RFC822 format only. * warnings about spaces in the message id are now optional, see the "-bd" option * fixed a bug that occured when files were copied over but could not be saved for some reason New in 4.2.3 to 4.3.1: * bugfixes, docu fixes - see debian/changelog New in 4.2.2: * password can be set in stores/channel New in 4.2.1: * recursive copying should work now * comments in config files * minor bugfixes and cleanups New in 4: * If the same new message is in both stores, it's left alone. (mailsync-3 would copy it in both directions, wasting bandwidth and creating duplicates). * Now makes a single pass through each mailbox instead of two. This reduces network bandwidth (though probably only a little, not by 50%). * Can handle either or both stores being empty. * List mode ("mailsync store") and diff mode ("mailsync store channel") fixed. Diff mode no longer removes duplicates. * The per-mailbox summary lines ("foo: 1 deleted, 30 remain") now appear before the copying & deleting are done. So if you see "foo: 4384 copied local->remote" you can hit ^C sooner. * Now mailsync is a C++ program. Reduced from 2000 lines of code to 1200. Data formats (.mailsync and msinfo) remain unchanged. Fewer memory leaks and less opportunity for buffer overflows (though I don't know of any in mailsync-3). mailsync-5.2.2/THANKS0000664000000000000000000000263110340621615011142 0ustar Thanks go out to the following people ------------------------------------- Tim Culver original mailsync author: v1-v4.2 Jaldhar H. Vyas mailsync manpage and initial Debian package Michael Krelin sizelimit option, bugfixes, docu corrections, autoconf ... Bob Lindell first md5 checksumms patch, testing Heiko Rommel @ SuSE Linux-lib64 support, various bugfixes Akkana Peck build bugfix Daniel Scheppler manpage, debian build, dependencies fixes Good bugreports that helped fix problems or help on the mail list ----------------------------------------------------------------- Steve McIntyre concurrent access LaMont Jones build problems Alain Tesio typo -> segfault, doh! Aly Dharshi RH build Andre Srinivasan not automatically setting -m when listing contents Wolfgang Sailer forgot to adapt README to autoconf build procedure, RH imap location Kunal Chavan don't delete duplicate messages with empty Message-IDs Akkana Peck config.h quoted in configure.ac, automake dependency Eric S. Johansson automake problem on Gentoo and testing David Binderman missing parameters in printfs in error messages Holger Krull Courier config Current maintainer ------------------ Tomas Pospisek mailsync v4.2.1-now mailsync-5.2.2/config.h.in0000664000000000000000000000520511704530657012264 0ustar /* config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if you have the `getpass' function. */ #undef HAVE_GETPASS /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `crypt' library (-lcrypt). */ #undef HAVE_LIBCRYPT /* Define to 1 if you have the `inet' library (-linet). */ #undef HAVE_LIBINET /* Define to 1 if you have the `nsl' library (-lnsl). */ #undef HAVE_LIBNSL /* Define to 1 if you have the `nsl_s' library (-lnsl_s). */ #undef HAVE_LIBNSL_S /* Define to 1 if you have the `socket' library (-lsocket). */ #undef HAVE_LIBSOCKET /* Does c-client include md5 support? */ #undef HAVE_MD5 /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if `stat' has the bug that it succeeds when given the zero-length file name argument. */ #undef HAVE_STAT_EMPTY_STRING_BUG /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `strtoul' function. */ #undef HAVE_STRTOUL /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Version number of package */ #undef VERSION /* Define to empty if `const' does not conform to ANSI C. */ #undef const