cyrus-imapd-2.4.18/0000755000175000017500000000000012546375260013023 5ustar ellieelliecyrus-imapd-2.4.18/autom4te.cache/0000755000175000017500000000000012546375257015635 5ustar ellieelliecyrus-imapd-2.4.18/autom4te.cache/output.10000644000175000017500000121522712546375257017271 0ustar ellieellie@%:@! /bin/sh @%:@ Guess values for system-dependent variables and create Makefiles. @%:@ Generated by GNU Autoconf 2.69. @%:@ @%:@ @%:@ Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @%:@ @%:@ @%:@ This configure script is free software; the Free Software Foundation @%:@ gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in @%:@( *posix*) : set -o posix ;; @%:@( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in @%:@( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in @%:@(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in @%:@ (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in @%:@( *posix*) : set -o posix ;; @%:@( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in @%:@( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in @%:@ (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## @%:@ as_fn_unset VAR @%:@ --------------- @%:@ Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset @%:@ as_fn_set_status STATUS @%:@ ----------------------- @%:@ Set @S|@? 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 "@S|@as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } @%:@ as_fn_mkdir_p @%:@ as_fn_executable_p FILE @%:@ ----------------------- @%:@ Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } @%:@ as_fn_executable_p @%:@ as_fn_append VAR VALUE @%:@ ---------------------- @%:@ Append the text in VALUE to the end of the definition contained in VAR. Take @%:@ advantage of any shell optimizations that allow amortized linear growth over @%:@ repeated appends, instead of the typical quadratic growth present in naive @%:@ implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append @%:@ as_fn_arith ARG... @%:@ ------------------ @%:@ Perform arithmetic evaluation on the ARGs, and store the result in the @%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments @%:@ must be portable across @S|@(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith @%:@ as_fn_error STATUS ERROR [LINENO LOG_FD] @%:@ ---------------------------------------- @%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are @%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the @%:@ script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } @%:@ as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in @%:@((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIB@&t@OBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= PACKAGE_URL= ac_unique_file="imap/imapd.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='LTLIBOBJS PERL_DEPSUBDIRS PERL_SUBDIRS IMAP_LIBS IMAP_COM_ERR_LIBS LIB_RT LIB_UCDSNMP SNMP_CONFIG LIB_WRAP SNMP_SUBDIRS PERL_CCCDLFLAGS PERL SASLFLAGS LIB_SASL DYNSASLFLAGS LIB_DYN_SASL GSSAPIBASE_LIBS GSSAPI_LIBS LIB_CRYPT COM_ERR_CPPFLAGS COM_ERR_LDFLAGS COM_ERR_LIBS COMPILE_ET IMAP_PROGS ZEPHYR_LIBS ZLIB CMU_LIB_SUBDIR OPENSSL_LIB OPENSSL_INC SERVER_SUBDIRS LDAP_LIBS LDAP_LDFLAGS LDAP_CPPFLAGS AFS_LDFLAGS AFS_LIBS cyrus_cv_sigveclib WITH_LOCK WITH_MAP WITH_GMTOFF WITH_NONBLOCK SIEVE_SUBDIRS LEXLIB LEX_OUTPUT_ROOT LEX YFLAGS YACC SIEVE_CPPFLAGS SIEVE_LIBS SIEVE_OBJS CYRUSDB_OBJS BDB_LIB BDB_INC LOCALDEFS DEPLIBS EXTRA_SUBDIRS PRE_SUBDIRS IPV6_OBJS LIB_SOCKET LIB@&t@OBJS AWK EGREP GREP CPP INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM SET_MAKE RANLIB OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC cyrus_group cyrus_user service_path cyrus_prefix MAKEDEPEND target_os target_vendor target_cpu target host_os host_vendor host_cpu host build_os build_vendor build_cpu build target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking with_extraident with_login with_cyrus_prefix with_service_path with_cyrus_user with_cyrus_group with_bdb with_dbdir with_bdb_libdir with_bdb_incdir with_mysql with_mysql_libdir with_mysql_incdir with_pgsql with_pgsql_libdir with_pgsql_incdir with_sqlite with_sqlite_libdir with_sqlite_incdir enable_sieve enable_pcre with_lock enable_afs with_afs_libdir with_afs_incdir with_ldap enable_krb5afspts enable_server with_krb with_krbimpl enable_statickrb with_krbdes with_openssl with_egd_socket with_lib_subdir with_zlib with_zephyr with_pidfile enable_idled enable_nntp enable_murder enable_replication with_com_err with_syslogfacility enable_cmulocal enable_oldsievename enable_netscapehack enable_gssapi with_gss_impl with_sasl with_staticsasl with_perl with_libwrap with_snmp with_ucdsnmp ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP YACC YFLAGS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX @<:@@S|@ac_default_prefix@:>@ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX @<:@PREFIX@:>@ By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root @<:@DATAROOTDIR/doc/PACKAGE@:>@ --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-sieve disable Sieve support --disable-pcre disable PCRE library --enable-afs Enable AFS with ptloader --enable-krb5afspts compile afskrb PTS module with krb5 support --disable-server disable compiling servers --enable-statickrb link Kerberos statically --enable-idled enable IMAP idled support --enable-nntp enable NNTP support --enable-murder enable IMAP Murder support --enable-replication enable replication support (experimental) --enable-cmulocal enable CMU-specific local support --enable-oldsievename enable the use of 'imap' as the sieve service name --enable-netscapehack enable Netscape hack for the menu option in Communicator to Administrate Mail --enable-gssapi= enable GSSAPI authentication @<:@yes@:>@ Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-extraident=STRING use STRING as extra version information --with-cyrus-prefix=DIR use DIR as cyrus server install directory --with-service-path=DIR use DIR as service install directory --with-cyrus-user=USERID use USERID cyrus userid --with-cyrus-group=GROUPID use GROUPID cyrus group --with-bdb=DIR use Berkeley DB (in DIR) [yes] --with-bdb-libdir=DIR Berkeley DB lib files are in DIR --with-bdb-incdir=DIR Berkeley DB include files are in DIR --with-mysql=DIR use MySQL (in DIR) [no] --with-mysql-libdir=DIR MySQL lib files are in DIR --with-mysql-incdir=DIR MySQL include files are in DIR --with-pgsql=DIR use PostgreSQL (in DIR) [no] --with-pgsql-libdir=DIR Pgsql lib files are in DIR --with-pgsql-incdir=DIR Pgsql include files are in DIR --with-sqlite=DIR use SQLite (in DIR) [no] --with-sqlite-libdir=DIR SQLite lib files are in DIR --with-sqlite-incdir=DIR SQLite include files are in DIR --with-lock=METHOD force use of METHOD for locking (flock or fcntl) --with-afs-libdir=PATH use AFS libraries from PATH [/usr/lib] --with-afs-incdir=PATH use AFS headers from PATH [/usr/include] --with-ldap=DIR use LDAP (in DIR) (experimental) /usr/local --with-krb=PATH use Kerberos from PATH --with-krbimpl=\kth|mit\ assume Kerberos 4 from KTH or MIT --with-krbdes use Kerberos DES implementation [yes] --with-openssl=PATH use OpenSSL from PATH --with-egd-socket=FILE Entropy Gathering Daemon socket pathname for systems without /dev/urandom --with-lib-subdir=DIR Find libraries in DIR instead of lib --with-zlib=PATH use zlib from PATH --with-zephyr=PATH enable Zephyr notification (installed on PATH) --with-pidfile=PATH pidfile in PATH (/var/run/cyrus-master.pid) --with-com_err=PATH use com_err from path -- includes in PATH/include, libs in PATH/lib, and compile_et in PATH/bin --with-syslogfacility=FACILITY set the syslog facility to use (default LOCAL6) --with-gss_impl={heimdal|mit|cybersafe|seam|auto} choose specific GSSAPI implementation @<:@@<:@auto@:>@@:>@ --with-sasl=DIR Compile with libsasl2 in --with-staticsasl=DIR Compile with staticly linked libsasl2 in --with-perl=PERL use PERL for perl --with-libwrap=DIR use libwrap (rooted in DIR) yes --with-snmp=DIR use ucd|net snmp (rooted in DIR) yes Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor YACC The `Yet Another Compiler Compiler' implementation to use. Defaults to the first program found out of: `bison -y', `byacc', `yacc'. YFLAGS The list of arguments that will be passed by default to @S|@YACC. This script will default YFLAGS to the empty string to avoid a default value of `-d' given by some make applications. Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## @%:@ ac_fn_c_try_compile LINENO @%:@ -------------------------- @%:@ Try to compile conftest.@S|@ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_compile @%:@ ac_fn_c_try_cpp LINENO @%:@ ---------------------- @%:@ Try to preprocess conftest.@S|@ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_cpp @%:@ ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES @%:@ ------------------------------------------------------- @%:@ Tests whether HEADER exists, giving a warning if it cannot be compiled using @%:@ the include files in INCLUDES and setting the cache variable VAR @%:@ accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 @%:@include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_header_mongrel @%:@ ac_fn_c_try_run LINENO @%:@ ---------------------- @%:@ Try to link conftest.@S|@ac_ext, and return whether this succeeded. Assumes @%:@ that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_run @%:@ ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES @%:@ ------------------------------------------------------- @%:@ Tests whether HEADER exists and can be compiled using the include files in @%:@ INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 @%:@include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_header_compile @%:@ ac_fn_c_try_link LINENO @%:@ ----------------------- @%:@ Try to link conftest.@S|@ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_link @%:@ ac_fn_c_compute_int LINENO EXPR VAR INCLUDES @%:@ -------------------------------------------- @%:@ Tries to find the compile-time value of EXPR in a program that includes @%:@ INCLUDES, setting VAR accordingly. Returns whether the value could be @%:@ computed ac_fn_c_compute_int () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array @<:@1 - 2 * !(($2) >= 0)@:>@; test_array @<:@0@:>@ = 0; return test_array @<:@0@:>@; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_lo=0 ac_mid=0 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array @<:@1 - 2 * !(($2) <= $ac_mid)@:>@; test_array @<:@0@:>@ = 0; return test_array @<:@0@:>@; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid; break else as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array @<:@1 - 2 * !(($2) < 0)@:>@; test_array @<:@0@:>@ = 0; return test_array @<:@0@:>@; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=-1 ac_mid=-1 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array @<:@1 - 2 * !(($2) >= $ac_mid)@:>@; test_array @<:@0@:>@ = 0; return test_array @<:@0@:>@; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_lo=$ac_mid; break else as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array @<:@1 - 2 * !(($2) <= $ac_mid)@:>@; test_array @<:@0@:>@ = 0; return test_array @<:@0@:>@; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid else as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in @%:@(( ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; '') ac_retval=1 ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 static long int longval () { return $2; } static unsigned long int ulongval () { return $2; } @%:@include @%:@include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if (($2) < 0) { long int i = longval (); if (i != ($2)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != ($2)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : echo >>conftest.val; read $3 &5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_func @%:@ ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES @%:@ ---------------------------------------------------- @%:@ Tries to find if the field MEMBER exists in type AGGR, after including @%:@ INCLUDES, setting cache variable VAR accordingly. ac_fn_c_check_member () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 $as_echo_n "checking for $2.$3... " >&6; } if eval \${$4+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int main () { static $2 ac_aggr; if (ac_aggr.$3) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$4=yes" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int main () { static $2 ac_aggr; if (sizeof ac_aggr.$3) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$4=yes" else eval "$4=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$4 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_member @%:@ ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES @%:@ --------------------------------------------- @%:@ Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR @%:@ accordingly. ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_decl_name=`echo $2|sed 's/ *(.*//'` as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 $as_echo_n "checking whether $as_decl_name is declared... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { @%:@ifndef $as_decl_name @%:@ifdef __cplusplus (void) $as_decl_use; @%:@else (void) $as_decl_name; @%:@endif @%:@endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_decl cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in @%:@(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers config.h" ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } if ${ac_cv_target+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' set x $ac_cv_target shift target_cpu=$1 target_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: target_os=$* IFS=$ac_save_IFS case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- @%:@ Check whether --with-extraident was given. if test "${with_extraident+set}" = set; then : withval=$with_extraident; cat >>confdefs.h <<_ACEOF @%:@define EXTRA_IDENT "$withval" _ACEOF fi # Extract the first word of "makedepend", so it can be a program name with args. set dummy makedepend; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MAKEDEPEND+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MAKEDEPEND"; then ac_cv_prog_MAKEDEPEND="$MAKEDEPEND" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MAKEDEPEND="makedepend" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_MAKEDEPEND" && ac_cv_prog_MAKEDEPEND="`cd ${srcdir};pwd`/tools/not-mkdep" fi fi MAKEDEPEND=$ac_cv_prog_MAKEDEPEND if test -n "$MAKEDEPEND"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEDEPEND" >&5 $as_echo "$MAKEDEPEND" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$MAKEDEPEND" != "makedepend"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Makedepend is not installed on this system. You should compile and install the version from the makedepend subdirectory." >&5 $as_echo "$as_me: WARNING: Makedepend is not installed on this system. You should compile and install the version from the makedepend subdirectory." >&2;} fi @%:@ Check whether --with-login was given. if test "${with_login+set}" = set; then : withval=$with_login; as_fn_error $? "--with-login is no longer supported. Configure SASL appropriately instead." "$LINENO" 5 fi @%:@ Check whether --with-cyrus-prefix was given. if test "${with_cyrus_prefix+set}" = set; then : withval=$with_cyrus_prefix; cyrus_prefix="$withval" else cyrus_prefix="/usr/cyrus" fi cat >>confdefs.h <<_ACEOF @%:@define CYRUS_PATH "$cyrus_prefix" _ACEOF @%:@ Check whether --with-service-path was given. if test "${with_service_path+set}" = set; then : withval=$with_service_path; service_path="$withval" else service_path="$cyrus_prefix/bin" fi cat >>confdefs.h <<_ACEOF @%:@define SERVICE_PATH "$service_path" _ACEOF @%:@ Check whether --with-cyrus-user was given. if test "${with_cyrus_user+set}" = set; then : withval=$with_cyrus_user; cyrus_user="$withval" else cyrus_user="cyrus" fi cat >>confdefs.h <<_ACEOF @%:@define CYRUS_USER "$cyrus_user" _ACEOF @%:@ Check whether --with-cyrus-group was given. if test "${with_cyrus_group+set}" = set; then : withval=$with_cyrus_group; cyrus_group="$withval" else cyrus_group="mail" fi if test $sysconfdir = '${prefix}/etc'; then sysconfdir="/etc" fi cat >>confdefs.h <<_ACEOF @%:@define SYSCONFDIR "$sysconfdir" _ACEOF ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $@%:@ != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in @%:@(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "@%:@define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" if test "x$ac_cv_header_minix_config_h" = xyes; then : MINIX=yes else MINIX= fi if test "$MINIX" = yes; then $as_echo "@%:@define _POSIX_SOURCE 1" >>confdefs.h $as_echo "@%:@define _POSIX_1_SOURCE 2" >>confdefs.h $as_echo "@%:@define _MINIX 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } if ${ac_cv_safe_to_define___extensions__+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # define __EXTENSIONS__ 1 $ac_includes_default int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_safe_to_define___extensions__=yes else ac_cv_safe_to_define___extensions__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } test $ac_cv_safe_to_define___extensions__ = yes && $as_echo "@%:@define __EXTENSIONS__ 1" >>confdefs.h $as_echo "@%:@define _ALL_SOURCE 1" >>confdefs.h $as_echo "@%:@define _GNU_SOURCE 1" >>confdefs.h $as_echo "@%:@define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h $as_echo "@%:@define _TANDEM_SOURCE 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5 $as_echo_n "checking for library containing strerror... " >&6; } if ${ac_cv_search_strerror+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char strerror (); int main () { return strerror (); ; return 0; } _ACEOF for ac_lib in '' cposix; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_strerror=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_strerror+:} false; then : break fi done if ${ac_cv_search_strerror+:} false; then : else ac_cv_search_strerror=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5 $as_echo "$ac_cv_search_strerror" >&6; } ac_res=$ac_cv_search_strerror if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 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 ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "@%:@define const /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5 $as_echo_n "checking for long file names... " >&6; } if ${ac_cv_sys_long_file_names+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_long_file_names=yes # Test for long file names in all the places we know might matter: # . the current directory, where building will happen # $prefix/lib where we will be installing things # $exec_prefix/lib likewise # $TMPDIR if set, where it might want to write temporary files # /tmp where it might want to write temporary files # /var/tmp likewise # /usr/tmp likewise for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib # in the usual case where exec_prefix is '${prefix}'. case $ac_dir in #( . | /* | ?:[\\/]*) ;; #( *) continue;; esac test -w "$ac_dir/." || continue # It is less confusing to not echo anything here. ac_xdir=$ac_dir/cf$$ (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue ac_tf1=$ac_xdir/conftest9012345 ac_tf2=$ac_xdir/conftest9012346 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" || ac_cv_sys_long_file_names=no rm -f -r "$ac_xdir" 2>/dev/null test $ac_cv_sys_long_file_names = no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5 $as_echo "$ac_cv_sys_long_file_names" >&6; } if test $ac_cv_sys_long_file_names = yes; then $as_echo "@%:@define HAVE_LONG_FILE_NAMES 1" >>confdefs.h fi if test $ac_cv_sys_long_file_names = no; then as_fn_error $? "The Cyrus IMAPD requires support for long file names" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 $as_echo_n "checking size of int... " >&6; } if ${ac_cv_sizeof_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : else if test "$ac_cv_type_int" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (int) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_int=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 $as_echo "$ac_cv_sizeof_int" >&6; } cat >>confdefs.h <<_ACEOF @%:@define SIZEOF_INT $ac_cv_sizeof_int _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 $as_echo_n "checking size of long... " >&6; } if ${ac_cv_sizeof_long+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : else if test "$ac_cv_type_long" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 $as_echo "$ac_cv_sizeof_long" >&6; } cat >>confdefs.h <<_ACEOF @%:@define SIZEOF_LONG $ac_cv_sizeof_long _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5 $as_echo_n "checking size of size_t... " >&6; } if ${ac_cv_sizeof_size_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then : else if test "$ac_cv_type_size_t" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (size_t) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_size_t=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5 $as_echo "$ac_cv_sizeof_size_t" >&6; } cat >>confdefs.h <<_ACEOF @%:@define SIZEOF_SIZE_T $ac_cv_sizeof_size_t _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5 $as_echo_n "checking size of off_t... " >&6; } if ${ac_cv_sizeof_off_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then : else if test "$ac_cv_type_off_t" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (off_t) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_off_t=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5 $as_echo "$ac_cv_sizeof_off_t" >&6; } cat >>confdefs.h <<_ACEOF @%:@define SIZEOF_OFF_T $ac_cv_sizeof_off_t _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long int" >&5 $as_echo_n "checking size of long long int... " >&6; } if ${ac_cv_sizeof_long_long_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long int))" "ac_cv_sizeof_long_long_int" "$ac_includes_default"; then : else if test "$ac_cv_type_long_long_int" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long long int) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long_long_int=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long_int" >&5 $as_echo "$ac_cv_sizeof_long_long_int" >&6; } cat >>confdefs.h <<_ACEOF @%:@define SIZEOF_LONG_LONG_INT $ac_cv_sizeof_long_long_int _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long int" >&5 $as_echo_n "checking size of unsigned long long int... " >&6; } if ${ac_cv_sizeof_unsigned_long_long_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long int))" "ac_cv_sizeof_unsigned_long_long_int" "$ac_includes_default"; then : else if test "$ac_cv_type_unsigned_long_long_int" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (unsigned long long int) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_unsigned_long_long_int=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long_int" >&5 $as_echo "$ac_cv_sizeof_unsigned_long_long_int" >&6; } cat >>confdefs.h <<_ACEOF @%:@define SIZEOF_UNSIGNED_LONG_LONG_INT $ac_cv_sizeof_unsigned_long_long_int _ACEOF if test "$ac_cv_sizeof_long_long_int" -eq 8 -a \ "$ac_cv_sizeof_unsigned_long_long_int" -eq 8; then $as_echo "@%:@define HAVE_LONG_LONG_INT /**/" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. ac_arch= ac_prev= for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do if test -n "$ac_prev"; then case $ac_word in i?86 | x86_64 | ppc | ppc64) if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ac_arch=$ac_word else ac_cv_c_bigendian=universal break fi ;; esac ac_prev= elif test "x$ac_word" = "x-arch"; then ac_prev=arch fi done fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no else ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) $as_echo "@%:@define WORDS_BIGENDIAN 1" >>confdefs.h ;; #( no) ;; #( universal) $as_echo "@%:@define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) as_fn_error $? "unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__" >&5 $as_echo_n "checking for __attribute__... " >&6; } if ${ac_cv___attribute__+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include static void foo(void) __attribute__ ((noreturn)); static void foo(void) { exit(1); } int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv___attribute__=yes else ac_cv___attribute__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "$ac_cv___attribute__" = "yes"; then $as_echo "@%:@define HAVE___ATTRIBUTE__ 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv___attribute__" >&5 $as_echo "$ac_cv___attribute__" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fPIC" >&5 $as_echo_n "checking if compiler supports -fPIC... " >&6; } if ${ac_cv_fpic+:} false; then : $as_echo_n "(cached) " >&6 else save_CFLAGS=$CFLAGS CFLAGS="${CFLAGS} -fPIC" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include static void foo(void) { exit(1); } int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_fpic=yes else ac_cv_fpic=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$save_CFLAGS fi if test "$ac_cv_fpic" = "yes"; then FPIC_CFLAGS="-fPIC" else FPIC_CFLAGS="" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fpic" >&5 $as_echo "$ac_cv_fpic" >&6; } # CMU GUESS RUNPATH SWITCH { $as_echo "$as_me:${as_lineno-$LINENO}: checking for runpath switch" >&5 $as_echo_n "checking for runpath switch... " >&6; } if ${andrew_cv_runpath_switch+:} false; then : $as_echo_n "(cached) " >&6 else # first, try -R SAVE_LDFLAGS="${LDFLAGS}" LDFLAGS="-R /usr/lib" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : andrew_cv_runpath_switch="-R" else LDFLAGS="-Wl,-rpath,/usr/lib" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : andrew_cv_runpath_switch="-Wl,-rpath," else andrew_cv_runpath_switch="none" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="${SAVE_LDFLAGS}" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $andrew_cv_runpath_switch" >&5 $as_echo "$andrew_cv_runpath_switch" >&6; } for ac_header in unistd.h sys/select.h sys/param.h stdarg.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove" if test "x$ac_cv_func_memmove" = xyes; then : $as_echo "@%:@define HAVE_MEMMOVE 1" >>confdefs.h else case " $LIB@&t@OBJS " in *" memmove.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS memmove.$ac_objext" ;; esac fi ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" if test "x$ac_cv_func_strcasecmp" = xyes; then : $as_echo "@%:@define HAVE_STRCASECMP 1" >>confdefs.h else case " $LIB@&t@OBJS " in *" strcasecmp.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS strcasecmp.$ac_objext" ;; esac fi ac_fn_c_check_func "$LINENO" "ftruncate" "ac_cv_func_ftruncate" if test "x$ac_cv_func_ftruncate" = xyes; then : $as_echo "@%:@define HAVE_FTRUNCATE 1" >>confdefs.h else case " $LIB@&t@OBJS " in *" ftruncate.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS ftruncate.$ac_objext" ;; esac fi ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror" if test "x$ac_cv_func_strerror" = xyes; then : $as_echo "@%:@define HAVE_STRERROR 1" >>confdefs.h else case " $LIB@&t@OBJS " in *" strerror.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS strerror.$ac_objext" ;; esac fi for ac_func in strlcat strlcpy getgrouplist do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } if eval \${$as_ac_Header+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include <$ac_hdr> int main () { if ((DIR *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$as_ac_Header=yes" else eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_ac_Header { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } if ${ac_cv_search_opendir+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' dir; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_opendir=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_opendir+:} false; then : break fi done if ${ac_cv_search_opendir+:} false; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 $as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } if ${ac_cv_search_opendir+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' x; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_opendir=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_opendir+:} false; then : break fi done if ${ac_cv_search_opendir+:} false; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 $as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi fi for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_STDLIB_H 1 _ACEOF fi done for ac_func in getpassphrase do : ac_fn_c_check_func "$LINENO" "getpassphrase" "ac_cv_func_getpassphrase" if test "x$ac_cv_func_getpassphrase" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_GETPASSPHRASE 1 _ACEOF fi done save_LIBS="$LIBS" LIB_SOCKET="" ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" if test "x$ac_cv_func_connect" = xyes; then : : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } if ${ac_cv_lib_nsl_gethostbyname+:} false; 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" = xyes; then : LIB_SOCKET="-lnsl $LIB_SOCKET" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 $as_echo_n "checking for connect in -lsocket... " >&6; } if ${ac_cv_lib_socket_connect+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char connect (); int main () { return connect (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_connect=yes else ac_cv_lib_socket_connect=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 $as_echo "$ac_cv_lib_socket_connect" >&6; } if test "x$ac_cv_lib_socket_connect" = xyes; then : LIB_SOCKET="-lsocket $LIB_SOCKET" fi fi LIBS="$LIB_SOCKET $save_LIBS" ac_fn_c_check_func "$LINENO" "res_search" "ac_cv_func_res_search" if test "x$ac_cv_func_res_search" = xyes; then : : else LIBS="-lresolv $LIB_SOCKET $save_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ [ #include #include #include #ifdef HAVE_ARPA_NAMESER_COMPAT_H #include #endif #include ] int main () { [ const char host[12]="openafs.org"; u_char ans[1024]; res_search( host, C_IN, T_MX, (u_char *)&ans, sizeof(ans)); return 0; ] ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : LIB_SOCKET="-lresolv $LIB_SOCKET" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi LIBS="$LIB_SOCKET $save_LIBS" for ac_func in dn_expand dns_lookup do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done LIBS="$save_LIBS" LIBS="$LIBS ${LIB_SOCKET}" cyrus_cv_getaddrinfo=yes ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo" if test "x$ac_cv_func_getaddrinfo" = xyes; then : ac_cv_lib_socket_getaddrinfo=no ac_cv_lib_inet6_getaddrinfo=no else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -lsocket" >&5 $as_echo_n "checking for getaddrinfo in -lsocket... " >&6; } if ${ac_cv_lib_socket_getaddrinfo+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char getaddrinfo (); int main () { return getaddrinfo (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_getaddrinfo=yes else ac_cv_lib_socket_getaddrinfo=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_getaddrinfo" >&5 $as_echo "$ac_cv_lib_socket_getaddrinfo" >&6; } if test "x$ac_cv_lib_socket_getaddrinfo" = xyes; then : LIBS="$LIBS -lsocket" ac_cv_lib_inet6_getaddrinfo=no else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether your system has IPv6 directory" >&5 $as_echo_n "checking whether your system has IPv6 directory... " >&6; } if ${ipv6_cv_dir+:} false; then : $as_echo_n "(cached) " >&6 else for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6_cv_dir" >&5 $as_echo "$ipv6_cv_dir" >&6; } if test $ipv6_cv_dir = no; then ac_cv_lib_inet6_getaddrinfo=no else if test x$ipv6_libinet6 = x; then ipv6_libinet6=no SAVELDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -linet6" >&5 $as_echo_n "checking for getaddrinfo in -linet6... " >&6; } if ${ac_cv_lib_inet6_getaddrinfo+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-linet6 $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 getaddrinfo (); int main () { return getaddrinfo (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_inet6_getaddrinfo=yes else ac_cv_lib_inet6_getaddrinfo=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_inet6_getaddrinfo" >&5 $as_echo "$ac_cv_lib_inet6_getaddrinfo" >&6; } if test "x$ac_cv_lib_inet6_getaddrinfo" = xyes; then : if test $ipv6_libinet6 = no; then ipv6_libinet6=yes LIBS="$LIBS -linet6" fi fi if test $ipv6_libinet6 = no; then LDFLAGS="$SAVELDFLAGS" fi fi fi fi ipv6_cv_getaddrinfo=no if test $ac_cv_func_getaddrinfo = yes -o $ac_cv_lib_socket_getaddrinfo = yes \ -o $ac_cv_lib_inet6_getaddrinfo = yes then ipv6_cv_getaddrinfo=yes fi if test $ipv6_cv_getaddrinfo = no; then if test getaddrinfo = getaddrinfo; then for ipv6_cv_pfx in o n; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "${ipv6_cv_pfx}getaddrinfo" >/dev/null 2>&1; then : as_ac_var=`$as_echo "ac_cv_func_${ipv6_cv_pfx}getaddrinfo" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "${ipv6_cv_pfx}getaddrinfo" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : fi fi rm -f conftest* if eval test X\$ac_cv_func_${ipv6_cv_pfx}getaddrinfo = Xyes; then $as_echo "@%:@define HAVE_GETADDRINFO /**/" >>confdefs.h ipv6_cv_getaddrinfo=yes break fi done fi fi if test $ipv6_cv_getaddrinfo = yes; then ac_fn_c_check_func "$LINENO" "gai_strerror" "ac_cv_func_gai_strerror" if test "x$ac_cv_func_gai_strerror" = xyes; then : ac_cv_lib_socket_gai_strerror=no ac_cv_lib_inet6_gai_strerror=no else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gai_strerror in -lsocket" >&5 $as_echo_n "checking for gai_strerror in -lsocket... " >&6; } if ${ac_cv_lib_socket_gai_strerror+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gai_strerror (); int main () { return gai_strerror (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_gai_strerror=yes else ac_cv_lib_socket_gai_strerror=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_gai_strerror" >&5 $as_echo "$ac_cv_lib_socket_gai_strerror" >&6; } if test "x$ac_cv_lib_socket_gai_strerror" = xyes; then : LIBS="$LIBS -lsocket" ac_cv_lib_inet6_gai_strerror=no else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether your system has IPv6 directory" >&5 $as_echo_n "checking whether your system has IPv6 directory... " >&6; } if ${ipv6_cv_dir+:} false; then : $as_echo_n "(cached) " >&6 else for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6_cv_dir" >&5 $as_echo "$ipv6_cv_dir" >&6; } if test $ipv6_cv_dir = no; then ac_cv_lib_inet6_gai_strerror=no else if test x$ipv6_libinet6 = x; then ipv6_libinet6=no SAVELDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gai_strerror in -linet6" >&5 $as_echo_n "checking for gai_strerror in -linet6... " >&6; } if ${ac_cv_lib_inet6_gai_strerror+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-linet6 $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 gai_strerror (); int main () { return gai_strerror (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_inet6_gai_strerror=yes else ac_cv_lib_inet6_gai_strerror=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_inet6_gai_strerror" >&5 $as_echo "$ac_cv_lib_inet6_gai_strerror" >&6; } if test "x$ac_cv_lib_inet6_gai_strerror" = xyes; then : if test $ipv6_libinet6 = no; then ipv6_libinet6=yes LIBS="$LIBS -linet6" fi fi if test $ipv6_libinet6 = no; then LDFLAGS="$SAVELDFLAGS" fi fi fi fi ipv6_cv_gai_strerror=no if test $ac_cv_func_gai_strerror = yes -o $ac_cv_lib_socket_gai_strerror = yes \ -o $ac_cv_lib_inet6_gai_strerror = yes then ipv6_cv_gai_strerror=yes fi if test $ipv6_cv_gai_strerror = no; then if test gai_strerror = getaddrinfo; then for ipv6_cv_pfx in o n; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "${ipv6_cv_pfx}gai_strerror" >/dev/null 2>&1; then : as_ac_var=`$as_echo "ac_cv_func_${ipv6_cv_pfx}gai_strerror" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "${ipv6_cv_pfx}gai_strerror" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : fi fi rm -f conftest* if eval test X\$ac_cv_func_${ipv6_cv_pfx}gai_strerror = Xyes; then $as_echo "@%:@define HAVE_GETADDRINFO /**/" >>confdefs.h ipv6_cv_gai_strerror=yes break fi done fi fi if test $ipv6_cv_gai_strerror = yes; then $as_echo "@%:@define HAVE_GETADDRINFO /**/" >>confdefs.h else cyrus_cv_getaddrinfo=no fi else cyrus_cv_getaddrinfo=no fi if test $cyrus_cv_getaddrinfo = no; then IPV6_OBJS="getaddrinfo.o" fi cyrus_cv_getnameinfo=yes ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo" if test "x$ac_cv_func_getnameinfo" = xyes; then : ac_cv_lib_socket_getnameinfo=no ac_cv_lib_inet6_getnameinfo=no else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getnameinfo in -lsocket" >&5 $as_echo_n "checking for getnameinfo in -lsocket... " >&6; } if ${ac_cv_lib_socket_getnameinfo+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char getnameinfo (); int main () { return getnameinfo (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_getnameinfo=yes else ac_cv_lib_socket_getnameinfo=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_getnameinfo" >&5 $as_echo "$ac_cv_lib_socket_getnameinfo" >&6; } if test "x$ac_cv_lib_socket_getnameinfo" = xyes; then : LIBS="$LIBS -lsocket" ac_cv_lib_inet6_getnameinfo=no else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether your system has IPv6 directory" >&5 $as_echo_n "checking whether your system has IPv6 directory... " >&6; } if ${ipv6_cv_dir+:} false; then : $as_echo_n "(cached) " >&6 else for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6_cv_dir" >&5 $as_echo "$ipv6_cv_dir" >&6; } if test $ipv6_cv_dir = no; then ac_cv_lib_inet6_getnameinfo=no else if test x$ipv6_libinet6 = x; then ipv6_libinet6=no SAVELDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getnameinfo in -linet6" >&5 $as_echo_n "checking for getnameinfo in -linet6... " >&6; } if ${ac_cv_lib_inet6_getnameinfo+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-linet6 $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 getnameinfo (); int main () { return getnameinfo (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_inet6_getnameinfo=yes else ac_cv_lib_inet6_getnameinfo=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_inet6_getnameinfo" >&5 $as_echo "$ac_cv_lib_inet6_getnameinfo" >&6; } if test "x$ac_cv_lib_inet6_getnameinfo" = xyes; then : if test $ipv6_libinet6 = no; then ipv6_libinet6=yes LIBS="$LIBS -linet6" fi fi if test $ipv6_libinet6 = no; then LDFLAGS="$SAVELDFLAGS" fi fi fi fi ipv6_cv_getnameinfo=no if test $ac_cv_func_getnameinfo = yes -o $ac_cv_lib_socket_getnameinfo = yes \ -o $ac_cv_lib_inet6_getnameinfo = yes then ipv6_cv_getnameinfo=yes fi if test $ipv6_cv_getnameinfo = no; then if test getnameinfo = getaddrinfo; then for ipv6_cv_pfx in o n; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "${ipv6_cv_pfx}getnameinfo" >/dev/null 2>&1; then : as_ac_var=`$as_echo "ac_cv_func_${ipv6_cv_pfx}getnameinfo" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "${ipv6_cv_pfx}getnameinfo" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : fi fi rm -f conftest* if eval test X\$ac_cv_func_${ipv6_cv_pfx}getnameinfo = Xyes; then $as_echo "@%:@define HAVE_GETADDRINFO /**/" >>confdefs.h ipv6_cv_getnameinfo=yes break fi done fi fi if test $ipv6_cv_getnameinfo = yes; then $as_echo "@%:@define HAVE_GETNAMEINFO /**/" >>confdefs.h else cyrus_cv_getnameinfo=no fi if test $cyrus_cv_getnameinfo = no; then IPV6_OBJS="$IPV6_OBJS getnameinfo.o" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether you have ss_family in struct sockaddr_storage" >&5 $as_echo_n "checking whether you have ss_family in struct sockaddr_storage... " >&6; } if ${ipv6_cv_ss_family+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { struct sockaddr_storage ss; int i = ss.ss_family; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ipv6_cv_ss_family=yes else ipv6_cv_ss_family=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ipv6_cv_ss_family = yes; then $as_echo "@%:@define HAVE_SS_FAMILY /**/" >>confdefs.h else : fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6_cv_ss_family" >&5 $as_echo "$ipv6_cv_ss_family" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether you have sa_len in struct sockaddr" >&5 $as_echo_n "checking whether you have sa_len in struct sockaddr... " >&6; } if ${ipv6_cv_sa_len+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { struct sockaddr sa; int i = sa.sa_len; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ipv6_cv_sa_len=yes else ipv6_cv_sa_len=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ipv6_cv_sa_len = yes; then $as_echo "@%:@define HAVE_SOCKADDR_SA_LEN /**/" >>confdefs.h else : fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6_cv_sa_len" >&5 $as_echo "$ipv6_cv_sa_len" >&6; } for ac_header in sys/time.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" if test "x$ac_cv_header_sys_time_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_SYS_TIME_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_time=yes else ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then $as_echo "@%:@define TIME_WITH_SYS_TIME 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } if ${ac_cv_struct_tm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { struct tm tm; int *p = &tm.tm_sec; return !p; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_struct_tm=time.h else ac_cv_struct_tm=sys/time.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 $as_echo "$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then $as_echo "@%:@define TM_IN_SYS_TIME 1" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include #include <$ac_cv_struct_tm> " if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_STRUCT_TM_TM_ZONE 1 _ACEOF fi if test "$ac_cv_member_struct_tm_tm_zone" = yes; then $as_echo "@%:@define HAVE_TM_ZONE 1" >>confdefs.h else ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include " if test "x$ac_cv_have_decl_tzname" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF @%:@define HAVE_DECL_TZNAME $ac_have_decl _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 $as_echo_n "checking for tzname... " >&6; } if ${ac_cv_var_tzname+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if !HAVE_DECL_TZNAME extern char *tzname[]; #endif int main () { return tzname[0][0]; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_var_tzname=yes else ac_cv_var_tzname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5 $as_echo "$ac_cv_var_tzname" >&6; } if test $ac_cv_var_tzname = yes; then $as_echo "@%:@define HAVE_TZNAME 1" >>confdefs.h fi fi for ac_func in vprintf do : ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf" if test "x$ac_cv_func_vprintf" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_VPRINTF 1 _ACEOF ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" if test "x$ac_cv_func__doprnt" = xyes; then : $as_echo "@%:@define HAVE_DOPRNT 1" >>confdefs.h fi fi done CYRUSDB_OBJS="cyrusdb_flat.o cyrusdb_skiplist.o cyrusdb_quotalegacy.o" @%:@ Check whether --with-bdb was given. if test "${with_bdb+set}" = set; then : withval=$with_bdb; with_bdb=$withval else with_bdb="yes" fi @%:@ Check whether --with-dbdir was given. if test "${with_dbdir+set}" = set; then : withval=$with_dbdir; with_bdb=$withval fi case "$with_bdb" in no) use_berkeley="no" ;; yes) use_berkeley="yes" with_bdb_lib=none with_bdb_inc=none ;; *) use_berkeley="yes" with_bdb_lib="$with_bdb/lib" with_bdb_inc="$with_bdb/include" ;; esac if test "$use_berkeley" != "no"; then @%:@ Check whether --with-bdb-libdir was given. if test "${with_bdb_libdir+set}" = set; then : withval=$with_bdb_libdir; with_bdb_lib=$withval else test "${with_bdb_lib+set}" = set || with_bdb_lib=none fi @%:@ Check whether --with-bdb-incdir was given. if test "${with_bdb_incdir+set}" = set; then : withval=$with_bdb_incdir; with_bdb_inc=$withval else test "${with_bdb_inc+set}" = set || with_bdb_inc=none fi cmu_save_CPPFLAGS=$CPPFLAGS if test -d $with_bdb_inc; then CPPFLAGS="$CPPFLAGS -I$with_bdb_inc" BDB_INCADD="-I$with_bdb_inc" else BDB_INCADD="" fi ac_fn_c_check_header_mongrel "$LINENO" "db.h" "ac_cv_header_db_h" "$ac_includes_default" if test "x$ac_cv_header_db_h" = xyes; then : BDB_SAVE_LDFLAGS=$LDFLAGS if test -d $with_bdb_lib; then # this is CMU ADD LIBPATH TO if test "$andrew_cv_runpath_switch" = "none" ; then LDFLAGS="-L$with_bdb_lib ${LDFLAGS}" else LDFLAGS="-L$with_bdb_lib ${LDFLAGS} $andrew_cv_runpath_switch$with_bdb_lib" fi # this is CMU ADD LIBPATH TO if test "$andrew_cv_runpath_switch" = "none" ; then BDB_LIBADD="-L$with_bdb_lib ${BDB_LIBADD}" else BDB_LIBADD="-L$with_bdb_lib ${BDB_LIBADD} $andrew_cv_runpath_switch$with_bdb_lib" fi else BDB_LIBADD="" fi saved_LIBS=$LIBS for dbname in ${with_bdb} \ db-4.8 db4.8 db48 \ db-4.7 db4.7 db47 \ db-4.6 db4.6 db46 \ db-4.5 db4.5 db45 \ db-4.4 db4.4 db44 \ db-4.3 db4.3 db43 \ db-4.2 db4.2 db42 \ db-4.1 db4.1 db41 \ db-4.0 db4.0 db40 db-4 db4 \ db-3.3 db3.3 db33 \ db-3.2 db3.2 db32 \ db-3.1 db3.1 db31 \ db-3.0 db3.0 db30 db-3 db3 \ db do LIBS="$saved_LIBS -l$dbname" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { db_create(NULL, NULL, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : BDB_LIBADD="$BDB_LIBADD -l$dbname"; dblib="berkeley"; dbname=db else dblib="no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$dblib" = "berkeley"; then break; fi done if test "$dblib" = "no"; then LIBS="$saved_LIBS -ldb" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { db_open(NULL, 0, 0, 0, NULL, NULL, NULL); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : BDB_LIBADD="$BDB_LIBADD -ldb"; dblib="berkeley"; dbname=db else dblib="no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi LIBS=$saved_LIBS LDFLAGS=$BDB_SAVE_LDFLAGS else dblib="no" fi CPPFLAGS=$cmu_save_CPPFLAGS if test "$dblib" = "no"; then as_fn_error $? "Berkeley DB 3.x or later was not found. You may need to supply the --with-bdb-libdir or --with-bdb-incdir configure options." "$LINENO" 5 fi if test "$with_bdb_lib" != "none"; then # this is CMU ADD LIBPATH if test "$andrew_cv_runpath_switch" = "none" ; then LDFLAGS="-L$with_bdb_lib ${LDFLAGS}" else LDFLAGS="-L$with_bdb_lib $andrew_cv_runpath_switch$with_bdb_lib ${LDFLAGS}" fi fi BDB_INC=${BDB_INCADD} BDB_LIB=${BDB_LIBADD} LIBS="${LIBS} ${BDB_LIBADD}" CPPFLAGS="${BDB_INCADD} ${CPPFLAGS}" CYRUSDB_OBJS="$CYRUSDB_OBJS cyrusdb_berkeley.o" $as_echo "@%:@define HAVE_BDB /**/" >>confdefs.h fi HAVE_SQL=0 @%:@ Check whether --with-mysql was given. if test "${with_mysql+set}" = set; then : withval=$with_mysql; with_mysql=$withval else with_mysql="no" fi case "$with_mysql" in no) use_mysql="no" ;; yes) use_mysql="yes" with_mysql_lib=none with_mysql_inc=none ;; *) use_mysql="yes" with_mysql_lib="$with_mysql/lib" with_mysql_inc="$with_mysql/include" ;; esac if test "$use_mysql" != "no"; then @%:@ Check whether --with-mysql-libdir was given. if test "${with_mysql_libdir+set}" = set; then : withval=$with_mysql_libdir; with_mysql_lib=$withval else test "${with_mysql_lib+set}" = set || with_mysql_lib=none fi @%:@ Check whether --with-mysql-incdir was given. if test "${with_mysql_incdir+set}" = set; then : withval=$with_mysql_incdir; with_mysql_inc=$withval else test "${with_mysql_inc+set}" = set || with_mysql_inc=none fi cmu_save_CPPFLAGS=$CPPFLAGS if test -d $with_mysql_inc; then CPPFLAGS="$CPPFLAGS -I$with_mysql_inc" MYSQL_INCADD="-I$with_mysql_inc" else MYSQL_INCADD="" fi ac_fn_c_check_header_mongrel "$LINENO" "mysql.h" "ac_cv_header_mysql_h" "$ac_includes_default" if test "x$ac_cv_header_mysql_h" = xyes; then : MYSQL_SAVE_LDFLAGS=$LDFLAGS if test -d $with_mysql_lib; then # this is CMU ADD LIBPATH TO if test "$andrew_cv_runpath_switch" = "none" ; then LDFLAGS="-L$with_mysql_lib ${LDFLAGS}" else LDFLAGS="-L$with_mysql_lib ${LDFLAGS} $andrew_cv_runpath_switch$with_mysql_lib" fi # this is CMU ADD LIBPATH TO if test "$andrew_cv_runpath_switch" = "none" ; then MYSQL_LIBADD="-L$with_mysql_lib ${MYSQL_LIBADD}" else MYSQL_LIBADD="-L$with_mysql_lib ${MYSQL_LIBADD} $andrew_cv_runpath_switch$with_mysql_lib" fi else MYSQL_LIBADD="" fi saved_LIBS=$LIBS for libname in ${with_mysql} mysqlclient do LIBS="$saved_LIBS -l$libname" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { mysql_select_db(NULL, NULL); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : MYSQL_LIBADD="$MYSQL_LIBADD -l$libname"; mysqllib="yes" else mysqllib="no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$mysqllib" = "yes"; then break; fi done LIBS=$saved_LIBS LDFLAGS=$MYSQL_SAVE_LDFLAGS else mysqllib="no" fi CPPFLAGS=$cmu_save_CPPFLAGS if test "$mysqllib" = "no"; then as_fn_error $? "MySQL was not found. You may need to supply the --with-mysql-libdir or --with-mysql-incdir configure options." "$LINENO" 5 else HAVE_SQL=1 fi if test "$with_mysql_lib" != "none"; then # this is CMU ADD LIBPATH if test "$andrew_cv_runpath_switch" = "none" ; then LDFLAGS="-L$with_mysql_lib ${LDFLAGS}" else LDFLAGS="-L$with_mysql_lib $andrew_cv_runpath_switch$with_mysql_lib ${LDFLAGS}" fi fi LIBS="${LIBS} ${MYSQL_LIBADD}" CPPFLAGS="${MYSQL_INCADD} ${CPPFLAGS}" $as_echo "@%:@define HAVE_MYSQL /**/" >>confdefs.h fi @%:@ Check whether --with-pgsql was given. if test "${with_pgsql+set}" = set; then : withval=$with_pgsql; with_pgsql=$withval else with_pgsql="no" fi case "$with_pgsql" in no) use_pgsql="no" ;; yes) use_pgsql="yes" with_pgsql_lib=none with_pgsql_inc=none ;; *) use_pgsql="yes" with_pgsql_lib="$with_pgsql/lib" with_pgsql_inc="$with_pgsql/include" ;; esac if test "$use_pgsql" != "no"; then @%:@ Check whether --with-pgsql-libdir was given. if test "${with_pgsql_libdir+set}" = set; then : withval=$with_pgsql_libdir; with_pgsql_lib=$withval else test "${with_pgsql_lib+set}" = set || with_pgsql_lib=none fi @%:@ Check whether --with-pgsql-incdir was given. if test "${with_pgsql_incdir+set}" = set; then : withval=$with_pgsql_incdir; with_pgsql_inc=$withval else test "${with_pgsql_inc+set}" = set || with_pgsql_inc=none fi cmu_save_CPPFLAGS=$CPPFLAGS if test -d $with_pgsql_inc; then CPPFLAGS="$CPPFLAGS -I$with_pgsql_inc" PGSQL_INCADD="-I$with_pgsql_inc" else PGSQL_INCADD="" fi ac_fn_c_check_header_mongrel "$LINENO" "libpq-fe.h" "ac_cv_header_libpq_fe_h" "$ac_includes_default" if test "x$ac_cv_header_libpq_fe_h" = xyes; then : PGSQL_SAVE_LDFLAGS=$LDFLAGS if test -d $with_pgsql_lib; then # this is CMU ADD LIBPATH TO if test "$andrew_cv_runpath_switch" = "none" ; then LDFLAGS="-L$with_pgsql_lib ${LDFLAGS}" else LDFLAGS="-L$with_pgsql_lib ${LDFLAGS} $andrew_cv_runpath_switch$with_pgsql_lib" fi # this is CMU ADD LIBPATH TO if test "$andrew_cv_runpath_switch" = "none" ; then PGSQL_LIBADD="-L$with_pgsql_lib ${PGSQL_LIBADD}" else PGSQL_LIBADD="-L$with_pgsql_lib ${PGSQL_LIBADD} $andrew_cv_runpath_switch$with_pgsql_lib" fi else PGSQL_LIBADD="" fi saved_LIBS=$LIBS for libname in ${with_pgsql} pq do LIBS="$saved_LIBS -l$libname" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { PQconnectdb(NULL); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : PGSQL_LIBADD="$PGSQL_LIBADD -l$libname"; pgsqllib="yes" else pgsqllib="no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$pgsqllib" = "yes"; then break; fi done LIBS=$saved_LIBS LDFLAGS=$PGSQL_SAVE_LDFLAGS else pgsqllib="no" fi CPPFLAGS=$cmu_save_CPPFLAGS if test "$pgsqllib" = "no"; then as_fn_error $? "PgSQL was not found. You may need to supply the --with-pgsql-libdir or --with-pgsql-incdir configure options." "$LINENO" 5 else HAVE_SQL=1 fi if test "$with_pgsql_lib" != "none"; then # this is CMU ADD LIBPATH if test "$andrew_cv_runpath_switch" = "none" ; then LDFLAGS="-L$with_pgsql_lib ${LDFLAGS}" else LDFLAGS="-L$with_pgsql_lib $andrew_cv_runpath_switch$with_pgsql_lib ${LDFLAGS}" fi fi LIBS="${LIBS} ${PGSQL_LIBADD}" CPPFLAGS="${PGSQL_INCADD} ${CPPFLAGS}" $as_echo "@%:@define HAVE_PGSQL /**/" >>confdefs.h fi @%:@ Check whether --with-sqlite was given. if test "${with_sqlite+set}" = set; then : withval=$with_sqlite; with_sqlite=$withval else with_sqlite=no fi case "$with_sqlite" in no) use_sqlite="no" ;; yes) use_sqlite="yes" with_sqlite_lib=none with_sqlite_inc=none ;; *) use_sqlite="yes" with_sqlite_lib="$with_sqlite/lib" with_sqlite_inc="$with_sqlite/include" ;; esac if test "$use_sqlite" != "no"; then @%:@ Check whether --with-sqlite-libdir was given. if test "${with_sqlite_libdir+set}" = set; then : withval=$with_sqlite_libdir; with_sqlite_lib=$withval else test "${with_sqlite_lib+set}" = set || with_sqlite_lib=none fi @%:@ Check whether --with-sqlite-incdir was given. if test "${with_sqlite_incdir+set}" = set; then : withval=$with_sqlite_incdir; with_sqlite_inc=$withval else test "${with_sqlite_inc+set}" = set || with_sqlite_inc=none fi cmu_save_CPPFLAGS=$CPPFLAGS if test -d $with_sqlite_inc; then CPPFLAGS="$CPPFLAGS -I$with_sqlite_inc" SQLITE_INCADD="-I$with_sqlite_inc" else SQLITE_INCADD="" fi ac_fn_c_check_header_mongrel "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default" if test "x$ac_cv_header_sqlite3_h" = xyes; then : SQLITE_SAVE_LDFLAGS=$LDFLAGS if test -d $with_sqlite_lib; then # this is CMU ADD LIBPATH TO if test "$andrew_cv_runpath_switch" = "none" ; then LDFLAGS="-L$with_sqlite_lib ${LDFLAGS}" else LDFLAGS="-L$with_sqlite_lib ${LDFLAGS} $andrew_cv_runpath_switch$with_sqlite_lib" fi # this is CMU ADD LIBPATH TO if test "$andrew_cv_runpath_switch" = "none" ; then SQLITE_LIBADD="-L$with_sqlite_lib ${SQLITE_LIBADD}" else SQLITE_LIBADD="-L$with_sqlite_lib ${SQLITE_LIBADD} $andrew_cv_runpath_switch$with_sqlite_lib" fi else SQLITE_LIBADD="" fi saved_LIBS=$LIBS for libname in ${with_sqlite} sqlite3 do LIBS="$saved_LIBS -l$libname" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { sqlite3_open(NULL, NULL); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : SQLITE_LIBADD="$SQLITE_LIBADD -l$libname"; sqlitelib="yes" else sqlitelib="no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$sqlitelib" = "yes"; then break; fi done LIBS=$saved_LIBS LDFLAGS=$SQLITE_SAVE_LDFLAGS else sqlitelib="no" fi CPPFLAGS=$cmu_save_CPPFLAGS if test "$sqlitelib" = "no"; then as_fn_error $? "Sqlite was not found. You may need to supply the --with-sqlite-libdir or --with-sqlite-incdir configure options." "$LINENO" 5 else HAVE_SQL=1 fi if test "$with_sqlite_lib" != "none"; then # this is CMU ADD LIBPATH if test "$andrew_cv_runpath_switch" = "none" ; then LDFLAGS="-L$with_sqlite_lib ${LDFLAGS}" else LDFLAGS="-L$with_sqlite_lib $andrew_cv_runpath_switch$with_sqlite_lib ${LDFLAGS}" fi fi LIBS="${LIBS} ${SQLITE_LIBADD}" CPPFLAGS="${SQLITE_INCADD} ${CPPFLAGS}" $as_echo "@%:@define HAVE_SQLITE /**/" >>confdefs.h fi if test $HAVE_SQL = 1; then CYRUSDB_OBJS="${CYRUSDB_OBJS} cyrusdb_sql.o" fi SIEVE_SUBDIRS="" sievedir="sieve" @%:@ Check whether --enable-sieve was given. if test "${enable_sieve+set}" = set; then : enableval=$enable_sieve; if test "$enableval" = no; then sievedir="no" fi fi testpcre="yes" @%:@ Check whether --enable-pcre was given. if test "${enable_pcre+set}" = set; then : enableval=$enable_pcre; if test "$enableval" = no; then testpcre="no" fi fi if test "$sievedir" != "no"; then SIEVE_OBJS="lmtp_sieve.o smtpclient.o" SIEVE_LIBS="../${sievedir}/libsieve.a" SIEVE_CPPFLAGS="-I\$(srcdir)/../$sievedir" $as_echo "@%:@define USE_SIEVE /**/" >>confdefs.h for ac_prog in 'bison -y' byacc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_YACC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_YACC="$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 YACC=$ac_cv_prog_YACC if test -n "$YACC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 $as_echo "$YACC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$YACC" && break done test -n "$YACC" || YACC="yacc" for ac_prog in flex lex do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LEX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LEX"; then ac_cv_prog_LEX="$LEX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LEX="$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 LEX=$ac_cv_prog_LEX if test -n "$LEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5 $as_echo "$LEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$LEX" && break done test -n "$LEX" || LEX=":" if test "x$LEX" != "x:"; then cat >conftest.l <<_ACEOF %% a { ECHO; } b { REJECT; } c { yymore (); } d { yyless (1); } e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */ yyless ((input () != 0)); } f { unput (yytext[0]); } . { BEGIN INITIAL; } %% #ifdef YYTEXT_POINTER extern char *yytext; #endif int main (void) { return ! yylex () + ! yywrap (); } _ACEOF { { ac_try="$LEX conftest.l" 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 "$LEX conftest.l") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5 $as_echo_n "checking lex output file root... " >&6; } if ${ac_cv_prog_lex_root+:} false; then : $as_echo_n "(cached) " >&6 else if test -f lex.yy.c; then ac_cv_prog_lex_root=lex.yy elif test -f lexyy.c; then ac_cv_prog_lex_root=lexyy else as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5 $as_echo "$ac_cv_prog_lex_root" >&6; } LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root if test -z "${LEXLIB+set}"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5 $as_echo_n "checking lex library... " >&6; } if ${ac_cv_lib_lex+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_LIBS=$LIBS ac_cv_lib_lex='none needed' for ac_lib in '' -lfl -ll; do LIBS="$ac_lib $ac_save_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ `cat $LEX_OUTPUT_ROOT.c` _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_lex=$ac_lib fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test "$ac_cv_lib_lex" != 'none needed' && break done LIBS=$ac_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5 $as_echo "$ac_cv_lib_lex" >&6; } test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5 $as_echo_n "checking whether yytext is a pointer... " >&6; } if ${ac_cv_prog_lex_yytext_pointer+:} false; then : $as_echo_n "(cached) " >&6 else # POSIX says lex can declare yytext either as a pointer or an array; the # default is implementation-dependent. Figure out which it is, since # not all implementations provide the %pointer and %array declarations. ac_cv_prog_lex_yytext_pointer=no ac_save_LIBS=$LIBS LIBS="$LEXLIB $ac_save_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define YYTEXT_POINTER 1 `cat $LEX_OUTPUT_ROOT.c` _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_prog_lex_yytext_pointer=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5 $as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; } if test $ac_cv_prog_lex_yytext_pointer = yes; then $as_echo "@%:@define YYTEXT_POINTER 1" >>confdefs.h fi rm -f conftest.l $LEX_OUTPUT_ROOT.c fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lfl" >&5 $as_echo_n "checking for main in -lfl... " >&6; } if ${ac_cv_lib_fl_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfl $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_fl_main=yes else ac_cv_lib_fl_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_fl_main" >&5 $as_echo "$ac_cv_lib_fl_main" >&6; } if test "x$ac_cv_lib_fl_main" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBFL 1 _ACEOF LIBS="-lfl $LIBS" fi if test "$testpcre" != "no"; then ac_fn_c_check_header_mongrel "$LINENO" "pcreposix.h" "ac_cv_header_pcreposix_h" "$ac_includes_default" if test "x$ac_cv_header_pcreposix_h" = xyes; then : fi if test "$ac_cv_header_pcreposix_h" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for utf8 enabled pcre" >&5 $as_echo_n "checking for utf8 enabled pcre... " >&6; } if ${cyrus_cv_pcre_utf8+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef REG_UTF8 #include #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : cyrus_cv_pcre_utf8=yes else cyrus_cv_pcre_utf8=no fi rm -f conftest.err conftest.i conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cyrus_cv_pcre_utf8" >&5 $as_echo "$cyrus_cv_pcre_utf8" >&6; } else cyrus_cv_pcre_utf8="no" fi fi if test "$cyrus_cv_pcre_utf8" = "yes"; then LIBS="$LIBS -lpcre -lpcreposix"; $as_echo "@%:@define ENABLE_REGEX /**/" >>confdefs.h $as_echo "@%:@define HAVE_PCREPOSIX_H /**/" >>confdefs.h else for ac_header in rxposix.h do : ac_fn_c_check_header_mongrel "$LINENO" "rxposix.h" "ac_cv_header_rxposix_h" "$ac_includes_default" if test "x$ac_cv_header_rxposix_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_RXPOSIX_H 1 _ACEOF fi done if test "$ac_cv_header_rxposix_h" = "yes"; then LIBS="$LIBS -lrx" $as_echo "@%:@define ENABLE_REGEX /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing regcomp" >&5 $as_echo_n "checking for library containing regcomp... " >&6; } if ${ac_cv_search_regcomp+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char regcomp (); int main () { return regcomp (); ; return 0; } _ACEOF for ac_lib in '' regex; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_regcomp=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_regcomp+:} false; then : break fi done if ${ac_cv_search_regcomp+:} false; then : else ac_cv_search_regcomp=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_regcomp" >&5 $as_echo "$ac_cv_search_regcomp" >&6; } ac_res=$ac_cv_search_regcomp if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" $as_echo "@%:@define ENABLE_REGEX /**/" >>confdefs.h fi fi fi SIEVE_SUBDIRS="${SIEVE_SUBDIRS} $sievedir" EXTRA_OUTPUT="${EXTRA_OUTPUT} $sievedir/Makefile" fi ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror" if test "x$ac_cv_func_strerror" = xyes; then : $as_echo "@%:@define HAS_STRERROR /**/" >>confdefs.h else $as_echo "@%:@define NEED_SYS_ERRLIST /**/" >>confdefs.h fi for ac_header in sys/resource.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default" if test "x$ac_cv_header_sys_resource_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_SYS_RESOURCE_H 1 _ACEOF fi done for ac_func in setrlimit do : ac_fn_c_check_func "$LINENO" "setrlimit" "ac_cv_func_setrlimit" if test "x$ac_cv_func_setrlimit" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_SETRLIMIT 1 _ACEOF fi done for ac_func in getrlimit do : ac_fn_c_check_func "$LINENO" "getrlimit" "ac_cv_func_getrlimit" if test "x$ac_cv_func_getrlimit" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_GETRLIMIT 1 _ACEOF fi done for ac_func in daemon setsid do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in shutdown do : ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown" if test "x$ac_cv_func_shutdown" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_SHUTDOWN 1 _ACEOF fi done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "socklen_t" >/dev/null 2>&1; then : $as_echo "@%:@define HAVE_SOCKLEN_T /**/" >>confdefs.h fi rm -f conftest* cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "sockaddr_storage" >/dev/null 2>&1; then : $as_echo "@%:@define HAVE_STRUCT_SOCKADDR_STORAGE /**/" >>confdefs.h fi rm -f conftest* cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "rlim_t" >/dev/null 2>&1; then : $as_echo "@%:@define HAVE_RLIM_T /**/" >>confdefs.h fi rm -f conftest* spt_type="" ac_fn_c_check_func "$LINENO" "setproctitle" "ac_cv_func_setproctitle" if test "x$ac_cv_func_setproctitle" = xyes; then : spt_type=SPT_BUILTIN fi if test "$spt_type" = ""; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setproctitle in -lutil" >&5 $as_echo_n "checking for setproctitle in -lutil... " >&6; } if ${ac_cv_lib_util_setproctitle+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lutil $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 setproctitle (); int main () { return setproctitle (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_util_setproctitle=yes else ac_cv_lib_util_setproctitle=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_util_setproctitle" >&5 $as_echo "$ac_cv_lib_util_setproctitle" >&6; } if test "x$ac_cv_lib_util_setproctitle" = xyes; then : spt_type=SPT_BUILTIN LIBS="${LIBS} -lutil" fi fi if test "$spt_type" = ""; then ac_fn_c_check_header_mongrel "$LINENO" "sys/pstat.h" "ac_cv_header_sys_pstat_h" "$ac_includes_default" if test "x$ac_cv_header_sys_pstat_h" = xyes; then : spt_type=SPT_PSTAT fi fi if test "$spt_type" = ""; then ac_fn_c_check_header_mongrel "$LINENO" "sys/sysnews.h" "ac_cv_header_sys_sysnews_h" "$ac_includes_default" if test "x$ac_cv_header_sys_sysnews_h" = xyes; then : spt_type=SPT_SYSMIPS fi fi if test "$spt_type" = ""; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5 $as_echo_n "checking for PS_STRINGS... " >&6; } if ${cyrus_cv_sys_psstrings+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifndef PS_STRINGS #include #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : cyrus_cv_sys_psstrings=yes else cyrus_cv_sys_psstrings=no fi rm -f conftest.err conftest.i conftest.$ac_ext fi if test $cyrus_cv_sys_psstrings = yes; then spt_type=SPT_PSSTRINGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cyrus_cv_sys_psstrings" >&5 $as_echo "$cyrus_cv_sys_psstrings" >&6; } fi if test "$spt_type" = ""; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SCO" >&5 $as_echo_n "checking for SCO... " >&6; } if ${cyrus_cv_sys_sco+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef _SCO_unix_ #include #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : cyrus_cv_sys_sco=yes else cyrus_cv_sys_sco=no fi rm -f conftest.err conftest.i conftest.$ac_ext fi if test $cyrus_cv_sys_sco = yes; then spt_type=SPT_SCO fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cyrus_cv_sys_sco" >&5 $as_echo "$cyrus_cv_sys_sco" >&6; } fi if test "$spt_type" = ""; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setproctitle usability" >&5 $as_echo_n "checking for setproctitle usability... " >&6; } if ${cyrus_cv_sys_setproctitle+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined(DGUX) || defined(_SEQUENT_) || defined(apollo) #include #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : cyrus_cv_sys_setproctitle=yes else cyrus_cv_sys_setproctitle=no fi rm -f conftest.err conftest.i conftest.$ac_ext fi if test $cyrus_cv_sys_setproctitle = no; then spt_type=SPT_NONE fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cyrus_cv_sys_setproctitle" >&5 $as_echo "$cyrus_cv_sys_setproctitle" >&6; } fi if test "$spt_type" != ""; then cat >>confdefs.h <<_ACEOF @%:@define SPT_TYPE $spt_type _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking nonblocking method" >&5 $as_echo_n "checking nonblocking method... " >&6; } if ${cyrus_cv_sys_nonblock+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #ifndef FNDELAY #define FNDELAY O_NDELAY #endif int main () { fcntl(0, F_GETFL, 0)&FNDELAY ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : cyrus_cv_sys_nonblock=fcntl else cyrus_cv_sys_nonblock=ioctl fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi WITH_NONBLOCK=$cyrus_cv_sys_nonblock { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WITH_NONBLOCK" >&5 $as_echo "$WITH_NONBLOCK" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking timezone GMT offset method" >&5 $as_echo_n "checking timezone GMT offset method... " >&6; } if ${cyrus_cv_struct_sys_gmtoff+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { struct tm tm; tm.tm_gmtoff = 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cyrus_cv_struct_sys_gmtoff=tm else cyrus_cv_struct_sys_gmtoff=gmtime fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi WITH_GMTOFF=$cyrus_cv_struct_sys_gmtoff { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WITH_GMTOFF" >&5 $as_echo "$WITH_GMTOFF" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared mmap" >&5 $as_echo_n "checking for shared mmap... " >&6; } if ${cyrus_cv_func_mmap_shared+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : cyrus_cv_func_mmap_shared=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include main() { char *base; int fd = open("conftestmmap", O_RDWR|O_CREAT|O_TRUNC, 0666); if (fd == -1) exit(1); if (write(fd, "test", 4) != 4) exit(1); fsync(fd); base = mmap((caddr_t)0, 100, PROT_READ, MAP_SHARED #ifdef MAP_FILE | MAP_FILE #endif #ifdef MAP_VARIABLE | MAP_VARIABLE #endif , fd, 0L); if (base == (caddr_t)-1) exit(1); if (strncmp(base, "test", 4) != 0) exit(1); if (write(fd, "test", 4) != 4) exit(1); fsync(fd); if (strncmp(base+4, "test", 4) != 0) exit(1); exit(0);} _ACEOF if ac_fn_c_try_run "$LINENO"; then : cyrus_cv_func_mmap_shared=yes else cyrus_cv_func_mmap_shared=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cyrus_cv_func_mmap_shared" >&5 $as_echo "$cyrus_cv_func_mmap_shared" >&6; } if test $cyrus_cv_func_mmap_shared = yes; then WITH_MAP="shared" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stupid shared mmap" >&5 $as_echo_n "checking for stupid shared mmap... " >&6; } if ${cyrus_cv_func_mmap_stupidshared+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : cyrus_cv_func_mmap_stupidshared=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include main() { char *base; int fd = open("conftestmmap", O_RDWR|O_CREAT|O_TRUNC, 0666); if (fd == -1) exit(1); if (write(fd, "test", 4) != 4) exit(1); fsync(fd); base = mmap((caddr_t)0, 4, PROT_READ, MAP_SHARED #ifdef MAP_FILE | MAP_FILE #endif #ifdef MAP_VARIABLE | MAP_VARIABLE #endif , fd, 0L); if (base == (caddr_t)-1) exit(1); if (strncmp(base, "test", 4) != 0) exit(1); lseek(fd, 0L, 0); if (write(fd, "xyzz", 4) != 4) exit(1); fsync(fd); if (strncmp(base, "xyzz", 4) != 0) exit(1); exit(0);} _ACEOF if ac_fn_c_try_run "$LINENO"; then : cyrus_cv_func_mmap_stupidshared=yes else cyrus_cv_func_mmap_stupidshared=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cyrus_cv_func_mmap_stupidshared" >&5 $as_echo "$cyrus_cv_func_mmap_stupidshared" >&6; } if test $cyrus_cv_func_mmap_stupidshared = yes; then WITH_MAP="stupidshared" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** This system does not have a working mmap()" >&5 $as_echo "$as_me: WARNING: *** This system does not have a working mmap()" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Expect a considerable performance penalty" >&5 $as_echo "$as_me: WARNING: *** Expect a considerable performance penalty" >&2;} WITH_MAP=nommap fi fi @%:@ Check whether --with-lock was given. if test "${with_lock+set}" = set; then : withval=$with_lock; WITH_LOCK="$withval" else ac_fn_c_check_func "$LINENO" "fcntl" "ac_cv_func_fcntl" if test "x$ac_cv_func_fcntl" = xyes; then : WITH_LOCK="fcntl" else ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock" if test "x$ac_cv_func_flock" = xyes; then : WITH_LOCK="flock" else as_fn_error $? "unable to detect locking method" "$LINENO" 5 fi fi fi LIB_RT="" ac_fn_c_check_func "$LINENO" "fdatasync" "ac_cv_func_fdatasync" if test "x$ac_cv_func_fdatasync" = xyes; then : $as_echo "@%:@define HAVE_FDATASYNC /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync in -lrt" >&5 $as_echo_n "checking for fdatasync in -lrt... " >&6; } if ${ac_cv_lib_rt_fdatasync+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char fdatasync (); int main () { return fdatasync (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_fdatasync=yes else ac_cv_lib_rt_fdatasync=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_fdatasync" >&5 $as_echo "$ac_cv_lib_rt_fdatasync" >&6; } if test "x$ac_cv_lib_rt_fdatasync" = xyes; then : LIB_RT="-lrt" $as_echo "@%:@define HAVE_FDATASYNC /**/" >>confdefs.h fi fi cant_find_sigvec=no if ${cyrus_cv_sigveclib+:} false; then : $as_echo_n "(cached) " >&6 else ac_fn_c_check_func "$LINENO" "sigvec" "ac_cv_func_sigvec" if test "x$ac_cv_func_sigvec" = xyes; then : cyrus_cv_sigveclib="" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigvec in -lBSD" >&5 $as_echo_n "checking for sigvec in -lBSD... " >&6; } if ${ac_cv_lib_BSD_sigvec+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lBSD $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 sigvec (); int main () { return sigvec (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_BSD_sigvec=yes else ac_cv_lib_BSD_sigvec=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_BSD_sigvec" >&5 $as_echo "$ac_cv_lib_BSD_sigvec" >&6; } if test "x$ac_cv_lib_BSD_sigvec" = xyes; then : cyrus_cv_sigveclib="-lBSD" else SAVE_LDFLAGS="$LDFLAGS" LDFLAGS="-L/usr/ucblib -R/usr/ucblib $LDFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigvec in -lucb" >&5 $as_echo_n "checking for sigvec in -lucb... " >&6; } if ${ac_cv_lib_ucb_sigvec+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lucb $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 sigvec (); int main () { return sigvec (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ucb_sigvec=yes else ac_cv_lib_ucb_sigvec=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_ucb_sigvec" >&5 $as_echo "$ac_cv_lib_ucb_sigvec" >&6; } if test "x$ac_cv_lib_ucb_sigvec" = xyes; then : cyrus_cv_sigveclib="-lc -L/usr/ucblib -R/usr/ucblib -lucb" else cant_find_sigvec=yes fi LDFLAGS="$SAVE_LDFLAGS" fi fi fi # ok, we still look for this stuff because of checking groups, but # all authentication goes through SASL @%:@ Check whether --enable-afs was given. if test "${enable_afs+set}" = set; then : enableval=$enable_afs; fi @%:@ Check whether --with-afs-libdir was given. if test "${with_afs_libdir+set}" = set; then : withval=$with_afs_libdir; afs_libdir="${withval}" else afs_libdir="/usr/lib" fi @%:@ Check whether --with-afs-incdir was given. if test "${with_afs_incdir+set}" = set; then : withval=$with_afs_incdir; afs_incdir="${withval}" else afs_incdir="/usr/include" fi @%:@ Check whether --with-ldap was given. if test "${with_ldap+set}" = set; then : withval=$with_ldap; with_ldap="${withval}" else with_ldap="no" fi @%:@ Check whether --enable-krb5afspts was given. if test "${enable_krb5afspts+set}" = set; then : enableval=$enable_krb5afspts; fi if test "x$enable_afs" = "xyes"; then # krb5afspts is only valid if AFS is enabled, so check inside here. if test "x$enable_krb5afspts" = "xyes"; then : SASL_GSSAPI_LIBS_SET="yes" $as_echo "@%:@define AFSPTS_USE_KRB5 /**/" >>confdefs.h fi CFLAGS="${CFLAGS} -I${with_afs_incdir}/include" AFS_LIBS="${with_afs_libdir}/afs/libkauth.a ${with_afs_libdir}/afs/libprot.a ${with_afs_libdir}/afs/libauth.a ${with_afs_libdir}/afs/libsys.a ${with_afs_libdir}/librxkad.a ${with_afs_libdir}/librx.a ${with_afs_libdir}/afs/libsys.a ${with_afs_libdir}/libubik.a ${with_afs_libdir}/liblwp.a ${with_afs_libdir}/afs/util.a ${with_afs_libdir}/afs/libcom_err.a" if test -f ${with_afs_libdir}/afs/libaudit.a; then AFS_LIBS="$AFS_LIBS ${with_afs_libdir}/afs/libaudit.a" fi if test -f /usr/ucblib/libucb.a; then # this is CMU ADD LIBPATH TO if test "$andrew_cv_runpath_switch" = "none" ; then AFS_LDFLAGS="-L/usr/ucblib ${AFS_LDFLAGS}" else AFS_LDFLAGS="-L/usr/ucblib ${AFS_LDFLAGS} $andrew_cv_runpath_switch/usr/ucblib" fi AFS_LIBS="$AFS_LIBS -lc -lucb" fi if test -f ${with_afs_libdir}/afs/libdes.a; then AFS_LIBS="$AFS_LIBS ${with_afs_libdir}/afs/libdes.a" else AFS_LIBS="$AFS_LIBS -ldes" fi if ${cyrus_cv_afs_sigvec+:} false; then : $as_echo_n "(cached) " >&6 else SAVE_LIBS="$LIBS" LIBS="${with_afs_libdir}/liblwp.a" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if AFS libraries need sigvec" >&5 $as_echo_n "checking if AFS libraries need sigvec... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ IOMGR_Initialize(); int main () { IOMGR_Initialize() ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } cyrus_cv_afs_sigvec="no" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } cyrus_cv_afs_sigvec="yes" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi if test "$cyrus_cv_afs_sigvec" = yes; then if test "$cant_find_sigvec" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find a sigvec for AFS libraries which seem to need one." >&5 $as_echo "$as_me: WARNING: Can't find a sigvec for AFS libraries which seem to need one." >&2;} else AFS_LIBS="${AFS_LIBS} $cyrus_cv_sigveclib" $as_echo "@%:@define HAVE_AFSKRB /**/" >>confdefs.h fi else AFS_LIBS="${AFS_LIBS}" $as_echo "@%:@define HAVE_AFSKRB /**/" >>confdefs.h fi LIBS="$SAVE_LIBS" fi LDAP_CPPFLAGS="" LDAP_LDFLAGS="" LDAP_LIBS="" if test "x$with_ldap" != "xno"; then if test ! -d $with_ldap; then with_ldap=/usr/local fi LDAP_CPPFLAGS="$CPPFLAGS -I${with_ldap}/include" LDAP_LDFLAGS="$LDFLAGS -L${with_ldap}/lib" LDAP_LIBS="" save_CPPFLAGS=$CPPFLAGS save_LDFLAGS=$LDFLAGS CPPFLAGS=$LDAP_CPPFLAGS LDFLAGS=$LDAP_LDFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_initialize in -lldap" >&5 $as_echo_n "checking for ldap_initialize in -lldap... " >&6; } if ${ac_cv_lib_ldap_ldap_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lldap -llber $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 ldap_initialize (); int main () { return ldap_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ldap_ldap_initialize=yes else ac_cv_lib_ldap_ldap_initialize=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_ldap_ldap_initialize" >&5 $as_echo "$ac_cv_lib_ldap_ldap_initialize" >&6; } if test "x$ac_cv_lib_ldap_ldap_initialize" = xyes; then : $as_echo "@%:@define HAVE_LDAP /**/" >>confdefs.h LDAP_LIBS="-lldap -llber" fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$LDAP_LDFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_initialize in -lldap" >&5 $as_echo_n "checking for ldap_initialize in -lldap... " >&6; } if ${ac_cv_lib_ldap_ldap_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lldap -llber $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 ldap_initialize (); int main () { return ldap_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ldap_ldap_initialize=yes else ac_cv_lib_ldap_ldap_initialize=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_ldap_ldap_initialize" >&5 $as_echo "$ac_cv_lib_ldap_ldap_initialize" >&6; } if test "x$ac_cv_lib_ldap_ldap_initialize" = xyes; then : $as_echo "@%:@define HAVE_LDAP /**/" >>confdefs.h LDAP_LIBS="-lldap -llber" fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS fi if test "x$enable_afs" = "xyes" -o "x$with_ldap" != "xno"; then EXTRA_SUBDIRS="${EXTRA_SUBDIRS} ptclient" EXTRA_OUTPUT="${EXTRA_OUTPUT} ptclient/Makefile" $as_echo "@%:@define WITH_PTS /**/" >>confdefs.h fi SERVER_SUBDIRS="master imap" @%:@ Check whether --enable-server was given. if test "${enable_server+set}" = set; then : enableval=$enable_server; if test "$enableval" = no; then SERVER_SUBDIRS="" fi fi # We always output a server makefile (just because we can) @%:@ Check whether --with-krb was given. if test "${with_krb+set}" = set; then : withval=$with_krb; with_krb="$withval" else with_krb="no" fi @%:@ Check whether --with-krbimpl was given. if test "${with_krbimpl+set}" = set; then : withval=$with_krbimpl; with_krbimpl="$withval" else with_krbimpl="kth" fi @%:@ Check whether --enable-statickrb was given. if test "${enable_statickrb+set}" = set; then : enableval=$enable_statickrb; with_statickrb="yes" else with_statickrb="no" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_search in -lresolv" >&5 $as_echo_n "checking for res_search in -lresolv... " >&6; } if ${ac_cv_lib_resolv_res_search+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lresolv $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 res_search (); int main () { return res_search (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_resolv_res_search=yes else ac_cv_lib_resolv_res_search=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_resolv_res_search" >&5 $as_echo "$ac_cv_lib_resolv_res_search" >&6; } if test "x$ac_cv_lib_resolv_res_search" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBRESOLV 1 _ACEOF LIBS="-lresolv $LIBS" fi if test "$with_statickrb" = "yes" -a ! -d "$with_krb"; then as_fn_error $? "--enable-statickrb specified but --with-krb did not specify a valid directory" "$LINENO" 5 fi if test "$with_krb" != "no"; then @%:@ Check whether --with-krbdes was given. if test "${with_krbdes+set}" = set; then : withval=$with_krbdes; with_krbdes="$withval" else with_krbdes="yes" fi if test "$with_krbdes" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_ecb_encrypt in -ldes" >&5 $as_echo_n "checking for des_ecb_encrypt in -ldes... " >&6; } if ${ac_cv_lib_des_des_ecb_encrypt+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldes $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 des_ecb_encrypt (); int main () { return des_ecb_encrypt (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_des_des_ecb_encrypt=yes else ac_cv_lib_des_des_ecb_encrypt=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_des_des_ecb_encrypt" >&5 $as_echo "$ac_cv_lib_des_des_ecb_encrypt" >&6; } if test "x$ac_cv_lib_des_des_ecb_encrypt" = xyes; then : if test "$with_statickrb" = "yes"; then KRB_LIBS="$with_krb/lib/libdes.a" else KRB_LIBS="-ldes" fi else as_fn_error $? "The Kerberos DES library is required for Kerberos support. You might want --with-auth=unix." "$LINENO" 5 fi fi fi if test -d ${with_krb}; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kerberos includes" >&5 $as_echo_n "checking for Kerberos includes... " >&6; } if ${cyrus_cv_krbinclude+:} false; then : $as_echo_n "(cached) " >&6 else for krbhloc in include/kerberosIV include do if test -f ${with_krb}/${krbhloc}/krb.h ; then cyrus_cv_krbinclude=${with_krb}/${krbhloc} break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cyrus_cv_krbinclude" >&5 $as_echo "$cyrus_cv_krbinclude" >&6; } if test -n "${cyrus_cv_krbinclude}"; then CPPFLAGS="$CPPFLAGS -I${cyrus_cv_krbinclude}" fi # this is CMU ADD LIBPATH if test "$andrew_cv_runpath_switch" = "none" ; then LDFLAGS="-L${with_krb}/lib ${LDFLAGS}" else LDFLAGS="-L${with_krb}/lib $andrew_cv_runpath_switch${with_krb}/lib ${LDFLAGS}" fi fi if test "$with_krbimpl" != "kth"; then KRBLIB="krb4" else KRBLIB="krb" fi if test "$with_des" != no; then ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default" if test "x$ac_cv_header_krb_h" = xyes; then : as_ac_Lib=`$as_echo "ac_cv_lib_${KRBLIB}''_krb_mk_priv" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_mk_priv in -l${KRBLIB}" >&5 $as_echo_n "checking for krb_mk_priv in -l${KRBLIB}... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l${KRBLIB} $KRB_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char krb_mk_priv (); int main () { return krb_mk_priv (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : if test "$with_statickrb" = "yes"; then KRB_LIBS="$KRB_LIBS $with_krb/lib/lib${KRBLIB}.a" else KRB_LIBS="$KRB_LIBS -l${KRBLIB}" fi else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No Kerberos V4 found" >&5 $as_echo "$as_me: WARNING: No Kerberos V4 found" >&2;}; krb4=no fi else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No Kerberos V4 found" >&5 $as_echo "$as_me: WARNING: No Kerberos V4 found" >&2;}; krb4=no fi else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No DES library found for Kerberos V4 support" >&5 $as_echo "$as_me: WARNING: No DES library found for Kerberos V4 support" >&2;} krb4=no fi if test "${krb4}" != no; then $as_echo "@%:@define HAVE_KRB /**/" >>confdefs.h fi LIBS="$KRB_LIBS $LIBS" SASL_GSSAPI_LIBS_SET="yes" IMAP_PROGS="" @%:@ Check whether --with-openssl was given. if test "${with_openssl+set}" = set; then : withval=$with_openssl; with_openssl="${withval}" fi OPENSSL_INC= OPENSSL_LIB= case "$with_openssl" in no) with_openssl="no";; ""|yes) LIB_RSAREF="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RSAPublicEncrypt in -lrsaref" >&5 $as_echo_n "checking for RSAPublicEncrypt in -lrsaref... " >&6; } if ${ac_cv_lib_rsaref_RSAPublicEncrypt+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrsaref $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 RSAPublicEncrypt (); int main () { return RSAPublicEncrypt (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rsaref_RSAPublicEncrypt=yes else ac_cv_lib_rsaref_RSAPublicEncrypt=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_rsaref_RSAPublicEncrypt" >&5 $as_echo "$ac_cv_lib_rsaref_RSAPublicEncrypt" >&6; } if test "x$ac_cv_lib_rsaref_RSAPublicEncrypt" = xyes; then : LIB_RSAREF="-lRSAglue -lrsaref"; cmu_have_rsaref=yes else cmu_have_rsaref=no fi with_openssl="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BIO_accept in -lcrypto" >&5 $as_echo_n "checking for BIO_accept in -lcrypto... " >&6; } if ${ac_cv_lib_crypto_BIO_accept+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIB_RSAREF $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 BIO_accept (); int main () { return BIO_accept (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_crypto_BIO_accept=yes else ac_cv_lib_crypto_BIO_accept=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_BIO_accept" >&5 $as_echo "$ac_cv_lib_crypto_BIO_accept" >&6; } if test "x$ac_cv_lib_crypto_BIO_accept" = xyes; then : LIBS="-lcrypto $LIB_RSAREF ${LIBS}" else with_openssl="no" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_CTX_new in -lssl" >&5 $as_echo_n "checking for SSL_CTX_new in -lssl... " >&6; } if ${ac_cv_lib_ssl_SSL_CTX_new+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lssl -lcrypto $LIB_RSAREF $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 SSL_CTX_new (); int main () { return SSL_CTX_new (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ssl_SSL_CTX_new=yes else ac_cv_lib_ssl_SSL_CTX_new=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_SSL_CTX_new" >&5 $as_echo "$ac_cv_lib_ssl_SSL_CTX_new" >&6; } if test "x$ac_cv_lib_ssl_SSL_CTX_new" = xyes; then : LIBS="-lssl ${LIBS}" else with_openssl="no" fi ;; *) OPENSSL_INC="-I${with_openssl}/include" OPENSSL_LIBPATH="${with_openssl}/lib" OPENSSL_LIB="-L${OPENSSL_LIBPATH}" CPPFLAGS="${CPPFLAGS} ${OPENSSL_INC}" # this is CMU ADD LIBPATH if test "$andrew_cv_runpath_switch" = "none" ; then LDFLAGS="-L${OPENSSL_LIBPATH} ${LDFLAGS}" else LDFLAGS="-L${OPENSSL_LIBPATH} $andrew_cv_runpath_switch${OPENSSL_LIBPATH} ${LDFLAGS}" fi # this is CMU ADD LIBPATH TO if test "$andrew_cv_runpath_switch" = "none" ; then OPENSSL_LIB="-L${OPENSSL_LIBPATH} ${OPENSSL_LIB}" else OPENSSL_LIB="-L${OPENSSL_LIBPATH} ${OPENSSL_LIB} $andrew_cv_runpath_switch${OPENSSL_LIBPATH}" fi LIBS="${LIBS} -lssl -lcrypto";; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl" >&5 $as_echo_n "checking for openssl... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5 $as_echo "$with_openssl" >&6; } if test "$with_openssl" != "no"; then $as_echo "@%:@define HAVE_SSL /**/" >>confdefs.h IMAP_PROGS="$IMAP_PROGS tls_prune" if test "${krb4}" != no; then $as_echo "@%:@define OPENSSL_ENABLE_OLD_DES_SUPPORT /**/" >>confdefs.h $as_echo "@%:@define OPENSSL_DES_LIBDES_COMPATIBILITY /**/" >>confdefs.h fi fi @%:@ Check whether --with-egd-socket was given. if test "${with_egd_socket+set}" = set; then : withval=$with_egd_socket; EGD_SOCKET="$withval" fi if test -n "$EGD_SOCKET" ; then cat >>confdefs.h <<_ACEOF @%:@define EGD_SOCKET "$EGD_SOCKET" _ACEOF fi @%:@ Check whether --with-lib-subdir was given. if test "${with_lib_subdir+set}" = set; then : withval=$with_lib_subdir; fi # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 $as_echo_n "checking size of long... " >&6; } if ${ac_cv_sizeof_long+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : else if test "$ac_cv_type_long" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 $as_echo "$ac_cv_sizeof_long" >&6; } cat >>confdefs.h <<_ACEOF @%:@define SIZEOF_LONG $ac_cv_sizeof_long _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking what directory libraries are found in" >&5 $as_echo_n "checking what directory libraries are found in... " >&6; } if ${ac_cv_cmu_lib_subdir+:} false; then : $as_echo_n "(cached) " >&6 else test "X$with_lib_subdir" = "Xyes" && with_lib_subdir= test "X$with_lib_subdir" = "Xno" && with_lib_subdir= if test "X$with_lib_subdir" = "X" ; then ac_cv_cmu_lib_subdir=lib if test $ac_cv_sizeof_long -eq 4 ; then test -d /usr/lib32 && ac_cv_cmu_lib_subdir=lib32 fi if test $ac_cv_sizeof_long -eq 8 ; then test -d /usr/lib64 && ac_cv_cmu_lib_subdir=lib64 fi else ac_cv_cmu_lib_subdir=$with_lib_subdir fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cmu_lib_subdir" >&5 $as_echo "$ac_cv_cmu_lib_subdir" >&6; } CMU_LIB_SUBDIR=$ac_cv_cmu_lib_subdir @%:@ Check whether --with-zlib was given. if test "${with_zlib+set}" = set; then : withval=$with_zlib; with_zlib=$withval else with_zlib="yes" fi save_CPPFLAGS=$CPPFLAGS save_LDFLAGS=$LDFLAGS if test -d $with_zlib; then CPPFLAGS="${CPPFLAGS} -I${with_lib}/include" # this is CMU ADD LIBPATH if test "$andrew_cv_runpath_switch" = "none" ; then LDFLAGS="-L${with_zlib}/$CMU_LIB_SUBDIR ${LDFLAGS}" else LDFLAGS="-L${with_zlib}/$CMU_LIB_SUBDIR $andrew_cv_runpath_switch${with_zlib}/$CMU_LIB_SUBDIR ${LDFLAGS}" fi fi ZLIB="" case "$with_zlib" in no) with_zlib="no";; *) ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" if test "x$ac_cv_header_zlib_h" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz" >&5 $as_echo_n "checking for deflate in -lz... " >&6; } if ${ac_cv_lib_z_deflate+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $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 deflate (); int main () { return deflate (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_z_deflate=yes else ac_cv_lib_z_deflate=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_z_deflate" >&5 $as_echo "$ac_cv_lib_z_deflate" >&6; } if test "x$ac_cv_lib_z_deflate" = xyes; then : LIBS="${LIBS} -lz"; with_zlib="yes" else with_zlib="no" fi else with_zlib=no fi ;; esac if test "$with_zlib" != "no"; then $as_echo "@%:@define HAVE_ZLIB /**/" >>confdefs.h ZLIB="-lz" else CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib" >&5 $as_echo_n "checking for zlib... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_zlib" >&5 $as_echo "$with_zlib" >&6; } @%:@ Check whether --with-zephyr was given. if test "${with_zephyr+set}" = set; then : withval=$with_zephyr; with_zephyr="${withval}" fi if test -z "$with_zephyr"; then if test -f /usr/local/lib/libzephyr.a; then with_zephyr="/usr/local" elif test -f /usr/lib/libzephyr.a; then with_zephyr="/usr" fi fi ZEPHYR_LIBS="" case "$with_zephyr" in no) true;; ""|yes) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZInitialize in -lzephyr" >&5 $as_echo_n "checking for ZInitialize in -lzephyr... " >&6; } if ${ac_cv_lib_zephyr_ZInitialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lzephyr $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 ZInitialize (); int main () { return ZInitialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_zephyr_ZInitialize=yes else ac_cv_lib_zephyr_ZInitialize=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_zephyr_ZInitialize" >&5 $as_echo "$ac_cv_lib_zephyr_ZInitialize" >&6; } if test "x$ac_cv_lib_zephyr_ZInitialize" = xyes; then : ZEPHYR_LIBS="-lzephyr" else with_zephyr="no" fi ;; *) ZEPHYR_LIBS="-lzephyr";; esac if test "$with_zephyr" != "no"; then $as_echo "@%:@define HAVE_ZEPHYR /**/" >>confdefs.h fi @%:@ Check whether --with-pidfile was given. if test "${with_pidfile+set}" = set; then : withval=$with_pidfile; MASTERPIDFILE="$withval" else MASTERPIDFILE="/var/run/cyrus-master.pid" fi MASTERPIDFILE="\"$MASTERPIDFILE\"" cat >>confdefs.h <<_ACEOF @%:@define MASTER_PIDFILE $MASTERPIDFILE _ACEOF @%:@ Check whether --enable-idled was given. if test "${enable_idled+set}" = set; then : enableval=$enable_idled; if test "$enable_val" != no; then IMAP_PROGS="$IMAP_PROGS idled" fi fi ENABLE_NNTP=no @%:@ Check whether --enable-nntp was given. if test "${enable_nntp+set}" = set; then : enableval=$enable_nntp; ENABLE_NNTP=$enableval if test "$ENABLE_NNTP" != no; then IMAP_PROGS="$IMAP_PROGS nntpd fetchnews" fi fi ENABLE_MURDER=no @%:@ Check whether --enable-murder was given. if test "${enable_murder+set}" = set; then : enableval=$enable_murder; ENABLE_MURDER=$enableval fi if test "$ENABLE_MURDER" != no; then IMAP_PROGS="$IMAP_PROGS mupdate" # for master/slave auto-selection for ac_header in sys/sockio.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/sockio.h" "ac_cv_header_sys_sockio_h" "$ac_includes_default" if test "x$ac_cv_header_sys_sockio_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_SYS_SOCKIO_H 1 _ACEOF fi done fi ENABLE_REPLICATION=no @%:@ Check whether --enable-replication was given. if test "${enable_replication+set}" = set; then : enableval=$enable_replication; ENABLE_REPLICATION=$enableval if test "$ENABLE_REPLICATION" != no; then IMAP_PROGS="$IMAP_PROGS sync_client sync_server sync_reset" fi fi @%:@ Check whether --with-com_err was given. if test "${with_com_err+set}" = set; then : withval=$with_com_err; fi if test -z "$with_com_err"; then # no value supplied { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5 $as_echo_n "checking for com_err in -lcom_err... " >&6; } if ${ac_cv_lib_com_err_com_err+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcom_err $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 com_err (); int main () { return com_err (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_com_err_com_err=yes else ac_cv_lib_com_err_com_err=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_com_err_com_err" >&5 $as_echo "$ac_cv_lib_com_err_com_err" >&6; } if test "x$ac_cv_lib_com_err_com_err" = xyes; then : # com_err is already in library path # guess we're okay # can use system com_err with_com_err="" ac_fn_c_check_header_mongrel "$LINENO" "et/com_err.h" "ac_cv_header_et_com_err_h" "$ac_includes_default" if test "x$ac_cv_header_et_com_err_h" = xyes; then : $as_echo "@%:@define HAVE_ET_COM_ERR_H /**/" >>confdefs.h else ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default" if test "x$ac_cv_header_com_err_h" = xyes; then : else as_fn_error $? "cannot locate com_err.h" "$LINENO" 5 fi fi # Extract the first word of "compile_et", so it can be a program name with args. set dummy compile_et; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_COMPILE_ET+:} false; then : $as_echo_n "(cached) " >&6 else case $COMPILE_ET in [\\/]* | ?:[\\/]*) ac_cv_path_COMPILE_ET="$COMPILE_ET" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_COMPILE_ET="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_COMPILE_ET" && ac_cv_path_COMPILE_ET="no compile et" ;; esac fi COMPILE_ET=$ac_cv_path_COMPILE_ET if test -n "$COMPILE_ET"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_ET" >&5 $as_echo "$COMPILE_ET" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else if test -f /usr/local/include/com_err.h -o -f /usr/local/include/et/com_err.h; then with_com_err="/usr/local" # Extract the first word of "/usr/local/bin/compile_et", so it can be a program name with args. set dummy /usr/local/bin/compile_et; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_COMPILE_ET+:} false; then : $as_echo_n "(cached) " >&6 else case $COMPILE_ET in [\\/]* | ?:[\\/]*) ac_cv_path_COMPILE_ET="$COMPILE_ET" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_COMPILE_ET="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_COMPILE_ET" && ac_cv_path_COMPILE_ET="no compile et" ;; esac fi COMPILE_ET=$ac_cv_path_COMPILE_ET if test -n "$COMPILE_ET"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_ET" >&5 $as_echo "$COMPILE_ET" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi elif test -f /usr/include/com_err.h -o -f /usr/include/et/com_err.h; then with_com_err="/usr" # Extract the first word of "/usr/bin/compile_et", so it can be a program name with args. set dummy /usr/bin/compile_et; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_COMPILE_ET+:} false; then : $as_echo_n "(cached) " >&6 else case $COMPILE_ET in [\\/]* | ?:[\\/]*) ac_cv_path_COMPILE_ET="$COMPILE_ET" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_COMPILE_ET="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_COMPILE_ET" && ac_cv_path_COMPILE_ET="no compile et" ;; esac fi COMPILE_ET=$ac_cv_path_COMPILE_ET if test -n "$COMPILE_ET"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_ET" >&5 $as_echo "$COMPILE_ET" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else # use ours with_com_err=yes fi fi if test "${with_com_err}" = "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: com_err is required; included version will be used." >&5 $as_echo "$as_me: WARNING: com_err is required; included version will be used." >&2;} with_com_err="yes" fi if test "${COMPILE_ET}" = "no compile et" -o "${COMPILE_ET}" = ""; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Parts of com_err distribuion were found, but not compile_et." >&5 $as_echo "$as_me: WARNING: Parts of com_err distribuion were found, but not compile_et." >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Will build com_err from included sources." >&5 $as_echo "$as_me: WARNING: Will build com_err from included sources." >&2;} with_com_err="yes" # build it ourselves fi fi case "$with_com_err" in # built-in et yes) # use the com_err we're gonna build COMPILE_ET="../com_err/et/compile_et" ;; "") # no problem, we already have it in the paths # we do nothing to pick it up ;; *) # use whatever they told us, or whatever we found COMPILE_ET="${with_com_err}/bin/compile_et" esac if test "$with_com_err" != yes ; then TEST1=".cyrus-configure-test-$$" /bin/rm -f $TEST1.et $TEST1.h $TEST1.c echo "error_table imap" >> $TEST1.et echo "ec IMAP_TESTING," >> $TEST1.et echo " \"Testing\"" >> $TEST1.et echo "end" >> $TEST1.et "${COMPILE_ET}" $TEST1.et > /dev/null compile_et_ok=no if test -f $TEST1.h ; then if test `awk '/IMAP_TESTING/{print $3}' $TEST1.h 2>/dev/null` = "(-1904809472L)" ; then compile_et_ok=yes fi fi /bin/rm -f $TEST1.et $TEST1.h $TEST1.c if test "$compile_et_ok" = no ; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems $COMPILE_ET is buggy, building our own" >&5 $as_echo "$as_me: WARNING: It seems $COMPILE_ET is buggy, building our own" >&2;} COMPILE_ET="../com_err/et/compile_et" # build it ourselves fi fi case "$with_com_err" in # built-in et yes) # use the com_err we're gonna build COM_ERR_LIBS="../com_err/et/libcom_err.a" COM_ERR_LDFLAGS="" COM_ERR_CPPFLAGS="-I\${top_srcdir}/com_err/et" PRE_SUBDIRS="com_err/et ${PRE_SUBDIRS}" EXTRA_OUTPUT="${EXTRA_OUTPUT} com_err/et/Makefile" ;; "") # no problem, we already have it in the paths # we do nothing to pick it up COM_ERR_LIBS="-lcom_err" # hope it's not shared # we already set COMPILE_ET, or we didn't get here COM_ERR_LDFLAGS="" COM_ERR_CPPFLAGS="" ;; *) # use whatever they told us, or whatever we found COM_ERR_LIBS="${with_com_err}/lib/libcom_err.a" COM_ERR_CPPFLAGS="-I${with_com_err}/include" # Ever get the feeling people hide this stuff on purpose? if test -d "${with_com_err}/include/et" ; then COM_ERR_CPPFLAGS="-I${with_com_err}/include/et" fi esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for modern syslog" >&5 $as_echo_n "checking for modern syslog... " >&6; } if ${cyrus_cv_lib_syslog+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef LOG_LOCAL6 #include #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : cyrus_cv_lib_syslog=yes else cyrus_cv_lib_syslog=no fi rm -f conftest.err conftest.i conftest.$ac_ext fi if test $cyrus_cv_lib_syslog = no; then PRE_SUBDIRS="${PRE_SUBDIRS} syslog" EXTRA_OUTPUT="${EXTRA_OUTPUT} syslog/Makefile" DEPLIBS="${DEPLIBS} ../syslog/libsyslog.a" CPPFLAGS="$CPPFLAGS -I\$(srcdir)/../syslog" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cyrus_cv_lib_syslog" >&5 $as_echo "$cyrus_cv_lib_syslog" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking which syslog facility to use" >&5 $as_echo_n "checking which syslog facility to use... " >&6; } SYSLOG_FACILITY=LOG_LOCAL6 @%:@ Check whether --with-syslogfacility was given. if test "${with_syslogfacility+set}" = set; then : withval=$with_syslogfacility; if test "$withval" != "yes" -a "$withval" != "no" ; then SYSLOG_FACILITY=LOG_$withval fi; fi cat >>confdefs.h <<_ACEOF @%:@define SYSLOG_FACILITY $SYSLOG_FACILITY _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSLOG_FACILITY" >&5 $as_echo "$SYSLOG_FACILITY" >&6; } ac_fn_c_check_func "$LINENO" "getdtablesize" "ac_cv_func_getdtablesize" if test "x$ac_cv_func_getdtablesize" = xyes; then : $as_echo "@%:@define HAVE_GETDTABLESIZE 1" >>confdefs.h else case " $LIB@&t@OBJS " in *" getdtablesize.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS getdtablesize.$ac_objext" ;; esac fi @%:@ Check whether --enable-cmulocal was given. if test "${enable_cmulocal+set}" = set; then : enableval=$enable_cmulocal; if test "$enableval" = yes; then EXTRA_SUBDIRS="${EXTRA_SUBDIRS} netnews depot" EXTRA_OUTPUT="${EXTRA_OUTPUT} depot/Makefile" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking to use old sieve service name" >&5 $as_echo_n "checking to use old sieve service name... " >&6; } @%:@ Check whether --enable-oldsievename was given. if test "${enable_oldsievename+set}" = set; then : enableval=$enable_oldsievename; if test "$enableval" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "@%:@define OLD_SIEVE_SERVICE_NAME /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @%:@ Check whether --enable-netscapehack was given. if test "${enable_netscapehack+set}" = set; then : enableval=$enable_netscapehack; if test "$enableval" = yes; then $as_echo "@%:@define ENABLE_X_NETSCAPE_HACK /**/" >>confdefs.h fi fi ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBDL 1 _ACEOF LIBS="-ldl $LIBS" fi fi ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt" if test "x$ac_cv_func_crypt" = xyes; then : cmu_have_crypt=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5 $as_echo_n "checking for crypt in -lcrypt... " >&6; } if ${ac_cv_lib_crypt_crypt+:} false; 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" = xyes; then : LIB_CRYPT="-lcrypt"; cmu_have_crypt=yes else cmu_have_crypt=no fi fi @%:@ Check whether --enable-gssapi was given. if test "${enable_gssapi+set}" = set; then : enableval=$enable_gssapi; gssapi=$enableval else gssapi=yes fi @%:@ Check whether --with-gss_impl was given. if test "${with_gss_impl+set}" = set; then : withval=$with_gss_impl; gss_impl=$withval else gss_impl=auto fi if test "$gssapi" != no; then platform= case "${host}" in *-*-linux*) platform=__linux ;; *-*-hpux*) platform=__hpux ;; *-*-irix*) platform=__irix ;; *-*-solaris2*) # When should we use __sunos? platform=__solaris ;; *-*-aix*) ###_AIX platform=__aix ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The system type is not recognized. If you believe that CyberSafe GSSAPI works on this platform, please update the configure script" >&5 $as_echo "$as_me: WARNING: The system type is not recognized. If you believe that CyberSafe GSSAPI works on this platform, please update the configure script" >&2;} if test "$gss_impl" = "cybersafe"; then as_fn_error $? "CyberSafe was forced, cannot continue as platform is not supported" "$LINENO" 5 fi ;; esac cmu_saved_CPPFLAGS=$CPPFLAGS if test -d ${gssapi}; then CPPFLAGS="$CPPFLAGS -I$gssapi/include" # We want to keep -I in our CPPFLAGS, but only if we succeed cmu_saved_CPPFLAGS=$CPPFLAGS ### I am not sure how useful is this (and whether this is required at all ### especially when we have to provide two -L flags for new CyberSafe LDFLAGS="$LDFLAGS -L$gssapi/lib" if test -n "$platform"; then if test "$gss_impl" = "auto" -o "$gss_impl" = "cybersafe"; then CPPFLAGS="$CPPFLAGS -D$platform" if test -d "${gssapi}/appsec-sdk/include"; then CPPFLAGS="$CPPFLAGS -I${gssapi}/appsec-sdk/include" fi fi fi fi ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default" if test "x$ac_cv_header_gssapi_h" = xyes; then : else ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default" if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling GSSAPI - no include files found" >&5 $as_echo "$as_me: WARNING: Disabling GSSAPI - no include files found" >&2;}; gssapi=no fi fi CPPFLAGS=$cmu_saved_CPPFLAGS fi if test "$gssapi" != no; then if test "$ac_cv_header_gssapi_h" = "yes" -o "$ac_cv_header_gssapi_gssapi_h" = "yes"; then $as_echo "@%:@define HAVE_GSSAPI_H /**/" >>confdefs.h fi # We need to find out which gssapi implementation we are # using. Supported alternatives are: MIT Kerberos 5, # Heimdal Kerberos 5 (http://www.pdc.kth.se/heimdal), # CyberSafe Kerberos 5 (http://www.cybersafe.com/) # and Sun SEAM (http://wwws.sun.com/software/security/kerberos/) # # The choice is reflected in GSSAPIBASE_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_search in -lresolv" >&5 $as_echo_n "checking for res_search in -lresolv... " >&6; } if ${ac_cv_lib_resolv_res_search+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lresolv $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 res_search (); int main () { return res_search (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_resolv_res_search=yes else ac_cv_lib_resolv_res_search=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_resolv_res_search" >&5 $as_echo "$ac_cv_lib_resolv_res_search" >&6; } if test "x$ac_cv_lib_resolv_res_search" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBRESOLV 1 _ACEOF LIBS="-lresolv $LIBS" fi if test -d ${gssapi}; then gssapi_dir="${gssapi}/lib" GSSAPIBASE_LIBS="-L$gssapi_dir" GSSAPIBASE_STATIC_LIBS="-L$gssapi_dir" else # FIXME: This is only used for building cyrus, and then only as # a real hack. it needs to be fixed. gssapi_dir="/usr/local/lib" fi # Check a full link against the Heimdal libraries. # If this fails, check a full link against the MIT libraries. # If this fails, check a full link against the CyberSafe libraries. # If this fails, check a full link against the Solaris 8 and up libgss. if test "$gss_impl" = "auto" -o "$gss_impl" = "heimdal"; then gss_failed=0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_unwrap in -lgssapi" >&5 $as_echo_n "checking for gss_unwrap in -lgssapi... " >&6; } if ${ac_cv_lib_gssapi_gss_unwrap+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgssapi ${GSSAPIBASE_LIBS} -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err ${LIB_SOCKET} $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 gss_unwrap (); int main () { return gss_unwrap (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_gssapi_gss_unwrap=yes else ac_cv_lib_gssapi_gss_unwrap=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_gssapi_gss_unwrap" >&5 $as_echo "$ac_cv_lib_gssapi_gss_unwrap" >&6; } if test "x$ac_cv_lib_gssapi_gss_unwrap" = xyes; then : gss_impl="heimdal" else gss_failed=1 fi if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then gss_impl="failed" fi fi if test "$gss_impl" = "auto" -o "$gss_impl" = "mit"; then # check for libkrb5support first { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5int_getspecific in -lkrb5support" >&5 $as_echo_n "checking for krb5int_getspecific in -lkrb5support... " >&6; } if ${ac_cv_lib_krb5support_krb5int_getspecific+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lkrb5support ${LIB_SOCKET} $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 krb5int_getspecific (); int main () { return krb5int_getspecific (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_krb5support_krb5int_getspecific=yes else ac_cv_lib_krb5support_krb5int_getspecific=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_krb5support_krb5int_getspecific" >&5 $as_echo "$ac_cv_lib_krb5support_krb5int_getspecific" >&6; } if test "x$ac_cv_lib_krb5support_krb5int_getspecific" = xyes; then : K5SUP=-lkrb5support K5SUPSTATIC=$gssapi_dir/libkrb5support.a fi gss_failed=0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_unwrap in -lgssapi_krb5" >&5 $as_echo_n "checking for gss_unwrap in -lgssapi_krb5... " >&6; } if ${ac_cv_lib_gssapi_krb5_gss_unwrap+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgssapi_krb5 ${GSSAPIBASE_LIBS} -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP} ${LIB_SOCKET} $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 gss_unwrap (); int main () { return gss_unwrap (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_gssapi_krb5_gss_unwrap=yes else ac_cv_lib_gssapi_krb5_gss_unwrap=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_gssapi_krb5_gss_unwrap" >&5 $as_echo "$ac_cv_lib_gssapi_krb5_gss_unwrap" >&6; } if test "x$ac_cv_lib_gssapi_krb5_gss_unwrap" = xyes; then : gss_impl="mit" else gss_failed=1 fi if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then gss_impl="failed" fi fi # For Cybersafe one has to set a platform define in order to make compilation work if test "$gss_impl" = "auto" -o "$gss_impl" = "cybersafe"; then cmu_saved_CPPFLAGS=$CPPFLAGS cmu_saved_GSSAPIBASE_LIBS=$GSSAPIBASE_LIBS # FIXME - Note that the libraries are in .../lib64 for 64bit kernels if test -d "${gssapi}/appsec-rt/lib"; then GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -L${gssapi}/appsec-rt/lib" fi CPPFLAGS="$CPPFLAGS -D$platform" if test -d "${gssapi}/appsec-sdk/include"; then CPPFLAGS="$CPPFLAGS -I${gssapi}/appsec-sdk/include" fi gss_failed=0 # Check for CyberSafe with two libraries first, than fall back to a single # library (older CyberSafe) unset ac_cv_lib_gss_csf_gss_acq_user { $as_echo "$as_me:${as_lineno-$LINENO}: checking for csf_gss_acq_user in -lgss" >&5 $as_echo_n "checking for csf_gss_acq_user in -lgss... " >&6; } if ${ac_cv_lib_gss_csf_gss_acq_user+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgss ${GSSAPIBASE_LIBS} -lgss -lcstbk5 $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 csf_gss_acq_user (); int main () { return csf_gss_acq_user (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_gss_csf_gss_acq_user=yes else ac_cv_lib_gss_csf_gss_acq_user=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_gss_csf_gss_acq_user" >&5 $as_echo "$ac_cv_lib_gss_csf_gss_acq_user" >&6; } if test "x$ac_cv_lib_gss_csf_gss_acq_user" = xyes; then : gss_impl="cybersafe03" else unset ac_cv_lib_gss_csf_gss_acq_user; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for csf_gss_acq_user in -lgss" >&5 $as_echo_n "checking for csf_gss_acq_user in -lgss... " >&6; } if ${ac_cv_lib_gss_csf_gss_acq_user+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgss $GSSAPIBASE_LIBS -lgss $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 csf_gss_acq_user (); int main () { return csf_gss_acq_user (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_gss_csf_gss_acq_user=yes else ac_cv_lib_gss_csf_gss_acq_user=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_gss_csf_gss_acq_user" >&5 $as_echo "$ac_cv_lib_gss_csf_gss_acq_user" >&6; } if test "x$ac_cv_lib_gss_csf_gss_acq_user" = xyes; then : gss_impl="cybersafe" else gss_failed=1 fi fi if test "$gss_failed" = "1"; then # Restore variables GSSAPIBASE_LIBS=$cmu_saved_GSSAPIBASE_LIBS CPPFLAGS=$cmu_saved_CPPFLAGS if test "$gss_impl" != "auto"; then gss_impl="failed" fi fi fi if test "$gss_impl" = "auto" -o "$gss_impl" = "seam"; then gss_failed=0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_unwrap in -lgss" >&5 $as_echo_n "checking for gss_unwrap in -lgss... " >&6; } if ${ac_cv_lib_gss_gss_unwrap+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgss -lgss $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 gss_unwrap (); int main () { return gss_unwrap (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_gss_gss_unwrap=yes else ac_cv_lib_gss_gss_unwrap=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_gss_gss_unwrap" >&5 $as_echo "$ac_cv_lib_gss_gss_unwrap" >&6; } if test "x$ac_cv_lib_gss_gss_unwrap" = xyes; then : gss_impl="seam" else gss_failed=1 fi if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then gss_impl="failed" fi fi if test "$gss_impl" = "mit"; then GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP}" GSSAPIBASE_STATIC_LIBS="$GSSAPIBASE_LIBS $gssapi_dir/libgssapi_krb5.a $gssapi_dir/libkrb5.a $gssapi_dir/libk5crypto.a $gssapi_dir/libcom_err.a ${K5SUPSTATIC}" elif test "$gss_impl" = "heimdal"; then CPPFLAGS="$CPPFLAGS -DKRB5_HEIMDAL" GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err" GSSAPIBASE_STATIC_LIBS="$GSSAPIBASE_STATIC_LIBS $gssapi_dir/libgssapi.a $gssapi_dir/libkrb5.a $gssapi_dir/libasn1.a $gssapi_dir/libroken.a $gssapi_dir/libcom_err.a ${LIB_CRYPT}" elif test "$gss_impl" = "cybersafe03"; then # Version of CyberSafe with two libraries CPPFLAGS="$CPPFLAGS -D$platform -I${gssapi}/appsec-sdk/include" GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgss -lcstbk5" # there is no static libgss for CyberSafe GSSAPIBASE_STATIC_LIBS=none elif test "$gss_impl" = "cybersafe"; then CPPFLAGS="$CPPFLAGS -D$platform -I${gssapi}/appsec-sdk/include" GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgss" # there is no static libgss for CyberSafe GSSAPIBASE_STATIC_LIBS=none elif test "$gss_impl" = "seam"; then GSSAPIBASE_LIBS=-lgss # there is no static libgss on Solaris 8 and up GSSAPIBASE_STATIC_LIBS=none elif test "$gss_impl" = "failed"; then gssapi="no" GSSAPIBASE_LIBS= GSSAPIBASE_STATIC_LIBS= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling GSSAPI - specified library not found" >&5 $as_echo "$as_me: WARNING: Disabling GSSAPI - specified library not found" >&2;} else gssapi="no" GSSAPIBASE_LIBS= GSSAPIBASE_STATIC_LIBS= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling GSSAPI - no library" >&5 $as_echo "$as_me: WARNING: Disabling GSSAPI - no library" >&2;} fi fi # # Cybersafe defines both GSS_C_NT_HOSTBASED_SERVICE and GSS_C_NT_USER_NAME # in gssapi\rfckrb5.h # if test "$gssapi" != "no"; then if test "$gss_impl" = "cybersafe" -o "$gss_impl" = "cybersafe03"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef GSS_C_NT_HOSTBASED_SERVICE hostbased_service_gss_nt_yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "hostbased_service_gss_nt_yes" >/dev/null 2>&1; then : $as_echo "@%:@define HAVE_GSS_C_NT_HOSTBASED_SERVICE /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cybersafe define not found" >&5 $as_echo "$as_me: WARNING: Cybersafe define not found" >&2;} fi rm -f conftest* elif test "$ac_cv_header_gssapi_h" = "yes"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "GSS_C_NT_HOSTBASED_SERVICE" >/dev/null 2>&1; then : $as_echo "@%:@define HAVE_GSS_C_NT_HOSTBASED_SERVICE /**/" >>confdefs.h fi rm -f conftest* elif test "$ac_cv_header_gssapi_gssapi_h"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "GSS_C_NT_HOSTBASED_SERVICE" >/dev/null 2>&1; then : $as_echo "@%:@define HAVE_GSS_C_NT_HOSTBASED_SERVICE /**/" >>confdefs.h fi rm -f conftest* fi if test "$gss_impl" = "cybersafe" -o "$gss_impl" = "cybersafe03"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef GSS_C_NT_USER_NAME user_name_yes_gss_nt #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "user_name_yes_gss_nt" >/dev/null 2>&1; then : $as_echo "@%:@define HAVE_GSS_C_NT_USER_NAME /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cybersafe define not found" >&5 $as_echo "$as_me: WARNING: Cybersafe define not found" >&2;} fi rm -f conftest* elif test "$ac_cv_header_gssapi_h" = "yes"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "GSS_C_NT_USER_NAME" >/dev/null 2>&1; then : $as_echo "@%:@define HAVE_GSS_C_NT_USER_NAME /**/" >>confdefs.h fi rm -f conftest* elif test "$ac_cv_header_gssapi_gssapi_h"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "GSS_C_NT_USER_NAME" >/dev/null 2>&1; then : $as_echo "@%:@define HAVE_GSS_C_NT_USER_NAME /**/" >>confdefs.h fi rm -f conftest* fi fi GSSAPI_LIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking GSSAPI" >&5 $as_echo_n "checking GSSAPI... " >&6; } if test "$gssapi" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: with implementation ${gss_impl}" >&5 $as_echo "with implementation ${gss_impl}" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_search in -lresolv" >&5 $as_echo_n "checking for res_search in -lresolv... " >&6; } if ${ac_cv_lib_resolv_res_search+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lresolv $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 res_search (); int main () { return res_search (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_resolv_res_search=yes else ac_cv_lib_resolv_res_search=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_resolv_res_search" >&5 $as_echo "$ac_cv_lib_resolv_res_search" >&6; } if test "x$ac_cv_lib_resolv_res_search" = xyes; then : GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lresolv" fi SASL_MECHS="$SASL_MECHS libgssapiv2.la" SASL_STATIC_OBJS="$SASL_STATIC_OBJS gssapi.o" SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/gssapi.c" cmu_save_LIBS="$LIBS" LIBS="$LIBS $GSSAPIBASE_LIBS" for ac_func in gsskrb5_register_acceptor_identity do : ac_fn_c_check_func "$LINENO" "gsskrb5_register_acceptor_identity" "ac_cv_func_gsskrb5_register_acceptor_identity" if test "x$ac_cv_func_gsskrb5_register_acceptor_identity" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY 1 _ACEOF fi done LIBS="$cmu_save_LIBS" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 $as_echo "disabled" >&6; } fi @%:@ Check whether --with-sasl was given. if test "${with_sasl+set}" = set; then : withval=$with_sasl; with_sasl="$withval" else with_sasl="yes" fi @%:@ Check whether --with-staticsasl was given. if test "${with_staticsasl+set}" = set; then : withval=$with_staticsasl; with_staticsasl="$withval"; if test $with_staticsasl != "no"; then using_static_sasl="static" fi else with_staticsasl="no"; using_static_sasl="no" fi SASLFLAGS="" LIB_SASL="" cmu_saved_CPPFLAGS=$CPPFLAGS cmu_saved_LDFLAGS=$LDFLAGS cmu_saved_LIBS=$LIBS if test ${with_staticsasl} != "no"; then if test -d ${with_staticsasl}; then if test -d ${with_staticsasl}/lib64 ; then ac_cv_sasl_where_lib=${with_staticsasl}/lib64 else ac_cv_sasl_where_lib=${with_staticsasl}/lib fi ac_cv_sasl_where_lib=${with_staticsasl}/lib ac_cv_sasl_where_inc=${with_staticsasl}/include SASLFLAGS="-I$ac_cv_sasl_where_inc" LIB_SASL="-L$ac_cv_sasl_where_lib" CPPFLAGS="${cmu_saved_CPPFLAGS} -I${ac_cv_sasl_where_inc}" LDFLAGS="${cmu_saved_LDFLAGS} -L${ac_cv_sasl_where_lib}" else with_staticsasl="/usr" fi ac_fn_c_check_header_mongrel "$LINENO" "sasl/sasl.h" "ac_cv_header_sasl_sasl_h" "$ac_includes_default" if test "x$ac_cv_header_sasl_sasl_h" = xyes; then : ac_fn_c_check_header_mongrel "$LINENO" "sasl/saslutil.h" "ac_cv_header_sasl_saslutil_h" "$ac_includes_default" if test "x$ac_cv_header_sasl_saslutil_h" = xyes; then : for i42 in lib64 lib; do if test -r ${with_staticsasl}/$i42/libsasl2.a; then ac_cv_found_sasl=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for static libsasl" >&5 $as_echo_n "checking for static libsasl... " >&6; } LIB_SASL="$LIB_SASL ${with_staticsasl}/$i42/libsasl2.a" fi done if test ! "$ac_cv_found_sasl" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for static libsasl" >&5 $as_echo_n "checking for static libsasl... " >&6; } as_fn_error $? "Could not find ${with_staticsasl}/lib*/libsasl2.a" "$LINENO" 5 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } if test "x$SASL_GSSAPI_LIBS_SET" = "x"; then LIB_SASL="$LIB_SASL $GSSAPIBASE_STATIC_LIBS" else SASL_GSSAPI_LIBS_SET="" cmu_saved_LIBS="$GSSAPIBASE_STATIC_LIBS $cmu_saved_LIBS" fi fi if test -d ${with_sasl}; then ac_cv_sasl_where_lib=${with_sasl}/lib ac_cv_sasl_where_inc=${with_sasl}/include DYNSASLFLAGS="-I$ac_cv_sasl_where_inc" if test "$ac_cv_sasl_where_lib" != ""; then # this is CMU ADD LIBPATH TO if test "$andrew_cv_runpath_switch" = "none" ; then LIB_DYN_SASL="-L$ac_cv_sasl_where_lib ${LIB_DYN_SASL}" else LIB_DYN_SASL="-L$ac_cv_sasl_where_lib ${LIB_DYN_SASL} $andrew_cv_runpath_switch$ac_cv_sasl_where_lib" fi fi LIB_DYN_SASL="$LIB_DYN_SASL -lsasl2" CPPFLAGS="${cmu_saved_CPPFLAGS} -I${ac_cv_sasl_where_inc}" LDFLAGS="${cmu_saved_LDFLAGS} -L${ac_cv_sasl_where_lib}" fi # be sure to check for a SASLv2 specific function ac_fn_c_check_header_mongrel "$LINENO" "sasl/sasl.h" "ac_cv_header_sasl_sasl_h" "$ac_includes_default" if test "x$ac_cv_header_sasl_sasl_h" = xyes; then : ac_fn_c_check_header_mongrel "$LINENO" "sasl/saslutil.h" "ac_cv_header_sasl_saslutil_h" "$ac_includes_default" if test "x$ac_cv_header_sasl_saslutil_h" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prop_get in -lsasl2" >&5 $as_echo_n "checking for prop_get in -lsasl2... " >&6; } if ${ac_cv_lib_sasl2_prop_get+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsasl2 $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 prop_get (); int main () { return prop_get (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_sasl2_prop_get=yes else ac_cv_lib_sasl2_prop_get=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_sasl2_prop_get" >&5 $as_echo "$ac_cv_lib_sasl2_prop_get" >&6; } if test "x$ac_cv_lib_sasl2_prop_get" = xyes; then : ac_cv_found_sasl=yes else ac_cv_found_sasl=no fi else ac_cv_found_sasl=no fi else ac_cv_found_sasl=no fi if test "$ac_cv_found_sasl" = "yes"; then if test "$ac_cv_sasl_where_lib" != ""; then # this is CMU ADD LIBPATH TO if test "$andrew_cv_runpath_switch" = "none" ; then DYNLIB_SASL="-L$ac_cv_sasl_where_lib ${DYNLIB_SASL}" else DYNLIB_SASL="-L$ac_cv_sasl_where_lib ${DYNLIB_SASL} $andrew_cv_runpath_switch$ac_cv_sasl_where_lib" fi fi DYNLIB_SASL="$DYNLIB_SASL -lsasl2" if test "$using_static_sasl" != "static"; then LIB_SASL=$DYNLIB_SASL SASLFLAGS=$DYNSASLFLAGS fi else DYNLIB_SASL="" DYNSASLFLAGS="" using_static_sasl="staticonly" fi if test "x$SASL_GSSAPI_LIBS_SET" != "x"; then SASL_GSSAPI_LIBS_SET="" cmu_saved_LIBS="$GSSAPIBASE_LIBS $cmu_saved_LIBS" fi LIBS="$cmu_saved_LIBS" LDFLAGS="$cmu_saved_LDFLAGS" CPPFLAGS="$cmu_saved_CPPFLAGS" if test "$ac_cv_found_sasl" != "yes"; then as_fn_error $? "Cannot continue without libsasl2. Get it from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/." "$LINENO" 5 fi cmu_saved_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $SASLFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef SASL_VERSION_MAJOR #error SASL_VERSION_MAJOR not defined #endif #ifndef SASL_VERSION_MINOR #error SASL_VERSION_MINOR not defined #endif #ifndef SASL_VERSION_STEP #error SASL_VERSION_STEP not defined #endif #if SASL_VERSION_MAJOR < 2 || SASL_VERSION_MINOR < 1 || SASL_VERSION_STEP < 7 #error SASL version is less than 2.1.7 #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else as_fn_error $? "Incorrect SASL headers found. This package requires SASL 2.1.7 or newer." "$LINENO" 5 fi rm -f conftest.err conftest.i conftest.$ac_ext CPPFLAGS=$cmu_saved_CPPFLAGS cmu_saved_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $LIB_SASL" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sasl_checkapop in -lsasl2" >&5 $as_echo_n "checking for sasl_checkapop in -lsasl2... " >&6; } if ${ac_cv_lib_sasl2_sasl_checkapop+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsasl2 $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 sasl_checkapop (); int main () { return sasl_checkapop (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_sasl2_sasl_checkapop=yes else ac_cv_lib_sasl2_sasl_checkapop=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_sasl2_sasl_checkapop" >&5 $as_echo "$ac_cv_lib_sasl2_sasl_checkapop" >&6; } if test "x$ac_cv_lib_sasl2_sasl_checkapop" = xyes; then : $as_echo "@%:@define HAVE_APOP /**/" >>confdefs.h else as_fn_error $? "libsasl2 without working sasl_checkapop. Cannot continue." "$LINENO" 5 fi LDFLAGS=$cmu_saved_LDFLAGS @%:@ Check whether --with-perl was given. if test "${with_perl+set}" = set; then : withval=$with_perl; with_perl="$withval" else with_perl="perl" fi if test "${with_perl}" = yes; then with_perl="perl" fi if test "${with_perl}" != no; then if test ${using_static_sasl} = "staticonly"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot compile perl utilities using static libsasl" >&5 $as_echo "$as_me: WARNING: Cannot compile perl utilities using static libsasl" >&2;} with_perl="no" else for ac_prog in ${with_perl} perl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_PERL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$PERL"; then ac_cv_prog_PERL="$PERL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_PERL="$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 PERL=$ac_cv_prog_PERL if test -n "$PERL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 $as_echo "$PERL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$PERL" && break done test -n "$PERL" || PERL="with_perl=notfound" fi fi if test "$with_perl" = "notfound"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Perl not found: Administrative tools won't be available" >&5 $as_echo "$as_me: WARNING: Perl not found: Administrative tools won't be available" >&2;} elif test "${with_perl}" != "no"; then EXTRA_SUBDIRS="${EXTRA_SUBDIRS} perl" PERL_SUBDIRS="imap" PERL="${with_perl}" case "${target_os}" in linux*|netbsd*|freebsd*|dragonfly*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl cccdlflags needed on \"${target_os}\"" >&5 $as_echo_n "checking for perl cccdlflags needed on \"${target_os}\"... " >&6; } eval `${PERL} -V:cccdlflags` PERL_CCCDLFLAGS="$cccdlflags" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL_CCCDLFLAGS" >&5 $as_echo "$PERL_CCCDLFLAGS" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: skipping check for perl cccdlflags on \"${target_os}\"" >&5 $as_echo "$as_me: WARNING: skipping check for perl cccdlflags on \"${target_os}\"" >&2;} esac fi if test "$sievedir" != "no"; then if test "$enable_server" != "no"; then EXTRA_SUBDIRS="${EXTRA_SUBDIRS} timsieved notifyd" EXTRA_OUTPUT="${EXTRA_OUTPUT} timsieved/Makefile notifyd/Makefile" fi PERL_SUBDIRS="${PERL_SUBDIRS} sieve" PERL_DEPSUBDIRS="sieve" EXTRA_OUTPUT="${EXTRA_OUTPUT} perl/sieve/Makefile perl/sieve/lib/Makefile" else PERL_DEPSUBDIRS="none" fi SNMP_SUBDIRS="" @%:@ Check whether --with-libwrap was given. if test "${with_libwrap+set}" = set; then : withval=$with_libwrap; with_libwrap=$withval else with_libwrap=yes fi if test "$with_libwrap" != no; then if test -d "$with_libwrap"; then CPPFLAGS="$CPPFLAGS -I${with_libwrap}/include" LDFLAGS="$LDFLAGS -L${with_libwrap}/$CMU_LIB_SUBDIR" fi cmu_save_LIBS="$LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for request_init in -lwrap" >&5 $as_echo_n "checking for request_init in -lwrap... " >&6; } if ${ac_cv_lib_wrap_request_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lwrap ${LIB_SOCKET} $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 request_init (); int main () { return request_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_wrap_request_init=yes else ac_cv_lib_wrap_request_init=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_wrap_request_init" >&5 $as_echo "$ac_cv_lib_wrap_request_init" >&6; } if test "x$ac_cv_lib_wrap_request_init" = xyes; then : ac_fn_c_check_header_mongrel "$LINENO" "tcpd.h" "ac_cv_header_tcpd_h" "$ac_includes_default" if test "x$ac_cv_header_tcpd_h" = xyes; then : else with_libwrap=no fi else with_libwrap=no fi LIBS="$cmu_save_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking libwrap support" >&5 $as_echo_n "checking libwrap support... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_libwrap" >&5 $as_echo "$with_libwrap" >&6; } LIB_WRAP="" if test "$with_libwrap" != no; then $as_echo "@%:@define HAVE_LIBWRAP /**/" >>confdefs.h LIB_WRAP="-lwrap" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for yp_get_default_domain in -lnsl" >&5 $as_echo_n "checking for yp_get_default_domain in -lnsl... " >&6; } if ${ac_cv_lib_nsl_yp_get_default_domain+:} false; 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 yp_get_default_domain (); int main () { return yp_get_default_domain (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nsl_yp_get_default_domain=yes else ac_cv_lib_nsl_yp_get_default_domain=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_yp_get_default_domain" >&5 $as_echo "$ac_cv_lib_nsl_yp_get_default_domain" >&6; } if test "x$ac_cv_lib_nsl_yp_get_default_domain" = xyes; then : LIB_WRAP="${LIB_WRAP} -lnsl" fi fi @%:@ Check whether --with-snmp was given. if test "${with_snmp+set}" = set; then : withval=$with_snmp; with_snmp=$withval else with_snmp=yes fi @%:@ Check whether --with-ucdsnmp was given. if test "${with_ucdsnmp+set}" = set; then : withval=$with_ucdsnmp; with_snmp=$withval fi if test "$with_snmp" != "no"; then if test "$with_snmp" = "yes"; then # Extract the first word of "net-snmp-config", so it can be a program name with args. set dummy net-snmp-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_SNMP_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $SNMP_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_SNMP_CONFIG="$SNMP_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="/usr/local/bin:$PATH" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_SNMP_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi SNMP_CONFIG=$ac_cv_path_SNMP_CONFIG if test -n "$SNMP_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SNMP_CONFIG" >&5 $as_echo "$SNMP_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else SNMP_CONFIG="$with_snmp/bin/net-snmp-config" fi if test -x "$SNMP_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking NET SNMP libraries" >&5 $as_echo_n "checking NET SNMP libraries... " >&6; } SNMP_LIBS=`$SNMP_CONFIG --agent-libs` SNMP_PREFIX=`$SNMP_CONFIG --prefix` if test -n "$SNMP_LIBS" && test -n "$SNMP_PREFIX"; then CPPFLAGS="$CPPFLAGS -I${SNMP_PREFIX}/include" LIB_UCDSNMP=$SNMP_LIBS $as_echo "@%:@define HAVE_NETSNMP 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } for ac_header in net-snmp/agent/agent_module_config.h do : ac_fn_c_check_header_mongrel "$LINENO" "net-snmp/agent/agent_module_config.h" "ac_cv_header_net_snmp_agent_agent_module_config_h" "$ac_includes_default" if test "x$ac_cv_header_net_snmp_agent_agent_module_config_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_NET_SNMP_AGENT_AGENT_MODULE_CONFIG_H 1 _ACEOF fi done else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find the required paths. Please check your net-snmp installation." >&5 $as_echo "$as_me: WARNING: Could not find the required paths. Please check your net-snmp installation." >&2;} fi else if test "$with_snmp" != no; then if test -d "$with_snmp"; then CPPFLAGS="$CPPFLAGS -I${with_snmp}/include" LDFLAGS="$LDFLAGS -L${with_snmp}/$CMU_LIB_SUBDIR" fi cmu_save_LIBS="$LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sprint_objid in -lsnmp" >&5 $as_echo_n "checking for sprint_objid in -lsnmp... " >&6; } if ${ac_cv_lib_snmp_sprint_objid+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsnmp ${LIB_SOCKET} $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 sprint_objid (); int main () { return sprint_objid (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_snmp_sprint_objid=yes else ac_cv_lib_snmp_sprint_objid=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_snmp_sprint_objid" >&5 $as_echo "$ac_cv_lib_snmp_sprint_objid" >&6; } if test "x$ac_cv_lib_snmp_sprint_objid" = xyes; then : ac_fn_c_check_header_mongrel "$LINENO" "ucd-snmp/version.h" "ac_cv_header_ucd_snmp_version_h" "$ac_includes_default" if test "x$ac_cv_header_ucd_snmp_version_h" = xyes; then : else with_snmp=no fi else with_snmp=no fi LIBS="$cmu_save_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking UCD SNMP libraries" >&5 $as_echo_n "checking UCD SNMP libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_snmp" >&5 $as_echo "$with_snmp" >&6; } LIB_UCDSNMP="" if test "$with_snmp" != no; then $as_echo "@%:@define HAVE_UCDSNMP 1" >>confdefs.h LIB_UCDSNMP="-lucdagent -lucdmibs -lsnmp" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rpmdbOpen in -lrpm" >&5 $as_echo_n "checking for rpmdbOpen in -lrpm... " >&6; } if ${ac_cv_lib_rpm_rpmdbOpen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrpm -lpopt $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 rpmdbOpen (); int main () { return rpmdbOpen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rpm_rpmdbOpen=yes else ac_cv_lib_rpm_rpmdbOpen=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_rpm_rpmdbOpen" >&5 $as_echo "$ac_cv_lib_rpm_rpmdbOpen" >&6; } if test "x$ac_cv_lib_rpm_rpmdbOpen" = xyes; then : LIB_UCDSNMP="${LIB_UCDSNMP} -lrpm -lpopt" fi fi fi fi # Figure out what directories we're linking against. # Lots of fun for the whole family. # This probably chokes on anything with spaces in it. # All we want is the list of -L directories, and -L may or may not be # followed by a space. isdir=no libpath="" #echo "debug ldflags: << ${ldflags} >>" #echo "debug default_ldflags: << ${default_ldflags} >>" for flag in ${ldflags} ${default_ldflags}; do case $flag in -L) # it's a split -L option, we'll mark the next option as a dir. isdir=yes ;; -L*) # attached -L option: split off the directory larg=`echo $flag | sed -e 's:-L\(..*\):\1:'` libpath="${libpath} ${larg}" ;; *) if test $isdir = yes ; then libpath="${libpath} ${flag}" isdir=no fi esac done IMAP_COM_ERR_LIBS="${COM_ERR_LIBS}" IMAP_LIBS="${LIB_SASL} ${LIBS} ${SQL_LIBS}" ac_config_files="$ac_config_files man/Makefile master/Makefile lib/Makefile imap/Makefile imtest/Makefile netnews/Makefile perl/Makefile $EXTRA_OUTPUT Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIB@&t@OBJS; 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 LIB@&t@OBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in @%:@( *posix*) : set -o posix ;; @%:@( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in @%:@( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in @%:@(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH @%:@ as_fn_error STATUS ERROR [LINENO LOG_FD] @%:@ ---------------------------------------- @%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are @%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the @%:@ script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } @%:@ as_fn_error @%:@ as_fn_set_status STATUS @%:@ ----------------------- @%:@ Set @S|@? 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 @S|@as_val. Take advantage of shells that can avoid forks. The arguments @%:@ must be portable across @S|@(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in @%:@((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @%:@ as_fn_mkdir_p @%:@ ------------- @%:@ Create "@S|@as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } @%:@ as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi @%:@ as_fn_executable_p FILE @%:@ ----------------------- @%:@ Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } @%:@ as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX @%:@@%:@ Running $as_me. @%:@@%:@ _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _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" ;; "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; "master/Makefile") CONFIG_FILES="$CONFIG_FILES master/Makefile" ;; "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "imap/Makefile") CONFIG_FILES="$CONFIG_FILES imap/Makefile" ;; "imtest/Makefile") CONFIG_FILES="$CONFIG_FILES imtest/Makefile" ;; "netnews/Makefile") CONFIG_FILES="$CONFIG_FILES netnews/Makefile" ;; "perl/Makefile") CONFIG_FILES="$CONFIG_FILES perl/Makefile" ;; "$EXTRA_OUTPUT") CONFIG_FILES="$CONFIG_FILES $EXTRA_OUTPUT" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac _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 $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi cyrus-imapd-2.4.18/autom4te.cache/traces.00000644000175000017500000032056012546375257017205 0ustar ellieelliem4trace:cmulocal/afs.m4:8: -1- AC_DEFUN([CMU_AFS_INC_WHERE1], [ cmu_save_CPPFLAGS=$CPPFLAGS CPPFLAGS="$cmu_save_CPPFLAGS -I$1" AC_TRY_COMPILE([#include ], [#ifndef SYS_NAME choke me #endif int foo;], ac_cv_found_afs_inc=yes, ac_cv_found_afs_inc=no) CPPFLAGS=$cmu_save_CPPFLAGS ]) m4trace:cmulocal/afs.m4:21: -1- AC_DEFUN([CMU_AFS_LIB_WHERE1], [ save_LIBS="$LIBS" save_LDFLAGS="$LDFLAGS" LIBS="-lauth $1/afs/util.a $LIB_SOCKET $LIBS" LDFLAGS="-L$1 -L$1/afs $LDFLAGS" dnl suppress caching AC_TRY_LINK([],[afsconf_Open();], ac_cv_found_afs_lib=yes, ac_cv_found_afs_lib=no) LIBS="$save_LIBS" LDFLAGS="$save_LDFLAGS" ]) m4trace:cmulocal/afs.m4:33: -1- AC_DEFUN([CMU_AFS_WHERE], [ AC_REQUIRE([CMU_FIND_LIB_SUBDIR]) for i in $1; do AC_MSG_CHECKING(for AFS in $i) CMU_AFS_INC_WHERE1("$i/include") ac_cv_found_lwp_inc=$ac_cv_found_afs_inc CMU_TEST_INCPATH($i/include, lwp) ac_cv_found_afs_inc=$ac_cv_found_lwp_inc if test "$ac_cv_found_afs_inc" = "yes"; then CMU_AFS_LIB_WHERE1("$i/$CMU_LIB_SUBDIR") if test "$ac_cv_found_afs_lib" = "yes"; then ac_cv_afs_where=$i AC_MSG_RESULT(found) break else AC_MSG_RESULT(not found) fi else AC_MSG_RESULT(not found) fi done ]) m4trace:cmulocal/afs.m4:56: -1- AC_DEFUN([CMU_AFS], [ AC_REQUIRE([CMU_FIND_LIB_SUBDIR]) AC_REQUIRE([CMU_SOCKETS]) AC_REQUIRE([CMU_LIBSSL]) AC_ARG_WITH(AFS, [ --with-afs=PREFIX Compile with AFS support], [if test "X$with_AFS" = "X"; then with_AFS=yes fi]) if test "X$with_AFS" != "X"; then ac_cv_afs_where=$with_AFS fi if test "X$ac_cv_afs_where" = "X"; then CMU_AFS_WHERE(/usr/afsws /usr/local /usr/athena /Library/OpenAFS/Tools) fi AC_MSG_CHECKING(whether to include AFS) if test "X$ac_cv_afs_where" = "Xno" -o "X$ac_cv_afs_where" = "X"; then ac_cv_found_afs=no AC_MSG_RESULT(no) else ac_cv_found_afs=yes AC_MSG_RESULT(yes) AFS_INC_DIR="$ac_cv_afs_where/include" AFS_LIB_DIR="$ac_cv_afs_where/$CMU_LIB_SUBDIR" AFS_TOP_DIR="$ac_cv_afs_where" AFS_INC_FLAGS="-I${AFS_INC_DIR}" AFS_LIB_FLAGS="-L${AFS_LIB_DIR} -L${AFS_LIB_DIR}/afs" cmu_save_LIBS="$LIBS" cmu_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS ${AFS_INC_FLAGS}" cmu_save_LDFLAGS="$LDFLAGS" LDFLAGS="$cmu_save_LDFLAGS ${AFS_LIB_FLAGS}" AC_CHECK_HEADERS(afs/stds.h) AC_MSG_CHECKING([if libdes is needed]) AC_TRY_LINK([],[des_quad_cksum();],AFS_DES_LIB="",AFS_DES_LIB="maybe") if test "X$AFS_DES_LIB" != "X"; then LIBS="$cmu_save_LIBS -ldes" AC_TRY_LINK([], [des_quad_cksum();],AFS_DES_LIB="yes") if test "X$AFS_DES_LIB" = "Xyes"; then AC_MSG_RESULT([yes]) AFS_LIBDES="-ldes" AFS_LIBDESA="${AFS_LIB_DIR}/libdes.a" else LIBS="$cmu_save_LIBS $LIBSSL_LIB_FLAGS" AC_TRY_LINK([], [des_quad_cksum();],AFS_DES_LIB="libcrypto") if test "X$AFS_DES_LIB" = "Xlibcrypto"; then AC_MSG_RESULT([libcrypto]) AFS_LIBDES="$LIBSSL_LIB_FLAGS" AFS_LIBDESA="$LIBSSL_LIB_FLAGS" else LIBS="$cmu_save_LIBS -L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS" AC_TRY_LINK([], [des_quad_cksum();],AFS_DES_LIB="libcrypto+descompat") if test "X$AFS_DES_LIB" = "Xlibcrypto+descompat"; then AC_MSG_RESULT([libcrypto+descompat]) AFS_LIBDES="-L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS" AFS_LIBDESA="-L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS" else AC_MSG_RESULT([unknown]) AC_MSG_ERROR([Could not use -ldes]) fi fi fi else AC_MSG_RESULT([no]) fi AFS_CLIENT_LIBS_STATIC="${AFS_LIB_DIR}/afs/libvolser.a ${AFS_LIB_DIR}/afs/libvldb.a ${AFS_LIB_DIR}/afs/libkauth.a ${AFS_LIB_DIR}/afs/libprot.a ${AFS_LIB_DIR}/libubik.a ${AFS_LIB_DIR}/afs/libauth.a ${AFS_LIB_DIR}/librxkad.a ${AFS_LIB_DIR}/librx.a ${AFS_LIB_DIR}/afs/libsys.a ${AFS_LIB_DIR}/librx.a ${AFS_LIB_DIR}/liblwp.a ${AFS_LIBDESA} ${AFS_LIB_DIR}/afs/libcmd.a ${AFS_LIB_DIR}/afs/libcom_err.a ${AFS_LIB_DIR}/afs/util.a" AFS_KTC_LIBS_STATIC="${AFS_LIB_DIR}/afs/libauth.a ${AFS_LIB_DIR}/afs/libsys.a ${AFS_LIB_DIR}/librx.a ${AFS_LIB_DIR}/liblwp.a ${AFS_LIBDESA} ${AFS_LIB_DIR}/afs/libcom_err.a ${AFS_LIB_DIR}/afs/util.a" AFS_CLIENT_LIBS="-lvolser -lvldb -lkauth -lprot -lubik -lauth -lrxkad -lrx ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcmd -lcom_err ${AFS_LIB_DIR}/afs/util.a" AFS_RX_LIBS="-lauth -lrxkad -lrx ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcmd -lcom_err ${AFS_LIB_DIR}/afs/util.a" AFS_KTC_LIBS="-lauth ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcom_err ${AFS_LIB_DIR}/afs/util.a" LIBS="$cmu_save_LIBS $AFS_CLIENT_LIBS ${LIB_SOCKET}" AC_CHECK_FUNC(des_pcbc_init) if test "X$ac_cv_func_des_pcbc_init" != "Xyes"; then AC_CHECK_LIB(descompat, des_pcbc_init, AFS_DESCOMPAT_LIB="-ldescompat") if test "X$AFS_DESCOMPAT_LIB" != "X" ; then AFS_CLIENT_LIBS_STATIC="$AFS_CLIENT_LIBS_STATIC $AFS_DESCOMPAT_LIB" AFS_KTC_LIBS_STATIC="$AFS_KTC_LIBS_STATIC $AFS_DESCOMPAT_LIB" AFS_CLIENT_LIBS="$AFS_CLIENT_LIBS $AFS_DESCOMPAT_LIB" AFS_KTC_LIBS="$AFS_KTC_LIBS $AFS_DESCOMPAT_LIB" else AC_MSG_CHECKING([if rxkad needs des_pcbc_init]) AC_TRY_LINK(,[tkt_DecodeTicket();],RXKAD_PROBLEM=no,RXKAD_PROBLEM=maybe) if test "$RXKAD_PROBLEM" = "maybe"; then AC_TRY_LINK([int des_pcbc_init() { return 0;}], [tkt_DecodeTicket();],RXKAD_PROBLEM=yes,RXKAD_PROBLEM=error) if test "$RXKAD_PROBLEM" = "yes"; then AC_MSG_RESULT([yes]) AC_MSG_ERROR([cannot use rxkad]) else AC_MSG_RESULT([unknown]) AC_MSG_ERROR([Unknown error testing rxkad]) fi else AC_MSG_RESULT([no]) fi fi fi LIBS="$cmu_save_LIBS" AC_CHECK_FUNC(flock) LIBS="$cmu_save_LIBS ${AFS_CLIENT_LIBS} ${LIB_SOCKET}" if test "X$ac_cv_func_flock" != "Xyes"; then AC_MSG_CHECKING([if AFS needs flock]) AC_TRY_LINK([#include #ifdef HAVE_AFS_STDS_H #include #endif #include #include #include #include struct ubik_client * cstruct; int sigvec() {return 0;} extern int UV_SetSecurity();], [vsu_ClientInit(1,"","",0, &cstruct,UV_SetSecurity)], AFS_FLOCK=no,AFS_FLOCK=yes) if test $AFS_FLOCK = "no"; then AC_MSG_RESULT([no]) else AC_MSG_RESULT([yes]) LDFLAGS="$LDFLAGS -L/usr/ucblib" AC_CHECK_LIB(ucb, flock,:, [AC_CHECK_LIB(BSD, flock)]) fi fi LIBS="$cmu_save_LIBS" AC_CHECK_FUNC(sigvec) LIBS="$cmu_save_LIBS ${AFS_CLIENT_LIBS} ${LIB_SOCKET}" if test "X$ac_cv_func_sigvec" != "Xyes"; then AC_MSG_CHECKING([if AFS needs sigvec]) AC_TRY_LINK([#include #ifdef HAVE_AFS_STDS_H #include #endif #include #include #include #include struct ubik_client * cstruct; int flock() {return 0;} extern int UV_SetSecurity();], [vsu_ClientInit(1,"","",0, &cstruct,UV_SetSecurity)], AFS_SIGVEC=no,AFS_SIGVEC=yes) if test $AFS_SIGVEC = "no"; then AC_MSG_RESULT([no]) else AC_MSG_RESULT([yes]) LDFLAGS="$LDFLAGS -L/usr/ucblib" AC_CHECK_LIB(ucb, sigvec,:,[AC_CHECK_LIB(BSD, sigvec)]) fi fi if test "$ac_cv_lib_ucb_flock" = "yes" -o "$ac_cv_lib_ucb_sigvec" = "yes"; then AFS_LIB_FLAGS="${AFS_LIB_FLAGS} -L/usr/ucblib -R/usr/ucblib" fi if test "$ac_cv_lib_ucb_flock" = "yes" -o "$ac_cv_lib_ucb_sigvec" = "yes"; then AFS_BSD_LIB="-lucb" elif test "$ac_cv_lib_BSD_flock" = "yes" -o "$ac_cv_lib_BSD_sigvec" = "yes"; then AFS_BSD_LIB="-lBSD" fi if test "X$AFS_BSD_LIB" != "X" ; then AFS_CLIENT_LIBS_STATIC="$AFS_CLIENT_LIBS_STATIC $AFS_BSD_LIB" AFS_KTC_LIBS_STATIC="$AFS_KTC_LIBS_STATIC $AFS_BSD_LIB" AFS_CLIENT_LIBS="$AFS_CLIENT_LIBS $AFS_BSD_LIB" AFS_RX_LIBS="$AFS_CLIENT_LIBS $AFS_BSD_LIB" AFS_KTC_LIBS="$AFS_KTC_LIBS $AFS_BSD_LIB" fi AC_MSG_CHECKING([if libaudit is needed]) AFS_LIBAUDIT="" LIBS="$cmu_save_LIBS $AFS_CLIENT_LIBS ${LIB_SOCKET}" AC_TRY_LINK([#include #ifdef HAVE_AFS_STDS_H #include #endif #include #include ], [afsconf_SuperUser();],AFS_AUDIT_LIB="",AFS_AUDIT_LIB="maybe") if test "X$AFS_AUDIT_LIB" != "X"; then LIBS="$cmu_save_LIBS -lvolser -lvldb -lkauth -lprot -lubik -lauth -laudit -lrxkad -lrx ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcmd -lcom_err ${AFS_LIB_DIR}/afs/util.a $AFS_BSD_LIB $AFS_DESCOMPAT_LIB $LIB_SOCKET" AC_TRY_LINK([#include #ifdef HAVE_AFS_STDS_H #include #endif #include #include ], [afsconf_SuperUser();],AFS_AUDIT_LIB="yes") if test "X$AFS_AUDIT_LIB" = "Xyes"; then AC_MSG_RESULT([yes]) AFS_LIBAUDIT="-laudit" AFS_CLIENT_LIBS_STATIC="${AFS_LIB_DIR}/afs/libvolser.a ${AFS_LIB_DIR}/afs/libvldb.a ${AFS_LIB_DIR}/afs/libkauth.a ${AFS_LIB_DIR}/afs/libprot.a ${AFS_LIB_DIR}/libubik.a ${AFS_LIB_DIR}/afs/libauth.a ${AFS_LIB_DIR}/afs/libaudit.a ${AFS_LIB_DIR}/librxkad.a ${AFS_LIB_DIR}/librx.a ${AFS_LIB_DIR}/afs/libsys.a ${AFS_LIB_DIR}/librx.a ${AFS_LIB_DIR}/liblwp.a ${AFS_LIBDESA} ${AFS_LIB_DIR}/afs/libcmd.a ${AFS_LIB_DIR}/afs/libcom_err.a ${AFS_LIB_DIR}/afs/util.a" AFS_CLIENT_LIBS="-lvolser -lvldb -lkauth -lprot -lubik -lauth -laudit -lrxkad -lrx ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcmd -lcom_err ${AFS_LIB_DIR}/afs/util.a $AFS_BSD_LIB $AFS_DESCOMPAT_LIB" AFS_RX_LIBS="-lauth -laudit -lrxkad -lrx ${AFS_LIB_DIR}/afs/libsys.a -lrx -llwp ${AFS_LIBDES} -lcmd -lcom_err ${AFS_LIB_DIR}/afs/util.a $AFS_BSD_LIB $AFS_DESCOMPAT_LIB" else AC_MSG_RESULT([unknown]) AC_MSG_ERROR([Could not use -lauth while testing for -laudit]) fi else AC_MSG_RESULT([no]) fi AC_CHECK_FUNCS(VL_ProbeServer) AC_MSG_CHECKING([if new-style afs_ integer types are defined]) AC_CACHE_VAL(ac_cv_afs_int32, dnl The next few lines contain a quoted argument to egrep dnl It is critical that there be no leading or trailing whitespace dnl or newlines [AC_EGREP_CPP(dnl changequote(<<,>>)dnl <<(^|[^a-zA-Z_0-9])afs_int32[^a-zA-Z_0-9]>>dnl changequote([,]), [#include #ifdef HAVE_AFS_STDS_H #include #endif], ac_cv_afs_int32=yes, ac_cv_afs_int32=no)]) AC_MSG_RESULT($ac_cv_afs_int32) if test $ac_cv_afs_int32 = yes ; then AC_DEFINE(HAVE_AFS_INT32,, [AFS provides new "unambiguous" type names]) else AC_DEFINE(afs_int16, int16, [it's a type definition]) AC_DEFINE(afs_int32, int32, [it's a type definition]) AC_DEFINE(afs_uint16, u_int16, [it's a type definition]) AC_DEFINE(afs_uint32, u_int32, [it's a type definition]) fi CPPFLAGS="${cmu_save_CPPFLAGS}" LDFLAGS="${cmu_save_LDFLAGS}" LIBS="${cmu_save_LIBS}" AC_DEFINE(AFS_ENV,, [Use AFS. (find what needs this and nuke it)]) AC_DEFINE(AFS,, [Use AFS. (find what needs this and nuke it)]) AC_SUBST(AFS_CLIENT_LIBS_STATIC) AC_SUBST(AFS_KTC_LIBS_STATIC) AC_SUBST(AFS_CLIENT_LIBS) AC_SUBST(AFS_RX_LIBS) AC_SUBST(AFS_KTC_LIBS) AC_SUBST(AFS_INC_FLAGS) AC_SUBST(AFS_LIB_FLAGS) AC_SUBST(AFS_TOP_DIR) AC_SUBST(AFS_LIBAUDIT) AC_SUBST(AFS_LIBDES) AC_SUBST(AFS_LIBDESA) fi ]) m4trace:cmulocal/afs.m4:310: -1- AC_DEFUN([CMU_NEEDS_AFS], [AC_REQUIRE([CMU_AFS]) if test "$ac_cv_found_afs" != "yes"; then AC_ERROR([Cannot continue without AFS]) fi]) m4trace:cmulocal/berkdb.m4:3: -1- AC_DEFUN([CMU_DB_INC_WHERE1], [ saved_CPPFLAGS=$CPPFLAGS CPPFLAGS="$saved_CPPFLAGS -I$1" AC_TRY_COMPILE([#include ], [DB *db; db_create(&db, NULL, 0); db->open(db, "foo.db", NULL, DB_UNKNOWN, DB_RDONLY, 0644);], ac_cv_found_db_inc=yes, ac_cv_found_db_inc=no) CPPFLAGS=$saved_CPPFLAGS ]) m4trace:cmulocal/berkdb.m4:15: -1- AC_DEFUN([CMU_DB_INC_WHERE], [ for i in $1; do AC_MSG_CHECKING(for db headers in $i) CMU_DB_INC_WHERE1($i) CMU_TEST_INCPATH($i, db) if test "$ac_cv_found_db_inc" = "yes"; then ac_cv_db_where_inc=$i AC_MSG_RESULT(found) break else AC_MSG_RESULT(not found) fi done ]) m4trace:cmulocal/berkdb.m4:34: -1- AC_DEFUN([CMU_DB3_LIB_WHERE1], [ AC_REQUIRE([CMU_AFS]) AC_REQUIRE([CMU_KRB4]) saved_LIBS=$LIBS LIBS="$saved_LIBS -L$1 -ldb-3" AC_TRY_LINK([#include ], [db_env_create(NULL, 0);], [ac_cv_found_db_3_lib=yes], ac_cv_found_db_3_lib=no) LIBS=$saved_LIBS ]) m4trace:cmulocal/berkdb.m4:45: -1- AC_DEFUN([CMU_DB4_LIB_WHERE1], [ AC_REQUIRE([CMU_AFS]) AC_REQUIRE([CMU_KRB4]) saved_LIBS=$LIBS LIBS="$saved_LIBS -L$1 -ldb-4" AC_TRY_LINK([#include ], [db_env_create(NULL, 0);], [ac_cv_found_db_4_lib=yes], ac_cv_found_db_4_lib=no) LIBS=$saved_LIBS ]) m4trace:cmulocal/berkdb.m4:57: -1- AC_DEFUN([CMU_DB_LIB_WHERE], [ for i in $1; do AC_MSG_CHECKING(for db libraries in $i) if test "$enable_db4" = "yes"; then CMU_DB4_LIB_WHERE1($i) CMU_TEST_LIBPATH($i, [db-4]) ac_cv_found_db_lib=$ac_cv_found_db_4_lib else CMU_DB3_LIB_WHERE1($i) CMU_TEST_LIBPATH($i, [db-3]) ac_cv_found_db_lib=$ac_cv_found_db_3_lib fi if test "$ac_cv_found_db_lib" = "yes" ; then ac_cv_db_where_lib=$i AC_MSG_RESULT(found) break else AC_MSG_RESULT(not found) fi done ]) m4trace:cmulocal/berkdb.m4:79: -1- AC_DEFUN([CMU_USE_DB], [ AC_REQUIRE([CMU_FIND_LIB_SUBDIR]) AC_ARG_WITH(db, [ --with-db=PREFIX Compile with db support], [if test "X$with_db" = "X"; then with_db=yes fi]) AC_ARG_WITH(db-lib, [ --with-db-lib=dir use db libraries in dir], [if test "$withval" = "yes" -o "$withval" = "no"; then AC_MSG_ERROR([No argument for --with-db-lib]) fi]) AC_ARG_WITH(db-include, [ --with-db-include=dir use db headers in dir], [if test "$withval" = "yes" -o "$withval" = "no"; then AC_MSG_ERROR([No argument for --with-db-include]) fi]) AC_ARG_ENABLE(db4, [ --enable-db4 use db 4.x libraries]) if test "X$with_db" != "X"; then if test "$with_db" != "yes"; then ac_cv_db_where_lib=$with_db/$CMU_LIB_SUBDIR ac_cv_db_where_inc=$with_db/include fi fi if test "X$with_db_lib" != "X"; then ac_cv_db_where_lib=$with_db_lib fi if test "X$ac_cv_db_where_lib" = "X"; then CMU_DB_LIB_WHERE(/usr/athena/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR) fi if test "X$with_db_include" != "X"; then ac_cv_db_where_inc=$with_db_include fi if test "X$ac_cv_db_where_inc" = "X"; then CMU_DB_INC_WHERE(/usr/athena/include /usr/local/include) fi AC_MSG_CHECKING(whether to include db) if test "X$ac_cv_db_where_lib" = "X" -o "X$ac_cv_db_where_inc" = "X"; then ac_cv_found_db=no AC_MSG_RESULT(no) else ac_cv_found_db=yes AC_MSG_RESULT(yes) DB_INC_DIR=$ac_cv_db_where_inc DB_LIB_DIR=$ac_cv_db_where_lib DB_INC_FLAGS="-I${DB_INC_DIR}" if test "$enable_db4" = "yes"; then DB_LIB_FLAGS="-L${DB_LIB_DIR} -ldb-4" else DB_LIB_FLAGS="-L${DB_LIB_DIR} -ldb-3" fi dnl Do not force configure.in to put these in CFLAGS and LIBS unconditionally dnl Allow makefile substitutions.... AC_SUBST(DB_INC_FLAGS) AC_SUBST(DB_LIB_FLAGS) if test "X$RPATH" = "X"; then RPATH="" fi case "${host}" in *-*-linux*) if test "X$RPATH" = "X"; then RPATH="-Wl,-rpath,${DB_LIB_DIR}" else RPATH="${RPATH}:${DB_LIB_DIR}" fi ;; *-*-hpux*) if test "X$RPATH" = "X"; then RPATH="-Wl,+b${DB_LIB_DIR}" else RPATH="${RPATH}:${DB_LIB_DIR}" fi ;; *-*-irix*) if test "X$RPATH" = "X"; then RPATH="-Wl,-rpath,${DB_LIB_DIR}" else RPATH="${RPATH}:${DB_LIB_DIR}" fi ;; *-*-solaris2*) if test "$ac_cv_prog_gcc" = yes; then if test "X$RPATH" = "X"; then RPATH="-Wl,-R${DB_LIB_DIR}" else RPATH="${RPATH}:${DB_LIB_DIR}" fi else RPATH="${RPATH} -R${DB_LIB_DIR}" fi ;; esac AC_SUBST(RPATH) fi ]) m4trace:cmulocal/berkdb.m4:204: -1- AC_DEFUN([CYRUS_BERKELEY_DB_CHK_LIB], [ BDB_SAVE_LDFLAGS=$LDFLAGS if test -d $with_bdb_lib; then CMU_ADD_LIBPATH_TO($with_bdb_lib, LDFLAGS) CMU_ADD_LIBPATH_TO($with_bdb_lib, BDB_LIBADD) else BDB_LIBADD="" fi saved_LIBS=$LIBS for dbname in ${with_bdb} \ db-4.8 db4.8 db48 \ db-4.7 db4.7 db47 \ db-4.6 db4.6 db46 \ db-4.5 db4.5 db45 \ db-4.4 db4.4 db44 \ db-4.3 db4.3 db43 \ db-4.2 db4.2 db42 \ db-4.1 db4.1 db41 \ db-4.0 db4.0 db40 db-4 db4 \ db-3.3 db3.3 db33 \ db-3.2 db3.2 db32 \ db-3.1 db3.1 db31 \ db-3.0 db3.0 db30 db-3 db3 \ db do LIBS="$saved_LIBS -l$dbname" AC_TRY_LINK([#include #include ], [db_create(NULL, NULL, 0);], BDB_LIBADD="$BDB_LIBADD -l$dbname"; dblib="berkeley"; dbname=db, dblib="no") if test "$dblib" = "berkeley"; then break; fi done if test "$dblib" = "no"; then LIBS="$saved_LIBS -ldb" AC_TRY_LINK([#include #include ], [db_open(NULL, 0, 0, 0, NULL, NULL, NULL);], BDB_LIBADD="$BDB_LIBADD -ldb"; dblib="berkeley"; dbname=db, dblib="no") fi LIBS=$saved_LIBS LDFLAGS=$BDB_SAVE_LDFLAGS ]) m4trace:cmulocal/berkdb.m4:253: -1- AC_DEFUN([CYRUS_BERKELEY_DB_OPTS], [ AC_ARG_WITH(bdb-libdir, [ --with-bdb-libdir=DIR Berkeley DB lib files are in DIR], with_bdb_lib=$withval, [ test "${with_bdb_lib+set}" = set || with_bdb_lib=none]) AC_ARG_WITH(bdb-incdir, [ --with-bdb-incdir=DIR Berkeley DB include files are in DIR], with_bdb_inc=$withval, [ test "${with_bdb_inc+set}" = set || with_bdb_inc=none ]) ]) m4trace:cmulocal/berkdb.m4:265: -1- AC_DEFUN([CYRUS_BERKELEY_DB_CHK], [ AC_REQUIRE([CYRUS_BERKELEY_DB_OPTS]) cmu_save_CPPFLAGS=$CPPFLAGS if test -d $with_bdb_inc; then CPPFLAGS="$CPPFLAGS -I$with_bdb_inc" BDB_INCADD="-I$with_bdb_inc" else BDB_INCADD="" fi dnl Note that FreeBSD puts it in a wierd place dnl (but they should use with-bdb-incdir) AC_CHECK_HEADER(db.h, [CYRUS_BERKELEY_DB_CHK_LIB()], dblib="no") CPPFLAGS=$cmu_save_CPPFLAGS ]) m4trace:cmulocal/bsd_sockets.m4:9: -1- AC_DEFUN([CMU_SOCKETS], [ save_LIBS="$LIBS" LIB_SOCKET="" AC_CHECK_FUNC(connect, :, [AC_CHECK_LIB(nsl, gethostbyname, LIB_SOCKET="-lnsl $LIB_SOCKET") AC_CHECK_LIB(socket, connect, LIB_SOCKET="-lsocket $LIB_SOCKET")] ) LIBS="$LIB_SOCKET $save_LIBS" AC_CHECK_FUNC(res_search, :, [LIBS="-lresolv $LIB_SOCKET $save_LIBS" AC_TRY_LINK([[ #include #include #include #ifdef HAVE_ARPA_NAMESER_COMPAT_H #include #endif #include ]],[[ const char host[12]="openafs.org"; u_char ans[1024]; res_search( host, C_IN, T_MX, (u_char *)&ans, sizeof(ans)); return 0; ]], LIB_SOCKET="-lresolv $LIB_SOCKET") ]) LIBS="$LIB_SOCKET $save_LIBS" AC_CHECK_FUNCS(dn_expand dns_lookup) LIBS="$save_LIBS" AC_SUBST(LIB_SOCKET) ]) m4trace:cmulocal/c-attribute.m4:9: -1- AC_DEFUN([CMU_C___ATTRIBUTE__], [ AC_MSG_CHECKING(for __attribute__) AC_CACHE_VAL(ac_cv___attribute__, [ AC_TRY_COMPILE([ #include static void foo(void) __attribute__ ((noreturn)); static void foo(void) { exit(1); } ], [ ], ac_cv___attribute__=yes, ac_cv___attribute__=no)]) if test "$ac_cv___attribute__" = "yes"; then AC_DEFINE(HAVE___ATTRIBUTE__, 1, [define if your compiler has __attribute__]) fi AC_MSG_RESULT($ac_cv___attribute__) ]) m4trace:cmulocal/c-fpic.m4:9: -1- AC_DEFUN([CMU_C_FPIC], [ AC_MSG_CHECKING(if compiler supports -fPIC) AC_CACHE_VAL(ac_cv_fpic, [ save_CFLAGS=$CFLAGS CFLAGS="${CFLAGS} -fPIC" AC_TRY_COMPILE([ #include static void foo(void) { exit(1); } ], [ ], ac_cv_fpic=yes, ac_cv_fpic=no) CFLAGS=$save_CFLAGS ]) if test "$ac_cv_fpic" = "yes"; then FPIC_CFLAGS="-fPIC" else FPIC_CFLAGS="" fi AC_MSG_RESULT($ac_cv_fpic) ]) m4trace:cmulocal/common.m4:3: -1- AC_DEFUN([CMU_TEST_LIBPATH], [ changequote(<<, >>) define(<>, translit(ac_cv_found_$2_lib, <<- *>>, <<__p>>)) changequote([, ]) if test "$CMU_AC_CV_FOUND" = "yes"; then if test \! -r "$1/lib$2.a" -a \! -r "$1/lib$2.so" -a \! -r "$1/lib$2.sl" -a \! -r "$1/lib$2.dylib"; then CMU_AC_CV_FOUND=no fi fi ]) m4trace:cmulocal/common.m4:14: -1- AC_DEFUN([CMU_TEST_INCPATH], [ changequote(<<, >>) define(<>, translit(ac_cv_found_$2_inc, [ *], [_p])) changequote([, ]) if test "$CMU_AC_CV_FOUND" = "yes"; then if test \! -r "$1/$2.h"; then CMU_AC_CV_FOUND=no fi fi ]) m4trace:cmulocal/common.m4:26: -1- AC_DEFUN([CMU_CHECK_HEADER_NOCACHE], [dnl Do the transliteration at runtime so arg 1 can be a shell variable. ac_safe=`echo "$1" | sed 'y%./+-%__p_%'` AC_MSG_CHECKING([for $1]) AC_TRY_CPP([#include <$1>], eval "ac_cv_header_$ac_safe=yes", eval "ac_cv_header_$ac_safe=no") if eval "test \"`echo '$ac_cv_header_'$ac_safe`\" = yes"; then AC_MSG_RESULT(yes) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) ifelse([$3], , , [$3 ])dnl fi ]) m4trace:cmulocal/common.m4:42: -1- AC_DEFUN([CMU_FIND_LIB_SUBDIR], [dnl AC_ARG_WITH([lib-subdir], AC_HELP_STRING([--with-lib-subdir=DIR],[Find libraries in DIR instead of lib])) AC_CHECK_SIZEOF(long) AC_CACHE_CHECK([what directory libraries are found in], [ac_cv_cmu_lib_subdir], [test "X$with_lib_subdir" = "Xyes" && with_lib_subdir= test "X$with_lib_subdir" = "Xno" && with_lib_subdir= if test "X$with_lib_subdir" = "X" ; then ac_cv_cmu_lib_subdir=lib if test $ac_cv_sizeof_long -eq 4 ; then test -d /usr/lib32 && ac_cv_cmu_lib_subdir=lib32 fi if test $ac_cv_sizeof_long -eq 8 ; then test -d /usr/lib64 && ac_cv_cmu_lib_subdir=lib64 fi else ac_cv_cmu_lib_subdir=$with_lib_subdir fi]) AC_SUBST(CMU_LIB_SUBDIR, $ac_cv_cmu_lib_subdir) ]) m4trace:cmulocal/cyrus.m4:12: -1- AC_DEFUN([CMU_ADD_LIBPATH], [ # this is CMU ADD LIBPATH if test "$andrew_cv_runpath_switch" = "none" ; then LDFLAGS="-L$1 ${LDFLAGS}" else LDFLAGS="-L$1 $andrew_cv_runpath_switch$1 ${LDFLAGS}" fi ]) m4trace:cmulocal/cyrus.m4:23: -1- AC_DEFUN([CMU_ADD_LIBPATH_TO], [ # this is CMU ADD LIBPATH TO if test "$andrew_cv_runpath_switch" = "none" ; then $2="-L$1 ${$2}" else $2="-L$1 ${$2} $andrew_cv_runpath_switch$1" fi ]) m4trace:cmulocal/cyrus.m4:33: -1- AC_DEFUN([CMU_GUESS_RUNPATH_SWITCH], [ # CMU GUESS RUNPATH SWITCH AC_CACHE_CHECK(for runpath switch, andrew_cv_runpath_switch, [ # first, try -R SAVE_LDFLAGS="${LDFLAGS}" LDFLAGS="-R /usr/lib" AC_TRY_LINK([],[],[andrew_cv_runpath_switch="-R"], [ LDFLAGS="-Wl,-rpath,/usr/lib" AC_TRY_LINK([],[],[andrew_cv_runpath_switch="-Wl,-rpath,"], [andrew_cv_runpath_switch="none"]) ]) LDFLAGS="${SAVE_LDFLAGS}" ])]) m4trace:cmulocal/ipv6.m4:4: -1- AC_DEFUN([IPv6_CHECK_FUNC], [ AC_CHECK_FUNC($1, [dnl ac_cv_lib_socket_$1=no ac_cv_lib_inet6_$1=no ], [dnl AC_CHECK_LIB(socket, $1, [dnl LIBS="$LIBS -lsocket" ac_cv_lib_inet6_$1=no ], [dnl AC_MSG_CHECKING([whether your system has IPv6 directory]) AC_CACHE_VAL(ipv6_cv_dir, [dnl for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then break fi done])dnl AC_MSG_RESULT($ipv6_cv_dir) if test $ipv6_cv_dir = no; then ac_cv_lib_inet6_$1=no else if test x$ipv6_libinet6 = x; then ipv6_libinet6=no SAVELDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib" fi AC_CHECK_LIB(inet6, $1, [dnl if test $ipv6_libinet6 = no; then ipv6_libinet6=yes LIBS="$LIBS -linet6" fi],)dnl if test $ipv6_libinet6 = no; then LDFLAGS="$SAVELDFLAGS" fi fi])dnl ])dnl ipv6_cv_$1=no if test $ac_cv_func_$1 = yes -o $ac_cv_lib_socket_$1 = yes \ -o $ac_cv_lib_inet6_$1 = yes then ipv6_cv_$1=yes fi if test $ipv6_cv_$1 = no; then if test $1 = getaddrinfo; then for ipv6_cv_pfx in o n; do AC_EGREP_HEADER(${ipv6_cv_pfx}$1, netdb.h, [AC_CHECK_FUNC(${ipv6_cv_pfx}$1)]) if eval test X\$ac_cv_func_${ipv6_cv_pfx}$1 = Xyes; then AC_DEFINE(HAVE_GETADDRINFO,[],[Do we have a getaddrinfo?]) ipv6_cv_$1=yes break fi done fi fi if test $ipv6_cv_$1 = yes; then ifelse([$2], , :, [$2]) else ifelse([$3], , :, [$3]) fi]) m4trace:cmulocal/ipv6.m4:66: -1- AC_DEFUN([IPv6_CHECK_SS_FAMILY], [ AC_MSG_CHECKING([whether you have ss_family in struct sockaddr_storage]) AC_CACHE_VAL(ipv6_cv_ss_family, [dnl AC_TRY_COMPILE([#include #include ], [struct sockaddr_storage ss; int i = ss.ss_family;], [ipv6_cv_ss_family=yes], [ipv6_cv_ss_family=no])])dnl if test $ipv6_cv_ss_family = yes; then ifelse([$1], , AC_DEFINE(HAVE_SS_FAMILY,[],[Is there an ss_family in sockaddr_storage?]), [$1]) else ifelse([$2], , :, [$2]) fi AC_MSG_RESULT($ipv6_cv_ss_family)]) m4trace:cmulocal/ipv6.m4:82: -1- AC_DEFUN([IPv6_CHECK_SA_LEN], [ AC_MSG_CHECKING([whether you have sa_len in struct sockaddr]) AC_CACHE_VAL(ipv6_cv_sa_len, [dnl AC_TRY_COMPILE([#include #include ], [struct sockaddr sa; int i = sa.sa_len;], [ipv6_cv_sa_len=yes], [ipv6_cv_sa_len=no])])dnl if test $ipv6_cv_sa_len = yes; then ifelse([$1], , AC_DEFINE(HAVE_SOCKADDR_SA_LEN,[],[Does sockaddr have an sa_len?]), [$1]) else ifelse([$2], , :, [$2]) fi AC_MSG_RESULT($ipv6_cv_sa_len)]) m4trace:cmulocal/ipv6.m4:98: -1- AC_DEFUN([IPv6_CHECK_SOCKLEN_T], [ AC_MSG_CHECKING(for socklen_t) AC_CACHE_VAL(ipv6_cv_socklen_t, [dnl AC_TRY_LINK([#include #include ], [socklen_t len = 0;], [ipv6_cv_socklen_t=yes], [ipv6_cv_socklen_t=no])])dnl if test $ipv6_cv_socklen_t = yes; then ifelse([$1], , AC_DEFINE(HAVE_SOCKLEN_T,[],[Do we have a socklen_t?]), [$1]) else ifelse([$2], , :, [$2]) fi AC_MSG_RESULT($ipv6_cv_socklen_t)]) m4trace:cmulocal/kerberos_v4.m4:6: -1- AC_DEFUN([CMU_KRB_SENDAUTH_PROTO], [ AC_MSG_CHECKING(for krb_sendauth prototype) AC_TRY_COMPILE( [#include int krb_sendauth (long options, int fd, KTEXT ktext, char *service, char *inst, char *realm, u_long checksum, MSG_DAT *msg_data, CREDENTIALS *cred, Key_schedule schedule, struct sockaddr_in *laddr, struct sockaddr_in *faddr, char *version);], [int foo = krb_sendauth(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0); ], ac_cv_krb_sendauth_proto=no, ac_cv_krb_sendauth_proto=yes) AC_MSG_RESULT($ac_cv_krb_sendauth_proto) if test "$ac_cv_krb_sendauth_proto" = yes; then AC_DEFINE(HAVE_KRB_SENDAUTH_PROTO)dnl fi AC_MSG_RESULT($ac_cv_krb_sendauth_proto) ]) m4trace:cmulocal/kerberos_v4.m4:25: -1- AC_DEFUN([CMU_KRB_SET_KEY_PROTO], [ AC_MSG_CHECKING(for krb_set_key prototype) AC_CACHE_VAL(ac_cv_krb_set_key_proto, [ cmu_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="${CPPFLAGS} ${KRB_INC_FLAGS}" AC_TRY_COMPILE( [#include int krb_set_key(char *key, int cvt);], [int foo = krb_set_key(0, 0);], ac_cv_krb_set_key_proto=no, ac_cv_krb_set_key_proto=yes) ]) CPPFLAGS="${cmu_save_CPPFLAGS}" if test "$ac_cv_krb_set_key_proto" = yes; then AC_DEFINE(HAVE_KRB_SET_KEY_PROTO)dnl fi AC_MSG_RESULT($ac_cv_krb_set_key_proto) ]) m4trace:cmulocal/kerberos_v4.m4:44: -1- AC_DEFUN([CMU_KRB4_32_DEFN], [ AC_MSG_CHECKING(for KRB4_32 definition) AC_CACHE_VAL(ac_cv_krb4_32_defn, [ cmu_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="${CPPFLAGS} ${KRB_INC_FLAGS}" AC_TRY_COMPILE( [#include ], [KRB4_32 foo = 1;], ac_cv_krb4_32_defn=yes, ac_cv_krb4_32_defn=no) ]) CPPFLAGS="${cmu_save_CPPFLAGS}" if test "$ac_cv_krb4_32_defn" = yes; then AC_DEFINE(HAVE_KRB4_32_DEFINE)dnl fi AC_MSG_RESULT($ac_cv_krb4_32_defn) ]) m4trace:cmulocal/kerberos_v4.m4:63: -1- AC_DEFUN([CMU_KRB_RD_REQ_PROTO], [ AC_MSG_CHECKING(for krb_rd_req prototype) AC_CACHE_VAL(ac_cv_krb_rd_req_proto, [ cmu_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="${CPPFLAGS} ${KRB_INC_FLAGS}" AC_TRY_COMPILE( [#include int krb_rd_req(KTEXT authent, char *service, char *instance, unsigned KRB_INT32 from_addr, AUTH_DAT *ad, char *fn);], [int foo = krb_rd_req(0,0,0,0,0,0);], ac_cv_krb_rd_req_proto=no, ac_cv_krb_rd_req_proto=yes) ]) CPPFLAGS="${cmu_save_CPPFLAGS}" if test "$ac_cv_krb_rd_req_proto" = yes; then AC_DEFINE(HAVE_KRB_RD_REQ_PROTO)dnl fi AC_MSG_RESULT($ac_cv_krb_rd_req_proto) ]) m4trace:cmulocal/kerberos_v4.m4:83: -1- AC_DEFUN([CMU_KRB_INC_WHERE1], [ saved_CPPFLAGS=$CPPFLAGS CPPFLAGS="$saved_CPPFLAGS -I$1" AC_TRY_COMPILE([#include ], [struct ktext foo;], ac_cv_found_krb_inc=yes, ac_cv_found_krb_inc=no) if test "$ac_cv_found_krb_inc" = "no"; then CPPFLAGS="$saved_CPPFLAGS -I$1 -I$1/kerberosIV" AC_TRY_COMPILE([#include ], [struct ktext foo;], [ac_cv_found_krb_inc=yes], ac_cv_found_krb_inc=no) fi CPPFLAGS=$saved_CPPFLAGS ]) m4trace:cmulocal/kerberos_v4.m4:100: -1- AC_DEFUN([CMU_KRB_INC_WHERE], [ for i in $1; do AC_MSG_CHECKING(for kerberos headers in $i) CMU_KRB_INC_WHERE1($i) CMU_TEST_INCPATH($i, krb) if test "$ac_cv_found_krb_inc" = "yes"; then ac_cv_krb_where_inc=$i AC_MSG_RESULT(found) break else AC_MSG_RESULT(not found) fi done ]) m4trace:cmulocal/kerberos_v4.m4:119: -1- AC_DEFUN([CMU_KRB_LIB_WHERE1], [ saved_LIBS=$LIBS LIBS="$saved_LIBS -L$1 -lkrb ${KRB_LIBDES}" AC_TRY_LINK(, [dest_tkt();], [ac_cv_found_krb_lib=yes], ac_cv_found_krb_lib=no) LIBS=$saved_LIBS ]) m4trace:cmulocal/kerberos_v4.m4:129: -1- AC_DEFUN([CMU_KRB_LIB_WHERE], [ for i in $1; do AC_MSG_CHECKING(for kerberos libraries in $i) CMU_KRB_LIB_WHERE1($i) dnl deal with false positives from implicit link paths CMU_TEST_LIBPATH($i, krb) if test "$ac_cv_found_krb_lib" = "yes" ; then ac_cv_krb_where_lib=$i AC_MSG_RESULT(found) break else AC_MSG_RESULT(not found) fi done ]) m4trace:cmulocal/kerberos_v4.m4:145: -1- AC_DEFUN([CMU_KRB4], [ AC_REQUIRE([CMU_FIND_LIB_SUBDIR]) AC_REQUIRE([CMU_SOCKETS]) AC_REQUIRE([CMU_LIBSSL]) AC_ARG_WITH(krb4, [ --with-krb4=PREFIX Compile with Kerberos 4 support], [if test "X$with_krb4" = "X"; then with_krb4=yes fi]) AC_ARG_WITH(krb4-lib, [ --with-krb4-lib=dir use kerberos 4 libraries in dir], [if test "$withval" = "yes" -o "$withval" = "no"; then AC_MSG_ERROR([No argument for --with-krb4-lib]) fi]) AC_ARG_WITH(krb4-include, [ --with-krb4-include=dir use kerberos 4 headers in dir], [if test "$withval" = "yes" -o "$withval" = "no"; then AC_MSG_ERROR([No argument for --with-krb4-include]) fi]) if test "X$with_krb4" != "X"; then if test "$with_krb4" != "yes" -a "$with_krb4" != "no"; then ac_cv_krb_where_lib=$with_krb4/$CMU_LIB_SUBDIR ac_cv_krb_where_inc=$with_krb4/include fi fi if test "$with_krb4" != "no"; then if test "X$with_krb4_lib" != "X"; then ac_cv_krb_where_lib=$with_krb4_lib fi if test "X$with_krb4_include" != "X"; then ac_cv_krb_where_inc=$with_krb4_include fi if test "X$ac_cv_krb_where_inc" = "X"; then CMU_KRB_INC_WHERE(/usr/athena/include /usr/include/kerberosIV /usr/local/include /usr/include/kerberos) fi AC_MSG_CHECKING([if libdes is needed]) AC_TRY_LINK([],[des_quad_cksum();],KRB_DES_LIB="",KRB_DES_LIB="maybe") if test "X$KRB_DES_LIB" != "X"; then LIBS="$cmu_save_LIBS -ldes" AC_TRY_LINK([], [des_quad_cksum();],KRB_DES_LIB="yes") if test "X$KRB_DES_LIB" = "Xyes"; then AC_MSG_RESULT([yes]) KRB_LIBDES="-ldes" KRB_LIBDESA='$(KRB_LIB_DIR)/libdes.a' else LIBS="$cmu_save_LIBS $LIBSSL_LIB_FLAGS" AC_TRY_LINK([], [des_quad_cksum();],KRB_DES_LIB="libcrypto") if test "X$KRB_DES_LIB" = "Xlibcrypto"; then AC_MSG_RESULT([libcrypto]) KRB_LIBDES="$LIBSSL_LIB_FLAGS" KRB_LIBDESA="$LIBSSL_LIB_FLAGS" else LIBS="$cmu_save_LIBS -L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS" AC_TRY_LINK([], [des_quad_cksum();],KRB_DES_LIB="libcrypto+descompat") if test "X$KRB_DES_LIB" = "Xlibcrypto+descompat"; then AC_MSG_RESULT([libcrypto+descompat]) KRB_LIBDES="-L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS" KRB_LIBDESA="-L$LIBSSL_LIB_DIR -ldescompat $LIBSSL_LIB_FLAGS" else AC_MSG_RESULT([unknown]) AC_MSG_ERROR([Could not use -ldes]) fi fi fi else AC_MSG_RESULT([no]) fi if test "X$ac_cv_krb_where_lib" = "X"; then CMU_KRB_LIB_WHERE(/usr/athena/$CMU_LIB_SUBDIR /usr/local/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR) fi fi LIBS="${cmu_save_LIBS}" AC_MSG_CHECKING([whether to include kerberos 4]) if test "X$ac_cv_krb_where_lib" = "X" -o "X$ac_cv_krb_where_inc" = "X"; then ac_cv_found_krb=no AC_MSG_RESULT(no) else ac_cv_found_krb=yes AC_MSG_RESULT(yes) KRB_INC_DIR=$ac_cv_krb_where_inc KRB_LIB_DIR=$ac_cv_krb_where_lib KRB_INC_FLAGS="-I${KRB_INC_DIR}" KRB_LIB_FLAGS="-L${KRB_LIB_DIR} -lkrb ${KRB_LIBDES}" LIBS="${cmu_save_LIBS} ${KRB_LIB_FLAGS}" AC_CHECK_LIB(resolv, dns_lookup, KRB_LIB_FLAGS="${KRB_LIB_FLAGS} -lresolv",,"${KRB_LIB_FLAGS}") AC_CHECK_LIB(crypt, crypt, KRB_LIB_FLAGS="${KRB_LIB_FLAGS} -lcrypt",,"${KRB_LIB_FLAGS}") LIBS="${LIBS} ${KRB_LIB_FLAGS}" AC_CHECK_FUNCS(krb_get_int krb_life_to_time) AC_SUBST(KRB_INC_FLAGS) AC_SUBST(KRB_LIB_FLAGS) LIBS="${cmu_save_LIBS}" AC_DEFINE(HAVE_KRB4,,[Kerberos V4 is present])dnl zephyr uses this AC_DEFINE(KERBEROS,,[Use kerberos 4. find out what needs this symbol]) if test "X$RPATH" = "X"; then RPATH="" fi case "${host}" in *-*-linux*) if test "X$RPATH" = "X"; then RPATH="-Wl,-rpath,${KRB_LIB_DIR}" else RPATH="${RPATH}:${KRB_LIB_DIR}" fi ;; *-*-hpux*) if test "X$RPATH" = "X"; then RPATH="-Wl,+b${KRB_LIB_DIR}" else RPATH="${RPATH}:${KRB_LIB_DIR}" fi ;; *-*-irix*) if test "X$RPATH" = "X"; then RPATH="-Wl,-rpath,${KRB_LIB_DIR}" else RPATH="${RPATH}:${KRB_LIB_DIR}" fi ;; *-*-solaris2*) if test "$ac_cv_prog_gcc" = yes; then if test "X$RPATH" = "X"; then RPATH="-Wl,-R${KRB_LIB_DIR}" else RPATH="${RPATH}:${KRB_LIB_DIR}" fi else RPATH="${RPATH} -R${KRB_LIB_DIR}" fi ;; esac AC_SUBST(RPATH) fi ]) m4trace:cmulocal/libssl.m4:6: -1- AC_DEFUN([CMU_LIBSSL_INC_WHERE1], [ saved_CPPFLAGS=$CPPFLAGS CPPFLAGS="$saved_CPPFLAGS -I$1" CMU_CHECK_HEADER_NOCACHE(openssl/ssl.h, ac_cv_found_libssl_inc=yes, ac_cv_found_libssl_inc=no) CPPFLAGS=$saved_CPPFLAGS ]) m4trace:cmulocal/libssl.m4:15: -1- AC_DEFUN([CMU_LIBSSL_INC_WHERE], [ for i in $1; do AC_MSG_CHECKING(for libssl headers in $i) CMU_LIBSSL_INC_WHERE1($i) CMU_TEST_INCPATH($i, ssl) if test "$ac_cv_found_libssl_inc" = "yes"; then ac_cv_libssl_where_inc=$i AC_MSG_RESULT(found) break else AC_MSG_RESULT(not found) fi done ]) m4trace:cmulocal/libssl.m4:30: -1- AC_DEFUN([CMU_LIBSSL_LIB_WHERE1], [ saved_LIBS=$LIBS LIBS="$saved_LIBS -L$1 -lssl -lcrypto $LIB_SOCKET" AC_TRY_LINK(, [SSL_write();], [ac_cv_found_ssl_lib=yes], ac_cv_found_ssl_lib=no) LIBS=$saved_LIBS ]) m4trace:cmulocal/libssl.m4:40: -1- AC_DEFUN([CMU_LIBSSL_LIB_WHERE], [ for i in $1; do AC_MSG_CHECKING(for libssl libraries in $i) CMU_LIBSSL_LIB_WHERE1($i) dnl deal with false positives from implicit link paths CMU_TEST_LIBPATH($i, ssl) if test "$ac_cv_found_ssl_lib" = "yes" ; then ac_cv_libssl_where_lib=$i AC_MSG_RESULT(found) break else AC_MSG_RESULT(not found) fi done ]) m4trace:cmulocal/libssl.m4:56: -1- AC_DEFUN([CMU_LIBSSL], [ AC_REQUIRE([CMU_FIND_LIB_SUBDIR]) AC_REQUIRE([CMU_SOCKETS]) AC_ARG_WITH(libssl, [ --with-libssl=PREFIX Compile with Libssl support], [if test "X$with_libssl" = "X"; then with_libssl=yes fi]) AC_ARG_WITH(libssl-lib, [ --with-libssl-lib=dir use libssl libraries in dir], [if test "$withval" = "yes" -o "$withval" = "no"; then AC_MSG_ERROR([No argument for --with-libssl-lib]) fi]) AC_ARG_WITH(libssl-include, [ --with-libssl-include=dir use libssl headers in dir], [if test "$withval" = "yes" -o "$withval" = "no"; then AC_MSG_ERROR([No argument for --with-libssl-include]) fi]) if test "X$with_libssl" != "X"; then if test "$with_libssl" != "yes" -a "$with_libssl" != no; then ac_cv_libssl_where_lib=$with_libssl/$CMU_LIB_SUBDIR ac_cv_libssl_where_inc=$with_libssl/include fi fi if test "$with_libssl" != "no"; then if test "X$with_libssl_lib" != "X"; then ac_cv_libssl_where_lib=$with_libssl_lib fi if test "X$ac_cv_libssl_where_lib" = "X"; then CMU_LIBSSL_LIB_WHERE(/usr/local/$CMU_LIB_SUBDIR/openssl /usr/$CMU_LIB_SUBDIR/openssl /usr/local/$CMU_LIB_SUBDIR /usr/$CMU_LIB_SUBDIR) fi if test "X$with_libssl_include" != "X"; then ac_cv_libssl_where_inc=$with_libssl_include fi if test "X$ac_cv_libssl_where_inc" = "X"; then CMU_LIBSSL_INC_WHERE(/usr/local/include /usr/include) fi fi AC_MSG_CHECKING(whether to include libssl) if test "X$ac_cv_libssl_where_lib" = "X" -a "X$ac_cv_libssl_where_inc" = "X"; then ac_cv_found_libssl=no AC_MSG_RESULT(no) else ac_cv_found_libssl=yes AC_MSG_RESULT(yes) LIBSSL_INC_DIR=$ac_cv_libssl_where_inc LIBSSL_LIB_DIR=$ac_cv_libssl_where_lib LIBSSL_INC_FLAGS="-I${LIBSSL_INC_DIR}" LIBSSL_LIB_FLAGS="-L${LIBSSL_LIB_DIR} -lssl -lcrypto" if test "X$RPATH" = "X"; then RPATH="" fi case "${host}" in *-*-linux*) if test "X$RPATH" = "X"; then RPATH="-Wl,-rpath,${LIBSSL_LIB_DIR}" else RPATH="${RPATH}:${LIBSSL_LIB_DIR}" fi ;; *-*-hpux*) if test "X$RPATH" = "X"; then RPATH="-Wl,+b${LIBSSL_LIB_DIR}" else RPATH="${RPATH}:${LIBSSL_LIB_DIR}" fi ;; *-*-irix*) if test "X$RPATH" = "X"; then RPATH="-Wl,-rpath,${LIBSSL_LIB_DIR}" else RPATH="${RPATH}:${LIBSSL_LIB_DIR}" fi ;; *-*-solaris2*) if test "$ac_cv_prog_gcc" = yes; then if test "X$RPATH" = "X"; then RPATH="-Wl,-R${LIBSSL_LIB_DIR}" else RPATH="${RPATH}:${LIBSSL_LIB_DIR}" fi else RPATH="${RPATH} -R${LIBSSL_LIB_DIR}" fi ;; esac AC_SUBST(RPATH) fi AC_SUBST(LIBSSL_INC_DIR) AC_SUBST(LIBSSL_LIB_DIR) AC_SUBST(LIBSSL_INC_FLAGS) AC_SUBST(LIBSSL_LIB_FLAGS) ]) m4trace:cmulocal/libwrap.m4:4: -1- AC_DEFUN([CMU_LIBWRAP], [ AC_REQUIRE([CMU_FIND_LIB_SUBDIR]) AC_REQUIRE([CMU_SOCKETS]) AC_ARG_WITH(libwrap, [ --with-libwrap=DIR use libwrap (rooted in DIR) [yes] ], with_libwrap=$withval, with_libwrap=yes) if test "$with_libwrap" != no; then if test -d "$with_libwrap"; then CPPFLAGS="$CPPFLAGS -I${with_libwrap}/include" LDFLAGS="$LDFLAGS -L${with_libwrap}/$CMU_LIB_SUBDIR" fi cmu_save_LIBS="$LIBS" AC_CHECK_LIB(wrap, request_init, [ AC_CHECK_HEADER(tcpd.h,, with_libwrap=no)], with_libwrap=no, ${LIB_SOCKET}) LIBS="$cmu_save_LIBS" fi AC_MSG_CHECKING(libwrap support) AC_MSG_RESULT($with_libwrap) LIB_WRAP="" if test "$with_libwrap" != no; then AC_DEFINE(HAVE_LIBWRAP,[],[Do we have TCP wrappers?]) LIB_WRAP="-lwrap" AC_CHECK_LIB(nsl, yp_get_default_domain, LIB_WRAP="${LIB_WRAP} -lnsl") fi AC_SUBST(LIB_WRAP) ]) m4trace:cmulocal/sasl2.m4:7: -1- AC_DEFUN([SASL_GSSAPI_CHK], [AC_REQUIRE([SASL2_CRYPT_CHK]) AC_REQUIRE([CMU_SOCKETS]) AC_ARG_ENABLE([gssapi], [AC_HELP_STRING([--enable-gssapi=], [enable GSSAPI authentication [yes]])], [gssapi=$enableval], [gssapi=yes]) AC_ARG_WITH([gss_impl], [AC_HELP_STRING([--with-gss_impl={heimdal|mit|cybersafe|seam|auto}], [choose specific GSSAPI implementation [[auto]]])], [gss_impl=$withval], [gss_impl=auto]) if test "$gssapi" != no; then platform= case "${host}" in *-*-linux*) platform=__linux ;; *-*-hpux*) platform=__hpux ;; *-*-irix*) platform=__irix ;; *-*-solaris2*) # When should we use __sunos? platform=__solaris ;; *-*-aix*) ###_AIX platform=__aix ;; *) AC_WARN([The system type is not recognized. If you believe that CyberSafe GSSAPI works on this platform, please update the configure script]) if test "$gss_impl" = "cybersafe"; then AC_ERROR([CyberSafe was forced, cannot continue as platform is not supported]) fi ;; esac cmu_saved_CPPFLAGS=$CPPFLAGS if test -d ${gssapi}; then CPPFLAGS="$CPPFLAGS -I$gssapi/include" # We want to keep -I in our CPPFLAGS, but only if we succeed cmu_saved_CPPFLAGS=$CPPFLAGS ### I am not sure how useful is this (and whether this is required at all ### especially when we have to provide two -L flags for new CyberSafe LDFLAGS="$LDFLAGS -L$gssapi/lib" if test -n "$platform"; then if test "$gss_impl" = "auto" -o "$gss_impl" = "cybersafe"; then CPPFLAGS="$CPPFLAGS -D$platform" if test -d "${gssapi}/appsec-sdk/include"; then CPPFLAGS="$CPPFLAGS -I${gssapi}/appsec-sdk/include" fi fi fi fi AC_CHECK_HEADER([gssapi.h],, [AC_CHECK_HEADER([gssapi/gssapi.h],, [AC_WARN([Disabling GSSAPI - no include files found]); gssapi=no])]) CPPFLAGS=$cmu_saved_CPPFLAGS fi if test "$gssapi" != no; then if test "$ac_cv_header_gssapi_h" = "yes" -o "$ac_cv_header_gssapi_gssapi_h" = "yes"; then AC_DEFINE(HAVE_GSSAPI_H,,[Define if you have the gssapi.h header file]) fi # We need to find out which gssapi implementation we are # using. Supported alternatives are: MIT Kerberos 5, # Heimdal Kerberos 5 (http://www.pdc.kth.se/heimdal), # CyberSafe Kerberos 5 (http://www.cybersafe.com/) # and Sun SEAM (http://wwws.sun.com/software/security/kerberos/) # # The choice is reflected in GSSAPIBASE_LIBS AC_CHECK_LIB(resolv,res_search) if test -d ${gssapi}; then gssapi_dir="${gssapi}/lib" GSSAPIBASE_LIBS="-L$gssapi_dir" GSSAPIBASE_STATIC_LIBS="-L$gssapi_dir" else # FIXME: This is only used for building cyrus, and then only as # a real hack. it needs to be fixed. gssapi_dir="/usr/local/lib" fi # Check a full link against the Heimdal libraries. # If this fails, check a full link against the MIT libraries. # If this fails, check a full link against the CyberSafe libraries. # If this fails, check a full link against the Solaris 8 and up libgss. if test "$gss_impl" = "auto" -o "$gss_impl" = "heimdal"; then gss_failed=0 AC_CHECK_LIB(gssapi,gss_unwrap,gss_impl="heimdal",gss_failed=1, ${GSSAPIBASE_LIBS} -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err ${LIB_SOCKET}) if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then gss_impl="failed" fi fi if test "$gss_impl" = "auto" -o "$gss_impl" = "mit"; then # check for libkrb5support first AC_CHECK_LIB(krb5support,krb5int_getspecific,K5SUP=-lkrb5support K5SUPSTATIC=$gssapi_dir/libkrb5support.a,,${LIB_SOCKET}) gss_failed=0 AC_CHECK_LIB(gssapi_krb5,gss_unwrap,gss_impl="mit",gss_failed=1, ${GSSAPIBASE_LIBS} -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP} ${LIB_SOCKET}) if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then gss_impl="failed" fi fi # For Cybersafe one has to set a platform define in order to make compilation work if test "$gss_impl" = "auto" -o "$gss_impl" = "cybersafe"; then cmu_saved_CPPFLAGS=$CPPFLAGS cmu_saved_GSSAPIBASE_LIBS=$GSSAPIBASE_LIBS # FIXME - Note that the libraries are in .../lib64 for 64bit kernels if test -d "${gssapi}/appsec-rt/lib"; then GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -L${gssapi}/appsec-rt/lib" fi CPPFLAGS="$CPPFLAGS -D$platform" if test -d "${gssapi}/appsec-sdk/include"; then CPPFLAGS="$CPPFLAGS -I${gssapi}/appsec-sdk/include" fi gss_failed=0 # Check for CyberSafe with two libraries first, than fall back to a single # library (older CyberSafe) unset ac_cv_lib_gss_csf_gss_acq_user AC_CHECK_LIB(gss,csf_gss_acq_user,gss_impl="cybersafe03", [unset ac_cv_lib_gss_csf_gss_acq_user; AC_CHECK_LIB(gss,csf_gss_acq_user,gss_impl="cybersafe", gss_failed=1,$GSSAPIBASE_LIBS -lgss)], [${GSSAPIBASE_LIBS} -lgss -lcstbk5]) if test "$gss_failed" = "1"; then # Restore variables GSSAPIBASE_LIBS=$cmu_saved_GSSAPIBASE_LIBS CPPFLAGS=$cmu_saved_CPPFLAGS if test "$gss_impl" != "auto"; then gss_impl="failed" fi fi fi if test "$gss_impl" = "auto" -o "$gss_impl" = "seam"; then gss_failed=0 AC_CHECK_LIB(gss,gss_unwrap,gss_impl="seam",gss_failed=1,-lgss) if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then gss_impl="failed" fi fi if test "$gss_impl" = "mit"; then GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP}" GSSAPIBASE_STATIC_LIBS="$GSSAPIBASE_LIBS $gssapi_dir/libgssapi_krb5.a $gssapi_dir/libkrb5.a $gssapi_dir/libk5crypto.a $gssapi_dir/libcom_err.a ${K5SUPSTATIC}" elif test "$gss_impl" = "heimdal"; then CPPFLAGS="$CPPFLAGS -DKRB5_HEIMDAL" GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err" GSSAPIBASE_STATIC_LIBS="$GSSAPIBASE_STATIC_LIBS $gssapi_dir/libgssapi.a $gssapi_dir/libkrb5.a $gssapi_dir/libasn1.a $gssapi_dir/libroken.a $gssapi_dir/libcom_err.a ${LIB_CRYPT}" elif test "$gss_impl" = "cybersafe03"; then # Version of CyberSafe with two libraries CPPFLAGS="$CPPFLAGS -D$platform -I${gssapi}/appsec-sdk/include" GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgss -lcstbk5" # there is no static libgss for CyberSafe GSSAPIBASE_STATIC_LIBS=none elif test "$gss_impl" = "cybersafe"; then CPPFLAGS="$CPPFLAGS -D$platform -I${gssapi}/appsec-sdk/include" GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgss" # there is no static libgss for CyberSafe GSSAPIBASE_STATIC_LIBS=none elif test "$gss_impl" = "seam"; then GSSAPIBASE_LIBS=-lgss # there is no static libgss on Solaris 8 and up GSSAPIBASE_STATIC_LIBS=none elif test "$gss_impl" = "failed"; then gssapi="no" GSSAPIBASE_LIBS= GSSAPIBASE_STATIC_LIBS= AC_WARN([Disabling GSSAPI - specified library not found]) else gssapi="no" GSSAPIBASE_LIBS= GSSAPIBASE_STATIC_LIBS= AC_WARN([Disabling GSSAPI - no library]) fi fi # # Cybersafe defines both GSS_C_NT_HOSTBASED_SERVICE and GSS_C_NT_USER_NAME # in gssapi\rfckrb5.h # if test "$gssapi" != "no"; then if test "$gss_impl" = "cybersafe" -o "$gss_impl" = "cybersafe03"; then AC_EGREP_CPP(hostbased_service_gss_nt_yes, [#include #ifdef GSS_C_NT_HOSTBASED_SERVICE hostbased_service_gss_nt_yes #endif], [AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE,, [Define if your GSSAPI implimentation defines GSS_C_NT_HOSTBASED_SERVICE])], [AC_WARN([Cybersafe define not found])]) elif test "$ac_cv_header_gssapi_h" = "yes"; then AC_EGREP_HEADER(GSS_C_NT_HOSTBASED_SERVICE, gssapi.h, [AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE,, [Define if your GSSAPI implimentation defines GSS_C_NT_HOSTBASED_SERVICE])]) elif test "$ac_cv_header_gssapi_gssapi_h"; then AC_EGREP_HEADER(GSS_C_NT_HOSTBASED_SERVICE, gssapi/gssapi.h, [AC_DEFINE(HAVE_GSS_C_NT_HOSTBASED_SERVICE,, [Define if your GSSAPI implimentation defines GSS_C_NT_HOSTBASED_SERVICE])]) fi if test "$gss_impl" = "cybersafe" -o "$gss_impl" = "cybersafe03"; then AC_EGREP_CPP(user_name_yes_gss_nt, [#include #ifdef GSS_C_NT_USER_NAME user_name_yes_gss_nt #endif], [AC_DEFINE(HAVE_GSS_C_NT_USER_NAME,, [Define if your GSSAPI implimentation defines GSS_C_NT_USER_NAME])], [AC_WARN([Cybersafe define not found])]) elif test "$ac_cv_header_gssapi_h" = "yes"; then AC_EGREP_HEADER(GSS_C_NT_USER_NAME, gssapi.h, [AC_DEFINE(HAVE_GSS_C_NT_USER_NAME,, [Define if your GSSAPI implimentation defines GSS_C_NT_USER_NAME])]) elif test "$ac_cv_header_gssapi_gssapi_h"; then AC_EGREP_HEADER(GSS_C_NT_USER_NAME, gssapi/gssapi.h, [AC_DEFINE(HAVE_GSS_C_NT_USER_NAME,, [Define if your GSSAPI implimentation defines GSS_C_NT_USER_NAME])]) fi fi GSSAPI_LIBS="" AC_MSG_CHECKING([GSSAPI]) if test "$gssapi" != no; then AC_MSG_RESULT([with implementation ${gss_impl}]) AC_CHECK_LIB(resolv,res_search,GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lresolv") SASL_MECHS="$SASL_MECHS libgssapiv2.la" SASL_STATIC_OBJS="$SASL_STATIC_OBJS gssapi.o" SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/gssapi.c" cmu_save_LIBS="$LIBS" LIBS="$LIBS $GSSAPIBASE_LIBS" AC_CHECK_FUNCS(gsskrb5_register_acceptor_identity) LIBS="$cmu_save_LIBS" else AC_MSG_RESULT([disabled]) fi AC_SUBST(GSSAPI_LIBS) AC_SUBST(GSSAPIBASE_LIBS) ]) m4trace:cmulocal/sasl2.m4:274: -1- AC_DEFUN([SASL_SET_GSSAPI_LIBS], [SASL_GSSAPI_LIBS_SET="yes" ]) m4trace:cmulocal/sasl2.m4:289: -1- AC_DEFUN([CMU_SASL2], [AC_REQUIRE([SASL_GSSAPI_CHK]) AC_ARG_WITH(sasl, [AC_HELP_STRING([--with-sasl=DIR],[Compile with libsasl2 in ])], with_sasl="$withval", with_sasl="yes") AC_ARG_WITH(staticsasl, [AC_HELP_STRING([--with-staticsasl=DIR], [Compile with staticly linked libsasl2 in ])], [with_staticsasl="$withval"; if test $with_staticsasl != "no"; then using_static_sasl="static" fi], [with_staticsasl="no"; using_static_sasl="no"]) SASLFLAGS="" LIB_SASL="" cmu_saved_CPPFLAGS=$CPPFLAGS cmu_saved_LDFLAGS=$LDFLAGS cmu_saved_LIBS=$LIBS if test ${with_staticsasl} != "no"; then if test -d ${with_staticsasl}; then if test -d ${with_staticsasl}/lib64 ; then ac_cv_sasl_where_lib=${with_staticsasl}/lib64 else ac_cv_sasl_where_lib=${with_staticsasl}/lib fi ac_cv_sasl_where_lib=${with_staticsasl}/lib ac_cv_sasl_where_inc=${with_staticsasl}/include SASLFLAGS="-I$ac_cv_sasl_where_inc" LIB_SASL="-L$ac_cv_sasl_where_lib" CPPFLAGS="${cmu_saved_CPPFLAGS} -I${ac_cv_sasl_where_inc}" LDFLAGS="${cmu_saved_LDFLAGS} -L${ac_cv_sasl_where_lib}" else with_staticsasl="/usr" fi AC_CHECK_HEADER(sasl/sasl.h, [AC_CHECK_HEADER(sasl/saslutil.h, [for i42 in lib64 lib; do if test -r ${with_staticsasl}/$i42/libsasl2.a; then ac_cv_found_sasl=yes AC_MSG_CHECKING([for static libsasl]) LIB_SASL="$LIB_SASL ${with_staticsasl}/$i42/libsasl2.a" fi done if test ! "$ac_cv_found_sasl" = "yes"; then AC_MSG_CHECKING([for static libsasl]) AC_ERROR([Could not find ${with_staticsasl}/lib*/libsasl2.a]) fi])]) AC_MSG_RESULT([found]) if test "x$SASL_GSSAPI_LIBS_SET" = "x"; then LIB_SASL="$LIB_SASL $GSSAPIBASE_STATIC_LIBS" else SASL_GSSAPI_LIBS_SET="" cmu_saved_LIBS="$GSSAPIBASE_STATIC_LIBS $cmu_saved_LIBS" fi fi if test -d ${with_sasl}; then ac_cv_sasl_where_lib=${with_sasl}/lib ac_cv_sasl_where_inc=${with_sasl}/include DYNSASLFLAGS="-I$ac_cv_sasl_where_inc" if test "$ac_cv_sasl_where_lib" != ""; then CMU_ADD_LIBPATH_TO($ac_cv_sasl_where_lib, LIB_DYN_SASL) fi LIB_DYN_SASL="$LIB_DYN_SASL -lsasl2" CPPFLAGS="${cmu_saved_CPPFLAGS} -I${ac_cv_sasl_where_inc}" LDFLAGS="${cmu_saved_LDFLAGS} -L${ac_cv_sasl_where_lib}" fi # be sure to check for a SASLv2 specific function AC_CHECK_HEADER(sasl/sasl.h, [AC_CHECK_HEADER(sasl/saslutil.h, [AC_CHECK_LIB(sasl2, prop_get, ac_cv_found_sasl=yes, ac_cv_found_sasl=no)], ac_cv_found_sasl=no)], ac_cv_found_sasl=no) if test "$ac_cv_found_sasl" = "yes"; then if test "$ac_cv_sasl_where_lib" != ""; then CMU_ADD_LIBPATH_TO($ac_cv_sasl_where_lib, DYNLIB_SASL) fi DYNLIB_SASL="$DYNLIB_SASL -lsasl2" if test "$using_static_sasl" != "static"; then LIB_SASL=$DYNLIB_SASL SASLFLAGS=$DYNSASLFLAGS fi else DYNLIB_SASL="" DYNSASLFLAGS="" using_static_sasl="staticonly" fi if test "x$SASL_GSSAPI_LIBS_SET" != "x"; then SASL_GSSAPI_LIBS_SET="" cmu_saved_LIBS="$GSSAPIBASE_LIBS $cmu_saved_LIBS" fi LIBS="$cmu_saved_LIBS" LDFLAGS="$cmu_saved_LDFLAGS" CPPFLAGS="$cmu_saved_CPPFLAGS" AC_SUBST(LIB_DYN_SASL) AC_SUBST(DYNSASLFLAGS) AC_SUBST(LIB_SASL) AC_SUBST(SASLFLAGS) ]) m4trace:cmulocal/sasl2.m4:410: -1- AC_DEFUN([CMU_SASL2_REQUIRED], [AC_REQUIRE([CMU_SASL2]) if test "$ac_cv_found_sasl" != "yes"; then AC_ERROR([Cannot continue without libsasl2. Get it from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/.]) fi]) m4trace:cmulocal/sasl2.m4:420: -1- AC_DEFUN([CMU_SASL2_REQUIRE_VER], [AC_REQUIRE([CMU_SASL2_REQUIRED]) cmu_saved_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $SASLFLAGS" AC_TRY_CPP([ #include #ifndef SASL_VERSION_MAJOR #error SASL_VERSION_MAJOR not defined #endif #ifndef SASL_VERSION_MINOR #error SASL_VERSION_MINOR not defined #endif #ifndef SASL_VERSION_STEP #error SASL_VERSION_STEP not defined #endif #if SASL_VERSION_MAJOR < $1 || SASL_VERSION_MINOR < $2 || SASL_VERSION_STEP < $3 #error SASL version is less than $1.$2.$3 #endif ],, [AC_ERROR([Incorrect SASL headers found. This package requires SASL $1.$2.$3 or newer.])]) CPPFLAGS=$cmu_saved_CPPFLAGS ]) m4trace:cmulocal/sasl2.m4:451: -1- AC_DEFUN([CMU_SASL2_CHECKAPOP_REQUIRED], [AC_REQUIRE([CMU_SASL2_REQUIRED]) cmu_saved_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $LIB_SASL" AC_CHECK_LIB(sasl2, sasl_checkapop, [AC_DEFINE(HAVE_APOP,[],[Does SASL support APOP?])], [AC_MSG_ERROR([libsasl2 without working sasl_checkapop. Cannot continue.])]) LDFLAGS=$cmu_saved_LDFLAGS ]) m4trace:cmulocal/sasl2.m4:468: -1- AC_DEFUN([SASL2_CRYPT_CHK], [AC_CHECK_FUNC(crypt, cmu_have_crypt=yes, [AC_CHECK_LIB(crypt, crypt, LIB_CRYPT="-lcrypt"; cmu_have_crypt=yes, cmu_have_crypt=no)]) AC_SUBST(LIB_CRYPT) ]) m4trace:cmulocal/sql.m4:16: -1- AC_DEFUN([CYRUS_MYSQL_CHK_LIB], [ MYSQL_SAVE_LDFLAGS=$LDFLAGS if test -d $with_mysql_lib; then CMU_ADD_LIBPATH_TO($with_mysql_lib, LDFLAGS) CMU_ADD_LIBPATH_TO($with_mysql_lib, MYSQL_LIBADD) else MYSQL_LIBADD="" fi saved_LIBS=$LIBS for libname in ${with_mysql} mysqlclient do LIBS="$saved_LIBS -l$libname" AC_TRY_LINK([#include #include ], [mysql_select_db(NULL, NULL);], MYSQL_LIBADD="$MYSQL_LIBADD -l$libname"; mysqllib="yes", mysqllib="no") if test "$mysqllib" = "yes"; then break; fi done LIBS=$saved_LIBS LDFLAGS=$MYSQL_SAVE_LDFLAGS ]) m4trace:cmulocal/sql.m4:43: -1- AC_DEFUN([CYRUS_MYSQL_OPTS], [ AC_ARG_WITH(mysql-libdir, [ --with-mysql-libdir=DIR MySQL lib files are in DIR], with_mysql_lib=$withval, [ test "${with_mysql_lib+set}" = set || with_mysql_lib=none]) AC_ARG_WITH(mysql-incdir, [ --with-mysql-incdir=DIR MySQL include files are in DIR], with_mysql_inc=$withval, [ test "${with_mysql_inc+set}" = set || with_mysql_inc=none ]) ]) m4trace:cmulocal/sql.m4:55: -1- AC_DEFUN([CYRUS_MYSQL_CHK], [ AC_REQUIRE([CYRUS_MYSQL_OPTS]) cmu_save_CPPFLAGS=$CPPFLAGS if test -d $with_mysql_inc; then CPPFLAGS="$CPPFLAGS -I$with_mysql_inc" MYSQL_INCADD="-I$with_mysql_inc" else MYSQL_INCADD="" fi AC_CHECK_HEADER(mysql.h, [CYRUS_MYSQL_CHK_LIB()], mysqllib="no") CPPFLAGS=$cmu_save_CPPFLAGS ]) m4trace:cmulocal/sql.m4:90: -1- AC_DEFUN([CYRUS_PGSQL_CHK_LIB], [ PGSQL_SAVE_LDFLAGS=$LDFLAGS if test -d $with_pgsql_lib; then CMU_ADD_LIBPATH_TO($with_pgsql_lib, LDFLAGS) CMU_ADD_LIBPATH_TO($with_pgsql_lib, PGSQL_LIBADD) else PGSQL_LIBADD="" fi saved_LIBS=$LIBS for libname in ${with_pgsql} pq do LIBS="$saved_LIBS -l$libname" AC_TRY_LINK([#include #include ], [PQconnectdb(NULL);], PGSQL_LIBADD="$PGSQL_LIBADD -l$libname"; pgsqllib="yes", pgsqllib="no") if test "$pgsqllib" = "yes"; then break; fi done LIBS=$saved_LIBS LDFLAGS=$PGSQL_SAVE_LDFLAGS ]) m4trace:cmulocal/sql.m4:117: -1- AC_DEFUN([CYRUS_PGSQL_OPTS], [ AC_ARG_WITH(pgsql-libdir, [ --with-pgsql-libdir=DIR Pgsql lib files are in DIR], with_pgsql_lib=$withval, [ test "${with_pgsql_lib+set}" = set || with_pgsql_lib=none]) AC_ARG_WITH(pgsql-incdir, [ --with-pgsql-incdir=DIR Pgsql include files are in DIR], with_pgsql_inc=$withval, [ test "${with_pgsql_inc+set}" = set || with_pgsql_inc=none ]) ]) m4trace:cmulocal/sql.m4:129: -1- AC_DEFUN([CYRUS_PGSQL_CHK], [ AC_REQUIRE([CYRUS_PGSQL_OPTS]) cmu_save_CPPFLAGS=$CPPFLAGS if test -d $with_pgsql_inc; then CPPFLAGS="$CPPFLAGS -I$with_pgsql_inc" PGSQL_INCADD="-I$with_pgsql_inc" else PGSQL_INCADD="" fi AC_CHECK_HEADER(libpq-fe.h, [CYRUS_PGSQL_CHK_LIB()], pgsqllib="no") CPPFLAGS=$cmu_save_CPPFLAGS ]) m4trace:cmulocal/sql.m4:164: -1- AC_DEFUN([CYRUS_SQLITE_CHK_LIB], [ SQLITE_SAVE_LDFLAGS=$LDFLAGS if test -d $with_sqlite_lib; then CMU_ADD_LIBPATH_TO($with_sqlite_lib, LDFLAGS) CMU_ADD_LIBPATH_TO($with_sqlite_lib, SQLITE_LIBADD) else SQLITE_LIBADD="" fi saved_LIBS=$LIBS for libname in ${with_sqlite} sqlite3 do LIBS="$saved_LIBS -l$libname" AC_TRY_LINK([#include #include ], [sqlite3_open(NULL, NULL);], SQLITE_LIBADD="$SQLITE_LIBADD -l$libname"; sqlitelib="yes", sqlitelib="no") if test "$sqlitelib" = "yes"; then break; fi done LIBS=$saved_LIBS LDFLAGS=$SQLITE_SAVE_LDFLAGS ]) m4trace:cmulocal/sql.m4:191: -1- AC_DEFUN([CYRUS_SQLITE_OPTS], [ AC_ARG_WITH(sqlite-libdir, [ --with-sqlite-libdir=DIR SQLite lib files are in DIR], with_sqlite_lib=$withval, [ test "${with_sqlite_lib+set}" = set || with_sqlite_lib=none]) AC_ARG_WITH(sqlite-incdir, [ --with-sqlite-incdir=DIR SQLite include files are in DIR], with_sqlite_inc=$withval, [ test "${with_sqlite_inc+set}" = set || with_sqlite_inc=none ]) ]) m4trace:cmulocal/sql.m4:203: -1- AC_DEFUN([CYRUS_SQLITE_CHK], [ AC_REQUIRE([CYRUS_SQLITE_OPTS]) cmu_save_CPPFLAGS=$CPPFLAGS if test -d $with_sqlite_inc; then CPPFLAGS="$CPPFLAGS -I$with_sqlite_inc" SQLITE_INCADD="-I$with_sqlite_inc" else SQLITE_INCADD="" fi AC_CHECK_HEADER(sqlite3.h, [CYRUS_SQLITE_CHK_LIB()], sqlitelib="no") CPPFLAGS=$cmu_save_CPPFLAGS ]) m4trace:cmulocal/ucdsnmp.m4:4: -1- AC_DEFUN([CMU_UCDSNMP], [ AC_REQUIRE([CMU_FIND_LIB_SUBDIR]) AC_REQUIRE([CMU_SOCKETS]) AC_ARG_WITH(snmp, [ --with-snmp=DIR use ucd|net snmp (rooted in DIR) [yes] ], with_snmp=$withval, with_snmp=yes) dnl dnl Maintain backwards compatibility with old --with-ucdsnmp option dnl AC_ARG_WITH(ucdsnmp,, with_snmp=$withval,) if test "$with_snmp" != "no"; then dnl dnl Try net-snmp first dnl if test "$with_snmp" = "yes"; then AC_PATH_PROG(SNMP_CONFIG,net-snmp-config,,[/usr/local/bin:$PATH]) else SNMP_CONFIG="$with_snmp/bin/net-snmp-config" fi if test -x "$SNMP_CONFIG"; then AC_MSG_CHECKING(NET SNMP libraries) SNMP_LIBS=`$SNMP_CONFIG --agent-libs` SNMP_PREFIX=`$SNMP_CONFIG --prefix` if test -n "$SNMP_LIBS" && test -n "$SNMP_PREFIX"; then CPPFLAGS="$CPPFLAGS -I${SNMP_PREFIX}/include" LIB_UCDSNMP=$SNMP_LIBS AC_DEFINE(HAVE_NETSNMP,1,[Do we have Net-SNMP support?]) AC_SUBST(LIB_UCDSNMP) AC_MSG_RESULT(yes) AC_CHECK_HEADERS(net-snmp/agent/agent_module_config.h,,) else AC_MSG_RESULT(no) AC_MSG_WARN([Could not find the required paths. Please check your net-snmp installation.]) fi else dnl dnl Try ucd-snmp if net-snmp test failed dnl if test "$with_snmp" != no; then if test -d "$with_snmp"; then CPPFLAGS="$CPPFLAGS -I${with_snmp}/include" LDFLAGS="$LDFLAGS -L${with_snmp}/$CMU_LIB_SUBDIR" fi cmu_save_LIBS="$LIBS" AC_CHECK_LIB(snmp, sprint_objid, [ AC_CHECK_HEADER(ucd-snmp/version.h,, with_snmp=no)], with_snmp=no, ${LIB_SOCKET}) LIBS="$cmu_save_LIBS" fi AC_MSG_CHECKING(UCD SNMP libraries) AC_MSG_RESULT($with_snmp) LIB_UCDSNMP="" if test "$with_snmp" != no; then AC_DEFINE(HAVE_UCDSNMP,1,[Do we have UCD-SNMP support?]) LIB_UCDSNMP="-lucdagent -lucdmibs -lsnmp" AC_CHECK_LIB(rpm, rpmdbOpen, LIB_UCDSNMP="${LIB_UCDSNMP} -lrpm -lpopt",,-lpopt) fi AC_SUBST(LIB_UCDSNMP) fi fi ]) m4trace:cmulocal/zlib.m4:6: -1- AC_DEFUN([CMU_HAVE_ZLIB], [ AC_REQUIRE([CMU_FIND_LIB_SUBDIR]) AC_ARG_WITH(zlib,[ --with-zlib=PATH use zlib from PATH], with_zlib=$withval, with_zlib="yes") save_CPPFLAGS=$CPPFLAGS save_LDFLAGS=$LDFLAGS if test -d $with_zlib; then CPPFLAGS="${CPPFLAGS} -I${with_lib}/include" CMU_ADD_LIBPATH(${with_zlib}/$CMU_LIB_SUBDIR) fi ZLIB="" case "$with_zlib" in no) with_zlib="no";; *) AC_CHECK_HEADER(zlib.h, [ AC_CHECK_LIB(z, deflate, LIBS="${LIBS} -lz"; with_zlib="yes", with_zlib="no",)], with_zlib=no) ;; esac if test "$with_zlib" != "no"; then AC_DEFINE(HAVE_ZLIB,[],[Do we have zlib?]) ZLIB="-lz" else CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS fi ]) m4trace:configure.in:49: -1- m4_pattern_forbid([^_?A[CHUM]_]) m4trace:configure.in:49: -1- m4_pattern_forbid([_AC_]) m4trace:configure.in:49: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) m4trace:configure.in:49: -1- m4_pattern_allow([^AS_FLAGS$]) m4trace:configure.in:49: -1- m4_pattern_forbid([^_?m4_]) m4trace:configure.in:49: -1- m4_pattern_forbid([^dnl$]) m4trace:configure.in:49: -1- m4_pattern_forbid([^_?AS_]) m4trace:configure.in:49: -1- m4_pattern_allow([^SHELL$]) m4trace:configure.in:49: -1- m4_pattern_allow([^PATH_SEPARATOR$]) m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_NAME$]) m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_VERSION$]) m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_STRING$]) m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_URL$]) m4trace:configure.in:49: -1- m4_pattern_allow([^exec_prefix$]) m4trace:configure.in:49: -1- m4_pattern_allow([^prefix$]) m4trace:configure.in:49: -1- m4_pattern_allow([^program_transform_name$]) m4trace:configure.in:49: -1- m4_pattern_allow([^bindir$]) m4trace:configure.in:49: -1- m4_pattern_allow([^sbindir$]) m4trace:configure.in:49: -1- m4_pattern_allow([^libexecdir$]) m4trace:configure.in:49: -1- m4_pattern_allow([^datarootdir$]) m4trace:configure.in:49: -1- m4_pattern_allow([^datadir$]) m4trace:configure.in:49: -1- m4_pattern_allow([^sysconfdir$]) m4trace:configure.in:49: -1- m4_pattern_allow([^sharedstatedir$]) m4trace:configure.in:49: -1- m4_pattern_allow([^localstatedir$]) m4trace:configure.in:49: -1- m4_pattern_allow([^includedir$]) m4trace:configure.in:49: -1- m4_pattern_allow([^oldincludedir$]) m4trace:configure.in:49: -1- m4_pattern_allow([^docdir$]) m4trace:configure.in:49: -1- m4_pattern_allow([^infodir$]) m4trace:configure.in:49: -1- m4_pattern_allow([^htmldir$]) m4trace:configure.in:49: -1- m4_pattern_allow([^dvidir$]) m4trace:configure.in:49: -1- m4_pattern_allow([^pdfdir$]) m4trace:configure.in:49: -1- m4_pattern_allow([^psdir$]) m4trace:configure.in:49: -1- m4_pattern_allow([^libdir$]) m4trace:configure.in:49: -1- m4_pattern_allow([^localedir$]) m4trace:configure.in:49: -1- m4_pattern_allow([^mandir$]) m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_NAME$]) m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_VERSION$]) m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_STRING$]) m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_URL$]) m4trace:configure.in:49: -1- m4_pattern_allow([^DEFS$]) m4trace:configure.in:49: -1- m4_pattern_allow([^ECHO_C$]) m4trace:configure.in:49: -1- m4_pattern_allow([^ECHO_N$]) m4trace:configure.in:49: -1- m4_pattern_allow([^ECHO_T$]) m4trace:configure.in:49: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.in:49: -1- m4_pattern_allow([^build_alias$]) m4trace:configure.in:49: -1- m4_pattern_allow([^host_alias$]) m4trace:configure.in:49: -1- m4_pattern_allow([^target_alias$]) m4trace:configure.in:52: -1- _m4_warn([obsolete], [The macro `AC_CANONICAL_SYSTEM' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:1857: AC_CANONICAL_SYSTEM is expanded from... configure.in:52: the top level]) m4trace:configure.in:52: -1- m4_pattern_allow([^build$]) m4trace:configure.in:52: -1- m4_pattern_allow([^build_cpu$]) m4trace:configure.in:52: -1- m4_pattern_allow([^build_vendor$]) m4trace:configure.in:52: -1- m4_pattern_allow([^build_os$]) m4trace:configure.in:52: -1- m4_pattern_allow([^host$]) m4trace:configure.in:52: -1- m4_pattern_allow([^host_cpu$]) m4trace:configure.in:52: -1- m4_pattern_allow([^host_vendor$]) m4trace:configure.in:52: -1- m4_pattern_allow([^host_os$]) m4trace:configure.in:52: -1- m4_pattern_allow([^target$]) m4trace:configure.in:52: -1- m4_pattern_allow([^target_cpu$]) m4trace:configure.in:52: -1- m4_pattern_allow([^target_vendor$]) m4trace:configure.in:52: -1- m4_pattern_allow([^target_os$]) m4trace:configure.in:55: -1- m4_pattern_allow([^EXTRA_IDENT$]) m4trace:configure.in:58: -1- m4_pattern_allow([^MAKEDEPEND$]) m4trace:configure.in:63: -2- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:34: AC_ERROR is expanded from... configure.in:63: the top level]) m4trace:configure.in:68: -1- m4_pattern_allow([^cyrus_prefix$]) m4trace:configure.in:69: -1- m4_pattern_allow([^CYRUS_PATH$]) m4trace:configure.in:72: -1- m4_pattern_allow([^service_path$]) m4trace:configure.in:73: -1- m4_pattern_allow([^SERVICE_PATH$]) m4trace:configure.in:76: -1- m4_pattern_allow([^cyrus_user$]) m4trace:configure.in:77: -1- m4_pattern_allow([^CYRUS_USER$]) m4trace:configure.in:80: -1- m4_pattern_allow([^cyrus_group$]) m4trace:configure.in:87: -1- m4_pattern_allow([^SYSCONFDIR$]) m4trace:configure.in:89: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:89: -1- m4_pattern_allow([^CFLAGS$]) m4trace:configure.in:89: -1- m4_pattern_allow([^LDFLAGS$]) m4trace:configure.in:89: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.in:89: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.in:89: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:89: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:89: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:89: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:89: -1- m4_pattern_allow([^ac_ct_CC$]) m4trace:configure.in:89: -1- m4_pattern_allow([^EXEEXT$]) m4trace:configure.in:89: -1- m4_pattern_allow([^OBJEXT$]) m4trace:configure.in:90: -1- m4_pattern_allow([^RANLIB$]) m4trace:configure.in:91: -1- m4_pattern_allow([^SET_MAKE$]) m4trace:configure.in:92: -1- m4_pattern_allow([^INSTALL_PROGRAM$]) m4trace:configure.in:92: -1- m4_pattern_allow([^INSTALL_SCRIPT$]) m4trace:configure.in:92: -1- m4_pattern_allow([^INSTALL_DATA$]) m4trace:configure.in:93: -1- _m4_warn([obsolete], [The macro `AC_AIX' is obsolete. You should run autoupdate.], [../../lib/autoconf/specific.m4:436: AC_AIX is expanded from... configure.in:93: the top level]) m4trace:configure.in:93: -1- m4_pattern_allow([^CPP$]) m4trace:configure.in:93: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.in:93: -1- m4_pattern_allow([^CPP$]) m4trace:configure.in:93: -1- m4_pattern_allow([^GREP$]) m4trace:configure.in:93: -1- m4_pattern_allow([^EGREP$]) m4trace:configure.in:93: -1- m4_pattern_allow([^STDC_HEADERS$]) m4trace:configure.in:93: -1- m4_pattern_allow([^_POSIX_SOURCE$]) m4trace:configure.in:93: -1- m4_pattern_allow([^_POSIX_1_SOURCE$]) m4trace:configure.in:93: -1- m4_pattern_allow([^_MINIX$]) m4trace:configure.in:93: -1- m4_pattern_allow([^__EXTENSIONS__$]) m4trace:configure.in:93: -1- m4_pattern_allow([^_ALL_SOURCE$]) m4trace:configure.in:93: -1- m4_pattern_allow([^_GNU_SOURCE$]) m4trace:configure.in:93: -1- m4_pattern_allow([^_POSIX_PTHREAD_SEMANTICS$]) m4trace:configure.in:93: -1- m4_pattern_allow([^_TANDEM_SOURCE$]) m4trace:configure.in:94: -1- _m4_warn([obsolete], [The macro `AC_ISC_POSIX' is obsolete. You should run autoupdate.], [../../lib/autoconf/specific.m4:446: AC_ISC_POSIX is expanded from... configure.in:94: the top level]) m4trace:configure.in:95: -1- m4_pattern_allow([^AWK$]) m4trace:configure.in:96: -1- m4_pattern_allow([^const$]) m4trace:configure.in:97: -1- m4_pattern_allow([^HAVE_LONG_FILE_NAMES$]) m4trace:configure.in:104: -1- m4_pattern_allow([^SIZEOF_INT$]) m4trace:configure.in:105: -1- m4_pattern_allow([^SIZEOF_LONG$]) m4trace:configure.in:106: -1- m4_pattern_allow([^SIZEOF_SIZE_T$]) m4trace:configure.in:107: -1- m4_pattern_allow([^SIZEOF_OFF_T$]) m4trace:configure.in:110: -1- m4_pattern_allow([^SIZEOF_LONG_LONG_INT$]) m4trace:configure.in:111: -1- m4_pattern_allow([^SIZEOF_UNSIGNED_LONG_LONG_INT$]) m4trace:configure.in:114: -1- m4_pattern_allow([^HAVE_LONG_LONG_INT$]) m4trace:configure.in:115: -1- m4_pattern_allow([^WORDS_BIGENDIAN$]) m4trace:configure.in:115: -1- m4_pattern_allow([^AC_APPLE_UNIVERSAL_BUILD$]) m4trace:configure.in:118: -1- CMU_C___ATTRIBUTE__ m4trace:configure.in:118: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2614: AC_TRY_COMPILE is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... cmulocal/c-attribute.m4:9: CMU_C___ATTRIBUTE__ is expanded from... configure.in:118: the top level]) m4trace:configure.in:118: -1- m4_pattern_allow([^HAVE___ATTRIBUTE__$]) m4trace:configure.in:119: -1- CMU_C_FPIC m4trace:configure.in:119: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2614: AC_TRY_COMPILE is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... cmulocal/c-fpic.m4:9: CMU_C_FPIC is expanded from... configure.in:119: the top level]) m4trace:configure.in:122: -1- CMU_GUESS_RUNPATH_SWITCH m4trace:configure.in:122: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2687: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... ../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... cmulocal/cyrus.m4:33: CMU_GUESS_RUNPATH_SWITCH is expanded from... configure.in:122: the top level]) m4trace:configure.in:122: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2687: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from... ../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from... ../../lib/autoconf/general.m4:2687: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... ../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... cmulocal/cyrus.m4:33: CMU_GUESS_RUNPATH_SWITCH is expanded from... configure.in:122: the top level]) m4trace:configure.in:125: -1- m4_pattern_allow([^HAVE_MEMMOVE$]) m4trace:configure.in:125: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.in:125: -1- m4_pattern_allow([^HAVE_STRCASECMP$]) m4trace:configure.in:125: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.in:125: -1- m4_pattern_allow([^HAVE_FTRUNCATE$]) m4trace:configure.in:125: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.in:125: -1- m4_pattern_allow([^HAVE_STRERROR$]) m4trace:configure.in:125: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.in:130: -1- m4_pattern_allow([^HAVE_STDLIB_H$]) m4trace:configure.in:131: -1- m4_pattern_allow([^HAVE_GETPASSPHRASE$]) m4trace:configure.in:134: -1- CMU_SOCKETS m4trace:configure.in:134: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2687: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/functions.m4:59: AC_CHECK_FUNC is expanded from... cmulocal/bsd_sockets.m4:9: CMU_SOCKETS is expanded from... configure.in:134: the top level]) m4trace:configure.in:134: -1- m4_pattern_allow([^LIB_SOCKET$]) m4trace:configure.in:139: -1- IPv6_CHECK_FUNC([getaddrinfo], [IPv6_CHECK_FUNC(gai_strerror, AC_DEFINE(HAVE_GETADDRINFO,[],[Do we have a getaddrinfo?]), cyrus_cv_getaddrinfo=no)], [cyrus_cv_getaddrinfo=no]) m4trace:configure.in:139: -1- m4_pattern_allow([^HAVE_GETADDRINFO$]) m4trace:configure.in:139: -2- m4_pattern_allow([^HAVE_GETADDRINFO$]) m4trace:configure.in:139: -1- IPv6_CHECK_FUNC([gai_strerror], [ $as_echo "@%:@define HAVE_GETADDRINFO /**/" >>confdefs.h ], [cyrus_cv_getaddrinfo=no]) m4trace:configure.in:139: -1- m4_pattern_allow([^HAVE_GETADDRINFO$]) m4trace:configure.in:149: -2- m4_pattern_allow([^HAVE_GETNAMEINFO$]) m4trace:configure.in:148: -1- IPv6_CHECK_FUNC([getnameinfo], [ $as_echo "@%:@define HAVE_GETNAMEINFO /**/" >>confdefs.h ], [cyrus_cv_getnameinfo=no]) m4trace:configure.in:148: -1- m4_pattern_allow([^HAVE_GETADDRINFO$]) m4trace:configure.in:156: -1- IPv6_CHECK_SS_FAMILY([]) m4trace:configure.in:156: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2614: AC_TRY_COMPILE is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... cmulocal/ipv6.m4:66: IPv6_CHECK_SS_FAMILY is expanded from... configure.in:156: the top level]) m4trace:configure.in:156: -2- m4_pattern_allow([^HAVE_SS_FAMILY$]) m4trace:configure.in:157: -1- IPv6_CHECK_SA_LEN([]) m4trace:configure.in:157: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2614: AC_TRY_COMPILE is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... cmulocal/ipv6.m4:82: IPv6_CHECK_SA_LEN is expanded from... configure.in:157: the top level]) m4trace:configure.in:157: -2- m4_pattern_allow([^HAVE_SOCKADDR_SA_LEN$]) m4trace:configure.in:159: -1- m4_pattern_allow([^IPV6_OBJS$]) m4trace:configure.in:162: -1- m4_pattern_allow([^HAVE_SYS_TIME_H$]) m4trace:configure.in:163: -1- m4_pattern_allow([^TIME_WITH_SYS_TIME$]) m4trace:configure.in:164: -1- m4_pattern_allow([^TM_IN_SYS_TIME$]) m4trace:configure.in:165: -1- m4_pattern_allow([^HAVE_STRUCT_TM_TM_ZONE$]) m4trace:configure.in:165: -1- m4_pattern_allow([^HAVE_TM_ZONE$]) m4trace:configure.in:165: -1- m4_pattern_allow([^HAVE_DECL_TZNAME$]) m4trace:configure.in:165: -1- m4_pattern_allow([^HAVE_TZNAME$]) m4trace:configure.in:167: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.in:168: -1- m4_pattern_allow([^PRE_SUBDIRS$]) m4trace:configure.in:169: -1- m4_pattern_allow([^EXTRA_SUBDIRS$]) m4trace:configure.in:170: -1- m4_pattern_allow([^DEPLIBS$]) m4trace:configure.in:171: -1- m4_pattern_allow([^LOCALDEFS$]) m4trace:configure.in:172: -1- m4_pattern_allow([^HAVE_VPRINTF$]) m4trace:configure.in:172: -1- m4_pattern_allow([^HAVE_DOPRNT$]) m4trace:configure.in:205: -1- CYRUS_BERKELEY_DB_CHK([]) m4trace:configure.in:205: -1- CYRUS_BERKELEY_DB_OPTS m4trace:configure.in:205: -1- CYRUS_BERKELEY_DB_CHK_LIB([]) m4trace:configure.in:205: -1- CMU_ADD_LIBPATH_TO([$with_bdb_lib], [LDFLAGS]) m4trace:configure.in:205: -1- CMU_ADD_LIBPATH_TO([$with_bdb_lib], [BDB_LIBADD]) m4trace:configure.in:205: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2687: AC_TRY_LINK is expanded from... cmulocal/berkdb.m4:204: CYRUS_BERKELEY_DB_CHK_LIB is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/headers.m4:129: _AC_CHECK_HEADER_MONGREL is expanded from... ../../lib/autoconf/headers.m4:67: AC_CHECK_HEADER is expanded from... cmulocal/berkdb.m4:265: CYRUS_BERKELEY_DB_CHK is expanded from... configure.in:205: the top level]) m4trace:configure.in:205: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2687: AC_TRY_LINK is expanded from... cmulocal/berkdb.m4:204: CYRUS_BERKELEY_DB_CHK_LIB is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/headers.m4:129: _AC_CHECK_HEADER_MONGREL is expanded from... ../../lib/autoconf/headers.m4:67: AC_CHECK_HEADER is expanded from... cmulocal/berkdb.m4:265: CYRUS_BERKELEY_DB_CHK is expanded from... configure.in:205: the top level]) m4trace:configure.in:208: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:34: AC_ERROR is expanded from... configure.in:208: the top level]) m4trace:configure.in:213: -1- CMU_ADD_LIBPATH([$with_bdb_lib]) m4trace:configure.in:218: -1- m4_pattern_allow([^BDB_INC$]) m4trace:configure.in:219: -1- m4_pattern_allow([^BDB_LIB$]) m4trace:configure.in:225: -1- m4_pattern_allow([^HAVE_BDB$]) m4trace:configure.in:257: -1- CYRUS_MYSQL_CHK([]) m4trace:configure.in:257: -1- CYRUS_MYSQL_OPTS m4trace:configure.in:257: -1- CYRUS_MYSQL_CHK_LIB([]) m4trace:configure.in:257: -1- CMU_ADD_LIBPATH_TO([$with_mysql_lib], [LDFLAGS]) m4trace:configure.in:257: -1- CMU_ADD_LIBPATH_TO([$with_mysql_lib], [MYSQL_LIBADD]) m4trace:configure.in:257: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2687: AC_TRY_LINK is expanded from... cmulocal/sql.m4:16: CYRUS_MYSQL_CHK_LIB is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/headers.m4:129: _AC_CHECK_HEADER_MONGREL is expanded from... ../../lib/autoconf/headers.m4:67: AC_CHECK_HEADER is expanded from... cmulocal/sql.m4:55: CYRUS_MYSQL_CHK is expanded from... configure.in:257: the top level]) m4trace:configure.in:260: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:34: AC_ERROR is expanded from... configure.in:260: the top level]) m4trace:configure.in:267: -1- CMU_ADD_LIBPATH([$with_mysql_lib]) m4trace:configure.in:273: -1- m4_pattern_allow([^HAVE_MYSQL$]) m4trace:configure.in:301: -1- CYRUS_PGSQL_CHK([]) m4trace:configure.in:301: -1- CYRUS_PGSQL_OPTS m4trace:configure.in:301: -1- CYRUS_PGSQL_CHK_LIB([]) m4trace:configure.in:301: -1- CMU_ADD_LIBPATH_TO([$with_pgsql_lib], [LDFLAGS]) m4trace:configure.in:301: -1- CMU_ADD_LIBPATH_TO([$with_pgsql_lib], [PGSQL_LIBADD]) m4trace:configure.in:301: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2687: AC_TRY_LINK is expanded from... cmulocal/sql.m4:90: CYRUS_PGSQL_CHK_LIB is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/headers.m4:129: _AC_CHECK_HEADER_MONGREL is expanded from... ../../lib/autoconf/headers.m4:67: AC_CHECK_HEADER is expanded from... cmulocal/sql.m4:129: CYRUS_PGSQL_CHK is expanded from... configure.in:301: the top level]) m4trace:configure.in:304: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:34: AC_ERROR is expanded from... configure.in:304: the top level]) m4trace:configure.in:311: -1- CMU_ADD_LIBPATH([$with_pgsql_lib]) m4trace:configure.in:317: -1- m4_pattern_allow([^HAVE_PGSQL$]) m4trace:configure.in:345: -1- CYRUS_SQLITE_CHK([]) m4trace:configure.in:345: -1- CYRUS_SQLITE_OPTS m4trace:configure.in:345: -1- CYRUS_SQLITE_CHK_LIB([]) m4trace:configure.in:345: -1- CMU_ADD_LIBPATH_TO([$with_sqlite_lib], [LDFLAGS]) m4trace:configure.in:345: -1- CMU_ADD_LIBPATH_TO([$with_sqlite_lib], [SQLITE_LIBADD]) m4trace:configure.in:345: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2687: AC_TRY_LINK is expanded from... cmulocal/sql.m4:164: CYRUS_SQLITE_CHK_LIB is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/headers.m4:129: _AC_CHECK_HEADER_MONGREL is expanded from... ../../lib/autoconf/headers.m4:67: AC_CHECK_HEADER is expanded from... cmulocal/sql.m4:203: CYRUS_SQLITE_CHK is expanded from... configure.in:345: the top level]) m4trace:configure.in:348: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:34: AC_ERROR is expanded from... configure.in:348: the top level]) m4trace:configure.in:355: -1- CMU_ADD_LIBPATH([$with_sqlite_lib]) m4trace:configure.in:361: -1- m4_pattern_allow([^HAVE_SQLITE$]) m4trace:configure.in:373: -1- m4_pattern_allow([^CYRUSDB_OBJS$]) m4trace:configure.in:392: -1- m4_pattern_allow([^SIEVE_OBJS$]) m4trace:configure.in:394: -1- m4_pattern_allow([^SIEVE_LIBS$]) m4trace:configure.in:396: -1- m4_pattern_allow([^SIEVE_CPPFLAGS$]) m4trace:configure.in:397: -1- m4_pattern_allow([^USE_SIEVE$]) m4trace:configure.in:400: -1- m4_pattern_allow([^YACC$]) m4trace:configure.in:400: -1- m4_pattern_allow([^YACC$]) m4trace:configure.in:400: -1- m4_pattern_allow([^YFLAGS$]) m4trace:configure.in:401: -1- m4_pattern_allow([^LEX$]) m4trace:configure.in:401: -1- m4_pattern_allow([^LEX_OUTPUT_ROOT$]) m4trace:configure.in:401: -1- m4_pattern_allow([^LEXLIB$]) m4trace:configure.in:401: -1- m4_pattern_allow([^YYTEXT_POINTER$]) m4trace:configure.in:402: -1- m4_pattern_allow([^HAVE_LIBFL$]) m4trace:configure.in:408: -2- _m4_warn([obsolete], [The macro `AC_TRY_CPP' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2529: AC_TRY_CPP is expanded from... configure.in:408: the top level]) m4trace:configure.in:420: -1- m4_pattern_allow([^ENABLE_REGEX$]) m4trace:configure.in:421: -1- m4_pattern_allow([^HAVE_PCREPOSIX_H$]) m4trace:configure.in:423: -1- m4_pattern_allow([^HAVE_RXPOSIX_H$]) m4trace:configure.in:426: -1- m4_pattern_allow([^ENABLE_REGEX$]) m4trace:configure.in:430: -2- m4_pattern_allow([^ENABLE_REGEX$]) m4trace:configure.in:439: -1- m4_pattern_allow([^SIEVE_SUBDIRS$]) m4trace:configure.in:442: -2- m4_pattern_allow([^HAS_STRERROR$]) m4trace:configure.in:443: -2- m4_pattern_allow([^NEED_SYS_ERRLIST$]) m4trace:configure.in:442: -1- _m4_warn([obsolete], [The macro `AC_FUNC_CHECK' is obsolete. You should run autoupdate.], [../../lib/autoconf/functions.m4:155: AC_FUNC_CHECK is expanded from... configure.in:442: the top level]) m4trace:configure.in:446: -1- m4_pattern_allow([^HAVE_SYS_RESOURCE_H$]) m4trace:configure.in:447: -1- m4_pattern_allow([^HAVE_SETRLIMIT$]) m4trace:configure.in:448: -1- m4_pattern_allow([^HAVE_GETRLIMIT$]) m4trace:configure.in:454: -1- m4_pattern_allow([^HAVE_SHUTDOWN$]) m4trace:configure.in:456: -2- m4_pattern_allow([^HAVE_SOCKLEN_T$]) m4trace:configure.in:458: -2- m4_pattern_allow([^HAVE_STRUCT_SOCKADDR_STORAGE$]) m4trace:configure.in:459: -2- m4_pattern_allow([^HAVE_RLIM_T$]) m4trace:configure.in:477: -2- _m4_warn([obsolete], [The macro `AC_TRY_CPP' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2529: AC_TRY_CPP is expanded from... configure.in:477: the top level]) m4trace:configure.in:490: -2- _m4_warn([obsolete], [The macro `AC_TRY_CPP' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2529: AC_TRY_CPP is expanded from... configure.in:490: the top level]) m4trace:configure.in:501: -2- _m4_warn([obsolete], [The macro `AC_TRY_CPP' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2529: AC_TRY_CPP is expanded from... configure.in:501: the top level]) m4trace:configure.in:511: -1- m4_pattern_allow([^SPT_TYPE$]) m4trace:configure.in:515: -2- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2687: AC_TRY_LINK is expanded from... configure.in:515: the top level]) m4trace:configure.in:523: -1- m4_pattern_allow([^WITH_NONBLOCK$]) m4trace:configure.in:527: -2- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2614: AC_TRY_COMPILE is expanded from... configure.in:527: the top level]) m4trace:configure.in:532: -1- m4_pattern_allow([^WITH_GMTOFF$]) m4trace:configure.in:535: -2- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2764: AC_TRY_RUN is expanded from... configure.in:535: the top level]) m4trace:configure.in:566: -2- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2764: AC_TRY_RUN is expanded from... configure.in:566: the top level]) m4trace:configure.in:603: -1- m4_pattern_allow([^WITH_MAP$]) m4trace:configure.in:604: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:34: AC_ERROR is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/functions.m4:59: AC_CHECK_FUNC is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/functions.m4:59: AC_CHECK_FUNC is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/general.m4:1481: AC_ARG_WITH is expanded from... configure.in:604: the top level]) m4trace:configure.in:614: -1- m4_pattern_allow([^WITH_LOCK$]) m4trace:configure.in:618: -2- m4_pattern_allow([^HAVE_FDATASYNC$]) m4trace:configure.in:618: -1- m4_pattern_allow([^HAVE_FDATASYNC$]) m4trace:configure.in:645: -1- m4_pattern_allow([^cyrus_cv_sigveclib$]) m4trace:configure.in:665: -1- SASL_SET_GSSAPI_LIBS m4trace:configure.in:665: -1- m4_pattern_allow([^AFSPTS_USE_KRB5$]) m4trace:configure.in:675: -1- CMU_ADD_LIBPATH_TO([/usr/ucblib], [AFS_LDFLAGS]) m4trace:configure.in:684: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2687: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... configure.in:684: the top level]) m4trace:configure.in:707: -1- m4_pattern_allow([^AFS_LIBS$]) m4trace:configure.in:708: -1- m4_pattern_allow([^AFS_LDFLAGS$]) m4trace:configure.in:709: -1- m4_pattern_allow([^HAVE_AFSKRB$]) m4trace:configure.in:713: -1- m4_pattern_allow([^AFS_LIBS$]) m4trace:configure.in:714: -1- m4_pattern_allow([^AFS_LDFLAGS$]) m4trace:configure.in:715: -1- m4_pattern_allow([^HAVE_AFSKRB$]) m4trace:configure.in:738: -1- m4_pattern_allow([^HAVE_LDAP$]) m4trace:configure.in:738: -1- m4_pattern_allow([^LDAP_CPPFLAGS$]) m4trace:configure.in:738: -1- m4_pattern_allow([^LDAP_LDFLAGS$]) m4trace:configure.in:738: -1- m4_pattern_allow([^LDAP_LIBS$]) m4trace:configure.in:748: -1- m4_pattern_allow([^HAVE_LDAP$]) m4trace:configure.in:748: -1- m4_pattern_allow([^LDAP_CPPFLAGS$]) m4trace:configure.in:748: -1- m4_pattern_allow([^LDAP_LDFLAGS$]) m4trace:configure.in:748: -1- m4_pattern_allow([^LDAP_LIBS$]) m4trace:configure.in:763: -1- m4_pattern_allow([^WITH_PTS$]) m4trace:configure.in:774: -1- m4_pattern_allow([^SERVER_SUBDIRS$]) m4trace:configure.in:792: -1- m4_pattern_allow([^HAVE_LIBRESOLV$]) m4trace:configure.in:829: -1- CMU_ADD_LIBPATH([${with_krb}/lib]) m4trace:configure.in:846: -3- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:33: AC_WARN is expanded from... configure.in:846: the top level]) m4trace:configure.in:848: -2- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:33: AC_WARN is expanded from... configure.in:848: the top level]) m4trace:configure.in:850: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:33: AC_WARN is expanded from... configure.in:850: the top level]) m4trace:configure.in:855: -1- m4_pattern_allow([^HAVE_KRB$]) m4trace:configure.in:860: -1- SASL_SET_GSSAPI_LIBS m4trace:configure.in:893: -1- CMU_ADD_LIBPATH([${OPENSSL_LIBPATH}]) m4trace:configure.in:894: -1- CMU_ADD_LIBPATH_TO([${OPENSSL_LIBPATH}], [OPENSSL_LIB]) m4trace:configure.in:902: -1- m4_pattern_allow([^HAVE_SSL$]) m4trace:configure.in:905: -1- m4_pattern_allow([^OPENSSL_ENABLE_OLD_DES_SUPPORT$]) m4trace:configure.in:906: -1- m4_pattern_allow([^OPENSSL_DES_LIBDES_COMPATIBILITY$]) m4trace:configure.in:909: -1- m4_pattern_allow([^OPENSSL_INC$]) m4trace:configure.in:910: -1- m4_pattern_allow([^OPENSSL_LIB$]) m4trace:configure.in:921: -1- m4_pattern_allow([^EGD_SOCKET$]) m4trace:configure.in:927: -1- CMU_HAVE_ZLIB m4trace:configure.in:927: -1- CMU_FIND_LIB_SUBDIR m4trace:configure.in:927: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... cmulocal/common.m4:42: CMU_FIND_LIB_SUBDIR is expanded from... cmulocal/zlib.m4:6: CMU_HAVE_ZLIB is expanded from... configure.in:927: the top level]) m4trace:configure.in:927: -1- m4_pattern_allow([^SIZEOF_LONG$]) m4trace:configure.in:927: -1- m4_pattern_allow([^CMU_LIB_SUBDIR$]) m4trace:configure.in:927: -1- CMU_ADD_LIBPATH([${with_zlib}/$CMU_LIB_SUBDIR]) m4trace:configure.in:927: -1- m4_pattern_allow([^HAVE_ZLIB$]) m4trace:configure.in:930: -1- m4_pattern_allow([^ZLIB$]) m4trace:configure.in:951: -1- m4_pattern_allow([^ZEPHYR_LIBS$]) m4trace:configure.in:953: -1- m4_pattern_allow([^HAVE_ZEPHYR$]) m4trace:configure.in:963: -1- m4_pattern_allow([^MASTER_PIDFILE$]) m4trace:configure.in:996: -1- m4_pattern_allow([^HAVE_SYS_SOCKIO_H$]) m4trace:configure.in:1010: -1- m4_pattern_allow([^IMAP_PROGS$]) m4trace:configure.in:1024: -1- m4_pattern_allow([^HAVE_ET_COM_ERR_H$]) m4trace:configure.in:1024: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:34: AC_ERROR is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/headers.m4:129: _AC_CHECK_HEADER_MONGREL is expanded from... ../../lib/autoconf/headers.m4:67: AC_CHECK_HEADER is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/headers.m4:129: _AC_CHECK_HEADER_MONGREL is expanded from... ../../lib/autoconf/headers.m4:67: AC_CHECK_HEADER is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/libs.m4:99: AC_CHECK_LIB is expanded from... configure.in:1024: the top level]) m4trace:configure.in:1024: -1- m4_pattern_allow([^COMPILE_ET$]) m4trace:configure.in:1024: -1- m4_pattern_allow([^COMPILE_ET$]) m4trace:configure.in:1024: -1- m4_pattern_allow([^COMPILE_ET$]) m4trace:configure.in:1119: -1- m4_pattern_allow([^COMPILE_ET$]) m4trace:configure.in:1120: -1- m4_pattern_allow([^COM_ERR_LIBS$]) m4trace:configure.in:1121: -1- m4_pattern_allow([^COM_ERR_LDFLAGS$]) m4trace:configure.in:1122: -1- m4_pattern_allow([^COM_ERR_CPPFLAGS$]) m4trace:configure.in:1125: -2- _m4_warn([obsolete], [The macro `AC_TRY_CPP' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2529: AC_TRY_CPP is expanded from... configure.in:1125: the top level]) m4trace:configure.in:1143: -1- m4_pattern_allow([^SYSLOG_FACILITY$]) m4trace:configure.in:1147: -1- m4_pattern_allow([^HAVE_GETDTABLESIZE$]) m4trace:configure.in:1147: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.in:1160: -2- m4_pattern_allow([^OLD_SIEVE_SERVICE_NAME$]) m4trace:configure.in:1170: -2- m4_pattern_allow([^ENABLE_X_NETSCAPE_HACK$]) m4trace:configure.in:1173: -1- m4_pattern_allow([^HAVE_LIBDL$]) m4trace:configure.in:1174: -1- CMU_SASL2_REQUIRE_VER([2], [1], [7]) m4trace:configure.in:1174: -1- CMU_SASL2_REQUIRED m4trace:configure.in:1174: -1- CMU_SASL2 m4trace:configure.in:1174: -1- SASL_GSSAPI_CHK m4trace:configure.in:1174: -1- SASL2_CRYPT_CHK m4trace:configure.in:1174: -1- m4_pattern_allow([^LIB_CRYPT$]) m4trace:configure.in:1174: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... ../../lib/autoconf/general.m4:1462: AC_ARG_ENABLE is expanded from... cmulocal/sasl2.m4:7: SASL_GSSAPI_CHK is expanded from... cmulocal/sasl2.m4:289: CMU_SASL2 is expanded from... cmulocal/sasl2.m4:410: CMU_SASL2_REQUIRED is expanded from... cmulocal/sasl2.m4:420: CMU_SASL2_REQUIRE_VER is expanded from... configure.in:1174: the top level]) m4trace:configure.in:1174: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... ../../lib/autoconf/general.m4:1481: AC_ARG_WITH is expanded from... cmulocal/sasl2.m4:7: SASL_GSSAPI_CHK is expanded from... cmulocal/sasl2.m4:289: CMU_SASL2 is expanded from... cmulocal/sasl2.m4:410: CMU_SASL2_REQUIRED is expanded from... cmulocal/sasl2.m4:420: CMU_SASL2_REQUIRE_VER is expanded from... configure.in:1174: the top level]) m4trace:configure.in:1174: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:33: AC_WARN is expanded from... cmulocal/sasl2.m4:7: SASL_GSSAPI_CHK is expanded from... cmulocal/sasl2.m4:289: CMU_SASL2 is expanded from... cmulocal/sasl2.m4:410: CMU_SASL2_REQUIRED is expanded from... cmulocal/sasl2.m4:420: CMU_SASL2_REQUIRE_VER is expanded from... configure.in:1174: the top level]) m4trace:configure.in:1174: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:34: AC_ERROR is expanded from... cmulocal/sasl2.m4:7: SASL_GSSAPI_CHK is expanded from... cmulocal/sasl2.m4:289: CMU_SASL2 is expanded from... cmulocal/sasl2.m4:410: CMU_SASL2_REQUIRED is expanded from... cmulocal/sasl2.m4:420: CMU_SASL2_REQUIRE_VER is expanded from... configure.in:1174: the top level]) m4trace:configure.in:1174: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:33: AC_WARN is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/headers.m4:129: _AC_CHECK_HEADER_MONGREL is expanded from... ../../lib/autoconf/headers.m4:67: AC_CHECK_HEADER is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/headers.m4:129: _AC_CHECK_HEADER_MONGREL is expanded from... ../../lib/autoconf/headers.m4:67: AC_CHECK_HEADER is expanded from... cmulocal/sasl2.m4:7: SASL_GSSAPI_CHK is expanded from... cmulocal/sasl2.m4:289: CMU_SASL2 is expanded from... cmulocal/sasl2.m4:410: CMU_SASL2_REQUIRED is expanded from... cmulocal/sasl2.m4:420: CMU_SASL2_REQUIRE_VER is expanded from... configure.in:1174: the top level]) m4trace:configure.in:1174: -1- m4_pattern_allow([^HAVE_GSSAPI_H$]) m4trace:configure.in:1174: -1- m4_pattern_allow([^HAVE_LIBRESOLV$]) m4trace:configure.in:1174: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:33: AC_WARN is expanded from... cmulocal/sasl2.m4:7: SASL_GSSAPI_CHK is expanded from... cmulocal/sasl2.m4:289: CMU_SASL2 is expanded from... cmulocal/sasl2.m4:410: CMU_SASL2_REQUIRED is expanded from... cmulocal/sasl2.m4:420: CMU_SASL2_REQUIRE_VER is expanded from... configure.in:1174: the top level]) m4trace:configure.in:1174: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:33: AC_WARN is expanded from... cmulocal/sasl2.m4:7: SASL_GSSAPI_CHK is expanded from... cmulocal/sasl2.m4:289: CMU_SASL2 is expanded from... cmulocal/sasl2.m4:410: CMU_SASL2_REQUIRED is expanded from... cmulocal/sasl2.m4:420: CMU_SASL2_REQUIRE_VER is expanded from... configure.in:1174: the top level]) m4trace:configure.in:1174: -1- m4_pattern_allow([^HAVE_GSS_C_NT_HOSTBASED_SERVICE$]) m4trace:configure.in:1174: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:33: AC_WARN is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/general.m4:2538: AC_EGREP_CPP is expanded from... cmulocal/sasl2.m4:7: SASL_GSSAPI_CHK is expanded from... cmulocal/sasl2.m4:289: CMU_SASL2 is expanded from... cmulocal/sasl2.m4:410: CMU_SASL2_REQUIRED is expanded from... cmulocal/sasl2.m4:420: CMU_SASL2_REQUIRE_VER is expanded from... configure.in:1174: the top level]) m4trace:configure.in:1174: -1- m4_pattern_allow([^HAVE_GSS_C_NT_HOSTBASED_SERVICE$]) m4trace:configure.in:1174: -1- m4_pattern_allow([^HAVE_GSS_C_NT_HOSTBASED_SERVICE$]) m4trace:configure.in:1174: -1- m4_pattern_allow([^HAVE_GSS_C_NT_USER_NAME$]) m4trace:configure.in:1174: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:33: AC_WARN is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/general.m4:2538: AC_EGREP_CPP is expanded from... cmulocal/sasl2.m4:7: SASL_GSSAPI_CHK is expanded from... cmulocal/sasl2.m4:289: CMU_SASL2 is expanded from... cmulocal/sasl2.m4:410: CMU_SASL2_REQUIRED is expanded from... cmulocal/sasl2.m4:420: CMU_SASL2_REQUIRE_VER is expanded from... configure.in:1174: the top level]) m4trace:configure.in:1174: -1- m4_pattern_allow([^HAVE_GSS_C_NT_USER_NAME$]) m4trace:configure.in:1174: -1- m4_pattern_allow([^HAVE_GSS_C_NT_USER_NAME$]) m4trace:configure.in:1174: -1- m4_pattern_allow([^HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY$]) m4trace:configure.in:1174: -1- m4_pattern_allow([^GSSAPI_LIBS$]) m4trace:configure.in:1174: -1- m4_pattern_allow([^GSSAPIBASE_LIBS$]) m4trace:configure.in:1174: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... ../../lib/autoconf/general.m4:1481: AC_ARG_WITH is expanded from... cmulocal/sasl2.m4:289: CMU_SASL2 is expanded from... cmulocal/sasl2.m4:410: CMU_SASL2_REQUIRED is expanded from... cmulocal/sasl2.m4:420: CMU_SASL2_REQUIRE_VER is expanded from... configure.in:1174: the top level]) m4trace:configure.in:1174: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... ../../lib/autoconf/general.m4:1481: AC_ARG_WITH is expanded from... cmulocal/sasl2.m4:289: CMU_SASL2 is expanded from... cmulocal/sasl2.m4:410: CMU_SASL2_REQUIRED is expanded from... cmulocal/sasl2.m4:420: CMU_SASL2_REQUIRE_VER is expanded from... configure.in:1174: the top level]) m4trace:configure.in:1174: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:34: AC_ERROR is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/headers.m4:129: _AC_CHECK_HEADER_MONGREL is expanded from... ../../lib/autoconf/headers.m4:67: AC_CHECK_HEADER is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/headers.m4:129: _AC_CHECK_HEADER_MONGREL is expanded from... ../../lib/autoconf/headers.m4:67: AC_CHECK_HEADER is expanded from... cmulocal/sasl2.m4:289: CMU_SASL2 is expanded from... cmulocal/sasl2.m4:410: CMU_SASL2_REQUIRED is expanded from... cmulocal/sasl2.m4:420: CMU_SASL2_REQUIRE_VER is expanded from... configure.in:1174: the top level]) m4trace:configure.in:1174: -1- CMU_ADD_LIBPATH_TO([$ac_cv_sasl_where_lib], [LIB_DYN_SASL]) m4trace:configure.in:1174: -1- CMU_ADD_LIBPATH_TO([$ac_cv_sasl_where_lib], [DYNLIB_SASL]) m4trace:configure.in:1174: -1- m4_pattern_allow([^LIB_DYN_SASL$]) m4trace:configure.in:1174: -1- m4_pattern_allow([^DYNSASLFLAGS$]) m4trace:configure.in:1174: -1- m4_pattern_allow([^LIB_SASL$]) m4trace:configure.in:1174: -1- m4_pattern_allow([^SASLFLAGS$]) m4trace:configure.in:1174: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:34: AC_ERROR is expanded from... cmulocal/sasl2.m4:410: CMU_SASL2_REQUIRED is expanded from... cmulocal/sasl2.m4:420: CMU_SASL2_REQUIRE_VER is expanded from... configure.in:1174: the top level]) m4trace:configure.in:1174: -1- _m4_warn([obsolete], [The macro `AC_TRY_CPP' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2529: AC_TRY_CPP is expanded from... cmulocal/sasl2.m4:420: CMU_SASL2_REQUIRE_VER is expanded from... configure.in:1174: the top level]) m4trace:configure.in:1174: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:34: AC_ERROR is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/general.m4:2503: _AC_PREPROC_IFELSE is expanded from... ../../lib/autoconf/general.m4:2518: AC_PREPROC_IFELSE is expanded from... ../../lib/autoconf/general.m4:2529: AC_TRY_CPP is expanded from... cmulocal/sasl2.m4:420: CMU_SASL2_REQUIRE_VER is expanded from... configure.in:1174: the top level]) m4trace:configure.in:1175: -1- CMU_SASL2_CHECKAPOP_REQUIRED m4trace:configure.in:1175: -1- m4_pattern_allow([^HAVE_APOP$]) m4trace:configure.in:1188: -1- m4_pattern_allow([^PERL$]) m4trace:configure.in:1207: -1- m4_pattern_allow([^PERL_CCCDLFLAGS$]) m4trace:configure.in:1232: -1- m4_pattern_allow([^SNMP_SUBDIRS$]) m4trace:configure.in:1234: -1- CMU_LIBWRAP m4trace:configure.in:1234: -1- m4_pattern_allow([^HAVE_LIBWRAP$]) m4trace:configure.in:1234: -1- m4_pattern_allow([^LIB_WRAP$]) m4trace:configure.in:1235: -1- CMU_UCDSNMP m4trace:configure.in:1235: -1- m4_pattern_allow([^SNMP_CONFIG$]) m4trace:configure.in:1235: -1- m4_pattern_allow([^HAVE_NETSNMP$]) m4trace:configure.in:1235: -1- m4_pattern_allow([^LIB_UCDSNMP$]) m4trace:configure.in:1235: -1- m4_pattern_allow([^HAVE_NET_SNMP_AGENT_AGENT_MODULE_CONFIG_H$]) m4trace:configure.in:1235: -1- m4_pattern_allow([^HAVE_UCDSNMP$]) m4trace:configure.in:1235: -1- m4_pattern_allow([^LIB_UCDSNMP$]) m4trace:configure.in:1270: -1- m4_pattern_allow([^LIB_RT$]) m4trace:configure.in:1271: -1- m4_pattern_allow([^IMAP_COM_ERR_LIBS$]) m4trace:configure.in:1272: -1- m4_pattern_allow([^IMAP_LIBS$]) m4trace:configure.in:1280: -1- m4_pattern_allow([^PERL_SUBDIRS$]) m4trace:configure.in:1281: -1- m4_pattern_allow([^PERL_DEPSUBDIRS$]) m4trace:configure.in:1282: -1- m4_pattern_allow([^PERL$]) m4trace:configure.in:1499: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments. You should run autoupdate.], []) m4trace:configure.in:1499: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.in:1499: -1- m4_pattern_allow([^LTLIBOBJS$]) cyrus-imapd-2.4.18/autom4te.cache/requests0000644000175000017500000001736312546375260017437 0ustar ellieellie# This file was generated by Autom4te Sun Apr 29 21:48:16 UTC 2012. # It contains the lists of macros which have been traced. # It can be safely removed. @request = ( bless( [ '0', 1, [ '/usr/share/autoconf' ], [ '/usr/share/autoconf/autoconf/autoconf.m4f', 'cmulocal/afs.m4', 'cmulocal/berkdb.m4', 'cmulocal/bsd_sockets.m4', 'cmulocal/c-attribute.m4', 'cmulocal/c-fpic.m4', 'cmulocal/common.m4', 'cmulocal/cyrus.m4', 'cmulocal/ipv6.m4', 'cmulocal/kerberos_v4.m4', 'cmulocal/libssl.m4', 'cmulocal/libwrap.m4', 'cmulocal/sasl2.m4', 'cmulocal/sql.m4', 'cmulocal/ucdsnmp.m4', 'cmulocal/zlib.m4', 'configure.in' ], { 'CMU_KRB_RD_REQ_PROTO' => 1, 'm4_pattern_forbid' => 1, 'CMU_USE_DB' => 1, 'CMU_DB_LIB_WHERE' => 1, 'CMU_FIND_LIB_SUBDIR' => 1, 'AC_DEFUN' => 1, 'CYRUS_PGSQL_CHK_LIB' => 1, 'CMU_SOCKETS' => 1, 'CMU_LIBSSL_LIB_WHERE1' => 1, 'CMU_ADD_LIBPATH_TO' => 1, 'CMU_DB3_LIB_WHERE1' => 1, 'CMU_KRB4_32_DEFN' => 1, '_m4_warn' => 1, 'CMU_AFS_LIB_WHERE1' => 1, 'CMU_LIBSSL_LIB_WHERE' => 1, 'CMU_SASL2_REQUIRED' => 1, 'CYRUS_BERKELEY_DB_CHK_LIB' => 1, 'CMU_HAVE_ZLIB' => 1, 'CYRUS_PGSQL_OPTS' => 1, 'CMU_TEST_LIBPATH' => 1, 'CMU_SASL2_REQUIRE_VER' => 1, 'CMU_KRB_INC_WHERE' => 1, 'CMU_AFS_INC_WHERE1' => 1, 'CMU_LIBSSL_INC_WHERE' => 1, 'IPv6_CHECK_FUNC' => 1, 'CYRUS_SQLITE_OPTS' => 1, 'SASL2_CRYPT_CHK' => 1, 'm4_pattern_allow' => 1, '_AM_AUTOCONF_VERSION' => 1, 'CMU_KRB_SET_KEY_PROTO' => 1, 'CMU_GUESS_RUNPATH_SWITCH' => 1, 'CMU_KRB_INC_WHERE1' => 1, 'CYRUS_MYSQL_CHK' => 1, 'CYRUS_BERKELEY_DB_OPTS' => 1, 'AU_DEFUN' => 1, 'IPv6_CHECK_SOCKLEN_T' => 1, 'CMU_AFS' => 1, 'CMU_LIBSSL' => 1, 'IPv6_CHECK_SA_LEN' => 1, 'CYRUS_MYSQL_OPTS' => 1, 'CMU_DB_INC_WHERE' => 1, 'CMU_UCDSNMP' => 1, 'CMU_DB4_LIB_WHERE1' => 1, 'SASL_SET_GSSAPI_LIBS' => 1, 'CYRUS_SQLITE_CHK' => 1, 'IPv6_CHECK_SS_FAMILY' => 1, 'CMU_KRB_LIB_WHERE' => 1, 'CMU_KRB_SENDAUTH_PROTO' => 1, 'AC_DEFUN_ONCE' => 1, 'CMU_SASL2' => 1, 'CMU_AFS_WHERE' => 1, 'CMU_LIBSSL_INC_WHERE1' => 1, 'CMU_DB_INC_WHERE1' => 1, 'CMU_C___ATTRIBUTE__' => 1, 'CMU_LIBWRAP' => 1, 'include' => 1, 'CYRUS_MYSQL_CHK_LIB' => 1, 'CMU_SASL2_CHECKAPOP_REQUIRED' => 1, 'CMU_KRB_LIB_WHERE1' => 1, 'CMU_C_FPIC' => 1, 'CMU_TEST_INCPATH' => 1, 'CMU_ADD_LIBPATH' => 1, 'CMU_KRB4' => 1, 'SASL_GSSAPI_CHK' => 1, 'CMU_CHECK_HEADER_NOCACHE' => 1, 'CYRUS_BERKELEY_DB_CHK' => 1, 'CYRUS_PGSQL_CHK' => 1, 'm4_include' => 1, 'CMU_NEEDS_AFS' => 1, 'CYRUS_SQLITE_CHK_LIB' => 1 } ], 'Autom4te::Request' ), bless( [ '1', 1, [ '/usr/share/autoconf' ], [ '/usr/share/autoconf/autoconf/autoconf.m4f', 'aclocal.m4', 'configure.in' ], { 'AM_PROG_F77_C_O' => 1, '_LT_AC_TAGCONFIG' => 1, 'm4_pattern_forbid' => 1, 'AC_INIT' => 1, 'AC_CANONICAL_TARGET' => 1, '_AM_COND_IF' => 1, 'AC_CONFIG_LIBOBJ_DIR' => 1, 'AC_SUBST' => 1, 'AC_CANONICAL_HOST' => 1, 'AC_FC_SRCEXT' => 1, 'AC_PROG_LIBTOOL' => 1, 'AM_INIT_AUTOMAKE' => 1, 'AC_CONFIG_SUBDIRS' => 1, 'AM_PATH_GUILE' => 1, 'AM_AUTOMAKE_VERSION' => 1, 'LT_CONFIG_LTDL_DIR' => 1, 'AC_CONFIG_LINKS' => 1, 'AC_REQUIRE_AUX_FILE' => 1, 'LT_SUPPORTED_TAG' => 1, 'm4_sinclude' => 1, 'AM_MAINTAINER_MODE' => 1, 'AM_NLS' => 1, 'AC_FC_PP_DEFINE' => 1, 'AM_GNU_GETTEXT_INTL_SUBDIR' => 1, '_m4_warn' => 1, 'AM_MAKEFILE_INCLUDE' => 1, 'AM_PROG_CXX_C_O' => 1, '_AM_MAKEFILE_INCLUDE' => 1, '_AM_COND_ENDIF' => 1, 'AM_ENABLE_MULTILIB' => 1, 'AM_SILENT_RULES' => 1, 'AM_PROG_MOC' => 1, 'AC_CONFIG_FILES' => 1, 'LT_INIT' => 1, 'include' => 1, 'AM_GNU_GETTEXT' => 1, 'AM_PROG_AR' => 1, 'AC_LIBSOURCE' => 1, 'AC_CANONICAL_BUILD' => 1, 'AM_PROG_FC_C_O' => 1, 'AC_FC_FREEFORM' => 1, 'AC_FC_PP_SRCEXT' => 1, 'AH_OUTPUT' => 1, 'AC_CONFIG_AUX_DIR' => 1, '_AM_SUBST_NOTMAKE' => 1, 'm4_pattern_allow' => 1, 'AM_PROG_CC_C_O' => 1, 'sinclude' => 1, 'AM_CONDITIONAL' => 1, 'AC_CANONICAL_SYSTEM' => 1, 'AM_XGETTEXT_OPTION' => 1, 'AC_CONFIG_HEADERS' => 1, 'AC_DEFINE_TRACE_LITERAL' => 1, 'AM_POT_TOOLS' => 1, 'm4_include' => 1, '_AM_COND_ELSE' => 1, 'AC_SUBST_TRACE' => 1 } ], 'Autom4te::Request' ) ); cyrus-imapd-2.4.18/autom4te.cache/traces.10000644000175000017500000026623012546375257017211 0ustar ellieelliem4trace:aclocal.m4:15: -1- m4_include([cmulocal/berkdb.m4]) m4trace:aclocal.m4:16: -1- m4_include([cmulocal/bsd_sockets.m4]) m4trace:aclocal.m4:17: -1- m4_include([cmulocal/c-attribute.m4]) m4trace:aclocal.m4:18: -1- m4_include([cmulocal/c-fpic.m4]) m4trace:aclocal.m4:19: -1- m4_include([cmulocal/common.m4]) m4trace:aclocal.m4:20: -1- m4_include([cmulocal/cyrus.m4]) m4trace:aclocal.m4:21: -1- m4_include([cmulocal/ipv6.m4]) m4trace:aclocal.m4:22: -1- m4_include([cmulocal/libwrap.m4]) m4trace:aclocal.m4:23: -1- m4_include([cmulocal/sasl2.m4]) m4trace:aclocal.m4:24: -1- m4_include([cmulocal/sql.m4]) m4trace:aclocal.m4:25: -1- m4_include([cmulocal/ucdsnmp.m4]) m4trace:aclocal.m4:26: -1- m4_include([cmulocal/zlib.m4]) m4trace:configure.in:49: -1- AC_INIT([imap/imapd.c]) m4trace:configure.in:49: -1- m4_pattern_forbid([^_?A[CHUM]_]) m4trace:configure.in:49: -1- m4_pattern_forbid([_AC_]) m4trace:configure.in:49: -1- m4_pattern_forbid([^LIBOBJS$], [do not use LIBOBJS directly, use AC_LIBOBJ (see section `AC_LIBOBJ vs LIBOBJS']) m4trace:configure.in:49: -1- m4_pattern_allow([^AS_FLAGS$]) m4trace:configure.in:49: -1- m4_pattern_forbid([^_?m4_]) m4trace:configure.in:49: -1- m4_pattern_forbid([^dnl$]) m4trace:configure.in:49: -1- m4_pattern_forbid([^_?AS_]) m4trace:configure.in:49: -1- AC_SUBST([SHELL]) m4trace:configure.in:49: -1- AC_SUBST_TRACE([SHELL]) m4trace:configure.in:49: -1- m4_pattern_allow([^SHELL$]) m4trace:configure.in:49: -1- AC_SUBST([PATH_SEPARATOR]) m4trace:configure.in:49: -1- AC_SUBST_TRACE([PATH_SEPARATOR]) m4trace:configure.in:49: -1- m4_pattern_allow([^PATH_SEPARATOR$]) m4trace:configure.in:49: -1- AC_SUBST([PACKAGE_NAME], [m4_ifdef([AC_PACKAGE_NAME], ['AC_PACKAGE_NAME'])]) m4trace:configure.in:49: -1- AC_SUBST_TRACE([PACKAGE_NAME]) m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_NAME$]) m4trace:configure.in:49: -1- AC_SUBST([PACKAGE_TARNAME], [m4_ifdef([AC_PACKAGE_TARNAME], ['AC_PACKAGE_TARNAME'])]) m4trace:configure.in:49: -1- AC_SUBST_TRACE([PACKAGE_TARNAME]) m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) m4trace:configure.in:49: -1- AC_SUBST([PACKAGE_VERSION], [m4_ifdef([AC_PACKAGE_VERSION], ['AC_PACKAGE_VERSION'])]) m4trace:configure.in:49: -1- AC_SUBST_TRACE([PACKAGE_VERSION]) m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_VERSION$]) m4trace:configure.in:49: -1- AC_SUBST([PACKAGE_STRING], [m4_ifdef([AC_PACKAGE_STRING], ['AC_PACKAGE_STRING'])]) m4trace:configure.in:49: -1- AC_SUBST_TRACE([PACKAGE_STRING]) m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_STRING$]) m4trace:configure.in:49: -1- AC_SUBST([PACKAGE_BUGREPORT], [m4_ifdef([AC_PACKAGE_BUGREPORT], ['AC_PACKAGE_BUGREPORT'])]) m4trace:configure.in:49: -1- AC_SUBST_TRACE([PACKAGE_BUGREPORT]) m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) m4trace:configure.in:49: -1- AC_SUBST([PACKAGE_URL], [m4_ifdef([AC_PACKAGE_URL], ['AC_PACKAGE_URL'])]) m4trace:configure.in:49: -1- AC_SUBST_TRACE([PACKAGE_URL]) m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_URL$]) m4trace:configure.in:49: -1- AC_SUBST([exec_prefix], [NONE]) m4trace:configure.in:49: -1- AC_SUBST_TRACE([exec_prefix]) m4trace:configure.in:49: -1- m4_pattern_allow([^exec_prefix$]) m4trace:configure.in:49: -1- AC_SUBST([prefix], [NONE]) m4trace:configure.in:49: -1- AC_SUBST_TRACE([prefix]) m4trace:configure.in:49: -1- m4_pattern_allow([^prefix$]) m4trace:configure.in:49: -1- AC_SUBST([program_transform_name], [s,x,x,]) m4trace:configure.in:49: -1- AC_SUBST_TRACE([program_transform_name]) m4trace:configure.in:49: -1- m4_pattern_allow([^program_transform_name$]) m4trace:configure.in:49: -1- AC_SUBST([bindir], ['${exec_prefix}/bin']) m4trace:configure.in:49: -1- AC_SUBST_TRACE([bindir]) m4trace:configure.in:49: -1- m4_pattern_allow([^bindir$]) m4trace:configure.in:49: -1- AC_SUBST([sbindir], ['${exec_prefix}/sbin']) m4trace:configure.in:49: -1- AC_SUBST_TRACE([sbindir]) m4trace:configure.in:49: -1- m4_pattern_allow([^sbindir$]) m4trace:configure.in:49: -1- AC_SUBST([libexecdir], ['${exec_prefix}/libexec']) m4trace:configure.in:49: -1- AC_SUBST_TRACE([libexecdir]) m4trace:configure.in:49: -1- m4_pattern_allow([^libexecdir$]) m4trace:configure.in:49: -1- AC_SUBST([datarootdir], ['${prefix}/share']) m4trace:configure.in:49: -1- AC_SUBST_TRACE([datarootdir]) m4trace:configure.in:49: -1- m4_pattern_allow([^datarootdir$]) m4trace:configure.in:49: -1- AC_SUBST([datadir], ['${datarootdir}']) m4trace:configure.in:49: -1- AC_SUBST_TRACE([datadir]) m4trace:configure.in:49: -1- m4_pattern_allow([^datadir$]) m4trace:configure.in:49: -1- AC_SUBST([sysconfdir], ['${prefix}/etc']) m4trace:configure.in:49: -1- AC_SUBST_TRACE([sysconfdir]) m4trace:configure.in:49: -1- m4_pattern_allow([^sysconfdir$]) m4trace:configure.in:49: -1- AC_SUBST([sharedstatedir], ['${prefix}/com']) m4trace:configure.in:49: -1- AC_SUBST_TRACE([sharedstatedir]) m4trace:configure.in:49: -1- m4_pattern_allow([^sharedstatedir$]) m4trace:configure.in:49: -1- AC_SUBST([localstatedir], ['${prefix}/var']) m4trace:configure.in:49: -1- AC_SUBST_TRACE([localstatedir]) m4trace:configure.in:49: -1- m4_pattern_allow([^localstatedir$]) m4trace:configure.in:49: -1- AC_SUBST([includedir], ['${prefix}/include']) m4trace:configure.in:49: -1- AC_SUBST_TRACE([includedir]) m4trace:configure.in:49: -1- m4_pattern_allow([^includedir$]) m4trace:configure.in:49: -1- AC_SUBST([oldincludedir], ['/usr/include']) m4trace:configure.in:49: -1- AC_SUBST_TRACE([oldincludedir]) m4trace:configure.in:49: -1- m4_pattern_allow([^oldincludedir$]) m4trace:configure.in:49: -1- AC_SUBST([docdir], [m4_ifset([AC_PACKAGE_TARNAME], ['${datarootdir}/doc/${PACKAGE_TARNAME}'], ['${datarootdir}/doc/${PACKAGE}'])]) m4trace:configure.in:49: -1- AC_SUBST_TRACE([docdir]) m4trace:configure.in:49: -1- m4_pattern_allow([^docdir$]) m4trace:configure.in:49: -1- AC_SUBST([infodir], ['${datarootdir}/info']) m4trace:configure.in:49: -1- AC_SUBST_TRACE([infodir]) m4trace:configure.in:49: -1- m4_pattern_allow([^infodir$]) m4trace:configure.in:49: -1- AC_SUBST([htmldir], ['${docdir}']) m4trace:configure.in:49: -1- AC_SUBST_TRACE([htmldir]) m4trace:configure.in:49: -1- m4_pattern_allow([^htmldir$]) m4trace:configure.in:49: -1- AC_SUBST([dvidir], ['${docdir}']) m4trace:configure.in:49: -1- AC_SUBST_TRACE([dvidir]) m4trace:configure.in:49: -1- m4_pattern_allow([^dvidir$]) m4trace:configure.in:49: -1- AC_SUBST([pdfdir], ['${docdir}']) m4trace:configure.in:49: -1- AC_SUBST_TRACE([pdfdir]) m4trace:configure.in:49: -1- m4_pattern_allow([^pdfdir$]) m4trace:configure.in:49: -1- AC_SUBST([psdir], ['${docdir}']) m4trace:configure.in:49: -1- AC_SUBST_TRACE([psdir]) m4trace:configure.in:49: -1- m4_pattern_allow([^psdir$]) m4trace:configure.in:49: -1- AC_SUBST([libdir], ['${exec_prefix}/lib']) m4trace:configure.in:49: -1- AC_SUBST_TRACE([libdir]) m4trace:configure.in:49: -1- m4_pattern_allow([^libdir$]) m4trace:configure.in:49: -1- AC_SUBST([localedir], ['${datarootdir}/locale']) m4trace:configure.in:49: -1- AC_SUBST_TRACE([localedir]) m4trace:configure.in:49: -1- m4_pattern_allow([^localedir$]) m4trace:configure.in:49: -1- AC_SUBST([mandir], ['${datarootdir}/man']) m4trace:configure.in:49: -1- AC_SUBST_TRACE([mandir]) m4trace:configure.in:49: -1- m4_pattern_allow([^mandir$]) m4trace:configure.in:49: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_NAME]) m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_NAME$]) m4trace:configure.in:49: -1- AH_OUTPUT([PACKAGE_NAME], [/* Define to the full name of this package. */ @%:@undef PACKAGE_NAME]) m4trace:configure.in:49: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_TARNAME]) m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_TARNAME$]) m4trace:configure.in:49: -1- AH_OUTPUT([PACKAGE_TARNAME], [/* Define to the one symbol short name of this package. */ @%:@undef PACKAGE_TARNAME]) m4trace:configure.in:49: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_VERSION]) m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_VERSION$]) m4trace:configure.in:49: -1- AH_OUTPUT([PACKAGE_VERSION], [/* Define to the version of this package. */ @%:@undef PACKAGE_VERSION]) m4trace:configure.in:49: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_STRING]) m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_STRING$]) m4trace:configure.in:49: -1- AH_OUTPUT([PACKAGE_STRING], [/* Define to the full name and version of this package. */ @%:@undef PACKAGE_STRING]) m4trace:configure.in:49: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_BUGREPORT]) m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_BUGREPORT$]) m4trace:configure.in:49: -1- AH_OUTPUT([PACKAGE_BUGREPORT], [/* Define to the address where bug reports for this package should be sent. */ @%:@undef PACKAGE_BUGREPORT]) m4trace:configure.in:49: -1- AC_DEFINE_TRACE_LITERAL([PACKAGE_URL]) m4trace:configure.in:49: -1- m4_pattern_allow([^PACKAGE_URL$]) m4trace:configure.in:49: -1- AH_OUTPUT([PACKAGE_URL], [/* Define to the home page for this package. */ @%:@undef PACKAGE_URL]) m4trace:configure.in:49: -1- AC_SUBST([DEFS]) m4trace:configure.in:49: -1- AC_SUBST_TRACE([DEFS]) m4trace:configure.in:49: -1- m4_pattern_allow([^DEFS$]) m4trace:configure.in:49: -1- AC_SUBST([ECHO_C]) m4trace:configure.in:49: -1- AC_SUBST_TRACE([ECHO_C]) m4trace:configure.in:49: -1- m4_pattern_allow([^ECHO_C$]) m4trace:configure.in:49: -1- AC_SUBST([ECHO_N]) m4trace:configure.in:49: -1- AC_SUBST_TRACE([ECHO_N]) m4trace:configure.in:49: -1- m4_pattern_allow([^ECHO_N$]) m4trace:configure.in:49: -1- AC_SUBST([ECHO_T]) m4trace:configure.in:49: -1- AC_SUBST_TRACE([ECHO_T]) m4trace:configure.in:49: -1- m4_pattern_allow([^ECHO_T$]) m4trace:configure.in:49: -1- AC_SUBST([LIBS]) m4trace:configure.in:49: -1- AC_SUBST_TRACE([LIBS]) m4trace:configure.in:49: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.in:49: -1- AC_SUBST([build_alias]) m4trace:configure.in:49: -1- AC_SUBST_TRACE([build_alias]) m4trace:configure.in:49: -1- m4_pattern_allow([^build_alias$]) m4trace:configure.in:49: -1- AC_SUBST([host_alias]) m4trace:configure.in:49: -1- AC_SUBST_TRACE([host_alias]) m4trace:configure.in:49: -1- m4_pattern_allow([^host_alias$]) m4trace:configure.in:49: -1- AC_SUBST([target_alias]) m4trace:configure.in:49: -1- AC_SUBST_TRACE([target_alias]) m4trace:configure.in:49: -1- m4_pattern_allow([^target_alias$]) m4trace:configure.in:51: -1- AC_CONFIG_HEADERS([config.h]) m4trace:configure.in:52: -1- AC_CANONICAL_SYSTEM m4trace:configure.in:52: -1- _m4_warn([obsolete], [The macro `AC_CANONICAL_SYSTEM' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:1857: AC_CANONICAL_SYSTEM is expanded from... configure.in:52: the top level]) m4trace:configure.in:52: -1- AC_CANONICAL_TARGET m4trace:configure.in:52: -1- AC_CANONICAL_HOST m4trace:configure.in:52: -1- AC_CANONICAL_BUILD m4trace:configure.in:52: -1- AC_REQUIRE_AUX_FILE([config.sub]) m4trace:configure.in:52: -1- AC_REQUIRE_AUX_FILE([config.guess]) m4trace:configure.in:52: -1- AC_SUBST([build], [$ac_cv_build]) m4trace:configure.in:52: -1- AC_SUBST_TRACE([build]) m4trace:configure.in:52: -1- m4_pattern_allow([^build$]) m4trace:configure.in:52: -1- AC_SUBST([build_cpu], [$[1]]) m4trace:configure.in:52: -1- AC_SUBST_TRACE([build_cpu]) m4trace:configure.in:52: -1- m4_pattern_allow([^build_cpu$]) m4trace:configure.in:52: -1- AC_SUBST([build_vendor], [$[2]]) m4trace:configure.in:52: -1- AC_SUBST_TRACE([build_vendor]) m4trace:configure.in:52: -1- m4_pattern_allow([^build_vendor$]) m4trace:configure.in:52: -1- AC_SUBST([build_os]) m4trace:configure.in:52: -1- AC_SUBST_TRACE([build_os]) m4trace:configure.in:52: -1- m4_pattern_allow([^build_os$]) m4trace:configure.in:52: -1- AC_SUBST([host], [$ac_cv_host]) m4trace:configure.in:52: -1- AC_SUBST_TRACE([host]) m4trace:configure.in:52: -1- m4_pattern_allow([^host$]) m4trace:configure.in:52: -1- AC_SUBST([host_cpu], [$[1]]) m4trace:configure.in:52: -1- AC_SUBST_TRACE([host_cpu]) m4trace:configure.in:52: -1- m4_pattern_allow([^host_cpu$]) m4trace:configure.in:52: -1- AC_SUBST([host_vendor], [$[2]]) m4trace:configure.in:52: -1- AC_SUBST_TRACE([host_vendor]) m4trace:configure.in:52: -1- m4_pattern_allow([^host_vendor$]) m4trace:configure.in:52: -1- AC_SUBST([host_os]) m4trace:configure.in:52: -1- AC_SUBST_TRACE([host_os]) m4trace:configure.in:52: -1- m4_pattern_allow([^host_os$]) m4trace:configure.in:52: -1- AC_SUBST([target], [$ac_cv_target]) m4trace:configure.in:52: -1- AC_SUBST_TRACE([target]) m4trace:configure.in:52: -1- m4_pattern_allow([^target$]) m4trace:configure.in:52: -1- AC_SUBST([target_cpu], [$[1]]) m4trace:configure.in:52: -1- AC_SUBST_TRACE([target_cpu]) m4trace:configure.in:52: -1- m4_pattern_allow([^target_cpu$]) m4trace:configure.in:52: -1- AC_SUBST([target_vendor], [$[2]]) m4trace:configure.in:52: -1- AC_SUBST_TRACE([target_vendor]) m4trace:configure.in:52: -1- m4_pattern_allow([^target_vendor$]) m4trace:configure.in:52: -1- AC_SUBST([target_os]) m4trace:configure.in:52: -1- AC_SUBST_TRACE([target_os]) m4trace:configure.in:52: -1- m4_pattern_allow([^target_os$]) m4trace:configure.in:55: -1- AC_DEFINE_TRACE_LITERAL([EXTRA_IDENT]) m4trace:configure.in:55: -1- m4_pattern_allow([^EXTRA_IDENT$]) m4trace:configure.in:55: -1- AH_OUTPUT([EXTRA_IDENT], [/* Extra version information for imap/version.h */ @%:@undef EXTRA_IDENT]) m4trace:configure.in:58: -1- AC_SUBST([MAKEDEPEND]) m4trace:configure.in:58: -1- AC_SUBST_TRACE([MAKEDEPEND]) m4trace:configure.in:58: -1- m4_pattern_allow([^MAKEDEPEND$]) m4trace:configure.in:63: -2- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:34: AC_ERROR is expanded from... configure.in:63: the top level]) m4trace:configure.in:68: -1- AC_SUBST([cyrus_prefix]) m4trace:configure.in:68: -1- AC_SUBST_TRACE([cyrus_prefix]) m4trace:configure.in:68: -1- m4_pattern_allow([^cyrus_prefix$]) m4trace:configure.in:69: -1- AC_DEFINE_TRACE_LITERAL([CYRUS_PATH]) m4trace:configure.in:69: -1- m4_pattern_allow([^CYRUS_PATH$]) m4trace:configure.in:69: -1- AH_OUTPUT([CYRUS_PATH], [/* Where will we be installed? */ @%:@undef CYRUS_PATH]) m4trace:configure.in:72: -1- AC_SUBST([service_path]) m4trace:configure.in:72: -1- AC_SUBST_TRACE([service_path]) m4trace:configure.in:72: -1- m4_pattern_allow([^service_path$]) m4trace:configure.in:73: -1- AC_DEFINE_TRACE_LITERAL([SERVICE_PATH]) m4trace:configure.in:73: -1- m4_pattern_allow([^SERVICE_PATH$]) m4trace:configure.in:73: -1- AH_OUTPUT([SERVICE_PATH], [/* Directory to use for service binaries */ @%:@undef SERVICE_PATH]) m4trace:configure.in:76: -1- AC_SUBST([cyrus_user]) m4trace:configure.in:76: -1- AC_SUBST_TRACE([cyrus_user]) m4trace:configure.in:76: -1- m4_pattern_allow([^cyrus_user$]) m4trace:configure.in:77: -1- AC_DEFINE_TRACE_LITERAL([CYRUS_USER]) m4trace:configure.in:77: -1- m4_pattern_allow([^CYRUS_USER$]) m4trace:configure.in:77: -1- AH_OUTPUT([CYRUS_USER], [/* What user will we run as? */ @%:@undef CYRUS_USER]) m4trace:configure.in:80: -1- AC_SUBST([cyrus_group]) m4trace:configure.in:80: -1- AC_SUBST_TRACE([cyrus_group]) m4trace:configure.in:80: -1- m4_pattern_allow([^cyrus_group$]) m4trace:configure.in:87: -1- AC_DEFINE_TRACE_LITERAL([SYSCONFDIR]) m4trace:configure.in:87: -1- m4_pattern_allow([^SYSCONFDIR$]) m4trace:configure.in:87: -1- AH_OUTPUT([SYSCONFDIR], [/* Config File Location */ @%:@undef SYSCONFDIR]) m4trace:configure.in:89: -1- AC_SUBST([CC]) m4trace:configure.in:89: -1- AC_SUBST_TRACE([CC]) m4trace:configure.in:89: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:89: -1- AC_SUBST([CFLAGS]) m4trace:configure.in:89: -1- AC_SUBST_TRACE([CFLAGS]) m4trace:configure.in:89: -1- m4_pattern_allow([^CFLAGS$]) m4trace:configure.in:89: -1- AC_SUBST([LDFLAGS]) m4trace:configure.in:89: -1- AC_SUBST_TRACE([LDFLAGS]) m4trace:configure.in:89: -1- m4_pattern_allow([^LDFLAGS$]) m4trace:configure.in:89: -1- AC_SUBST([LIBS]) m4trace:configure.in:89: -1- AC_SUBST_TRACE([LIBS]) m4trace:configure.in:89: -1- m4_pattern_allow([^LIBS$]) m4trace:configure.in:89: -1- AC_SUBST([CPPFLAGS]) m4trace:configure.in:89: -1- AC_SUBST_TRACE([CPPFLAGS]) m4trace:configure.in:89: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.in:89: -1- AC_SUBST([CC]) m4trace:configure.in:89: -1- AC_SUBST_TRACE([CC]) m4trace:configure.in:89: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:89: -1- AC_SUBST([CC]) m4trace:configure.in:89: -1- AC_SUBST_TRACE([CC]) m4trace:configure.in:89: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:89: -1- AC_SUBST([CC]) m4trace:configure.in:89: -1- AC_SUBST_TRACE([CC]) m4trace:configure.in:89: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:89: -1- AC_SUBST([CC]) m4trace:configure.in:89: -1- AC_SUBST_TRACE([CC]) m4trace:configure.in:89: -1- m4_pattern_allow([^CC$]) m4trace:configure.in:89: -1- AC_SUBST([ac_ct_CC]) m4trace:configure.in:89: -1- AC_SUBST_TRACE([ac_ct_CC]) m4trace:configure.in:89: -1- m4_pattern_allow([^ac_ct_CC$]) m4trace:configure.in:89: -1- AC_SUBST([EXEEXT], [$ac_cv_exeext]) m4trace:configure.in:89: -1- AC_SUBST_TRACE([EXEEXT]) m4trace:configure.in:89: -1- m4_pattern_allow([^EXEEXT$]) m4trace:configure.in:89: -1- AC_SUBST([OBJEXT], [$ac_cv_objext]) m4trace:configure.in:89: -1- AC_SUBST_TRACE([OBJEXT]) m4trace:configure.in:89: -1- m4_pattern_allow([^OBJEXT$]) m4trace:configure.in:90: -1- AC_SUBST([RANLIB]) m4trace:configure.in:90: -1- AC_SUBST_TRACE([RANLIB]) m4trace:configure.in:90: -1- m4_pattern_allow([^RANLIB$]) m4trace:configure.in:91: -1- AC_SUBST([SET_MAKE]) m4trace:configure.in:91: -1- AC_SUBST_TRACE([SET_MAKE]) m4trace:configure.in:91: -1- m4_pattern_allow([^SET_MAKE$]) m4trace:configure.in:92: -1- AC_REQUIRE_AUX_FILE([install-sh]) m4trace:configure.in:92: -1- AC_SUBST([INSTALL_PROGRAM]) m4trace:configure.in:92: -1- AC_SUBST_TRACE([INSTALL_PROGRAM]) m4trace:configure.in:92: -1- m4_pattern_allow([^INSTALL_PROGRAM$]) m4trace:configure.in:92: -1- AC_SUBST([INSTALL_SCRIPT]) m4trace:configure.in:92: -1- AC_SUBST_TRACE([INSTALL_SCRIPT]) m4trace:configure.in:92: -1- m4_pattern_allow([^INSTALL_SCRIPT$]) m4trace:configure.in:92: -1- AC_SUBST([INSTALL_DATA]) m4trace:configure.in:92: -1- AC_SUBST_TRACE([INSTALL_DATA]) m4trace:configure.in:92: -1- m4_pattern_allow([^INSTALL_DATA$]) m4trace:configure.in:93: -1- _m4_warn([obsolete], [The macro `AC_AIX' is obsolete. You should run autoupdate.], [../../lib/autoconf/specific.m4:436: AC_AIX is expanded from... configure.in:93: the top level]) m4trace:configure.in:93: -1- AC_SUBST([CPP]) m4trace:configure.in:93: -1- AC_SUBST_TRACE([CPP]) m4trace:configure.in:93: -1- m4_pattern_allow([^CPP$]) m4trace:configure.in:93: -1- AC_SUBST([CPPFLAGS]) m4trace:configure.in:93: -1- AC_SUBST_TRACE([CPPFLAGS]) m4trace:configure.in:93: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.in:93: -1- AC_SUBST([CPP]) m4trace:configure.in:93: -1- AC_SUBST_TRACE([CPP]) m4trace:configure.in:93: -1- m4_pattern_allow([^CPP$]) m4trace:configure.in:93: -1- AC_SUBST([GREP]) m4trace:configure.in:93: -1- AC_SUBST_TRACE([GREP]) m4trace:configure.in:93: -1- m4_pattern_allow([^GREP$]) m4trace:configure.in:93: -1- AC_SUBST([EGREP]) m4trace:configure.in:93: -1- AC_SUBST_TRACE([EGREP]) m4trace:configure.in:93: -1- m4_pattern_allow([^EGREP$]) m4trace:configure.in:93: -1- AC_DEFINE_TRACE_LITERAL([STDC_HEADERS]) m4trace:configure.in:93: -1- m4_pattern_allow([^STDC_HEADERS$]) m4trace:configure.in:93: -1- AH_OUTPUT([STDC_HEADERS], [/* Define to 1 if you have the ANSI C header files. */ @%:@undef STDC_HEADERS]) m4trace:configure.in:93: -1- AH_OUTPUT([HAVE_SYS_TYPES_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_TYPES_H]) m4trace:configure.in:93: -1- AH_OUTPUT([HAVE_SYS_STAT_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_STAT_H]) m4trace:configure.in:93: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STDLIB_H]) m4trace:configure.in:93: -1- AH_OUTPUT([HAVE_STRING_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STRING_H]) m4trace:configure.in:93: -1- AH_OUTPUT([HAVE_MEMORY_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_MEMORY_H]) m4trace:configure.in:93: -1- AH_OUTPUT([HAVE_STRINGS_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STRINGS_H]) m4trace:configure.in:93: -1- AH_OUTPUT([HAVE_INTTYPES_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_INTTYPES_H]) m4trace:configure.in:93: -1- AH_OUTPUT([HAVE_STDINT_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STDINT_H]) m4trace:configure.in:93: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_UNISTD_H]) m4trace:configure.in:93: -1- AC_DEFINE_TRACE_LITERAL([_POSIX_SOURCE]) m4trace:configure.in:93: -1- m4_pattern_allow([^_POSIX_SOURCE$]) m4trace:configure.in:93: -1- AH_OUTPUT([_POSIX_SOURCE], [/* Define to 1 if you need to in order for `stat\' and other things to work. */ @%:@undef _POSIX_SOURCE]) m4trace:configure.in:93: -1- AC_DEFINE_TRACE_LITERAL([_POSIX_1_SOURCE]) m4trace:configure.in:93: -1- m4_pattern_allow([^_POSIX_1_SOURCE$]) m4trace:configure.in:93: -1- AH_OUTPUT([_POSIX_1_SOURCE], [/* Define to 2 if the system does not provide POSIX.1 features except with this defined. */ @%:@undef _POSIX_1_SOURCE]) m4trace:configure.in:93: -1- AC_DEFINE_TRACE_LITERAL([_MINIX]) m4trace:configure.in:93: -1- m4_pattern_allow([^_MINIX$]) m4trace:configure.in:93: -1- AH_OUTPUT([_MINIX], [/* Define to 1 if on MINIX. */ @%:@undef _MINIX]) m4trace:configure.in:93: -1- AH_OUTPUT([USE_SYSTEM_EXTENSIONS], [/* Enable extensions on AIX 3, Interix. */ #ifndef _ALL_SOURCE # undef _ALL_SOURCE #endif /* Enable GNU extensions on systems that have them. */ #ifndef _GNU_SOURCE # undef _GNU_SOURCE #endif /* Enable threading extensions on Solaris. */ #ifndef _POSIX_PTHREAD_SEMANTICS # undef _POSIX_PTHREAD_SEMANTICS #endif /* Enable extensions on HP NonStop. */ #ifndef _TANDEM_SOURCE # undef _TANDEM_SOURCE #endif /* Enable general extensions on Solaris. */ #ifndef __EXTENSIONS__ # undef __EXTENSIONS__ #endif ]) m4trace:configure.in:93: -1- AC_DEFINE_TRACE_LITERAL([__EXTENSIONS__]) m4trace:configure.in:93: -1- m4_pattern_allow([^__EXTENSIONS__$]) m4trace:configure.in:93: -1- AC_DEFINE_TRACE_LITERAL([_ALL_SOURCE]) m4trace:configure.in:93: -1- m4_pattern_allow([^_ALL_SOURCE$]) m4trace:configure.in:93: -1- AC_DEFINE_TRACE_LITERAL([_GNU_SOURCE]) m4trace:configure.in:93: -1- m4_pattern_allow([^_GNU_SOURCE$]) m4trace:configure.in:93: -1- AC_DEFINE_TRACE_LITERAL([_POSIX_PTHREAD_SEMANTICS]) m4trace:configure.in:93: -1- m4_pattern_allow([^_POSIX_PTHREAD_SEMANTICS$]) m4trace:configure.in:93: -1- AC_DEFINE_TRACE_LITERAL([_TANDEM_SOURCE]) m4trace:configure.in:93: -1- m4_pattern_allow([^_TANDEM_SOURCE$]) m4trace:configure.in:94: -1- _m4_warn([obsolete], [The macro `AC_ISC_POSIX' is obsolete. You should run autoupdate.], [../../lib/autoconf/specific.m4:446: AC_ISC_POSIX is expanded from... configure.in:94: the top level]) m4trace:configure.in:95: -1- AC_SUBST([AWK]) m4trace:configure.in:95: -1- AC_SUBST_TRACE([AWK]) m4trace:configure.in:95: -1- m4_pattern_allow([^AWK$]) m4trace:configure.in:96: -1- AC_DEFINE_TRACE_LITERAL([const]) m4trace:configure.in:96: -1- m4_pattern_allow([^const$]) m4trace:configure.in:96: -1- AH_OUTPUT([const], [/* Define to empty if `const\' does not conform to ANSI C. */ @%:@undef const]) m4trace:configure.in:97: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LONG_FILE_NAMES]) m4trace:configure.in:97: -1- m4_pattern_allow([^HAVE_LONG_FILE_NAMES$]) m4trace:configure.in:97: -1- AH_OUTPUT([HAVE_LONG_FILE_NAMES], [/* Define to 1 if you support file names longer than 14 characters. */ @%:@undef HAVE_LONG_FILE_NAMES]) m4trace:configure.in:101: -1- AH_OUTPUT([inline], [/* Define to `__inline__\' or `__inline\' if that\'s what the C compiler calls it, or to nothing if \'inline\' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif]) m4trace:configure.in:104: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_INT]) m4trace:configure.in:104: -1- m4_pattern_allow([^SIZEOF_INT$]) m4trace:configure.in:104: -1- AH_OUTPUT([SIZEOF_INT], [/* The size of `int\', as computed by sizeof. */ @%:@undef SIZEOF_INT]) m4trace:configure.in:105: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_LONG]) m4trace:configure.in:105: -1- m4_pattern_allow([^SIZEOF_LONG$]) m4trace:configure.in:105: -1- AH_OUTPUT([SIZEOF_LONG], [/* The size of `long\', as computed by sizeof. */ @%:@undef SIZEOF_LONG]) m4trace:configure.in:106: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_SIZE_T]) m4trace:configure.in:106: -1- m4_pattern_allow([^SIZEOF_SIZE_T$]) m4trace:configure.in:106: -1- AH_OUTPUT([SIZEOF_SIZE_T], [/* The size of `size_t\', as computed by sizeof. */ @%:@undef SIZEOF_SIZE_T]) m4trace:configure.in:107: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_OFF_T]) m4trace:configure.in:107: -1- m4_pattern_allow([^SIZEOF_OFF_T$]) m4trace:configure.in:107: -1- AH_OUTPUT([SIZEOF_OFF_T], [/* The size of `off_t\', as computed by sizeof. */ @%:@undef SIZEOF_OFF_T]) m4trace:configure.in:110: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_LONG_LONG_INT]) m4trace:configure.in:110: -1- m4_pattern_allow([^SIZEOF_LONG_LONG_INT$]) m4trace:configure.in:110: -1- AH_OUTPUT([SIZEOF_LONG_LONG_INT], [/* The size of `long long int\', as computed by sizeof. */ @%:@undef SIZEOF_LONG_LONG_INT]) m4trace:configure.in:111: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_UNSIGNED_LONG_LONG_INT]) m4trace:configure.in:111: -1- m4_pattern_allow([^SIZEOF_UNSIGNED_LONG_LONG_INT$]) m4trace:configure.in:111: -1- AH_OUTPUT([SIZEOF_UNSIGNED_LONG_LONG_INT], [/* The size of `unsigned long long int\', as computed by sizeof. */ @%:@undef SIZEOF_UNSIGNED_LONG_LONG_INT]) m4trace:configure.in:114: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LONG_LONG_INT]) m4trace:configure.in:114: -1- m4_pattern_allow([^HAVE_LONG_LONG_INT$]) m4trace:configure.in:114: -1- AH_OUTPUT([HAVE_LONG_LONG_INT], [/* Does the compiler support long long int? */ @%:@undef HAVE_LONG_LONG_INT]) m4trace:configure.in:115: -1- AH_OUTPUT([WORDS_BIGENDIAN], [/* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN # undef WORDS_BIGENDIAN # endif #endif]) m4trace:configure.in:115: -1- AC_DEFINE_TRACE_LITERAL([WORDS_BIGENDIAN]) m4trace:configure.in:115: -1- m4_pattern_allow([^WORDS_BIGENDIAN$]) m4trace:configure.in:115: -1- AC_DEFINE_TRACE_LITERAL([AC_APPLE_UNIVERSAL_BUILD]) m4trace:configure.in:115: -1- m4_pattern_allow([^AC_APPLE_UNIVERSAL_BUILD$]) m4trace:configure.in:115: -1- AH_OUTPUT([AC_APPLE_UNIVERSAL_BUILD], [/* Define if building universal (internal helper macro) */ @%:@undef AC_APPLE_UNIVERSAL_BUILD]) m4trace:configure.in:118: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2614: AC_TRY_COMPILE is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... cmulocal/c-attribute.m4:9: CMU_C___ATTRIBUTE__ is expanded from... configure.in:118: the top level]) m4trace:configure.in:118: -1- AC_DEFINE_TRACE_LITERAL([HAVE___ATTRIBUTE__]) m4trace:configure.in:118: -1- m4_pattern_allow([^HAVE___ATTRIBUTE__$]) m4trace:configure.in:118: -1- AH_OUTPUT([HAVE___ATTRIBUTE__], [/* define if your compiler has __attribute__ */ @%:@undef HAVE___ATTRIBUTE__]) m4trace:configure.in:119: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2614: AC_TRY_COMPILE is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... cmulocal/c-fpic.m4:9: CMU_C_FPIC is expanded from... configure.in:119: the top level]) m4trace:configure.in:122: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2687: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... ../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... cmulocal/cyrus.m4:33: CMU_GUESS_RUNPATH_SWITCH is expanded from... configure.in:122: the top level]) m4trace:configure.in:122: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2687: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/general.m4:2661: _AC_LINK_IFELSE is expanded from... ../../lib/autoconf/general.m4:2678: AC_LINK_IFELSE is expanded from... ../../lib/autoconf/general.m4:2687: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... ../../lib/autoconf/general.m4:2052: AC_CACHE_CHECK is expanded from... cmulocal/cyrus.m4:33: CMU_GUESS_RUNPATH_SWITCH is expanded from... configure.in:122: the top level]) m4trace:configure.in:124: -1- AH_OUTPUT([HAVE_UNISTD_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_UNISTD_H]) m4trace:configure.in:124: -1- AH_OUTPUT([HAVE_SYS_SELECT_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_SELECT_H]) m4trace:configure.in:124: -1- AH_OUTPUT([HAVE_SYS_PARAM_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_PARAM_H]) m4trace:configure.in:124: -1- AH_OUTPUT([HAVE_STDARG_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STDARG_H]) m4trace:configure.in:125: -1- AH_OUTPUT([HAVE_MEMMOVE], [/* Define to 1 if you have the `memmove\' function. */ @%:@undef HAVE_MEMMOVE]) m4trace:configure.in:125: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MEMMOVE]) m4trace:configure.in:125: -1- m4_pattern_allow([^HAVE_MEMMOVE$]) m4trace:configure.in:125: -1- AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS memmove.$ac_objext"]) m4trace:configure.in:125: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) m4trace:configure.in:125: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.in:125: -1- AC_LIBSOURCE([memmove.c]) m4trace:configure.in:125: -1- AH_OUTPUT([HAVE_STRCASECMP], [/* Define to 1 if you have the `strcasecmp\' function. */ @%:@undef HAVE_STRCASECMP]) m4trace:configure.in:125: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRCASECMP]) m4trace:configure.in:125: -1- m4_pattern_allow([^HAVE_STRCASECMP$]) m4trace:configure.in:125: -1- AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS strcasecmp.$ac_objext"]) m4trace:configure.in:125: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) m4trace:configure.in:125: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.in:125: -1- AC_LIBSOURCE([strcasecmp.c]) m4trace:configure.in:125: -1- AH_OUTPUT([HAVE_FTRUNCATE], [/* Define to 1 if you have the `ftruncate\' function. */ @%:@undef HAVE_FTRUNCATE]) m4trace:configure.in:125: -1- AC_DEFINE_TRACE_LITERAL([HAVE_FTRUNCATE]) m4trace:configure.in:125: -1- m4_pattern_allow([^HAVE_FTRUNCATE$]) m4trace:configure.in:125: -1- AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS ftruncate.$ac_objext"]) m4trace:configure.in:125: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) m4trace:configure.in:125: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.in:125: -1- AC_LIBSOURCE([ftruncate.c]) m4trace:configure.in:125: -1- AH_OUTPUT([HAVE_STRERROR], [/* Define to 1 if you have the `strerror\' function. */ @%:@undef HAVE_STRERROR]) m4trace:configure.in:125: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRERROR]) m4trace:configure.in:125: -1- m4_pattern_allow([^HAVE_STRERROR$]) m4trace:configure.in:125: -1- AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS strerror.$ac_objext"]) m4trace:configure.in:125: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) m4trace:configure.in:125: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.in:125: -1- AC_LIBSOURCE([strerror.c]) m4trace:configure.in:126: -1- AH_OUTPUT([HAVE_STRLCAT], [/* Define to 1 if you have the `strlcat\' function. */ @%:@undef HAVE_STRLCAT]) m4trace:configure.in:126: -1- AH_OUTPUT([HAVE_STRLCPY], [/* Define to 1 if you have the `strlcpy\' function. */ @%:@undef HAVE_STRLCPY]) m4trace:configure.in:126: -1- AH_OUTPUT([HAVE_GETGROUPLIST], [/* Define to 1 if you have the `getgrouplist\' function. */ @%:@undef HAVE_GETGROUPLIST]) m4trace:configure.in:127: -1- AH_OUTPUT([HAVE_DIRENT_H], [/* Define to 1 if you have the header file, and it defines `DIR\'. */ @%:@undef HAVE_DIRENT_H]) m4trace:configure.in:127: -1- AH_OUTPUT([HAVE_SYS_NDIR_H], [/* Define to 1 if you have the header file, and it defines `DIR\'. */ @%:@undef HAVE_SYS_NDIR_H]) m4trace:configure.in:127: -1- AH_OUTPUT([HAVE_SYS_DIR_H], [/* Define to 1 if you have the header file, and it defines `DIR\'. */ @%:@undef HAVE_SYS_DIR_H]) m4trace:configure.in:127: -1- AH_OUTPUT([HAVE_NDIR_H], [/* Define to 1 if you have the header file, and it defines `DIR\'. */ @%:@undef HAVE_NDIR_H]) m4trace:configure.in:130: -1- AH_OUTPUT([HAVE_STDLIB_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_STDLIB_H]) m4trace:configure.in:130: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STDLIB_H]) m4trace:configure.in:130: -1- m4_pattern_allow([^HAVE_STDLIB_H$]) m4trace:configure.in:131: -1- AH_OUTPUT([HAVE_GETPASSPHRASE], [/* Define to 1 if you have the `getpassphrase\' function. */ @%:@undef HAVE_GETPASSPHRASE]) m4trace:configure.in:131: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETPASSPHRASE]) m4trace:configure.in:131: -1- m4_pattern_allow([^HAVE_GETPASSPHRASE$]) m4trace:configure.in:134: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2687: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/functions.m4:59: AC_CHECK_FUNC is expanded from... cmulocal/bsd_sockets.m4:9: CMU_SOCKETS is expanded from... configure.in:134: the top level]) m4trace:configure.in:134: -1- AH_OUTPUT([HAVE_DN_EXPAND], [/* Define to 1 if you have the `dn_expand\' function. */ @%:@undef HAVE_DN_EXPAND]) m4trace:configure.in:134: -1- AH_OUTPUT([HAVE_DNS_LOOKUP], [/* Define to 1 if you have the `dns_lookup\' function. */ @%:@undef HAVE_DNS_LOOKUP]) m4trace:configure.in:134: -1- AC_SUBST([LIB_SOCKET]) m4trace:configure.in:134: -1- AC_SUBST_TRACE([LIB_SOCKET]) m4trace:configure.in:134: -1- m4_pattern_allow([^LIB_SOCKET$]) m4trace:configure.in:139: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETADDRINFO]) m4trace:configure.in:139: -1- m4_pattern_allow([^HAVE_GETADDRINFO$]) m4trace:configure.in:139: -1- AH_OUTPUT([HAVE_GETADDRINFO], [/* Do we have a getaddrinfo? */ @%:@undef HAVE_GETADDRINFO]) m4trace:configure.in:139: -2- AC_DEFINE_TRACE_LITERAL([HAVE_GETADDRINFO]) m4trace:configure.in:139: -2- m4_pattern_allow([^HAVE_GETADDRINFO$]) m4trace:configure.in:139: -2- AH_OUTPUT([HAVE_GETADDRINFO], [/* Do we have a getaddrinfo? */ @%:@undef HAVE_GETADDRINFO]) m4trace:configure.in:139: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETADDRINFO]) m4trace:configure.in:139: -1- m4_pattern_allow([^HAVE_GETADDRINFO$]) m4trace:configure.in:139: -1- AH_OUTPUT([HAVE_GETADDRINFO], [/* Do we have a getaddrinfo? */ @%:@undef HAVE_GETADDRINFO]) m4trace:configure.in:149: -2- AC_DEFINE_TRACE_LITERAL([HAVE_GETNAMEINFO]) m4trace:configure.in:149: -2- m4_pattern_allow([^HAVE_GETNAMEINFO$]) m4trace:configure.in:149: -2- AH_OUTPUT([HAVE_GETNAMEINFO], [/* Do we have a getnameinfo? */ @%:@undef HAVE_GETNAMEINFO]) m4trace:configure.in:148: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETADDRINFO]) m4trace:configure.in:148: -1- m4_pattern_allow([^HAVE_GETADDRINFO$]) m4trace:configure.in:148: -1- AH_OUTPUT([HAVE_GETADDRINFO], [/* Do we have a getaddrinfo? */ @%:@undef HAVE_GETADDRINFO]) m4trace:configure.in:156: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2614: AC_TRY_COMPILE is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... cmulocal/ipv6.m4:66: IPv6_CHECK_SS_FAMILY is expanded from... configure.in:156: the top level]) m4trace:configure.in:156: -2- AC_DEFINE_TRACE_LITERAL([HAVE_SS_FAMILY]) m4trace:configure.in:156: -2- m4_pattern_allow([^HAVE_SS_FAMILY$]) m4trace:configure.in:156: -2- AH_OUTPUT([HAVE_SS_FAMILY], [/* Is there an ss_family in sockaddr_storage? */ @%:@undef HAVE_SS_FAMILY]) m4trace:configure.in:157: -1- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2614: AC_TRY_COMPILE is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... cmulocal/ipv6.m4:82: IPv6_CHECK_SA_LEN is expanded from... configure.in:157: the top level]) m4trace:configure.in:157: -2- AC_DEFINE_TRACE_LITERAL([HAVE_SOCKADDR_SA_LEN]) m4trace:configure.in:157: -2- m4_pattern_allow([^HAVE_SOCKADDR_SA_LEN$]) m4trace:configure.in:157: -2- AH_OUTPUT([HAVE_SOCKADDR_SA_LEN], [/* Does sockaddr have an sa_len? */ @%:@undef HAVE_SOCKADDR_SA_LEN]) m4trace:configure.in:159: -1- AC_SUBST([IPV6_OBJS]) m4trace:configure.in:159: -1- AC_SUBST_TRACE([IPV6_OBJS]) m4trace:configure.in:159: -1- m4_pattern_allow([^IPV6_OBJS$]) m4trace:configure.in:162: -1- AH_OUTPUT([HAVE_SYS_TIME_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_TIME_H]) m4trace:configure.in:162: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SYS_TIME_H]) m4trace:configure.in:162: -1- m4_pattern_allow([^HAVE_SYS_TIME_H$]) m4trace:configure.in:163: -1- AC_DEFINE_TRACE_LITERAL([TIME_WITH_SYS_TIME]) m4trace:configure.in:163: -1- m4_pattern_allow([^TIME_WITH_SYS_TIME$]) m4trace:configure.in:163: -1- AH_OUTPUT([TIME_WITH_SYS_TIME], [/* Define to 1 if you can safely include both and . */ @%:@undef TIME_WITH_SYS_TIME]) m4trace:configure.in:164: -1- AC_DEFINE_TRACE_LITERAL([TM_IN_SYS_TIME]) m4trace:configure.in:164: -1- m4_pattern_allow([^TM_IN_SYS_TIME$]) m4trace:configure.in:164: -1- AH_OUTPUT([TM_IN_SYS_TIME], [/* Define to 1 if your declares `struct tm\'. */ @%:@undef TM_IN_SYS_TIME]) m4trace:configure.in:165: -1- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_TM_TM_ZONE]) m4trace:configure.in:165: -1- m4_pattern_allow([^HAVE_STRUCT_TM_TM_ZONE$]) m4trace:configure.in:165: -1- AH_OUTPUT([HAVE_STRUCT_TM_TM_ZONE], [/* Define to 1 if `tm_zone\' is a member of `struct tm\'. */ @%:@undef HAVE_STRUCT_TM_TM_ZONE]) m4trace:configure.in:165: -1- AC_DEFINE_TRACE_LITERAL([HAVE_TM_ZONE]) m4trace:configure.in:165: -1- m4_pattern_allow([^HAVE_TM_ZONE$]) m4trace:configure.in:165: -1- AH_OUTPUT([HAVE_TM_ZONE], [/* Define to 1 if your `struct tm\' has `tm_zone\'. Deprecated, use `HAVE_STRUCT_TM_TM_ZONE\' instead. */ @%:@undef HAVE_TM_ZONE]) m4trace:configure.in:165: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DECL_TZNAME]) m4trace:configure.in:165: -1- m4_pattern_allow([^HAVE_DECL_TZNAME$]) m4trace:configure.in:165: -1- AH_OUTPUT([HAVE_DECL_TZNAME], [/* Define to 1 if you have the declaration of `tzname\', and to 0 if you don\'t. */ @%:@undef HAVE_DECL_TZNAME]) m4trace:configure.in:165: -1- AC_DEFINE_TRACE_LITERAL([HAVE_TZNAME]) m4trace:configure.in:165: -1- m4_pattern_allow([^HAVE_TZNAME$]) m4trace:configure.in:165: -1- AH_OUTPUT([HAVE_TZNAME], [/* Define to 1 if you don\'t have `tm_zone\' but do have the external array `tzname\'. */ @%:@undef HAVE_TZNAME]) m4trace:configure.in:167: -1- AC_SUBST([CPPFLAGS]) m4trace:configure.in:167: -1- AC_SUBST_TRACE([CPPFLAGS]) m4trace:configure.in:167: -1- m4_pattern_allow([^CPPFLAGS$]) m4trace:configure.in:168: -1- AC_SUBST([PRE_SUBDIRS]) m4trace:configure.in:168: -1- AC_SUBST_TRACE([PRE_SUBDIRS]) m4trace:configure.in:168: -1- m4_pattern_allow([^PRE_SUBDIRS$]) m4trace:configure.in:169: -1- AC_SUBST([EXTRA_SUBDIRS]) m4trace:configure.in:169: -1- AC_SUBST_TRACE([EXTRA_SUBDIRS]) m4trace:configure.in:169: -1- m4_pattern_allow([^EXTRA_SUBDIRS$]) m4trace:configure.in:170: -1- AC_SUBST([DEPLIBS]) m4trace:configure.in:170: -1- AC_SUBST_TRACE([DEPLIBS]) m4trace:configure.in:170: -1- m4_pattern_allow([^DEPLIBS$]) m4trace:configure.in:171: -1- AC_SUBST([LOCALDEFS]) m4trace:configure.in:171: -1- AC_SUBST_TRACE([LOCALDEFS]) m4trace:configure.in:171: -1- m4_pattern_allow([^LOCALDEFS$]) m4trace:configure.in:172: -1- AH_OUTPUT([HAVE_VPRINTF], [/* Define to 1 if you have the `vprintf\' function. */ @%:@undef HAVE_VPRINTF]) m4trace:configure.in:172: -1- AC_DEFINE_TRACE_LITERAL([HAVE_VPRINTF]) m4trace:configure.in:172: -1- m4_pattern_allow([^HAVE_VPRINTF$]) m4trace:configure.in:172: -1- AC_DEFINE_TRACE_LITERAL([HAVE_DOPRNT]) m4trace:configure.in:172: -1- m4_pattern_allow([^HAVE_DOPRNT$]) m4trace:configure.in:172: -1- AH_OUTPUT([HAVE_DOPRNT], [/* Define to 1 if you don\'t have `vprintf\' but do have `_doprnt.\' */ @%:@undef HAVE_DOPRNT]) m4trace:configure.in:205: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2687: AC_TRY_LINK is expanded from... cmulocal/berkdb.m4:204: CYRUS_BERKELEY_DB_CHK_LIB is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/headers.m4:129: _AC_CHECK_HEADER_MONGREL is expanded from... ../../lib/autoconf/headers.m4:67: AC_CHECK_HEADER is expanded from... cmulocal/berkdb.m4:265: CYRUS_BERKELEY_DB_CHK is expanded from... configure.in:205: the top level]) m4trace:configure.in:205: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2687: AC_TRY_LINK is expanded from... cmulocal/berkdb.m4:204: CYRUS_BERKELEY_DB_CHK_LIB is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/headers.m4:129: _AC_CHECK_HEADER_MONGREL is expanded from... ../../lib/autoconf/headers.m4:67: AC_CHECK_HEADER is expanded from... cmulocal/berkdb.m4:265: CYRUS_BERKELEY_DB_CHK is expanded from... configure.in:205: the top level]) m4trace:configure.in:208: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:34: AC_ERROR is expanded from... configure.in:208: the top level]) m4trace:configure.in:218: -1- AC_SUBST([BDB_INC]) m4trace:configure.in:218: -1- AC_SUBST_TRACE([BDB_INC]) m4trace:configure.in:218: -1- m4_pattern_allow([^BDB_INC$]) m4trace:configure.in:219: -1- AC_SUBST([BDB_LIB]) m4trace:configure.in:219: -1- AC_SUBST_TRACE([BDB_LIB]) m4trace:configure.in:219: -1- m4_pattern_allow([^BDB_LIB$]) m4trace:configure.in:225: -1- AC_DEFINE_TRACE_LITERAL([HAVE_BDB]) m4trace:configure.in:225: -1- m4_pattern_allow([^HAVE_BDB$]) m4trace:configure.in:225: -1- AH_OUTPUT([HAVE_BDB], [/* Build in Berkeley DB support? */ @%:@undef HAVE_BDB]) m4trace:configure.in:257: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2687: AC_TRY_LINK is expanded from... cmulocal/sql.m4:16: CYRUS_MYSQL_CHK_LIB is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/headers.m4:129: _AC_CHECK_HEADER_MONGREL is expanded from... ../../lib/autoconf/headers.m4:67: AC_CHECK_HEADER is expanded from... cmulocal/sql.m4:55: CYRUS_MYSQL_CHK is expanded from... configure.in:257: the top level]) m4trace:configure.in:260: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:34: AC_ERROR is expanded from... configure.in:260: the top level]) m4trace:configure.in:273: -1- AC_DEFINE_TRACE_LITERAL([HAVE_MYSQL]) m4trace:configure.in:273: -1- m4_pattern_allow([^HAVE_MYSQL$]) m4trace:configure.in:273: -1- AH_OUTPUT([HAVE_MYSQL], [/* Build in MySQL support? */ @%:@undef HAVE_MYSQL]) m4trace:configure.in:301: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2687: AC_TRY_LINK is expanded from... cmulocal/sql.m4:90: CYRUS_PGSQL_CHK_LIB is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/headers.m4:129: _AC_CHECK_HEADER_MONGREL is expanded from... ../../lib/autoconf/headers.m4:67: AC_CHECK_HEADER is expanded from... cmulocal/sql.m4:129: CYRUS_PGSQL_CHK is expanded from... configure.in:301: the top level]) m4trace:configure.in:304: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:34: AC_ERROR is expanded from... configure.in:304: the top level]) m4trace:configure.in:317: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PGSQL]) m4trace:configure.in:317: -1- m4_pattern_allow([^HAVE_PGSQL$]) m4trace:configure.in:317: -1- AH_OUTPUT([HAVE_PGSQL], [/* Build in PgSQL support? */ @%:@undef HAVE_PGSQL]) m4trace:configure.in:345: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2687: AC_TRY_LINK is expanded from... cmulocal/sql.m4:164: CYRUS_SQLITE_CHK_LIB is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/headers.m4:129: _AC_CHECK_HEADER_MONGREL is expanded from... ../../lib/autoconf/headers.m4:67: AC_CHECK_HEADER is expanded from... cmulocal/sql.m4:203: CYRUS_SQLITE_CHK is expanded from... configure.in:345: the top level]) m4trace:configure.in:348: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:34: AC_ERROR is expanded from... configure.in:348: the top level]) m4trace:configure.in:361: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SQLITE]) m4trace:configure.in:361: -1- m4_pattern_allow([^HAVE_SQLITE$]) m4trace:configure.in:361: -1- AH_OUTPUT([HAVE_SQLITE], [/* Build in SQLite support? */ @%:@undef HAVE_SQLITE]) m4trace:configure.in:373: -1- AC_SUBST([CYRUSDB_OBJS]) m4trace:configure.in:373: -1- AC_SUBST_TRACE([CYRUSDB_OBJS]) m4trace:configure.in:373: -1- m4_pattern_allow([^CYRUSDB_OBJS$]) m4trace:configure.in:392: -1- AC_SUBST([SIEVE_OBJS]) m4trace:configure.in:392: -1- AC_SUBST_TRACE([SIEVE_OBJS]) m4trace:configure.in:392: -1- m4_pattern_allow([^SIEVE_OBJS$]) m4trace:configure.in:394: -1- AC_SUBST([SIEVE_LIBS]) m4trace:configure.in:394: -1- AC_SUBST_TRACE([SIEVE_LIBS]) m4trace:configure.in:394: -1- m4_pattern_allow([^SIEVE_LIBS$]) m4trace:configure.in:396: -1- AC_SUBST([SIEVE_CPPFLAGS]) m4trace:configure.in:396: -1- AC_SUBST_TRACE([SIEVE_CPPFLAGS]) m4trace:configure.in:396: -1- m4_pattern_allow([^SIEVE_CPPFLAGS$]) m4trace:configure.in:397: -1- AC_DEFINE_TRACE_LITERAL([USE_SIEVE]) m4trace:configure.in:397: -1- m4_pattern_allow([^USE_SIEVE$]) m4trace:configure.in:397: -1- AH_OUTPUT([USE_SIEVE], [/* Build in Sieve support? */ @%:@undef USE_SIEVE]) m4trace:configure.in:400: -1- AC_SUBST([YACC]) m4trace:configure.in:400: -1- AC_SUBST_TRACE([YACC]) m4trace:configure.in:400: -1- m4_pattern_allow([^YACC$]) m4trace:configure.in:400: -1- AC_SUBST([YACC]) m4trace:configure.in:400: -1- AC_SUBST_TRACE([YACC]) m4trace:configure.in:400: -1- m4_pattern_allow([^YACC$]) m4trace:configure.in:400: -1- AC_SUBST([YFLAGS]) m4trace:configure.in:400: -1- AC_SUBST_TRACE([YFLAGS]) m4trace:configure.in:400: -1- m4_pattern_allow([^YFLAGS$]) m4trace:configure.in:401: -1- AC_SUBST([LEX]) m4trace:configure.in:401: -1- AC_SUBST_TRACE([LEX]) m4trace:configure.in:401: -1- m4_pattern_allow([^LEX$]) m4trace:configure.in:401: -1- AC_SUBST([LEX_OUTPUT_ROOT], [$ac_cv_prog_lex_root]) m4trace:configure.in:401: -1- AC_SUBST_TRACE([LEX_OUTPUT_ROOT]) m4trace:configure.in:401: -1- m4_pattern_allow([^LEX_OUTPUT_ROOT$]) m4trace:configure.in:401: -1- AC_SUBST([LEXLIB]) m4trace:configure.in:401: -1- AC_SUBST_TRACE([LEXLIB]) m4trace:configure.in:401: -1- m4_pattern_allow([^LEXLIB$]) m4trace:configure.in:401: -1- AC_DEFINE_TRACE_LITERAL([YYTEXT_POINTER]) m4trace:configure.in:401: -1- m4_pattern_allow([^YYTEXT_POINTER$]) m4trace:configure.in:401: -1- AH_OUTPUT([YYTEXT_POINTER], [/* Define to 1 if `lex\' declares `yytext\' as a `char *\' by default, not a `char@<:@@:>@\'. */ @%:@undef YYTEXT_POINTER]) m4trace:configure.in:402: -1- AH_OUTPUT([HAVE_LIBFL], [/* Define to 1 if you have the `fl\' library (-lfl). */ @%:@undef HAVE_LIBFL]) m4trace:configure.in:402: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBFL]) m4trace:configure.in:402: -1- m4_pattern_allow([^HAVE_LIBFL$]) m4trace:configure.in:408: -2- _m4_warn([obsolete], [The macro `AC_TRY_CPP' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2529: AC_TRY_CPP is expanded from... configure.in:408: the top level]) m4trace:configure.in:420: -1- AC_DEFINE_TRACE_LITERAL([ENABLE_REGEX]) m4trace:configure.in:420: -1- m4_pattern_allow([^ENABLE_REGEX$]) m4trace:configure.in:420: -1- AH_OUTPUT([ENABLE_REGEX], [/* Do we have a regex library? */ @%:@undef ENABLE_REGEX]) m4trace:configure.in:421: -1- AC_DEFINE_TRACE_LITERAL([HAVE_PCREPOSIX_H]) m4trace:configure.in:421: -1- m4_pattern_allow([^HAVE_PCREPOSIX_H$]) m4trace:configure.in:421: -1- AH_OUTPUT([HAVE_PCREPOSIX_H], [/* Do we have usable pcre library? */ @%:@undef HAVE_PCREPOSIX_H]) m4trace:configure.in:423: -1- AH_OUTPUT([HAVE_RXPOSIX_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_RXPOSIX_H]) m4trace:configure.in:423: -1- AC_DEFINE_TRACE_LITERAL([HAVE_RXPOSIX_H]) m4trace:configure.in:423: -1- m4_pattern_allow([^HAVE_RXPOSIX_H$]) m4trace:configure.in:426: -1- AC_DEFINE_TRACE_LITERAL([ENABLE_REGEX]) m4trace:configure.in:426: -1- m4_pattern_allow([^ENABLE_REGEX$]) m4trace:configure.in:426: -1- AH_OUTPUT([ENABLE_REGEX], [/* Do we have a regex library? */ @%:@undef ENABLE_REGEX]) m4trace:configure.in:430: -2- AC_DEFINE_TRACE_LITERAL([ENABLE_REGEX]) m4trace:configure.in:430: -2- m4_pattern_allow([^ENABLE_REGEX$]) m4trace:configure.in:430: -2- AH_OUTPUT([ENABLE_REGEX], [/* Do we have a regex library? */ @%:@undef ENABLE_REGEX]) m4trace:configure.in:439: -1- AC_SUBST([SIEVE_SUBDIRS]) m4trace:configure.in:439: -1- AC_SUBST_TRACE([SIEVE_SUBDIRS]) m4trace:configure.in:439: -1- m4_pattern_allow([^SIEVE_SUBDIRS$]) m4trace:configure.in:442: -2- AC_DEFINE_TRACE_LITERAL([HAS_STRERROR]) m4trace:configure.in:442: -2- m4_pattern_allow([^HAS_STRERROR$]) m4trace:configure.in:442: -2- AH_OUTPUT([HAS_STRERROR], [/* Do we have strerror()? */ @%:@undef HAS_STRERROR]) m4trace:configure.in:443: -2- AC_DEFINE_TRACE_LITERAL([NEED_SYS_ERRLIST]) m4trace:configure.in:443: -2- m4_pattern_allow([^NEED_SYS_ERRLIST$]) m4trace:configure.in:443: -2- AH_OUTPUT([NEED_SYS_ERRLIST], [/* Do we have a sys_errlist? */ @%:@undef NEED_SYS_ERRLIST]) m4trace:configure.in:442: -1- _m4_warn([obsolete], [The macro `AC_FUNC_CHECK' is obsolete. You should run autoupdate.], [../../lib/autoconf/functions.m4:155: AC_FUNC_CHECK is expanded from... configure.in:442: the top level]) m4trace:configure.in:446: -1- AH_OUTPUT([HAVE_SYS_RESOURCE_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_RESOURCE_H]) m4trace:configure.in:446: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SYS_RESOURCE_H]) m4trace:configure.in:446: -1- m4_pattern_allow([^HAVE_SYS_RESOURCE_H$]) m4trace:configure.in:447: -1- AH_OUTPUT([HAVE_SETRLIMIT], [/* Define to 1 if you have the `setrlimit\' function. */ @%:@undef HAVE_SETRLIMIT]) m4trace:configure.in:447: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SETRLIMIT]) m4trace:configure.in:447: -1- m4_pattern_allow([^HAVE_SETRLIMIT$]) m4trace:configure.in:448: -1- AH_OUTPUT([HAVE_GETRLIMIT], [/* Define to 1 if you have the `getrlimit\' function. */ @%:@undef HAVE_GETRLIMIT]) m4trace:configure.in:448: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETRLIMIT]) m4trace:configure.in:448: -1- m4_pattern_allow([^HAVE_GETRLIMIT$]) m4trace:configure.in:451: -1- AH_OUTPUT([HAVE_DAEMON], [/* Define to 1 if you have the `daemon\' function. */ @%:@undef HAVE_DAEMON]) m4trace:configure.in:451: -1- AH_OUTPUT([HAVE_SETSID], [/* Define to 1 if you have the `setsid\' function. */ @%:@undef HAVE_SETSID]) m4trace:configure.in:454: -1- AH_OUTPUT([HAVE_SHUTDOWN], [/* Define to 1 if you have the `shutdown\' function. */ @%:@undef HAVE_SHUTDOWN]) m4trace:configure.in:454: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SHUTDOWN]) m4trace:configure.in:454: -1- m4_pattern_allow([^HAVE_SHUTDOWN$]) m4trace:configure.in:456: -2- AC_DEFINE_TRACE_LITERAL([HAVE_SOCKLEN_T]) m4trace:configure.in:456: -2- m4_pattern_allow([^HAVE_SOCKLEN_T$]) m4trace:configure.in:456: -2- AH_OUTPUT([HAVE_SOCKLEN_T], [/* Do we have a socklen_t? */ @%:@undef HAVE_SOCKLEN_T]) m4trace:configure.in:458: -2- AC_DEFINE_TRACE_LITERAL([HAVE_STRUCT_SOCKADDR_STORAGE]) m4trace:configure.in:458: -2- m4_pattern_allow([^HAVE_STRUCT_SOCKADDR_STORAGE$]) m4trace:configure.in:458: -2- AH_OUTPUT([HAVE_STRUCT_SOCKADDR_STORAGE], [/* Do we have a sockaddr_storage? */ @%:@undef HAVE_STRUCT_SOCKADDR_STORAGE]) m4trace:configure.in:459: -2- AC_DEFINE_TRACE_LITERAL([HAVE_RLIM_T]) m4trace:configure.in:459: -2- m4_pattern_allow([^HAVE_RLIM_T$]) m4trace:configure.in:459: -2- AH_OUTPUT([HAVE_RLIM_T], [/* Do we have an rlim_t? */ @%:@undef HAVE_RLIM_T]) m4trace:configure.in:477: -2- _m4_warn([obsolete], [The macro `AC_TRY_CPP' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2529: AC_TRY_CPP is expanded from... configure.in:477: the top level]) m4trace:configure.in:490: -2- _m4_warn([obsolete], [The macro `AC_TRY_CPP' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2529: AC_TRY_CPP is expanded from... configure.in:490: the top level]) m4trace:configure.in:501: -2- _m4_warn([obsolete], [The macro `AC_TRY_CPP' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2529: AC_TRY_CPP is expanded from... configure.in:501: the top level]) m4trace:configure.in:511: -1- AC_DEFINE_TRACE_LITERAL([SPT_TYPE]) m4trace:configure.in:511: -1- m4_pattern_allow([^SPT_TYPE$]) m4trace:configure.in:511: -1- AH_OUTPUT([SPT_TYPE], [/* Do we already have setproctitle? */ @%:@undef SPT_TYPE]) m4trace:configure.in:515: -2- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2687: AC_TRY_LINK is expanded from... configure.in:515: the top level]) m4trace:configure.in:523: -1- AC_SUBST([WITH_NONBLOCK]) m4trace:configure.in:523: -1- AC_SUBST_TRACE([WITH_NONBLOCK]) m4trace:configure.in:523: -1- m4_pattern_allow([^WITH_NONBLOCK$]) m4trace:configure.in:527: -2- _m4_warn([obsolete], [The macro `AC_TRY_COMPILE' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2614: AC_TRY_COMPILE is expanded from... configure.in:527: the top level]) m4trace:configure.in:532: -1- AC_SUBST([WITH_GMTOFF]) m4trace:configure.in:532: -1- AC_SUBST_TRACE([WITH_GMTOFF]) m4trace:configure.in:532: -1- m4_pattern_allow([^WITH_GMTOFF$]) m4trace:configure.in:535: -2- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2764: AC_TRY_RUN is expanded from... configure.in:535: the top level]) m4trace:configure.in:566: -2- _m4_warn([obsolete], [The macro `AC_TRY_RUN' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2764: AC_TRY_RUN is expanded from... configure.in:566: the top level]) m4trace:configure.in:603: -1- AC_SUBST([WITH_MAP]) m4trace:configure.in:603: -1- AC_SUBST_TRACE([WITH_MAP]) m4trace:configure.in:603: -1- m4_pattern_allow([^WITH_MAP$]) m4trace:configure.in:604: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:34: AC_ERROR is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/functions.m4:59: AC_CHECK_FUNC is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/functions.m4:59: AC_CHECK_FUNC is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/general.m4:1481: AC_ARG_WITH is expanded from... configure.in:604: the top level]) m4trace:configure.in:614: -1- AC_SUBST([WITH_LOCK]) m4trace:configure.in:614: -1- AC_SUBST_TRACE([WITH_LOCK]) m4trace:configure.in:614: -1- m4_pattern_allow([^WITH_LOCK$]) m4trace:configure.in:618: -2- AC_DEFINE_TRACE_LITERAL([HAVE_FDATASYNC]) m4trace:configure.in:618: -2- m4_pattern_allow([^HAVE_FDATASYNC$]) m4trace:configure.in:618: -2- AH_OUTPUT([HAVE_FDATASYNC], [/* Do we have fdatasync()? */ @%:@undef HAVE_FDATASYNC]) m4trace:configure.in:618: -1- AC_DEFINE_TRACE_LITERAL([HAVE_FDATASYNC]) m4trace:configure.in:618: -1- m4_pattern_allow([^HAVE_FDATASYNC$]) m4trace:configure.in:618: -1- AH_OUTPUT([HAVE_FDATASYNC], [/* Do we have fdatasync()? */ @%:@undef HAVE_FDATASYNC]) m4trace:configure.in:645: -1- AC_SUBST([cyrus_cv_sigveclib]) m4trace:configure.in:645: -1- AC_SUBST_TRACE([cyrus_cv_sigveclib]) m4trace:configure.in:645: -1- m4_pattern_allow([^cyrus_cv_sigveclib$]) m4trace:configure.in:665: -1- AC_DEFINE_TRACE_LITERAL([AFSPTS_USE_KRB5]) m4trace:configure.in:665: -1- m4_pattern_allow([^AFSPTS_USE_KRB5$]) m4trace:configure.in:665: -1- AH_OUTPUT([AFSPTS_USE_KRB5], [/* Should the AFS PTS plugin use krb5? */ @%:@undef AFSPTS_USE_KRB5]) m4trace:configure.in:684: -1- _m4_warn([obsolete], [The macro `AC_TRY_LINK' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2687: AC_TRY_LINK is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/general.m4:2031: AC_CACHE_VAL is expanded from... configure.in:684: the top level]) m4trace:configure.in:707: -1- AC_SUBST([AFS_LIBS]) m4trace:configure.in:707: -1- AC_SUBST_TRACE([AFS_LIBS]) m4trace:configure.in:707: -1- m4_pattern_allow([^AFS_LIBS$]) m4trace:configure.in:708: -1- AC_SUBST([AFS_LDFLAGS]) m4trace:configure.in:708: -1- AC_SUBST_TRACE([AFS_LDFLAGS]) m4trace:configure.in:708: -1- m4_pattern_allow([^AFS_LDFLAGS$]) m4trace:configure.in:709: -1- AC_DEFINE_TRACE_LITERAL([HAVE_AFSKRB]) m4trace:configure.in:709: -1- m4_pattern_allow([^HAVE_AFSKRB$]) m4trace:configure.in:709: -1- AH_OUTPUT([HAVE_AFSKRB], [/* Should we build afskrb pts module? */ @%:@undef HAVE_AFSKRB]) m4trace:configure.in:713: -1- AC_SUBST([AFS_LIBS]) m4trace:configure.in:713: -1- AC_SUBST_TRACE([AFS_LIBS]) m4trace:configure.in:713: -1- m4_pattern_allow([^AFS_LIBS$]) m4trace:configure.in:714: -1- AC_SUBST([AFS_LDFLAGS]) m4trace:configure.in:714: -1- AC_SUBST_TRACE([AFS_LDFLAGS]) m4trace:configure.in:714: -1- m4_pattern_allow([^AFS_LDFLAGS$]) m4trace:configure.in:715: -1- AC_DEFINE_TRACE_LITERAL([HAVE_AFSKRB]) m4trace:configure.in:715: -1- m4_pattern_allow([^HAVE_AFSKRB$]) m4trace:configure.in:715: -1- AH_OUTPUT([HAVE_AFSKRB], [/* Should we build afskrb pts module? */ @%:@undef HAVE_AFSKRB]) m4trace:configure.in:738: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LDAP]) m4trace:configure.in:738: -1- m4_pattern_allow([^HAVE_LDAP$]) m4trace:configure.in:738: -1- AH_OUTPUT([HAVE_LDAP], [/* Should we build ldap pts module? */ @%:@undef HAVE_LDAP]) m4trace:configure.in:738: -1- AC_SUBST([LDAP_CPPFLAGS]) m4trace:configure.in:738: -1- AC_SUBST_TRACE([LDAP_CPPFLAGS]) m4trace:configure.in:738: -1- m4_pattern_allow([^LDAP_CPPFLAGS$]) m4trace:configure.in:738: -1- AC_SUBST([LDAP_LDFLAGS]) m4trace:configure.in:738: -1- AC_SUBST_TRACE([LDAP_LDFLAGS]) m4trace:configure.in:738: -1- m4_pattern_allow([^LDAP_LDFLAGS$]) m4trace:configure.in:738: -1- AC_SUBST([LDAP_LIBS]) m4trace:configure.in:738: -1- AC_SUBST_TRACE([LDAP_LIBS]) m4trace:configure.in:738: -1- m4_pattern_allow([^LDAP_LIBS$]) m4trace:configure.in:748: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LDAP]) m4trace:configure.in:748: -1- m4_pattern_allow([^HAVE_LDAP$]) m4trace:configure.in:748: -1- AH_OUTPUT([HAVE_LDAP], [/* Should we build ldap pts module? */ @%:@undef HAVE_LDAP]) m4trace:configure.in:748: -1- AC_SUBST([LDAP_CPPFLAGS]) m4trace:configure.in:748: -1- AC_SUBST_TRACE([LDAP_CPPFLAGS]) m4trace:configure.in:748: -1- m4_pattern_allow([^LDAP_CPPFLAGS$]) m4trace:configure.in:748: -1- AC_SUBST([LDAP_LDFLAGS]) m4trace:configure.in:748: -1- AC_SUBST_TRACE([LDAP_LDFLAGS]) m4trace:configure.in:748: -1- m4_pattern_allow([^LDAP_LDFLAGS$]) m4trace:configure.in:748: -1- AC_SUBST([LDAP_LIBS]) m4trace:configure.in:748: -1- AC_SUBST_TRACE([LDAP_LIBS]) m4trace:configure.in:748: -1- m4_pattern_allow([^LDAP_LIBS$]) m4trace:configure.in:763: -1- AC_DEFINE_TRACE_LITERAL([WITH_PTS]) m4trace:configure.in:763: -1- m4_pattern_allow([^WITH_PTS$]) m4trace:configure.in:763: -1- AH_OUTPUT([WITH_PTS], [/* Build in PTS support? */ @%:@undef WITH_PTS]) m4trace:configure.in:774: -1- AC_SUBST([SERVER_SUBDIRS]) m4trace:configure.in:774: -1- AC_SUBST_TRACE([SERVER_SUBDIRS]) m4trace:configure.in:774: -1- m4_pattern_allow([^SERVER_SUBDIRS$]) m4trace:configure.in:792: -1- AH_OUTPUT([HAVE_LIBRESOLV], [/* Define to 1 if you have the `resolv\' library (-lresolv). */ @%:@undef HAVE_LIBRESOLV]) m4trace:configure.in:792: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBRESOLV]) m4trace:configure.in:792: -1- m4_pattern_allow([^HAVE_LIBRESOLV$]) m4trace:configure.in:846: -3- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:33: AC_WARN is expanded from... configure.in:846: the top level]) m4trace:configure.in:848: -2- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:33: AC_WARN is expanded from... configure.in:848: the top level]) m4trace:configure.in:850: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:33: AC_WARN is expanded from... configure.in:850: the top level]) m4trace:configure.in:855: -1- AC_DEFINE_TRACE_LITERAL([HAVE_KRB]) m4trace:configure.in:855: -1- m4_pattern_allow([^HAVE_KRB$]) m4trace:configure.in:855: -1- AH_OUTPUT([HAVE_KRB], [/* Support for Kerberos? */ @%:@undef HAVE_KRB]) m4trace:configure.in:902: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SSL]) m4trace:configure.in:902: -1- m4_pattern_allow([^HAVE_SSL$]) m4trace:configure.in:902: -1- AH_OUTPUT([HAVE_SSL], [/* Build with SSL support? */ @%:@undef HAVE_SSL]) m4trace:configure.in:905: -1- AC_DEFINE_TRACE_LITERAL([OPENSSL_ENABLE_OLD_DES_SUPPORT]) m4trace:configure.in:905: -1- m4_pattern_allow([^OPENSSL_ENABLE_OLD_DES_SUPPORT$]) m4trace:configure.in:905: -1- AH_OUTPUT([OPENSSL_ENABLE_OLD_DES_SUPPORT], [/* Configure OpenSSL to provide legacy des apis */ @%:@undef OPENSSL_ENABLE_OLD_DES_SUPPORT]) m4trace:configure.in:906: -1- AC_DEFINE_TRACE_LITERAL([OPENSSL_DES_LIBDES_COMPATIBILITY]) m4trace:configure.in:906: -1- m4_pattern_allow([^OPENSSL_DES_LIBDES_COMPATIBILITY$]) m4trace:configure.in:906: -1- AH_OUTPUT([OPENSSL_DES_LIBDES_COMPATIBILITY], [/* Configure OpenSSL to provide krb4-compatible legacy des apis */ @%:@undef OPENSSL_DES_LIBDES_COMPATIBILITY]) m4trace:configure.in:909: -1- AC_SUBST([OPENSSL_INC]) m4trace:configure.in:909: -1- AC_SUBST_TRACE([OPENSSL_INC]) m4trace:configure.in:909: -1- m4_pattern_allow([^OPENSSL_INC$]) m4trace:configure.in:910: -1- AC_SUBST([OPENSSL_LIB]) m4trace:configure.in:910: -1- AC_SUBST_TRACE([OPENSSL_LIB]) m4trace:configure.in:910: -1- m4_pattern_allow([^OPENSSL_LIB$]) m4trace:configure.in:921: -1- AC_DEFINE_TRACE_LITERAL([EGD_SOCKET]) m4trace:configure.in:921: -1- m4_pattern_allow([^EGD_SOCKET$]) m4trace:configure.in:921: -1- AH_OUTPUT([EGD_SOCKET], [/* Alternative to /dev/urandom? */ @%:@undef EGD_SOCKET]) m4trace:configure.in:927: -2- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... cmulocal/common.m4:42: CMU_FIND_LIB_SUBDIR is expanded from... cmulocal/zlib.m4:6: CMU_HAVE_ZLIB is expanded from... configure.in:927: the top level]) m4trace:configure.in:927: -1- AC_DEFINE_TRACE_LITERAL([SIZEOF_LONG]) m4trace:configure.in:927: -1- m4_pattern_allow([^SIZEOF_LONG$]) m4trace:configure.in:927: -1- AH_OUTPUT([SIZEOF_LONG], [/* The size of `long\', as computed by sizeof. */ @%:@undef SIZEOF_LONG]) m4trace:configure.in:927: -1- AC_SUBST([CMU_LIB_SUBDIR], [$ac_cv_cmu_lib_subdir]) m4trace:configure.in:927: -1- AC_SUBST_TRACE([CMU_LIB_SUBDIR]) m4trace:configure.in:927: -1- m4_pattern_allow([^CMU_LIB_SUBDIR$]) m4trace:configure.in:927: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ZLIB]) m4trace:configure.in:927: -1- m4_pattern_allow([^HAVE_ZLIB$]) m4trace:configure.in:927: -1- AH_OUTPUT([HAVE_ZLIB], [/* Do we have zlib? */ @%:@undef HAVE_ZLIB]) m4trace:configure.in:930: -1- AC_SUBST([ZLIB]) m4trace:configure.in:930: -1- AC_SUBST_TRACE([ZLIB]) m4trace:configure.in:930: -1- m4_pattern_allow([^ZLIB$]) m4trace:configure.in:951: -1- AC_SUBST([ZEPHYR_LIBS]) m4trace:configure.in:951: -1- AC_SUBST_TRACE([ZEPHYR_LIBS]) m4trace:configure.in:951: -1- m4_pattern_allow([^ZEPHYR_LIBS$]) m4trace:configure.in:953: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ZEPHYR]) m4trace:configure.in:953: -1- m4_pattern_allow([^HAVE_ZEPHYR$]) m4trace:configure.in:953: -1- AH_OUTPUT([HAVE_ZEPHYR], [/* Build with Zephyr support? */ @%:@undef HAVE_ZEPHYR]) m4trace:configure.in:963: -1- AC_DEFINE_TRACE_LITERAL([MASTER_PIDFILE]) m4trace:configure.in:963: -1- m4_pattern_allow([^MASTER_PIDFILE$]) m4trace:configure.in:963: -1- AH_OUTPUT([MASTER_PIDFILE], [/* Name of the pidfile for master */ @%:@undef MASTER_PIDFILE]) m4trace:configure.in:996: -1- AH_OUTPUT([HAVE_SYS_SOCKIO_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_SYS_SOCKIO_H]) m4trace:configure.in:996: -1- AC_DEFINE_TRACE_LITERAL([HAVE_SYS_SOCKIO_H]) m4trace:configure.in:996: -1- m4_pattern_allow([^HAVE_SYS_SOCKIO_H$]) m4trace:configure.in:1010: -1- AC_SUBST([IMAP_PROGS]) m4trace:configure.in:1010: -1- AC_SUBST_TRACE([IMAP_PROGS]) m4trace:configure.in:1010: -1- m4_pattern_allow([^IMAP_PROGS$]) m4trace:configure.in:1024: -1- AC_DEFINE_TRACE_LITERAL([HAVE_ET_COM_ERR_H]) m4trace:configure.in:1024: -1- m4_pattern_allow([^HAVE_ET_COM_ERR_H$]) m4trace:configure.in:1024: -1- AH_OUTPUT([HAVE_ET_COM_ERR_H], [/* We need et/com_err.h */ @%:@undef HAVE_ET_COM_ERR_H]) m4trace:configure.in:1024: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:34: AC_ERROR is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/headers.m4:129: _AC_CHECK_HEADER_MONGREL is expanded from... ../../lib/autoconf/headers.m4:67: AC_CHECK_HEADER is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/headers.m4:129: _AC_CHECK_HEADER_MONGREL is expanded from... ../../lib/autoconf/headers.m4:67: AC_CHECK_HEADER is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/libs.m4:99: AC_CHECK_LIB is expanded from... configure.in:1024: the top level]) m4trace:configure.in:1024: -1- AC_SUBST([COMPILE_ET]) m4trace:configure.in:1024: -1- AC_SUBST_TRACE([COMPILE_ET]) m4trace:configure.in:1024: -1- m4_pattern_allow([^COMPILE_ET$]) m4trace:configure.in:1024: -1- AC_SUBST([COMPILE_ET]) m4trace:configure.in:1024: -1- AC_SUBST_TRACE([COMPILE_ET]) m4trace:configure.in:1024: -1- m4_pattern_allow([^COMPILE_ET$]) m4trace:configure.in:1024: -1- AC_SUBST([COMPILE_ET]) m4trace:configure.in:1024: -1- AC_SUBST_TRACE([COMPILE_ET]) m4trace:configure.in:1024: -1- m4_pattern_allow([^COMPILE_ET$]) m4trace:configure.in:1119: -1- AC_SUBST([COMPILE_ET]) m4trace:configure.in:1119: -1- AC_SUBST_TRACE([COMPILE_ET]) m4trace:configure.in:1119: -1- m4_pattern_allow([^COMPILE_ET$]) m4trace:configure.in:1120: -1- AC_SUBST([COM_ERR_LIBS]) m4trace:configure.in:1120: -1- AC_SUBST_TRACE([COM_ERR_LIBS]) m4trace:configure.in:1120: -1- m4_pattern_allow([^COM_ERR_LIBS$]) m4trace:configure.in:1121: -1- AC_SUBST([COM_ERR_LDFLAGS]) m4trace:configure.in:1121: -1- AC_SUBST_TRACE([COM_ERR_LDFLAGS]) m4trace:configure.in:1121: -1- m4_pattern_allow([^COM_ERR_LDFLAGS$]) m4trace:configure.in:1122: -1- AC_SUBST([COM_ERR_CPPFLAGS]) m4trace:configure.in:1122: -1- AC_SUBST_TRACE([COM_ERR_CPPFLAGS]) m4trace:configure.in:1122: -1- m4_pattern_allow([^COM_ERR_CPPFLAGS$]) m4trace:configure.in:1125: -2- _m4_warn([obsolete], [The macro `AC_TRY_CPP' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2529: AC_TRY_CPP is expanded from... configure.in:1125: the top level]) m4trace:configure.in:1143: -1- AC_DEFINE_TRACE_LITERAL([SYSLOG_FACILITY]) m4trace:configure.in:1143: -1- m4_pattern_allow([^SYSLOG_FACILITY$]) m4trace:configure.in:1143: -1- AH_OUTPUT([SYSLOG_FACILITY], [/* Syslog facility to use. */ @%:@undef SYSLOG_FACILITY]) m4trace:configure.in:1147: -1- AH_OUTPUT([HAVE_GETDTABLESIZE], [/* Define to 1 if you have the `getdtablesize\' function. */ @%:@undef HAVE_GETDTABLESIZE]) m4trace:configure.in:1147: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GETDTABLESIZE]) m4trace:configure.in:1147: -1- m4_pattern_allow([^HAVE_GETDTABLESIZE$]) m4trace:configure.in:1147: -1- AC_SUBST([LIB@&t@OBJS], ["$LIB@&t@OBJS getdtablesize.$ac_objext"]) m4trace:configure.in:1147: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) m4trace:configure.in:1147: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.in:1147: -1- AC_LIBSOURCE([getdtablesize.c]) m4trace:configure.in:1160: -2- AC_DEFINE_TRACE_LITERAL([OLD_SIEVE_SERVICE_NAME]) m4trace:configure.in:1160: -2- m4_pattern_allow([^OLD_SIEVE_SERVICE_NAME$]) m4trace:configure.in:1160: -2- AH_OUTPUT([OLD_SIEVE_SERVICE_NAME], [/* Use "imap" as sieve service name? */ @%:@undef OLD_SIEVE_SERVICE_NAME]) m4trace:configure.in:1170: -2- AC_DEFINE_TRACE_LITERAL([ENABLE_X_NETSCAPE_HACK]) m4trace:configure.in:1170: -2- m4_pattern_allow([^ENABLE_X_NETSCAPE_HACK$]) m4trace:configure.in:1170: -2- AH_OUTPUT([ENABLE_X_NETSCAPE_HACK], [/* Enable Netscape Menu Option Hack? */ @%:@undef ENABLE_X_NETSCAPE_HACK]) m4trace:configure.in:1173: -1- AH_OUTPUT([HAVE_LIBDL], [/* Define to 1 if you have the `dl\' library (-ldl). */ @%:@undef HAVE_LIBDL]) m4trace:configure.in:1173: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBDL]) m4trace:configure.in:1173: -1- m4_pattern_allow([^HAVE_LIBDL$]) m4trace:configure.in:1174: -1- AC_SUBST([LIB_CRYPT]) m4trace:configure.in:1174: -1- AC_SUBST_TRACE([LIB_CRYPT]) m4trace:configure.in:1174: -1- m4_pattern_allow([^LIB_CRYPT$]) m4trace:configure.in:1174: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... ../../lib/autoconf/general.m4:1462: AC_ARG_ENABLE is expanded from... cmulocal/sasl2.m4:7: SASL_GSSAPI_CHK is expanded from... cmulocal/sasl2.m4:289: CMU_SASL2 is expanded from... cmulocal/sasl2.m4:410: CMU_SASL2_REQUIRED is expanded from... cmulocal/sasl2.m4:420: CMU_SASL2_REQUIRE_VER is expanded from... configure.in:1174: the top level]) m4trace:configure.in:1174: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... ../../lib/autoconf/general.m4:1481: AC_ARG_WITH is expanded from... cmulocal/sasl2.m4:7: SASL_GSSAPI_CHK is expanded from... cmulocal/sasl2.m4:289: CMU_SASL2 is expanded from... cmulocal/sasl2.m4:410: CMU_SASL2_REQUIRED is expanded from... cmulocal/sasl2.m4:420: CMU_SASL2_REQUIRE_VER is expanded from... configure.in:1174: the top level]) m4trace:configure.in:1174: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:33: AC_WARN is expanded from... cmulocal/sasl2.m4:7: SASL_GSSAPI_CHK is expanded from... cmulocal/sasl2.m4:289: CMU_SASL2 is expanded from... cmulocal/sasl2.m4:410: CMU_SASL2_REQUIRED is expanded from... cmulocal/sasl2.m4:420: CMU_SASL2_REQUIRE_VER is expanded from... configure.in:1174: the top level]) m4trace:configure.in:1174: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:34: AC_ERROR is expanded from... cmulocal/sasl2.m4:7: SASL_GSSAPI_CHK is expanded from... cmulocal/sasl2.m4:289: CMU_SASL2 is expanded from... cmulocal/sasl2.m4:410: CMU_SASL2_REQUIRED is expanded from... cmulocal/sasl2.m4:420: CMU_SASL2_REQUIRE_VER is expanded from... configure.in:1174: the top level]) m4trace:configure.in:1174: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:33: AC_WARN is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/headers.m4:129: _AC_CHECK_HEADER_MONGREL is expanded from... ../../lib/autoconf/headers.m4:67: AC_CHECK_HEADER is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/headers.m4:129: _AC_CHECK_HEADER_MONGREL is expanded from... ../../lib/autoconf/headers.m4:67: AC_CHECK_HEADER is expanded from... cmulocal/sasl2.m4:7: SASL_GSSAPI_CHK is expanded from... cmulocal/sasl2.m4:289: CMU_SASL2 is expanded from... cmulocal/sasl2.m4:410: CMU_SASL2_REQUIRED is expanded from... cmulocal/sasl2.m4:420: CMU_SASL2_REQUIRE_VER is expanded from... configure.in:1174: the top level]) m4trace:configure.in:1174: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSSAPI_H]) m4trace:configure.in:1174: -1- m4_pattern_allow([^HAVE_GSSAPI_H$]) m4trace:configure.in:1174: -1- AH_OUTPUT([HAVE_GSSAPI_H], [/* Define if you have the gssapi.h header file */ @%:@undef HAVE_GSSAPI_H]) m4trace:configure.in:1174: -1- AH_OUTPUT([HAVE_LIBRESOLV], [/* Define to 1 if you have the `resolv\' library (-lresolv). */ @%:@undef HAVE_LIBRESOLV]) m4trace:configure.in:1174: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBRESOLV]) m4trace:configure.in:1174: -1- m4_pattern_allow([^HAVE_LIBRESOLV$]) m4trace:configure.in:1174: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:33: AC_WARN is expanded from... cmulocal/sasl2.m4:7: SASL_GSSAPI_CHK is expanded from... cmulocal/sasl2.m4:289: CMU_SASL2 is expanded from... cmulocal/sasl2.m4:410: CMU_SASL2_REQUIRED is expanded from... cmulocal/sasl2.m4:420: CMU_SASL2_REQUIRE_VER is expanded from... configure.in:1174: the top level]) m4trace:configure.in:1174: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:33: AC_WARN is expanded from... cmulocal/sasl2.m4:7: SASL_GSSAPI_CHK is expanded from... cmulocal/sasl2.m4:289: CMU_SASL2 is expanded from... cmulocal/sasl2.m4:410: CMU_SASL2_REQUIRED is expanded from... cmulocal/sasl2.m4:420: CMU_SASL2_REQUIRE_VER is expanded from... configure.in:1174: the top level]) m4trace:configure.in:1174: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSS_C_NT_HOSTBASED_SERVICE]) m4trace:configure.in:1174: -1- m4_pattern_allow([^HAVE_GSS_C_NT_HOSTBASED_SERVICE$]) m4trace:configure.in:1174: -1- AH_OUTPUT([HAVE_GSS_C_NT_HOSTBASED_SERVICE], [/* Define if your GSSAPI implimentation defines GSS_C_NT_HOSTBASED_SERVICE */ @%:@undef HAVE_GSS_C_NT_HOSTBASED_SERVICE]) m4trace:configure.in:1174: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:33: AC_WARN is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/general.m4:2538: AC_EGREP_CPP is expanded from... cmulocal/sasl2.m4:7: SASL_GSSAPI_CHK is expanded from... cmulocal/sasl2.m4:289: CMU_SASL2 is expanded from... cmulocal/sasl2.m4:410: CMU_SASL2_REQUIRED is expanded from... cmulocal/sasl2.m4:420: CMU_SASL2_REQUIRE_VER is expanded from... configure.in:1174: the top level]) m4trace:configure.in:1174: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSS_C_NT_HOSTBASED_SERVICE]) m4trace:configure.in:1174: -1- m4_pattern_allow([^HAVE_GSS_C_NT_HOSTBASED_SERVICE$]) m4trace:configure.in:1174: -1- AH_OUTPUT([HAVE_GSS_C_NT_HOSTBASED_SERVICE], [/* Define if your GSSAPI implimentation defines GSS_C_NT_HOSTBASED_SERVICE */ @%:@undef HAVE_GSS_C_NT_HOSTBASED_SERVICE]) m4trace:configure.in:1174: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSS_C_NT_HOSTBASED_SERVICE]) m4trace:configure.in:1174: -1- m4_pattern_allow([^HAVE_GSS_C_NT_HOSTBASED_SERVICE$]) m4trace:configure.in:1174: -1- AH_OUTPUT([HAVE_GSS_C_NT_HOSTBASED_SERVICE], [/* Define if your GSSAPI implimentation defines GSS_C_NT_HOSTBASED_SERVICE */ @%:@undef HAVE_GSS_C_NT_HOSTBASED_SERVICE]) m4trace:configure.in:1174: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSS_C_NT_USER_NAME]) m4trace:configure.in:1174: -1- m4_pattern_allow([^HAVE_GSS_C_NT_USER_NAME$]) m4trace:configure.in:1174: -1- AH_OUTPUT([HAVE_GSS_C_NT_USER_NAME], [/* Define if your GSSAPI implimentation defines GSS_C_NT_USER_NAME */ @%:@undef HAVE_GSS_C_NT_USER_NAME]) m4trace:configure.in:1174: -1- _m4_warn([obsolete], [The macro `AC_WARN' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:33: AC_WARN is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/general.m4:2538: AC_EGREP_CPP is expanded from... cmulocal/sasl2.m4:7: SASL_GSSAPI_CHK is expanded from... cmulocal/sasl2.m4:289: CMU_SASL2 is expanded from... cmulocal/sasl2.m4:410: CMU_SASL2_REQUIRED is expanded from... cmulocal/sasl2.m4:420: CMU_SASL2_REQUIRE_VER is expanded from... configure.in:1174: the top level]) m4trace:configure.in:1174: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSS_C_NT_USER_NAME]) m4trace:configure.in:1174: -1- m4_pattern_allow([^HAVE_GSS_C_NT_USER_NAME$]) m4trace:configure.in:1174: -1- AH_OUTPUT([HAVE_GSS_C_NT_USER_NAME], [/* Define if your GSSAPI implimentation defines GSS_C_NT_USER_NAME */ @%:@undef HAVE_GSS_C_NT_USER_NAME]) m4trace:configure.in:1174: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSS_C_NT_USER_NAME]) m4trace:configure.in:1174: -1- m4_pattern_allow([^HAVE_GSS_C_NT_USER_NAME$]) m4trace:configure.in:1174: -1- AH_OUTPUT([HAVE_GSS_C_NT_USER_NAME], [/* Define if your GSSAPI implimentation defines GSS_C_NT_USER_NAME */ @%:@undef HAVE_GSS_C_NT_USER_NAME]) m4trace:configure.in:1174: -1- AH_OUTPUT([HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY], [/* Define to 1 if you have the `gsskrb5_register_acceptor_identity\' function. */ @%:@undef HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY]) m4trace:configure.in:1174: -1- AC_DEFINE_TRACE_LITERAL([HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY]) m4trace:configure.in:1174: -1- m4_pattern_allow([^HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY$]) m4trace:configure.in:1174: -1- AC_SUBST([GSSAPI_LIBS]) m4trace:configure.in:1174: -1- AC_SUBST_TRACE([GSSAPI_LIBS]) m4trace:configure.in:1174: -1- m4_pattern_allow([^GSSAPI_LIBS$]) m4trace:configure.in:1174: -1- AC_SUBST([GSSAPIBASE_LIBS]) m4trace:configure.in:1174: -1- AC_SUBST_TRACE([GSSAPIBASE_LIBS]) m4trace:configure.in:1174: -1- m4_pattern_allow([^GSSAPIBASE_LIBS$]) m4trace:configure.in:1174: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... ../../lib/autoconf/general.m4:1481: AC_ARG_WITH is expanded from... cmulocal/sasl2.m4:289: CMU_SASL2 is expanded from... cmulocal/sasl2.m4:410: CMU_SASL2_REQUIRED is expanded from... cmulocal/sasl2.m4:420: CMU_SASL2_REQUIRE_VER is expanded from... configure.in:1174: the top level]) m4trace:configure.in:1174: -1- _m4_warn([obsolete], [The macro `AC_HELP_STRING' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:207: AC_HELP_STRING is expanded from... ../../lib/autoconf/general.m4:1481: AC_ARG_WITH is expanded from... cmulocal/sasl2.m4:289: CMU_SASL2 is expanded from... cmulocal/sasl2.m4:410: CMU_SASL2_REQUIRED is expanded from... cmulocal/sasl2.m4:420: CMU_SASL2_REQUIRE_VER is expanded from... configure.in:1174: the top level]) m4trace:configure.in:1174: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:34: AC_ERROR is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/headers.m4:129: _AC_CHECK_HEADER_MONGREL is expanded from... ../../lib/autoconf/headers.m4:67: AC_CHECK_HEADER is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/headers.m4:129: _AC_CHECK_HEADER_MONGREL is expanded from... ../../lib/autoconf/headers.m4:67: AC_CHECK_HEADER is expanded from... cmulocal/sasl2.m4:289: CMU_SASL2 is expanded from... cmulocal/sasl2.m4:410: CMU_SASL2_REQUIRED is expanded from... cmulocal/sasl2.m4:420: CMU_SASL2_REQUIRE_VER is expanded from... configure.in:1174: the top level]) m4trace:configure.in:1174: -1- AC_SUBST([LIB_DYN_SASL]) m4trace:configure.in:1174: -1- AC_SUBST_TRACE([LIB_DYN_SASL]) m4trace:configure.in:1174: -1- m4_pattern_allow([^LIB_DYN_SASL$]) m4trace:configure.in:1174: -1- AC_SUBST([DYNSASLFLAGS]) m4trace:configure.in:1174: -1- AC_SUBST_TRACE([DYNSASLFLAGS]) m4trace:configure.in:1174: -1- m4_pattern_allow([^DYNSASLFLAGS$]) m4trace:configure.in:1174: -1- AC_SUBST([LIB_SASL]) m4trace:configure.in:1174: -1- AC_SUBST_TRACE([LIB_SASL]) m4trace:configure.in:1174: -1- m4_pattern_allow([^LIB_SASL$]) m4trace:configure.in:1174: -1- AC_SUBST([SASLFLAGS]) m4trace:configure.in:1174: -1- AC_SUBST_TRACE([SASLFLAGS]) m4trace:configure.in:1174: -1- m4_pattern_allow([^SASLFLAGS$]) m4trace:configure.in:1174: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:34: AC_ERROR is expanded from... cmulocal/sasl2.m4:410: CMU_SASL2_REQUIRED is expanded from... cmulocal/sasl2.m4:420: CMU_SASL2_REQUIRE_VER is expanded from... configure.in:1174: the top level]) m4trace:configure.in:1174: -1- _m4_warn([obsolete], [The macro `AC_TRY_CPP' is obsolete. You should run autoupdate.], [../../lib/autoconf/general.m4:2529: AC_TRY_CPP is expanded from... cmulocal/sasl2.m4:420: CMU_SASL2_REQUIRE_VER is expanded from... configure.in:1174: the top level]) m4trace:configure.in:1174: -1- _m4_warn([obsolete], [The macro `AC_ERROR' is obsolete. You should run autoupdate.], [../../lib/autoconf/oldnames.m4:34: AC_ERROR is expanded from... ../../lib/m4sugar/m4sh.m4:639: AS_IF is expanded from... ../../lib/autoconf/general.m4:2503: _AC_PREPROC_IFELSE is expanded from... ../../lib/autoconf/general.m4:2518: AC_PREPROC_IFELSE is expanded from... ../../lib/autoconf/general.m4:2529: AC_TRY_CPP is expanded from... cmulocal/sasl2.m4:420: CMU_SASL2_REQUIRE_VER is expanded from... configure.in:1174: the top level]) m4trace:configure.in:1175: -1- AC_DEFINE_TRACE_LITERAL([HAVE_APOP]) m4trace:configure.in:1175: -1- m4_pattern_allow([^HAVE_APOP$]) m4trace:configure.in:1175: -1- AH_OUTPUT([HAVE_APOP], [/* Does SASL support APOP? */ @%:@undef HAVE_APOP]) m4trace:configure.in:1188: -1- AC_SUBST([PERL]) m4trace:configure.in:1188: -1- AC_SUBST_TRACE([PERL]) m4trace:configure.in:1188: -1- m4_pattern_allow([^PERL$]) m4trace:configure.in:1207: -1- AC_SUBST([PERL_CCCDLFLAGS]) m4trace:configure.in:1207: -1- AC_SUBST_TRACE([PERL_CCCDLFLAGS]) m4trace:configure.in:1207: -1- m4_pattern_allow([^PERL_CCCDLFLAGS$]) m4trace:configure.in:1232: -1- AC_SUBST([SNMP_SUBDIRS]) m4trace:configure.in:1232: -1- AC_SUBST_TRACE([SNMP_SUBDIRS]) m4trace:configure.in:1232: -1- m4_pattern_allow([^SNMP_SUBDIRS$]) m4trace:configure.in:1234: -1- AC_DEFINE_TRACE_LITERAL([HAVE_LIBWRAP]) m4trace:configure.in:1234: -1- m4_pattern_allow([^HAVE_LIBWRAP$]) m4trace:configure.in:1234: -1- AH_OUTPUT([HAVE_LIBWRAP], [/* Do we have TCP wrappers? */ @%:@undef HAVE_LIBWRAP]) m4trace:configure.in:1234: -1- AC_SUBST([LIB_WRAP]) m4trace:configure.in:1234: -1- AC_SUBST_TRACE([LIB_WRAP]) m4trace:configure.in:1234: -1- m4_pattern_allow([^LIB_WRAP$]) m4trace:configure.in:1235: -1- AC_SUBST([SNMP_CONFIG]) m4trace:configure.in:1235: -1- AC_SUBST_TRACE([SNMP_CONFIG]) m4trace:configure.in:1235: -1- m4_pattern_allow([^SNMP_CONFIG$]) m4trace:configure.in:1235: -1- AC_DEFINE_TRACE_LITERAL([HAVE_NETSNMP]) m4trace:configure.in:1235: -1- m4_pattern_allow([^HAVE_NETSNMP$]) m4trace:configure.in:1235: -1- AH_OUTPUT([HAVE_NETSNMP], [/* Do we have Net-SNMP support? */ @%:@undef HAVE_NETSNMP]) m4trace:configure.in:1235: -1- AC_SUBST([LIB_UCDSNMP]) m4trace:configure.in:1235: -1- AC_SUBST_TRACE([LIB_UCDSNMP]) m4trace:configure.in:1235: -1- m4_pattern_allow([^LIB_UCDSNMP$]) m4trace:configure.in:1235: -1- AH_OUTPUT([HAVE_NET_SNMP_AGENT_AGENT_MODULE_CONFIG_H], [/* Define to 1 if you have the header file. */ @%:@undef HAVE_NET_SNMP_AGENT_AGENT_MODULE_CONFIG_H]) m4trace:configure.in:1235: -1- AC_DEFINE_TRACE_LITERAL([HAVE_NET_SNMP_AGENT_AGENT_MODULE_CONFIG_H]) m4trace:configure.in:1235: -1- m4_pattern_allow([^HAVE_NET_SNMP_AGENT_AGENT_MODULE_CONFIG_H$]) m4trace:configure.in:1235: -1- AC_DEFINE_TRACE_LITERAL([HAVE_UCDSNMP]) m4trace:configure.in:1235: -1- m4_pattern_allow([^HAVE_UCDSNMP$]) m4trace:configure.in:1235: -1- AH_OUTPUT([HAVE_UCDSNMP], [/* Do we have UCD-SNMP support? */ @%:@undef HAVE_UCDSNMP]) m4trace:configure.in:1235: -1- AC_SUBST([LIB_UCDSNMP]) m4trace:configure.in:1235: -1- AC_SUBST_TRACE([LIB_UCDSNMP]) m4trace:configure.in:1235: -1- m4_pattern_allow([^LIB_UCDSNMP$]) m4trace:configure.in:1270: -1- AC_SUBST([LIB_RT]) m4trace:configure.in:1270: -1- AC_SUBST_TRACE([LIB_RT]) m4trace:configure.in:1270: -1- m4_pattern_allow([^LIB_RT$]) m4trace:configure.in:1271: -1- AC_SUBST([IMAP_COM_ERR_LIBS]) m4trace:configure.in:1271: -1- AC_SUBST_TRACE([IMAP_COM_ERR_LIBS]) m4trace:configure.in:1271: -1- m4_pattern_allow([^IMAP_COM_ERR_LIBS$]) m4trace:configure.in:1272: -1- AC_SUBST([IMAP_LIBS]) m4trace:configure.in:1272: -1- AC_SUBST_TRACE([IMAP_LIBS]) m4trace:configure.in:1272: -1- m4_pattern_allow([^IMAP_LIBS$]) m4trace:configure.in:1280: -1- AC_SUBST([PERL_SUBDIRS]) m4trace:configure.in:1280: -1- AC_SUBST_TRACE([PERL_SUBDIRS]) m4trace:configure.in:1280: -1- m4_pattern_allow([^PERL_SUBDIRS$]) m4trace:configure.in:1281: -1- AC_SUBST([PERL_DEPSUBDIRS]) m4trace:configure.in:1281: -1- AC_SUBST_TRACE([PERL_DEPSUBDIRS]) m4trace:configure.in:1281: -1- m4_pattern_allow([^PERL_DEPSUBDIRS$]) m4trace:configure.in:1282: -1- AC_SUBST([PERL]) m4trace:configure.in:1282: -1- AC_SUBST_TRACE([PERL]) m4trace:configure.in:1282: -1- m4_pattern_allow([^PERL$]) m4trace:configure.in:1284: -1- AH_OUTPUT([00001], [ /* * Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The name "Carnegie Mellon University" must not be used to * endorse or promote products derived from this software without * prior written permission. For permission or any legal * details, please contact * Carnegie Mellon University * Center for Technology Transfer and Enterprise Creation * 4615 Forbes Avenue * Suite 302 * Pittsburgh, PA 15213 * (412) 268-7393, fax: (412) 268-7395 * innovation@andrew.cmu.edu * * 4. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by Computing Services * at Carnegie Mellon University (http://www.cmu.edu/computing/)." * * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * $Id: configure.in,v 1.316 2010/01/06 17:01:26 murch Exp $ */ #ifndef _CYRUS_IMAPD_CONFIG_H_ #define _CYRUS_IMAPD_CONFIG_H_ ]) m4trace:configure.in:1332: -1- AH_OUTPUT([zzzz2], [ /* time.h */ #if TIME_WITH_SYS_TIME # include # include #else # if HAVE_SYS_TIME_H # include # else # include # endif #endif /* com_err.h, as needed */ #ifndef IN_COM_ERR #ifdef HAVE_ET_COM_ERR_H #include #else #include #endif /* HAVE_ET_COM_ERR_H */ #endif /* IN_COM_ERR */ /* This allows us to work even when we don\'t have an fdatasync */ #ifndef HAVE_FDATASYNC #define fdatasync(fd) fsync(fd) #endif /* A similar setup for not having O_DSYNC */ #include #ifndef O_DSYNC # ifdef O_SYNC # define O_DSYNC O_SYNC /* POSIX */ # else # define O_DSYNC O_FSYNC /* BSD */ # endif #endif #ifndef HAVE___ATTRIBUTE__ /* Can\'t use attributes... */ #define __attribute__(foo) #endif #ifndef HAVE_SOCKLEN_T typedef unsigned int socklen_t; #endif #ifndef HAVE_RLIM_T typedef int rlim_t; #endif /* some potentially memory saving tradeoffs, preconfigured in memory-saving mode */ /* save the cmdlines for the ID command */ #undef ID_SAVE_CMDLINE /* IPv6 things */ #include #include #include #include #ifndef HAVE_STRUCT_SOCKADDR_STORAGE #define _SS_MAXSIZE 128 /* Implementation specific max size */ #define _SS_PADSIZE (_SS_MAXSIZE - sizeof (struct sockaddr)) struct sockaddr_storage { struct sockaddr ss_sa; char __ss_pad2[_SS_PADSIZE]; }; # define ss_family ss_sa.sa_family # define HAVE_SS_FAMILY #endif /* !HAVE_STRUCT_SOCKADDR_STORAGE */ #ifndef HAVE_SS_FAMILY #define ss_family __ss_family #endif #ifndef AF_INET6 /* Define it to something that should never appear */ #define AF_INET6 AF_MAX #endif #if !defined(HAVE_GETADDRINFO) || !defined(HAVE_GETNAMEINFO) #include "gai.h" #endif /* End IPv6 things */ #ifdef OLD_SIEVE_SERVICE_NAME #define SIEVE_SERVICE_NAME "imap" #else #define SIEVE_SERVICE_NAME "sieve" #endif /* filenames */ #define FNAME_DBDIR "/db" #define FNAME_USERDIR "/user/" #define FNAME_DOMAINDIR "/domain/" #define FNAME_LOGDIR "/log/" #define FNAME_PTSDB "/ptclient/ptscache.db" #define CONFIG_FILENAME (SYSCONFDIR "/imapd.conf") #define DEFAULT_MASTER_CONFIG_FILENAME (SYSCONFDIR "/cyrus.conf") #ifndef HAVE_SHUTDOWN #define shutdown(fd, mode) 0 #endif /* *printf() macros */ #if (SIZEOF_SIZE_T == SIZEOF_INT) #define SIZE_T_FMT "%u" #elif (SIZEOF_SIZE_T == SIZEOF_LONG) #define SIZE_T_FMT "%lu" #elif (SIZEOF_SIZE_T == SIZEOF_LONG_LONG_INT) #define SIZE_T_FMT "%llu" #else #error dont know what to use for SIZE_T_FMT #endif #if (SIZEOF_OFF_T == SIZEOF_LONG) #define OFF_T_FMT "%ld" #define strtoofft(nptr, endptr, base) strtol(nptr, endptr, base) #elif (SIZEOF_OFF_T == SIZEOF_LONG_LONG_INT) #define OFF_T_FMT "%lld" #define strtoofft(nptr, endptr, base) strtoll(nptr, endptr, base) #else #error dont know what to use for OFF_T_FMT #endif /* compile time options; think carefully before modifying */ enum { /* should we send an UNAVAILABLE message to master when * a service is exiting (master is already going to be * informed of the exit by the SIGCHLD signal anyway) ? */ MESSAGE_MASTER_ON_EXIT = 0, /* should a hierarchical rename stop on error? */ RENAME_STOP_ON_ERROR = 1, /* should we call fsync() to maybe help with softupdates? (it should) */ APPEND_ULTRA_PARANOID = 1, /* should we log extra information at the DEBUG level for DB stuff? * 0 -> nothing; 1 -> some; higher -> even more */ CONFIG_DB_VERBOSE = 1, /* log timing information to LOG_DEBUG */ CONFIG_TIMING_VERBOSE = 0, /* should we be pedantic about namespace or sleezy? */ SLEEZY_NAMESPACE = 1, /* should we do a fast TLS session shutdown? */ TLS_FAST_SHUTDOWN = 1, /* should we use the SQUAT engine to accelerate SEARCH? */ SQUAT_ENGINE = 1, /* should we have long LMTP error messages? */ LMTP_LONG_ERROR_MSGS = 1 }; #endif /* _CYRUS_IMAPD_CONFIG_H_ */ ]) m4trace:configure.in:1499: -1- AC_CONFIG_FILES([man/Makefile master/Makefile lib/Makefile imap/Makefile imtest/Makefile netnews/Makefile perl/Makefile $EXTRA_OUTPUT Makefile]) m4trace:configure.in:1499: -1- _m4_warn([obsolete], [AC_OUTPUT should be used without arguments. You should run autoupdate.], []) m4trace:configure.in:1499: -1- AC_SUBST([LIB@&t@OBJS], [$ac_libobjs]) m4trace:configure.in:1499: -1- AC_SUBST_TRACE([LIB@&t@OBJS]) m4trace:configure.in:1499: -1- m4_pattern_allow([^LIB@&t@OBJS$]) m4trace:configure.in:1499: -1- AC_SUBST([LTLIBOBJS], [$ac_ltlibobjs]) m4trace:configure.in:1499: -1- AC_SUBST_TRACE([LTLIBOBJS]) m4trace:configure.in:1499: -1- m4_pattern_allow([^LTLIBOBJS$]) m4trace:configure.in:1499: -1- AC_SUBST_TRACE([top_builddir]) m4trace:configure.in:1499: -1- AC_SUBST_TRACE([top_build_prefix]) m4trace:configure.in:1499: -1- AC_SUBST_TRACE([srcdir]) m4trace:configure.in:1499: -1- AC_SUBST_TRACE([abs_srcdir]) m4trace:configure.in:1499: -1- AC_SUBST_TRACE([top_srcdir]) m4trace:configure.in:1499: -1- AC_SUBST_TRACE([abs_top_srcdir]) m4trace:configure.in:1499: -1- AC_SUBST_TRACE([builddir]) m4trace:configure.in:1499: -1- AC_SUBST_TRACE([abs_builddir]) m4trace:configure.in:1499: -1- AC_SUBST_TRACE([abs_top_builddir]) m4trace:configure.in:1499: -1- AC_SUBST_TRACE([INSTALL]) cyrus-imapd-2.4.18/autom4te.cache/output.00000644000175000017500000121522712546375257017270 0ustar ellieellie@%:@! /bin/sh @%:@ Guess values for system-dependent variables and create Makefiles. @%:@ Generated by GNU Autoconf 2.69. @%:@ @%:@ @%:@ Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. @%:@ @%:@ @%:@ This configure script is free software; the Free Software Foundation @%:@ gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in @%:@( *posix*) : set -o posix ;; @%:@( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in @%:@( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in @%:@(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in @%:@ (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in @%:@( *posix*) : set -o posix ;; @%:@( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in @%:@( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in @%:@ (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## @%:@ as_fn_unset VAR @%:@ --------------- @%:@ Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset @%:@ as_fn_set_status STATUS @%:@ ----------------------- @%:@ Set @S|@? 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 "@S|@as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } @%:@ as_fn_mkdir_p @%:@ as_fn_executable_p FILE @%:@ ----------------------- @%:@ Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } @%:@ as_fn_executable_p @%:@ as_fn_append VAR VALUE @%:@ ---------------------- @%:@ Append the text in VALUE to the end of the definition contained in VAR. Take @%:@ advantage of any shell optimizations that allow amortized linear growth over @%:@ repeated appends, instead of the typical quadratic growth present in naive @%:@ implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append @%:@ as_fn_arith ARG... @%:@ ------------------ @%:@ Perform arithmetic evaluation on the ARGs, and store the result in the @%:@ global @S|@as_val. Take advantage of shells that can avoid forks. The arguments @%:@ must be portable across @S|@(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith @%:@ as_fn_error STATUS ERROR [LINENO LOG_FD] @%:@ ---------------------------------------- @%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are @%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the @%:@ script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } @%:@ as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in @%:@((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIB@&t@OBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= PACKAGE_URL= ac_unique_file="imap/imapd.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='LTLIBOBJS PERL_DEPSUBDIRS PERL_SUBDIRS IMAP_LIBS IMAP_COM_ERR_LIBS LIB_RT LIB_UCDSNMP SNMP_CONFIG LIB_WRAP SNMP_SUBDIRS PERL_CCCDLFLAGS PERL SASLFLAGS LIB_SASL DYNSASLFLAGS LIB_DYN_SASL GSSAPIBASE_LIBS GSSAPI_LIBS LIB_CRYPT COM_ERR_CPPFLAGS COM_ERR_LDFLAGS COM_ERR_LIBS COMPILE_ET IMAP_PROGS ZEPHYR_LIBS ZLIB CMU_LIB_SUBDIR OPENSSL_LIB OPENSSL_INC SERVER_SUBDIRS LDAP_LIBS LDAP_LDFLAGS LDAP_CPPFLAGS AFS_LDFLAGS AFS_LIBS cyrus_cv_sigveclib WITH_LOCK WITH_MAP WITH_GMTOFF WITH_NONBLOCK SIEVE_SUBDIRS LEXLIB LEX_OUTPUT_ROOT LEX YFLAGS YACC SIEVE_CPPFLAGS SIEVE_LIBS SIEVE_OBJS CYRUSDB_OBJS BDB_LIB BDB_INC LOCALDEFS DEPLIBS EXTRA_SUBDIRS PRE_SUBDIRS IPV6_OBJS LIB_SOCKET LIB@&t@OBJS AWK EGREP GREP CPP INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM SET_MAKE RANLIB OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC cyrus_group cyrus_user service_path cyrus_prefix MAKEDEPEND target_os target_vendor target_cpu target host_os host_vendor host_cpu host build_os build_vendor build_cpu build target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking with_extraident with_login with_cyrus_prefix with_service_path with_cyrus_user with_cyrus_group with_bdb with_dbdir with_bdb_libdir with_bdb_incdir with_mysql with_mysql_libdir with_mysql_incdir with_pgsql with_pgsql_libdir with_pgsql_incdir with_sqlite with_sqlite_libdir with_sqlite_incdir enable_sieve enable_pcre with_lock enable_afs with_afs_libdir with_afs_incdir with_ldap enable_krb5afspts enable_server with_krb with_krbimpl enable_statickrb with_krbdes with_openssl with_egd_socket with_lib_subdir with_zlib with_zephyr with_pidfile enable_idled enable_nntp enable_murder enable_replication with_com_err with_syslogfacility enable_cmulocal enable_oldsievename enable_netscapehack enable_gssapi with_gss_impl with_sasl with_staticsasl with_perl with_libwrap with_snmp with_ucdsnmp ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP YACC YFLAGS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX @<:@@S|@ac_default_prefix@:>@ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX @<:@PREFIX@:>@ By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root @<:@DATAROOTDIR/doc/PACKAGE@:>@ --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-sieve disable Sieve support --disable-pcre disable PCRE library --enable-afs Enable AFS with ptloader --enable-krb5afspts compile afskrb PTS module with krb5 support --disable-server disable compiling servers --enable-statickrb link Kerberos statically --enable-idled enable IMAP idled support --enable-nntp enable NNTP support --enable-murder enable IMAP Murder support --enable-replication enable replication support (experimental) --enable-cmulocal enable CMU-specific local support --enable-oldsievename enable the use of 'imap' as the sieve service name --enable-netscapehack enable Netscape hack for the menu option in Communicator to Administrate Mail --enable-gssapi= enable GSSAPI authentication @<:@yes@:>@ Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-extraident=STRING use STRING as extra version information --with-cyrus-prefix=DIR use DIR as cyrus server install directory --with-service-path=DIR use DIR as service install directory --with-cyrus-user=USERID use USERID cyrus userid --with-cyrus-group=GROUPID use GROUPID cyrus group --with-bdb=DIR use Berkeley DB (in DIR) [yes] --with-bdb-libdir=DIR Berkeley DB lib files are in DIR --with-bdb-incdir=DIR Berkeley DB include files are in DIR --with-mysql=DIR use MySQL (in DIR) [no] --with-mysql-libdir=DIR MySQL lib files are in DIR --with-mysql-incdir=DIR MySQL include files are in DIR --with-pgsql=DIR use PostgreSQL (in DIR) [no] --with-pgsql-libdir=DIR Pgsql lib files are in DIR --with-pgsql-incdir=DIR Pgsql include files are in DIR --with-sqlite=DIR use SQLite (in DIR) [no] --with-sqlite-libdir=DIR SQLite lib files are in DIR --with-sqlite-incdir=DIR SQLite include files are in DIR --with-lock=METHOD force use of METHOD for locking (flock or fcntl) --with-afs-libdir=PATH use AFS libraries from PATH [/usr/lib] --with-afs-incdir=PATH use AFS headers from PATH [/usr/include] --with-ldap=DIR use LDAP (in DIR) (experimental) /usr/local --with-krb=PATH use Kerberos from PATH --with-krbimpl=\kth|mit\ assume Kerberos 4 from KTH or MIT --with-krbdes use Kerberos DES implementation [yes] --with-openssl=PATH use OpenSSL from PATH --with-egd-socket=FILE Entropy Gathering Daemon socket pathname for systems without /dev/urandom --with-lib-subdir=DIR Find libraries in DIR instead of lib --with-zlib=PATH use zlib from PATH --with-zephyr=PATH enable Zephyr notification (installed on PATH) --with-pidfile=PATH pidfile in PATH (/var/run/cyrus-master.pid) --with-com_err=PATH use com_err from path -- includes in PATH/include, libs in PATH/lib, and compile_et in PATH/bin --with-syslogfacility=FACILITY set the syslog facility to use (default LOCAL6) --with-gss_impl={heimdal|mit|cybersafe|seam|auto} choose specific GSSAPI implementation @<:@@<:@auto@:>@@:>@ --with-sasl=DIR Compile with libsasl2 in --with-staticsasl=DIR Compile with staticly linked libsasl2 in --with-perl=PERL use PERL for perl --with-libwrap=DIR use libwrap (rooted in DIR) yes --with-snmp=DIR use ucd|net snmp (rooted in DIR) yes Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor YACC The `Yet Another Compiler Compiler' implementation to use. Defaults to the first program found out of: `bison -y', `byacc', `yacc'. YFLAGS The list of arguments that will be passed by default to @S|@YACC. This script will default YFLAGS to the empty string to avoid a default value of `-d' given by some make applications. Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## @%:@ ac_fn_c_try_compile LINENO @%:@ -------------------------- @%:@ Try to compile conftest.@S|@ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_compile @%:@ ac_fn_c_try_cpp LINENO @%:@ ---------------------- @%:@ Try to preprocess conftest.@S|@ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_cpp @%:@ ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES @%:@ ------------------------------------------------------- @%:@ Tests whether HEADER exists, giving a warning if it cannot be compiled using @%:@ the include files in INCLUDES and setting the cache variable VAR @%:@ accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 @%:@include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_header_mongrel @%:@ ac_fn_c_try_run LINENO @%:@ ---------------------- @%:@ Try to link conftest.@S|@ac_ext, and return whether this succeeded. Assumes @%:@ that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_run @%:@ ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES @%:@ ------------------------------------------------------- @%:@ Tests whether HEADER exists and can be compiled using the include files in @%:@ INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 @%:@include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_header_compile @%:@ ac_fn_c_try_link LINENO @%:@ ----------------------- @%:@ Try to link conftest.@S|@ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } @%:@ ac_fn_c_try_link @%:@ ac_fn_c_compute_int LINENO EXPR VAR INCLUDES @%:@ -------------------------------------------- @%:@ Tries to find the compile-time value of EXPR in a program that includes @%:@ INCLUDES, setting VAR accordingly. Returns whether the value could be @%:@ computed ac_fn_c_compute_int () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array @<:@1 - 2 * !(($2) >= 0)@:>@; test_array @<:@0@:>@ = 0; return test_array @<:@0@:>@; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_lo=0 ac_mid=0 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array @<:@1 - 2 * !(($2) <= $ac_mid)@:>@; test_array @<:@0@:>@ = 0; return test_array @<:@0@:>@; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid; break else as_fn_arith $ac_mid + 1 && ac_lo=$as_val if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array @<:@1 - 2 * !(($2) < 0)@:>@; test_array @<:@0@:>@ = 0; return test_array @<:@0@:>@; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=-1 ac_mid=-1 while :; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array @<:@1 - 2 * !(($2) >= $ac_mid)@:>@; test_array @<:@0@:>@ = 0; return test_array @<:@0@:>@; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_lo=$ac_mid; break else as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { static int test_array @<:@1 - 2 * !(($2) <= $ac_mid)@:>@; test_array @<:@0@:>@ = 0; return test_array @<:@0@:>@; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_hi=$ac_mid else as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in @%:@(( ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; '') ac_retval=1 ;; esac else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 static long int longval () { return $2; } static unsigned long int ulongval () { return $2; } @%:@include @%:@include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if (($2) < 0) { long int i = longval (); if (i != ($2)) return 1; fprintf (f, "%ld", i); } else { unsigned long int i = ulongval (); if (i != ($2)) return 1; fprintf (f, "%lu", i); } /* Do not output a trailing newline, as this causes \r\n confusion on some platforms. */ return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : echo >>conftest.val; read $3 &5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_func @%:@ ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES @%:@ ---------------------------------------------------- @%:@ Tries to find if the field MEMBER exists in type AGGR, after including @%:@ INCLUDES, setting cache variable VAR accordingly. ac_fn_c_check_member () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 $as_echo_n "checking for $2.$3... " >&6; } if eval \${$4+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int main () { static $2 ac_aggr; if (ac_aggr.$3) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$4=yes" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int main () { static $2 ac_aggr; if (sizeof ac_aggr.$3) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$4=yes" else eval "$4=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$4 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_member @%:@ ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES @%:@ --------------------------------------------- @%:@ Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR @%:@ accordingly. ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_decl_name=`echo $2|sed 's/ *(.*//'` as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 $as_echo_n "checking whether $as_decl_name is declared... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { @%:@ifndef $as_decl_name @%:@ifdef __cplusplus (void) $as_decl_use; @%:@else (void) $as_decl_name; @%:@endif @%:@endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } @%:@ ac_fn_c_check_decl cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF @%:@define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in @%:@(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_config_headers="$ac_config_headers config.h" ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 $as_echo_n "checking target system type... " >&6; } if ${ac_cv_target+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 $as_echo "$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' set x $ac_cv_target shift target_cpu=$1 target_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: target_os=$* IFS=$ac_save_IFS case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- @%:@ Check whether --with-extraident was given. if test "${with_extraident+set}" = set; then : withval=$with_extraident; cat >>confdefs.h <<_ACEOF @%:@define EXTRA_IDENT "$withval" _ACEOF fi # Extract the first word of "makedepend", so it can be a program name with args. set dummy makedepend; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MAKEDEPEND+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MAKEDEPEND"; then ac_cv_prog_MAKEDEPEND="$MAKEDEPEND" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MAKEDEPEND="makedepend" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_MAKEDEPEND" && ac_cv_prog_MAKEDEPEND="`cd ${srcdir};pwd`/tools/not-mkdep" fi fi MAKEDEPEND=$ac_cv_prog_MAKEDEPEND if test -n "$MAKEDEPEND"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKEDEPEND" >&5 $as_echo "$MAKEDEPEND" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "$MAKEDEPEND" != "makedepend"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Makedepend is not installed on this system. You should compile and install the version from the makedepend subdirectory." >&5 $as_echo "$as_me: WARNING: Makedepend is not installed on this system. You should compile and install the version from the makedepend subdirectory." >&2;} fi @%:@ Check whether --with-login was given. if test "${with_login+set}" = set; then : withval=$with_login; as_fn_error $? "--with-login is no longer supported. Configure SASL appropriately instead." "$LINENO" 5 fi @%:@ Check whether --with-cyrus-prefix was given. if test "${with_cyrus_prefix+set}" = set; then : withval=$with_cyrus_prefix; cyrus_prefix="$withval" else cyrus_prefix="/usr/cyrus" fi cat >>confdefs.h <<_ACEOF @%:@define CYRUS_PATH "$cyrus_prefix" _ACEOF @%:@ Check whether --with-service-path was given. if test "${with_service_path+set}" = set; then : withval=$with_service_path; service_path="$withval" else service_path="$cyrus_prefix/bin" fi cat >>confdefs.h <<_ACEOF @%:@define SERVICE_PATH "$service_path" _ACEOF @%:@ Check whether --with-cyrus-user was given. if test "${with_cyrus_user+set}" = set; then : withval=$with_cyrus_user; cyrus_user="$withval" else cyrus_user="cyrus" fi cat >>confdefs.h <<_ACEOF @%:@define CYRUS_USER "$cyrus_user" _ACEOF @%:@ Check whether --with-cyrus-group was given. if test "${with_cyrus_group+set}" = set; then : withval=$with_cyrus_group; cyrus_group="$withval" else cyrus_group="mail" fi if test $sysconfdir = '${prefix}/etc'; then sysconfdir="/etc" fi cat >>confdefs.h <<_ACEOF @%:@define SYSCONFDIR "$sysconfdir" _ACEOF ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $@%:@ != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in @%:@(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@ifdef __STDC__ @%:@ include @%:@else @%:@ include @%:@endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @%:@include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "@%:@define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" if test "x$ac_cv_header_minix_config_h" = xyes; then : MINIX=yes else MINIX= fi if test "$MINIX" = yes; then $as_echo "@%:@define _POSIX_SOURCE 1" >>confdefs.h $as_echo "@%:@define _POSIX_1_SOURCE 2" >>confdefs.h $as_echo "@%:@define _MINIX 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } if ${ac_cv_safe_to_define___extensions__+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ # define __EXTENSIONS__ 1 $ac_includes_default int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_safe_to_define___extensions__=yes else ac_cv_safe_to_define___extensions__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } test $ac_cv_safe_to_define___extensions__ = yes && $as_echo "@%:@define __EXTENSIONS__ 1" >>confdefs.h $as_echo "@%:@define _ALL_SOURCE 1" >>confdefs.h $as_echo "@%:@define _GNU_SOURCE 1" >>confdefs.h $as_echo "@%:@define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h $as_echo "@%:@define _TANDEM_SOURCE 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5 $as_echo_n "checking for library containing strerror... " >&6; } if ${ac_cv_search_strerror+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char strerror (); int main () { return strerror (); ; return 0; } _ACEOF for ac_lib in '' cposix; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_strerror=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_strerror+:} false; then : break fi done if ${ac_cv_search_strerror+:} false; then : else ac_cv_search_strerror=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5 $as_echo "$ac_cv_search_strerror" >&6; } ac_res=$ac_cv_search_strerror if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 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 ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "@%:@define const /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5 $as_echo_n "checking for long file names... " >&6; } if ${ac_cv_sys_long_file_names+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_sys_long_file_names=yes # Test for long file names in all the places we know might matter: # . the current directory, where building will happen # $prefix/lib where we will be installing things # $exec_prefix/lib likewise # $TMPDIR if set, where it might want to write temporary files # /tmp where it might want to write temporary files # /var/tmp likewise # /usr/tmp likewise for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib # in the usual case where exec_prefix is '${prefix}'. case $ac_dir in #( . | /* | ?:[\\/]*) ;; #( *) continue;; esac test -w "$ac_dir/." || continue # It is less confusing to not echo anything here. ac_xdir=$ac_dir/cf$$ (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue ac_tf1=$ac_xdir/conftest9012345 ac_tf2=$ac_xdir/conftest9012346 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" || ac_cv_sys_long_file_names=no rm -f -r "$ac_xdir" 2>/dev/null test $ac_cv_sys_long_file_names = no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5 $as_echo "$ac_cv_sys_long_file_names" >&6; } if test $ac_cv_sys_long_file_names = yes; then $as_echo "@%:@define HAVE_LONG_FILE_NAMES 1" >>confdefs.h fi if test $ac_cv_sys_long_file_names = no; then as_fn_error $? "The Cyrus IMAPD requires support for long file names" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 $as_echo_n "checking size of int... " >&6; } if ${ac_cv_sizeof_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default"; then : else if test "$ac_cv_type_int" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (int) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_int=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 $as_echo "$ac_cv_sizeof_int" >&6; } cat >>confdefs.h <<_ACEOF @%:@define SIZEOF_INT $ac_cv_sizeof_int _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 $as_echo_n "checking size of long... " >&6; } if ${ac_cv_sizeof_long+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : else if test "$ac_cv_type_long" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 $as_echo "$ac_cv_sizeof_long" >&6; } cat >>confdefs.h <<_ACEOF @%:@define SIZEOF_LONG $ac_cv_sizeof_long _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5 $as_echo_n "checking size of size_t... " >&6; } if ${ac_cv_sizeof_size_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default"; then : else if test "$ac_cv_type_size_t" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (size_t) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_size_t=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5 $as_echo "$ac_cv_sizeof_size_t" >&6; } cat >>confdefs.h <<_ACEOF @%:@define SIZEOF_SIZE_T $ac_cv_sizeof_size_t _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of off_t" >&5 $as_echo_n "checking size of off_t... " >&6; } if ${ac_cv_sizeof_off_t+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (off_t))" "ac_cv_sizeof_off_t" "$ac_includes_default"; then : else if test "$ac_cv_type_off_t" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (off_t) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_off_t=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_off_t" >&5 $as_echo "$ac_cv_sizeof_off_t" >&6; } cat >>confdefs.h <<_ACEOF @%:@define SIZEOF_OFF_T $ac_cv_sizeof_off_t _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long int" >&5 $as_echo_n "checking size of long long int... " >&6; } if ${ac_cv_sizeof_long_long_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long int))" "ac_cv_sizeof_long_long_int" "$ac_includes_default"; then : else if test "$ac_cv_type_long_long_int" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long long int) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long_long_int=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long_int" >&5 $as_echo "$ac_cv_sizeof_long_long_int" >&6; } cat >>confdefs.h <<_ACEOF @%:@define SIZEOF_LONG_LONG_INT $ac_cv_sizeof_long_long_int _ACEOF # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long int" >&5 $as_echo_n "checking size of unsigned long long int... " >&6; } if ${ac_cv_sizeof_unsigned_long_long_int+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long int))" "ac_cv_sizeof_unsigned_long_long_int" "$ac_includes_default"; then : else if test "$ac_cv_type_unsigned_long_long_int" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (unsigned long long int) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_unsigned_long_long_int=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long_int" >&5 $as_echo "$ac_cv_sizeof_unsigned_long_long_int" >&6; } cat >>confdefs.h <<_ACEOF @%:@define SIZEOF_UNSIGNED_LONG_LONG_INT $ac_cv_sizeof_unsigned_long_long_int _ACEOF if test "$ac_cv_sizeof_long_long_int" -eq 8 -a \ "$ac_cv_sizeof_unsigned_long_long_int" -eq 8; then $as_echo "@%:@define HAVE_LONG_LONG_INT /**/" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. ac_arch= ac_prev= for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do if test -n "$ac_prev"; then case $ac_word in i?86 | x86_64 | ppc | ppc64) if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ac_arch=$ac_word else ac_cv_c_bigendian=universal break fi ;; esac ac_prev= elif test "x$ac_word" = "x-arch"; then ac_prev=arch fi done fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no else ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) $as_echo "@%:@define WORDS_BIGENDIAN 1" >>confdefs.h ;; #( no) ;; #( universal) $as_echo "@%:@define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) as_fn_error $? "unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__" >&5 $as_echo_n "checking for __attribute__... " >&6; } if ${ac_cv___attribute__+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include static void foo(void) __attribute__ ((noreturn)); static void foo(void) { exit(1); } int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv___attribute__=yes else ac_cv___attribute__=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "$ac_cv___attribute__" = "yes"; then $as_echo "@%:@define HAVE___ATTRIBUTE__ 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv___attribute__" >&5 $as_echo "$ac_cv___attribute__" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if compiler supports -fPIC" >&5 $as_echo_n "checking if compiler supports -fPIC... " >&6; } if ${ac_cv_fpic+:} false; then : $as_echo_n "(cached) " >&6 else save_CFLAGS=$CFLAGS CFLAGS="${CFLAGS} -fPIC" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include static void foo(void) { exit(1); } int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_fpic=yes else ac_cv_fpic=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext CFLAGS=$save_CFLAGS fi if test "$ac_cv_fpic" = "yes"; then FPIC_CFLAGS="-fPIC" else FPIC_CFLAGS="" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_fpic" >&5 $as_echo "$ac_cv_fpic" >&6; } # CMU GUESS RUNPATH SWITCH { $as_echo "$as_me:${as_lineno-$LINENO}: checking for runpath switch" >&5 $as_echo_n "checking for runpath switch... " >&6; } if ${andrew_cv_runpath_switch+:} false; then : $as_echo_n "(cached) " >&6 else # first, try -R SAVE_LDFLAGS="${LDFLAGS}" LDFLAGS="-R /usr/lib" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : andrew_cv_runpath_switch="-R" else LDFLAGS="-Wl,-rpath,/usr/lib" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : andrew_cv_runpath_switch="-Wl,-rpath," else andrew_cv_runpath_switch="none" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="${SAVE_LDFLAGS}" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $andrew_cv_runpath_switch" >&5 $as_echo "$andrew_cv_runpath_switch" >&6; } for ac_header in unistd.h sys/select.h sys/param.h stdarg.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove" if test "x$ac_cv_func_memmove" = xyes; then : $as_echo "@%:@define HAVE_MEMMOVE 1" >>confdefs.h else case " $LIB@&t@OBJS " in *" memmove.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS memmove.$ac_objext" ;; esac fi ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" if test "x$ac_cv_func_strcasecmp" = xyes; then : $as_echo "@%:@define HAVE_STRCASECMP 1" >>confdefs.h else case " $LIB@&t@OBJS " in *" strcasecmp.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS strcasecmp.$ac_objext" ;; esac fi ac_fn_c_check_func "$LINENO" "ftruncate" "ac_cv_func_ftruncate" if test "x$ac_cv_func_ftruncate" = xyes; then : $as_echo "@%:@define HAVE_FTRUNCATE 1" >>confdefs.h else case " $LIB@&t@OBJS " in *" ftruncate.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS ftruncate.$ac_objext" ;; esac fi ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror" if test "x$ac_cv_func_strerror" = xyes; then : $as_echo "@%:@define HAVE_STRERROR 1" >>confdefs.h else case " $LIB@&t@OBJS " in *" strerror.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS strerror.$ac_objext" ;; esac fi for ac_func in strlcat strlcpy getgrouplist do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } if eval \${$as_ac_Header+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include <$ac_hdr> int main () { if ((DIR *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$as_ac_Header=yes" else eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_ac_Header { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } if ${ac_cv_search_opendir+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' dir; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_opendir=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_opendir+:} false; then : break fi done if ${ac_cv_search_opendir+:} false; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 $as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } if ${ac_cv_search_opendir+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' x; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_opendir=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_opendir+:} false; then : break fi done if ${ac_cv_search_opendir+:} false; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 $as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi fi for ac_header in stdlib.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_STDLIB_H 1 _ACEOF fi done for ac_func in getpassphrase do : ac_fn_c_check_func "$LINENO" "getpassphrase" "ac_cv_func_getpassphrase" if test "x$ac_cv_func_getpassphrase" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_GETPASSPHRASE 1 _ACEOF fi done save_LIBS="$LIBS" LIB_SOCKET="" ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" if test "x$ac_cv_func_connect" = xyes; then : : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5 $as_echo_n "checking for gethostbyname in -lnsl... " >&6; } if ${ac_cv_lib_nsl_gethostbyname+:} false; 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" = xyes; then : LIB_SOCKET="-lnsl $LIB_SOCKET" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 $as_echo_n "checking for connect in -lsocket... " >&6; } if ${ac_cv_lib_socket_connect+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char connect (); int main () { return connect (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_connect=yes else ac_cv_lib_socket_connect=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 $as_echo "$ac_cv_lib_socket_connect" >&6; } if test "x$ac_cv_lib_socket_connect" = xyes; then : LIB_SOCKET="-lsocket $LIB_SOCKET" fi fi LIBS="$LIB_SOCKET $save_LIBS" ac_fn_c_check_func "$LINENO" "res_search" "ac_cv_func_res_search" if test "x$ac_cv_func_res_search" = xyes; then : : else LIBS="-lresolv $LIB_SOCKET $save_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ [ #include #include #include #ifdef HAVE_ARPA_NAMESER_COMPAT_H #include #endif #include ] int main () { [ const char host[12]="openafs.org"; u_char ans[1024]; res_search( host, C_IN, T_MX, (u_char *)&ans, sizeof(ans)); return 0; ] ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : LIB_SOCKET="-lresolv $LIB_SOCKET" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi LIBS="$LIB_SOCKET $save_LIBS" for ac_func in dn_expand dns_lookup do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done LIBS="$save_LIBS" LIBS="$LIBS ${LIB_SOCKET}" cyrus_cv_getaddrinfo=yes ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo" if test "x$ac_cv_func_getaddrinfo" = xyes; then : ac_cv_lib_socket_getaddrinfo=no ac_cv_lib_inet6_getaddrinfo=no else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -lsocket" >&5 $as_echo_n "checking for getaddrinfo in -lsocket... " >&6; } if ${ac_cv_lib_socket_getaddrinfo+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char getaddrinfo (); int main () { return getaddrinfo (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_getaddrinfo=yes else ac_cv_lib_socket_getaddrinfo=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_getaddrinfo" >&5 $as_echo "$ac_cv_lib_socket_getaddrinfo" >&6; } if test "x$ac_cv_lib_socket_getaddrinfo" = xyes; then : LIBS="$LIBS -lsocket" ac_cv_lib_inet6_getaddrinfo=no else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether your system has IPv6 directory" >&5 $as_echo_n "checking whether your system has IPv6 directory... " >&6; } if ${ipv6_cv_dir+:} false; then : $as_echo_n "(cached) " >&6 else for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6_cv_dir" >&5 $as_echo "$ipv6_cv_dir" >&6; } if test $ipv6_cv_dir = no; then ac_cv_lib_inet6_getaddrinfo=no else if test x$ipv6_libinet6 = x; then ipv6_libinet6=no SAVELDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getaddrinfo in -linet6" >&5 $as_echo_n "checking for getaddrinfo in -linet6... " >&6; } if ${ac_cv_lib_inet6_getaddrinfo+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-linet6 $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 getaddrinfo (); int main () { return getaddrinfo (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_inet6_getaddrinfo=yes else ac_cv_lib_inet6_getaddrinfo=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_inet6_getaddrinfo" >&5 $as_echo "$ac_cv_lib_inet6_getaddrinfo" >&6; } if test "x$ac_cv_lib_inet6_getaddrinfo" = xyes; then : if test $ipv6_libinet6 = no; then ipv6_libinet6=yes LIBS="$LIBS -linet6" fi fi if test $ipv6_libinet6 = no; then LDFLAGS="$SAVELDFLAGS" fi fi fi fi ipv6_cv_getaddrinfo=no if test $ac_cv_func_getaddrinfo = yes -o $ac_cv_lib_socket_getaddrinfo = yes \ -o $ac_cv_lib_inet6_getaddrinfo = yes then ipv6_cv_getaddrinfo=yes fi if test $ipv6_cv_getaddrinfo = no; then if test getaddrinfo = getaddrinfo; then for ipv6_cv_pfx in o n; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "${ipv6_cv_pfx}getaddrinfo" >/dev/null 2>&1; then : as_ac_var=`$as_echo "ac_cv_func_${ipv6_cv_pfx}getaddrinfo" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "${ipv6_cv_pfx}getaddrinfo" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : fi fi rm -f conftest* if eval test X\$ac_cv_func_${ipv6_cv_pfx}getaddrinfo = Xyes; then $as_echo "@%:@define HAVE_GETADDRINFO /**/" >>confdefs.h ipv6_cv_getaddrinfo=yes break fi done fi fi if test $ipv6_cv_getaddrinfo = yes; then ac_fn_c_check_func "$LINENO" "gai_strerror" "ac_cv_func_gai_strerror" if test "x$ac_cv_func_gai_strerror" = xyes; then : ac_cv_lib_socket_gai_strerror=no ac_cv_lib_inet6_gai_strerror=no else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gai_strerror in -lsocket" >&5 $as_echo_n "checking for gai_strerror in -lsocket... " >&6; } if ${ac_cv_lib_socket_gai_strerror+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gai_strerror (); int main () { return gai_strerror (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_gai_strerror=yes else ac_cv_lib_socket_gai_strerror=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_gai_strerror" >&5 $as_echo "$ac_cv_lib_socket_gai_strerror" >&6; } if test "x$ac_cv_lib_socket_gai_strerror" = xyes; then : LIBS="$LIBS -lsocket" ac_cv_lib_inet6_gai_strerror=no else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether your system has IPv6 directory" >&5 $as_echo_n "checking whether your system has IPv6 directory... " >&6; } if ${ipv6_cv_dir+:} false; then : $as_echo_n "(cached) " >&6 else for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6_cv_dir" >&5 $as_echo "$ipv6_cv_dir" >&6; } if test $ipv6_cv_dir = no; then ac_cv_lib_inet6_gai_strerror=no else if test x$ipv6_libinet6 = x; then ipv6_libinet6=no SAVELDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gai_strerror in -linet6" >&5 $as_echo_n "checking for gai_strerror in -linet6... " >&6; } if ${ac_cv_lib_inet6_gai_strerror+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-linet6 $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 gai_strerror (); int main () { return gai_strerror (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_inet6_gai_strerror=yes else ac_cv_lib_inet6_gai_strerror=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_inet6_gai_strerror" >&5 $as_echo "$ac_cv_lib_inet6_gai_strerror" >&6; } if test "x$ac_cv_lib_inet6_gai_strerror" = xyes; then : if test $ipv6_libinet6 = no; then ipv6_libinet6=yes LIBS="$LIBS -linet6" fi fi if test $ipv6_libinet6 = no; then LDFLAGS="$SAVELDFLAGS" fi fi fi fi ipv6_cv_gai_strerror=no if test $ac_cv_func_gai_strerror = yes -o $ac_cv_lib_socket_gai_strerror = yes \ -o $ac_cv_lib_inet6_gai_strerror = yes then ipv6_cv_gai_strerror=yes fi if test $ipv6_cv_gai_strerror = no; then if test gai_strerror = getaddrinfo; then for ipv6_cv_pfx in o n; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "${ipv6_cv_pfx}gai_strerror" >/dev/null 2>&1; then : as_ac_var=`$as_echo "ac_cv_func_${ipv6_cv_pfx}gai_strerror" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "${ipv6_cv_pfx}gai_strerror" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : fi fi rm -f conftest* if eval test X\$ac_cv_func_${ipv6_cv_pfx}gai_strerror = Xyes; then $as_echo "@%:@define HAVE_GETADDRINFO /**/" >>confdefs.h ipv6_cv_gai_strerror=yes break fi done fi fi if test $ipv6_cv_gai_strerror = yes; then $as_echo "@%:@define HAVE_GETADDRINFO /**/" >>confdefs.h else cyrus_cv_getaddrinfo=no fi else cyrus_cv_getaddrinfo=no fi if test $cyrus_cv_getaddrinfo = no; then IPV6_OBJS="getaddrinfo.o" fi cyrus_cv_getnameinfo=yes ac_fn_c_check_func "$LINENO" "getnameinfo" "ac_cv_func_getnameinfo" if test "x$ac_cv_func_getnameinfo" = xyes; then : ac_cv_lib_socket_getnameinfo=no ac_cv_lib_inet6_getnameinfo=no else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getnameinfo in -lsocket" >&5 $as_echo_n "checking for getnameinfo in -lsocket... " >&6; } if ${ac_cv_lib_socket_getnameinfo+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char getnameinfo (); int main () { return getnameinfo (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_getnameinfo=yes else ac_cv_lib_socket_getnameinfo=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_getnameinfo" >&5 $as_echo "$ac_cv_lib_socket_getnameinfo" >&6; } if test "x$ac_cv_lib_socket_getnameinfo" = xyes; then : LIBS="$LIBS -lsocket" ac_cv_lib_inet6_getnameinfo=no else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether your system has IPv6 directory" >&5 $as_echo_n "checking whether your system has IPv6 directory... " >&6; } if ${ipv6_cv_dir+:} false; then : $as_echo_n "(cached) " >&6 else for ipv6_cv_dir in /usr/local/v6 /usr/inet6 no; do if test $ipv6_cv_dir = no -o -d $ipv6_cv_dir; then break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6_cv_dir" >&5 $as_echo "$ipv6_cv_dir" >&6; } if test $ipv6_cv_dir = no; then ac_cv_lib_inet6_getnameinfo=no else if test x$ipv6_libinet6 = x; then ipv6_libinet6=no SAVELDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -L$ipv6_cv_dir/lib" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getnameinfo in -linet6" >&5 $as_echo_n "checking for getnameinfo in -linet6... " >&6; } if ${ac_cv_lib_inet6_getnameinfo+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-linet6 $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 getnameinfo (); int main () { return getnameinfo (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_inet6_getnameinfo=yes else ac_cv_lib_inet6_getnameinfo=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_inet6_getnameinfo" >&5 $as_echo "$ac_cv_lib_inet6_getnameinfo" >&6; } if test "x$ac_cv_lib_inet6_getnameinfo" = xyes; then : if test $ipv6_libinet6 = no; then ipv6_libinet6=yes LIBS="$LIBS -linet6" fi fi if test $ipv6_libinet6 = no; then LDFLAGS="$SAVELDFLAGS" fi fi fi fi ipv6_cv_getnameinfo=no if test $ac_cv_func_getnameinfo = yes -o $ac_cv_lib_socket_getnameinfo = yes \ -o $ac_cv_lib_inet6_getnameinfo = yes then ipv6_cv_getnameinfo=yes fi if test $ipv6_cv_getnameinfo = no; then if test getnameinfo = getaddrinfo; then for ipv6_cv_pfx in o n; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "${ipv6_cv_pfx}getnameinfo" >/dev/null 2>&1; then : as_ac_var=`$as_echo "ac_cv_func_${ipv6_cv_pfx}getnameinfo" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "${ipv6_cv_pfx}getnameinfo" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : fi fi rm -f conftest* if eval test X\$ac_cv_func_${ipv6_cv_pfx}getnameinfo = Xyes; then $as_echo "@%:@define HAVE_GETADDRINFO /**/" >>confdefs.h ipv6_cv_getnameinfo=yes break fi done fi fi if test $ipv6_cv_getnameinfo = yes; then $as_echo "@%:@define HAVE_GETNAMEINFO /**/" >>confdefs.h else cyrus_cv_getnameinfo=no fi if test $cyrus_cv_getnameinfo = no; then IPV6_OBJS="$IPV6_OBJS getnameinfo.o" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether you have ss_family in struct sockaddr_storage" >&5 $as_echo_n "checking whether you have ss_family in struct sockaddr_storage... " >&6; } if ${ipv6_cv_ss_family+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { struct sockaddr_storage ss; int i = ss.ss_family; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ipv6_cv_ss_family=yes else ipv6_cv_ss_family=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ipv6_cv_ss_family = yes; then $as_echo "@%:@define HAVE_SS_FAMILY /**/" >>confdefs.h else : fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6_cv_ss_family" >&5 $as_echo "$ipv6_cv_ss_family" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether you have sa_len in struct sockaddr" >&5 $as_echo_n "checking whether you have sa_len in struct sockaddr... " >&6; } if ${ipv6_cv_sa_len+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { struct sockaddr sa; int i = sa.sa_len; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ipv6_cv_sa_len=yes else ipv6_cv_sa_len=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ipv6_cv_sa_len = yes; then $as_echo "@%:@define HAVE_SOCKADDR_SA_LEN /**/" >>confdefs.h else : fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ipv6_cv_sa_len" >&5 $as_echo "$ipv6_cv_sa_len" >&6; } for ac_header in sys/time.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" if test "x$ac_cv_header_sys_time_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_SYS_TIME_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_time=yes else ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then $as_echo "@%:@define TIME_WITH_SYS_TIME 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; } if ${ac_cv_struct_tm+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { struct tm tm; int *p = &tm.tm_sec; return !p; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_struct_tm=time.h else ac_cv_struct_tm=sys/time.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 $as_echo "$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then $as_echo "@%:@define TM_IN_SYS_TIME 1" >>confdefs.h fi ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include #include <$ac_cv_struct_tm> " if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_STRUCT_TM_TM_ZONE 1 _ACEOF fi if test "$ac_cv_member_struct_tm_tm_zone" = yes; then $as_echo "@%:@define HAVE_TM_ZONE 1" >>confdefs.h else ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include " if test "x$ac_cv_have_decl_tzname" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF @%:@define HAVE_DECL_TZNAME $ac_have_decl _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 $as_echo_n "checking for tzname... " >&6; } if ${ac_cv_var_tzname+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if !HAVE_DECL_TZNAME extern char *tzname[]; #endif int main () { return tzname[0][0]; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_var_tzname=yes else ac_cv_var_tzname=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5 $as_echo "$ac_cv_var_tzname" >&6; } if test $ac_cv_var_tzname = yes; then $as_echo "@%:@define HAVE_TZNAME 1" >>confdefs.h fi fi for ac_func in vprintf do : ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf" if test "x$ac_cv_func_vprintf" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_VPRINTF 1 _ACEOF ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" if test "x$ac_cv_func__doprnt" = xyes; then : $as_echo "@%:@define HAVE_DOPRNT 1" >>confdefs.h fi fi done CYRUSDB_OBJS="cyrusdb_flat.o cyrusdb_skiplist.o cyrusdb_quotalegacy.o" @%:@ Check whether --with-bdb was given. if test "${with_bdb+set}" = set; then : withval=$with_bdb; with_bdb=$withval else with_bdb="yes" fi @%:@ Check whether --with-dbdir was given. if test "${with_dbdir+set}" = set; then : withval=$with_dbdir; with_bdb=$withval fi case "$with_bdb" in no) use_berkeley="no" ;; yes) use_berkeley="yes" with_bdb_lib=none with_bdb_inc=none ;; *) use_berkeley="yes" with_bdb_lib="$with_bdb/lib" with_bdb_inc="$with_bdb/include" ;; esac if test "$use_berkeley" != "no"; then @%:@ Check whether --with-bdb-libdir was given. if test "${with_bdb_libdir+set}" = set; then : withval=$with_bdb_libdir; with_bdb_lib=$withval else test "${with_bdb_lib+set}" = set || with_bdb_lib=none fi @%:@ Check whether --with-bdb-incdir was given. if test "${with_bdb_incdir+set}" = set; then : withval=$with_bdb_incdir; with_bdb_inc=$withval else test "${with_bdb_inc+set}" = set || with_bdb_inc=none fi cmu_save_CPPFLAGS=$CPPFLAGS if test -d $with_bdb_inc; then CPPFLAGS="$CPPFLAGS -I$with_bdb_inc" BDB_INCADD="-I$with_bdb_inc" else BDB_INCADD="" fi ac_fn_c_check_header_mongrel "$LINENO" "db.h" "ac_cv_header_db_h" "$ac_includes_default" if test "x$ac_cv_header_db_h" = xyes; then : BDB_SAVE_LDFLAGS=$LDFLAGS if test -d $with_bdb_lib; then # this is CMU ADD LIBPATH TO if test "$andrew_cv_runpath_switch" = "none" ; then LDFLAGS="-L$with_bdb_lib ${LDFLAGS}" else LDFLAGS="-L$with_bdb_lib ${LDFLAGS} $andrew_cv_runpath_switch$with_bdb_lib" fi # this is CMU ADD LIBPATH TO if test "$andrew_cv_runpath_switch" = "none" ; then BDB_LIBADD="-L$with_bdb_lib ${BDB_LIBADD}" else BDB_LIBADD="-L$with_bdb_lib ${BDB_LIBADD} $andrew_cv_runpath_switch$with_bdb_lib" fi else BDB_LIBADD="" fi saved_LIBS=$LIBS for dbname in ${with_bdb} \ db-4.8 db4.8 db48 \ db-4.7 db4.7 db47 \ db-4.6 db4.6 db46 \ db-4.5 db4.5 db45 \ db-4.4 db4.4 db44 \ db-4.3 db4.3 db43 \ db-4.2 db4.2 db42 \ db-4.1 db4.1 db41 \ db-4.0 db4.0 db40 db-4 db4 \ db-3.3 db3.3 db33 \ db-3.2 db3.2 db32 \ db-3.1 db3.1 db31 \ db-3.0 db3.0 db30 db-3 db3 \ db do LIBS="$saved_LIBS -l$dbname" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { db_create(NULL, NULL, 0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : BDB_LIBADD="$BDB_LIBADD -l$dbname"; dblib="berkeley"; dbname=db else dblib="no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$dblib" = "berkeley"; then break; fi done if test "$dblib" = "no"; then LIBS="$saved_LIBS -ldb" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { db_open(NULL, 0, 0, 0, NULL, NULL, NULL); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : BDB_LIBADD="$BDB_LIBADD -ldb"; dblib="berkeley"; dbname=db else dblib="no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi LIBS=$saved_LIBS LDFLAGS=$BDB_SAVE_LDFLAGS else dblib="no" fi CPPFLAGS=$cmu_save_CPPFLAGS if test "$dblib" = "no"; then as_fn_error $? "Berkeley DB 3.x or later was not found. You may need to supply the --with-bdb-libdir or --with-bdb-incdir configure options." "$LINENO" 5 fi if test "$with_bdb_lib" != "none"; then # this is CMU ADD LIBPATH if test "$andrew_cv_runpath_switch" = "none" ; then LDFLAGS="-L$with_bdb_lib ${LDFLAGS}" else LDFLAGS="-L$with_bdb_lib $andrew_cv_runpath_switch$with_bdb_lib ${LDFLAGS}" fi fi BDB_INC=${BDB_INCADD} BDB_LIB=${BDB_LIBADD} LIBS="${LIBS} ${BDB_LIBADD}" CPPFLAGS="${BDB_INCADD} ${CPPFLAGS}" CYRUSDB_OBJS="$CYRUSDB_OBJS cyrusdb_berkeley.o" $as_echo "@%:@define HAVE_BDB /**/" >>confdefs.h fi HAVE_SQL=0 @%:@ Check whether --with-mysql was given. if test "${with_mysql+set}" = set; then : withval=$with_mysql; with_mysql=$withval else with_mysql="no" fi case "$with_mysql" in no) use_mysql="no" ;; yes) use_mysql="yes" with_mysql_lib=none with_mysql_inc=none ;; *) use_mysql="yes" with_mysql_lib="$with_mysql/lib" with_mysql_inc="$with_mysql/include" ;; esac if test "$use_mysql" != "no"; then @%:@ Check whether --with-mysql-libdir was given. if test "${with_mysql_libdir+set}" = set; then : withval=$with_mysql_libdir; with_mysql_lib=$withval else test "${with_mysql_lib+set}" = set || with_mysql_lib=none fi @%:@ Check whether --with-mysql-incdir was given. if test "${with_mysql_incdir+set}" = set; then : withval=$with_mysql_incdir; with_mysql_inc=$withval else test "${with_mysql_inc+set}" = set || with_mysql_inc=none fi cmu_save_CPPFLAGS=$CPPFLAGS if test -d $with_mysql_inc; then CPPFLAGS="$CPPFLAGS -I$with_mysql_inc" MYSQL_INCADD="-I$with_mysql_inc" else MYSQL_INCADD="" fi ac_fn_c_check_header_mongrel "$LINENO" "mysql.h" "ac_cv_header_mysql_h" "$ac_includes_default" if test "x$ac_cv_header_mysql_h" = xyes; then : MYSQL_SAVE_LDFLAGS=$LDFLAGS if test -d $with_mysql_lib; then # this is CMU ADD LIBPATH TO if test "$andrew_cv_runpath_switch" = "none" ; then LDFLAGS="-L$with_mysql_lib ${LDFLAGS}" else LDFLAGS="-L$with_mysql_lib ${LDFLAGS} $andrew_cv_runpath_switch$with_mysql_lib" fi # this is CMU ADD LIBPATH TO if test "$andrew_cv_runpath_switch" = "none" ; then MYSQL_LIBADD="-L$with_mysql_lib ${MYSQL_LIBADD}" else MYSQL_LIBADD="-L$with_mysql_lib ${MYSQL_LIBADD} $andrew_cv_runpath_switch$with_mysql_lib" fi else MYSQL_LIBADD="" fi saved_LIBS=$LIBS for libname in ${with_mysql} mysqlclient do LIBS="$saved_LIBS -l$libname" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { mysql_select_db(NULL, NULL); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : MYSQL_LIBADD="$MYSQL_LIBADD -l$libname"; mysqllib="yes" else mysqllib="no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$mysqllib" = "yes"; then break; fi done LIBS=$saved_LIBS LDFLAGS=$MYSQL_SAVE_LDFLAGS else mysqllib="no" fi CPPFLAGS=$cmu_save_CPPFLAGS if test "$mysqllib" = "no"; then as_fn_error $? "MySQL was not found. You may need to supply the --with-mysql-libdir or --with-mysql-incdir configure options." "$LINENO" 5 else HAVE_SQL=1 fi if test "$with_mysql_lib" != "none"; then # this is CMU ADD LIBPATH if test "$andrew_cv_runpath_switch" = "none" ; then LDFLAGS="-L$with_mysql_lib ${LDFLAGS}" else LDFLAGS="-L$with_mysql_lib $andrew_cv_runpath_switch$with_mysql_lib ${LDFLAGS}" fi fi LIBS="${LIBS} ${MYSQL_LIBADD}" CPPFLAGS="${MYSQL_INCADD} ${CPPFLAGS}" $as_echo "@%:@define HAVE_MYSQL /**/" >>confdefs.h fi @%:@ Check whether --with-pgsql was given. if test "${with_pgsql+set}" = set; then : withval=$with_pgsql; with_pgsql=$withval else with_pgsql="no" fi case "$with_pgsql" in no) use_pgsql="no" ;; yes) use_pgsql="yes" with_pgsql_lib=none with_pgsql_inc=none ;; *) use_pgsql="yes" with_pgsql_lib="$with_pgsql/lib" with_pgsql_inc="$with_pgsql/include" ;; esac if test "$use_pgsql" != "no"; then @%:@ Check whether --with-pgsql-libdir was given. if test "${with_pgsql_libdir+set}" = set; then : withval=$with_pgsql_libdir; with_pgsql_lib=$withval else test "${with_pgsql_lib+set}" = set || with_pgsql_lib=none fi @%:@ Check whether --with-pgsql-incdir was given. if test "${with_pgsql_incdir+set}" = set; then : withval=$with_pgsql_incdir; with_pgsql_inc=$withval else test "${with_pgsql_inc+set}" = set || with_pgsql_inc=none fi cmu_save_CPPFLAGS=$CPPFLAGS if test -d $with_pgsql_inc; then CPPFLAGS="$CPPFLAGS -I$with_pgsql_inc" PGSQL_INCADD="-I$with_pgsql_inc" else PGSQL_INCADD="" fi ac_fn_c_check_header_mongrel "$LINENO" "libpq-fe.h" "ac_cv_header_libpq_fe_h" "$ac_includes_default" if test "x$ac_cv_header_libpq_fe_h" = xyes; then : PGSQL_SAVE_LDFLAGS=$LDFLAGS if test -d $with_pgsql_lib; then # this is CMU ADD LIBPATH TO if test "$andrew_cv_runpath_switch" = "none" ; then LDFLAGS="-L$with_pgsql_lib ${LDFLAGS}" else LDFLAGS="-L$with_pgsql_lib ${LDFLAGS} $andrew_cv_runpath_switch$with_pgsql_lib" fi # this is CMU ADD LIBPATH TO if test "$andrew_cv_runpath_switch" = "none" ; then PGSQL_LIBADD="-L$with_pgsql_lib ${PGSQL_LIBADD}" else PGSQL_LIBADD="-L$with_pgsql_lib ${PGSQL_LIBADD} $andrew_cv_runpath_switch$with_pgsql_lib" fi else PGSQL_LIBADD="" fi saved_LIBS=$LIBS for libname in ${with_pgsql} pq do LIBS="$saved_LIBS -l$libname" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { PQconnectdb(NULL); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : PGSQL_LIBADD="$PGSQL_LIBADD -l$libname"; pgsqllib="yes" else pgsqllib="no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$pgsqllib" = "yes"; then break; fi done LIBS=$saved_LIBS LDFLAGS=$PGSQL_SAVE_LDFLAGS else pgsqllib="no" fi CPPFLAGS=$cmu_save_CPPFLAGS if test "$pgsqllib" = "no"; then as_fn_error $? "PgSQL was not found. You may need to supply the --with-pgsql-libdir or --with-pgsql-incdir configure options." "$LINENO" 5 else HAVE_SQL=1 fi if test "$with_pgsql_lib" != "none"; then # this is CMU ADD LIBPATH if test "$andrew_cv_runpath_switch" = "none" ; then LDFLAGS="-L$with_pgsql_lib ${LDFLAGS}" else LDFLAGS="-L$with_pgsql_lib $andrew_cv_runpath_switch$with_pgsql_lib ${LDFLAGS}" fi fi LIBS="${LIBS} ${PGSQL_LIBADD}" CPPFLAGS="${PGSQL_INCADD} ${CPPFLAGS}" $as_echo "@%:@define HAVE_PGSQL /**/" >>confdefs.h fi @%:@ Check whether --with-sqlite was given. if test "${with_sqlite+set}" = set; then : withval=$with_sqlite; with_sqlite=$withval else with_sqlite=no fi case "$with_sqlite" in no) use_sqlite="no" ;; yes) use_sqlite="yes" with_sqlite_lib=none with_sqlite_inc=none ;; *) use_sqlite="yes" with_sqlite_lib="$with_sqlite/lib" with_sqlite_inc="$with_sqlite/include" ;; esac if test "$use_sqlite" != "no"; then @%:@ Check whether --with-sqlite-libdir was given. if test "${with_sqlite_libdir+set}" = set; then : withval=$with_sqlite_libdir; with_sqlite_lib=$withval else test "${with_sqlite_lib+set}" = set || with_sqlite_lib=none fi @%:@ Check whether --with-sqlite-incdir was given. if test "${with_sqlite_incdir+set}" = set; then : withval=$with_sqlite_incdir; with_sqlite_inc=$withval else test "${with_sqlite_inc+set}" = set || with_sqlite_inc=none fi cmu_save_CPPFLAGS=$CPPFLAGS if test -d $with_sqlite_inc; then CPPFLAGS="$CPPFLAGS -I$with_sqlite_inc" SQLITE_INCADD="-I$with_sqlite_inc" else SQLITE_INCADD="" fi ac_fn_c_check_header_mongrel "$LINENO" "sqlite3.h" "ac_cv_header_sqlite3_h" "$ac_includes_default" if test "x$ac_cv_header_sqlite3_h" = xyes; then : SQLITE_SAVE_LDFLAGS=$LDFLAGS if test -d $with_sqlite_lib; then # this is CMU ADD LIBPATH TO if test "$andrew_cv_runpath_switch" = "none" ; then LDFLAGS="-L$with_sqlite_lib ${LDFLAGS}" else LDFLAGS="-L$with_sqlite_lib ${LDFLAGS} $andrew_cv_runpath_switch$with_sqlite_lib" fi # this is CMU ADD LIBPATH TO if test "$andrew_cv_runpath_switch" = "none" ; then SQLITE_LIBADD="-L$with_sqlite_lib ${SQLITE_LIBADD}" else SQLITE_LIBADD="-L$with_sqlite_lib ${SQLITE_LIBADD} $andrew_cv_runpath_switch$with_sqlite_lib" fi else SQLITE_LIBADD="" fi saved_LIBS=$LIBS for libname in ${with_sqlite} sqlite3 do LIBS="$saved_LIBS -l$libname" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { sqlite3_open(NULL, NULL); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : SQLITE_LIBADD="$SQLITE_LIBADD -l$libname"; sqlitelib="yes" else sqlitelib="no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "$sqlitelib" = "yes"; then break; fi done LIBS=$saved_LIBS LDFLAGS=$SQLITE_SAVE_LDFLAGS else sqlitelib="no" fi CPPFLAGS=$cmu_save_CPPFLAGS if test "$sqlitelib" = "no"; then as_fn_error $? "Sqlite was not found. You may need to supply the --with-sqlite-libdir or --with-sqlite-incdir configure options." "$LINENO" 5 else HAVE_SQL=1 fi if test "$with_sqlite_lib" != "none"; then # this is CMU ADD LIBPATH if test "$andrew_cv_runpath_switch" = "none" ; then LDFLAGS="-L$with_sqlite_lib ${LDFLAGS}" else LDFLAGS="-L$with_sqlite_lib $andrew_cv_runpath_switch$with_sqlite_lib ${LDFLAGS}" fi fi LIBS="${LIBS} ${SQLITE_LIBADD}" CPPFLAGS="${SQLITE_INCADD} ${CPPFLAGS}" $as_echo "@%:@define HAVE_SQLITE /**/" >>confdefs.h fi if test $HAVE_SQL = 1; then CYRUSDB_OBJS="${CYRUSDB_OBJS} cyrusdb_sql.o" fi SIEVE_SUBDIRS="" sievedir="sieve" @%:@ Check whether --enable-sieve was given. if test "${enable_sieve+set}" = set; then : enableval=$enable_sieve; if test "$enableval" = no; then sievedir="no" fi fi testpcre="yes" @%:@ Check whether --enable-pcre was given. if test "${enable_pcre+set}" = set; then : enableval=$enable_pcre; if test "$enableval" = no; then testpcre="no" fi fi if test "$sievedir" != "no"; then SIEVE_OBJS="lmtp_sieve.o smtpclient.o" SIEVE_LIBS="../${sievedir}/libsieve.a" SIEVE_CPPFLAGS="-I\$(srcdir)/../$sievedir" $as_echo "@%:@define USE_SIEVE /**/" >>confdefs.h for ac_prog in 'bison -y' byacc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_YACC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_YACC="$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 YACC=$ac_cv_prog_YACC if test -n "$YACC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 $as_echo "$YACC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$YACC" && break done test -n "$YACC" || YACC="yacc" for ac_prog in flex lex do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LEX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LEX"; then ac_cv_prog_LEX="$LEX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LEX="$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 LEX=$ac_cv_prog_LEX if test -n "$LEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5 $as_echo "$LEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$LEX" && break done test -n "$LEX" || LEX=":" if test "x$LEX" != "x:"; then cat >conftest.l <<_ACEOF %% a { ECHO; } b { REJECT; } c { yymore (); } d { yyless (1); } e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */ yyless ((input () != 0)); } f { unput (yytext[0]); } . { BEGIN INITIAL; } %% #ifdef YYTEXT_POINTER extern char *yytext; #endif int main (void) { return ! yylex () + ! yywrap (); } _ACEOF { { ac_try="$LEX conftest.l" 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 "$LEX conftest.l") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5 $as_echo_n "checking lex output file root... " >&6; } if ${ac_cv_prog_lex_root+:} false; then : $as_echo_n "(cached) " >&6 else if test -f lex.yy.c; then ac_cv_prog_lex_root=lex.yy elif test -f lexyy.c; then ac_cv_prog_lex_root=lexyy else as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5 $as_echo "$ac_cv_prog_lex_root" >&6; } LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root if test -z "${LEXLIB+set}"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5 $as_echo_n "checking lex library... " >&6; } if ${ac_cv_lib_lex+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_LIBS=$LIBS ac_cv_lib_lex='none needed' for ac_lib in '' -lfl -ll; do LIBS="$ac_lib $ac_save_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ `cat $LEX_OUTPUT_ROOT.c` _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_lex=$ac_lib fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test "$ac_cv_lib_lex" != 'none needed' && break done LIBS=$ac_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5 $as_echo "$ac_cv_lib_lex" >&6; } test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5 $as_echo_n "checking whether yytext is a pointer... " >&6; } if ${ac_cv_prog_lex_yytext_pointer+:} false; then : $as_echo_n "(cached) " >&6 else # POSIX says lex can declare yytext either as a pointer or an array; the # default is implementation-dependent. Figure out which it is, since # not all implementations provide the %pointer and %array declarations. ac_cv_prog_lex_yytext_pointer=no ac_save_LIBS=$LIBS LIBS="$LEXLIB $ac_save_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define YYTEXT_POINTER 1 `cat $LEX_OUTPUT_ROOT.c` _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_prog_lex_yytext_pointer=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5 $as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; } if test $ac_cv_prog_lex_yytext_pointer = yes; then $as_echo "@%:@define YYTEXT_POINTER 1" >>confdefs.h fi rm -f conftest.l $LEX_OUTPUT_ROOT.c fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lfl" >&5 $as_echo_n "checking for main in -lfl... " >&6; } if ${ac_cv_lib_fl_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lfl $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_fl_main=yes else ac_cv_lib_fl_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_fl_main" >&5 $as_echo "$ac_cv_lib_fl_main" >&6; } if test "x$ac_cv_lib_fl_main" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBFL 1 _ACEOF LIBS="-lfl $LIBS" fi if test "$testpcre" != "no"; then ac_fn_c_check_header_mongrel "$LINENO" "pcreposix.h" "ac_cv_header_pcreposix_h" "$ac_includes_default" if test "x$ac_cv_header_pcreposix_h" = xyes; then : fi if test "$ac_cv_header_pcreposix_h" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for utf8 enabled pcre" >&5 $as_echo_n "checking for utf8 enabled pcre... " >&6; } if ${cyrus_cv_pcre_utf8+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef REG_UTF8 #include #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : cyrus_cv_pcre_utf8=yes else cyrus_cv_pcre_utf8=no fi rm -f conftest.err conftest.i conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cyrus_cv_pcre_utf8" >&5 $as_echo "$cyrus_cv_pcre_utf8" >&6; } else cyrus_cv_pcre_utf8="no" fi fi if test "$cyrus_cv_pcre_utf8" = "yes"; then LIBS="$LIBS -lpcre -lpcreposix"; $as_echo "@%:@define ENABLE_REGEX /**/" >>confdefs.h $as_echo "@%:@define HAVE_PCREPOSIX_H /**/" >>confdefs.h else for ac_header in rxposix.h do : ac_fn_c_check_header_mongrel "$LINENO" "rxposix.h" "ac_cv_header_rxposix_h" "$ac_includes_default" if test "x$ac_cv_header_rxposix_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_RXPOSIX_H 1 _ACEOF fi done if test "$ac_cv_header_rxposix_h" = "yes"; then LIBS="$LIBS -lrx" $as_echo "@%:@define ENABLE_REGEX /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing regcomp" >&5 $as_echo_n "checking for library containing regcomp... " >&6; } if ${ac_cv_search_regcomp+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char regcomp (); int main () { return regcomp (); ; return 0; } _ACEOF for ac_lib in '' regex; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_c_try_link "$LINENO"; then : ac_cv_search_regcomp=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_regcomp+:} false; then : break fi done if ${ac_cv_search_regcomp+:} false; then : else ac_cv_search_regcomp=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_regcomp" >&5 $as_echo "$ac_cv_search_regcomp" >&6; } ac_res=$ac_cv_search_regcomp if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" $as_echo "@%:@define ENABLE_REGEX /**/" >>confdefs.h fi fi fi SIEVE_SUBDIRS="${SIEVE_SUBDIRS} $sievedir" EXTRA_OUTPUT="${EXTRA_OUTPUT} $sievedir/Makefile" fi ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror" if test "x$ac_cv_func_strerror" = xyes; then : $as_echo "@%:@define HAS_STRERROR /**/" >>confdefs.h else $as_echo "@%:@define NEED_SYS_ERRLIST /**/" >>confdefs.h fi for ac_header in sys/resource.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default" if test "x$ac_cv_header_sys_resource_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_SYS_RESOURCE_H 1 _ACEOF fi done for ac_func in setrlimit do : ac_fn_c_check_func "$LINENO" "setrlimit" "ac_cv_func_setrlimit" if test "x$ac_cv_func_setrlimit" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_SETRLIMIT 1 _ACEOF fi done for ac_func in getrlimit do : ac_fn_c_check_func "$LINENO" "getrlimit" "ac_cv_func_getrlimit" if test "x$ac_cv_func_getrlimit" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_GETRLIMIT 1 _ACEOF fi done for ac_func in daemon setsid do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF @%:@define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in shutdown do : ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown" if test "x$ac_cv_func_shutdown" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_SHUTDOWN 1 _ACEOF fi done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "socklen_t" >/dev/null 2>&1; then : $as_echo "@%:@define HAVE_SOCKLEN_T /**/" >>confdefs.h fi rm -f conftest* cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "sockaddr_storage" >/dev/null 2>&1; then : $as_echo "@%:@define HAVE_STRUCT_SOCKADDR_STORAGE /**/" >>confdefs.h fi rm -f conftest* cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "rlim_t" >/dev/null 2>&1; then : $as_echo "@%:@define HAVE_RLIM_T /**/" >>confdefs.h fi rm -f conftest* spt_type="" ac_fn_c_check_func "$LINENO" "setproctitle" "ac_cv_func_setproctitle" if test "x$ac_cv_func_setproctitle" = xyes; then : spt_type=SPT_BUILTIN fi if test "$spt_type" = ""; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setproctitle in -lutil" >&5 $as_echo_n "checking for setproctitle in -lutil... " >&6; } if ${ac_cv_lib_util_setproctitle+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lutil $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 setproctitle (); int main () { return setproctitle (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_util_setproctitle=yes else ac_cv_lib_util_setproctitle=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_util_setproctitle" >&5 $as_echo "$ac_cv_lib_util_setproctitle" >&6; } if test "x$ac_cv_lib_util_setproctitle" = xyes; then : spt_type=SPT_BUILTIN LIBS="${LIBS} -lutil" fi fi if test "$spt_type" = ""; then ac_fn_c_check_header_mongrel "$LINENO" "sys/pstat.h" "ac_cv_header_sys_pstat_h" "$ac_includes_default" if test "x$ac_cv_header_sys_pstat_h" = xyes; then : spt_type=SPT_PSTAT fi fi if test "$spt_type" = ""; then ac_fn_c_check_header_mongrel "$LINENO" "sys/sysnews.h" "ac_cv_header_sys_sysnews_h" "$ac_includes_default" if test "x$ac_cv_header_sys_sysnews_h" = xyes; then : spt_type=SPT_SYSMIPS fi fi if test "$spt_type" = ""; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PS_STRINGS" >&5 $as_echo_n "checking for PS_STRINGS... " >&6; } if ${cyrus_cv_sys_psstrings+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifndef PS_STRINGS #include #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : cyrus_cv_sys_psstrings=yes else cyrus_cv_sys_psstrings=no fi rm -f conftest.err conftest.i conftest.$ac_ext fi if test $cyrus_cv_sys_psstrings = yes; then spt_type=SPT_PSSTRINGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cyrus_cv_sys_psstrings" >&5 $as_echo "$cyrus_cv_sys_psstrings" >&6; } fi if test "$spt_type" = ""; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SCO" >&5 $as_echo_n "checking for SCO... " >&6; } if ${cyrus_cv_sys_sco+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef _SCO_unix_ #include #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : cyrus_cv_sys_sco=yes else cyrus_cv_sys_sco=no fi rm -f conftest.err conftest.i conftest.$ac_ext fi if test $cyrus_cv_sys_sco = yes; then spt_type=SPT_SCO fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cyrus_cv_sys_sco" >&5 $as_echo "$cyrus_cv_sys_sco" >&6; } fi if test "$spt_type" = ""; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for setproctitle usability" >&5 $as_echo_n "checking for setproctitle usability... " >&6; } if ${cyrus_cv_sys_setproctitle+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined(DGUX) || defined(_SEQUENT_) || defined(apollo) #include #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : cyrus_cv_sys_setproctitle=yes else cyrus_cv_sys_setproctitle=no fi rm -f conftest.err conftest.i conftest.$ac_ext fi if test $cyrus_cv_sys_setproctitle = no; then spt_type=SPT_NONE fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cyrus_cv_sys_setproctitle" >&5 $as_echo "$cyrus_cv_sys_setproctitle" >&6; } fi if test "$spt_type" != ""; then cat >>confdefs.h <<_ACEOF @%:@define SPT_TYPE $spt_type _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking nonblocking method" >&5 $as_echo_n "checking nonblocking method... " >&6; } if ${cyrus_cv_sys_nonblock+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #ifndef FNDELAY #define FNDELAY O_NDELAY #endif int main () { fcntl(0, F_GETFL, 0)&FNDELAY ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : cyrus_cv_sys_nonblock=fcntl else cyrus_cv_sys_nonblock=ioctl fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi WITH_NONBLOCK=$cyrus_cv_sys_nonblock { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WITH_NONBLOCK" >&5 $as_echo "$WITH_NONBLOCK" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking timezone GMT offset method" >&5 $as_echo_n "checking timezone GMT offset method... " >&6; } if ${cyrus_cv_struct_sys_gmtoff+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { struct tm tm; tm.tm_gmtoff = 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cyrus_cv_struct_sys_gmtoff=tm else cyrus_cv_struct_sys_gmtoff=gmtime fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi WITH_GMTOFF=$cyrus_cv_struct_sys_gmtoff { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WITH_GMTOFF" >&5 $as_echo "$WITH_GMTOFF" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared mmap" >&5 $as_echo_n "checking for shared mmap... " >&6; } if ${cyrus_cv_func_mmap_shared+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : cyrus_cv_func_mmap_shared=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include main() { char *base; int fd = open("conftestmmap", O_RDWR|O_CREAT|O_TRUNC, 0666); if (fd == -1) exit(1); if (write(fd, "test", 4) != 4) exit(1); fsync(fd); base = mmap((caddr_t)0, 100, PROT_READ, MAP_SHARED #ifdef MAP_FILE | MAP_FILE #endif #ifdef MAP_VARIABLE | MAP_VARIABLE #endif , fd, 0L); if (base == (caddr_t)-1) exit(1); if (strncmp(base, "test", 4) != 0) exit(1); if (write(fd, "test", 4) != 4) exit(1); fsync(fd); if (strncmp(base+4, "test", 4) != 0) exit(1); exit(0);} _ACEOF if ac_fn_c_try_run "$LINENO"; then : cyrus_cv_func_mmap_shared=yes else cyrus_cv_func_mmap_shared=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cyrus_cv_func_mmap_shared" >&5 $as_echo "$cyrus_cv_func_mmap_shared" >&6; } if test $cyrus_cv_func_mmap_shared = yes; then WITH_MAP="shared" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stupid shared mmap" >&5 $as_echo_n "checking for stupid shared mmap... " >&6; } if ${cyrus_cv_func_mmap_stupidshared+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : cyrus_cv_func_mmap_stupidshared=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include main() { char *base; int fd = open("conftestmmap", O_RDWR|O_CREAT|O_TRUNC, 0666); if (fd == -1) exit(1); if (write(fd, "test", 4) != 4) exit(1); fsync(fd); base = mmap((caddr_t)0, 4, PROT_READ, MAP_SHARED #ifdef MAP_FILE | MAP_FILE #endif #ifdef MAP_VARIABLE | MAP_VARIABLE #endif , fd, 0L); if (base == (caddr_t)-1) exit(1); if (strncmp(base, "test", 4) != 0) exit(1); lseek(fd, 0L, 0); if (write(fd, "xyzz", 4) != 4) exit(1); fsync(fd); if (strncmp(base, "xyzz", 4) != 0) exit(1); exit(0);} _ACEOF if ac_fn_c_try_run "$LINENO"; then : cyrus_cv_func_mmap_stupidshared=yes else cyrus_cv_func_mmap_stupidshared=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cyrus_cv_func_mmap_stupidshared" >&5 $as_echo "$cyrus_cv_func_mmap_stupidshared" >&6; } if test $cyrus_cv_func_mmap_stupidshared = yes; then WITH_MAP="stupidshared" else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** This system does not have a working mmap()" >&5 $as_echo "$as_me: WARNING: *** This system does not have a working mmap()" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** Expect a considerable performance penalty" >&5 $as_echo "$as_me: WARNING: *** Expect a considerable performance penalty" >&2;} WITH_MAP=nommap fi fi @%:@ Check whether --with-lock was given. if test "${with_lock+set}" = set; then : withval=$with_lock; WITH_LOCK="$withval" else ac_fn_c_check_func "$LINENO" "fcntl" "ac_cv_func_fcntl" if test "x$ac_cv_func_fcntl" = xyes; then : WITH_LOCK="fcntl" else ac_fn_c_check_func "$LINENO" "flock" "ac_cv_func_flock" if test "x$ac_cv_func_flock" = xyes; then : WITH_LOCK="flock" else as_fn_error $? "unable to detect locking method" "$LINENO" 5 fi fi fi LIB_RT="" ac_fn_c_check_func "$LINENO" "fdatasync" "ac_cv_func_fdatasync" if test "x$ac_cv_func_fdatasync" = xyes; then : $as_echo "@%:@define HAVE_FDATASYNC /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fdatasync in -lrt" >&5 $as_echo_n "checking for fdatasync in -lrt... " >&6; } if ${ac_cv_lib_rt_fdatasync+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char fdatasync (); int main () { return fdatasync (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rt_fdatasync=yes else ac_cv_lib_rt_fdatasync=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_fdatasync" >&5 $as_echo "$ac_cv_lib_rt_fdatasync" >&6; } if test "x$ac_cv_lib_rt_fdatasync" = xyes; then : LIB_RT="-lrt" $as_echo "@%:@define HAVE_FDATASYNC /**/" >>confdefs.h fi fi cant_find_sigvec=no if ${cyrus_cv_sigveclib+:} false; then : $as_echo_n "(cached) " >&6 else ac_fn_c_check_func "$LINENO" "sigvec" "ac_cv_func_sigvec" if test "x$ac_cv_func_sigvec" = xyes; then : cyrus_cv_sigveclib="" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigvec in -lBSD" >&5 $as_echo_n "checking for sigvec in -lBSD... " >&6; } if ${ac_cv_lib_BSD_sigvec+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lBSD $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 sigvec (); int main () { return sigvec (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_BSD_sigvec=yes else ac_cv_lib_BSD_sigvec=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_BSD_sigvec" >&5 $as_echo "$ac_cv_lib_BSD_sigvec" >&6; } if test "x$ac_cv_lib_BSD_sigvec" = xyes; then : cyrus_cv_sigveclib="-lBSD" else SAVE_LDFLAGS="$LDFLAGS" LDFLAGS="-L/usr/ucblib -R/usr/ucblib $LDFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigvec in -lucb" >&5 $as_echo_n "checking for sigvec in -lucb... " >&6; } if ${ac_cv_lib_ucb_sigvec+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lucb $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 sigvec (); int main () { return sigvec (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ucb_sigvec=yes else ac_cv_lib_ucb_sigvec=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_ucb_sigvec" >&5 $as_echo "$ac_cv_lib_ucb_sigvec" >&6; } if test "x$ac_cv_lib_ucb_sigvec" = xyes; then : cyrus_cv_sigveclib="-lc -L/usr/ucblib -R/usr/ucblib -lucb" else cant_find_sigvec=yes fi LDFLAGS="$SAVE_LDFLAGS" fi fi fi # ok, we still look for this stuff because of checking groups, but # all authentication goes through SASL @%:@ Check whether --enable-afs was given. if test "${enable_afs+set}" = set; then : enableval=$enable_afs; fi @%:@ Check whether --with-afs-libdir was given. if test "${with_afs_libdir+set}" = set; then : withval=$with_afs_libdir; afs_libdir="${withval}" else afs_libdir="/usr/lib" fi @%:@ Check whether --with-afs-incdir was given. if test "${with_afs_incdir+set}" = set; then : withval=$with_afs_incdir; afs_incdir="${withval}" else afs_incdir="/usr/include" fi @%:@ Check whether --with-ldap was given. if test "${with_ldap+set}" = set; then : withval=$with_ldap; with_ldap="${withval}" else with_ldap="no" fi @%:@ Check whether --enable-krb5afspts was given. if test "${enable_krb5afspts+set}" = set; then : enableval=$enable_krb5afspts; fi if test "x$enable_afs" = "xyes"; then # krb5afspts is only valid if AFS is enabled, so check inside here. if test "x$enable_krb5afspts" = "xyes"; then : SASL_GSSAPI_LIBS_SET="yes" $as_echo "@%:@define AFSPTS_USE_KRB5 /**/" >>confdefs.h fi CFLAGS="${CFLAGS} -I${with_afs_incdir}/include" AFS_LIBS="${with_afs_libdir}/afs/libkauth.a ${with_afs_libdir}/afs/libprot.a ${with_afs_libdir}/afs/libauth.a ${with_afs_libdir}/afs/libsys.a ${with_afs_libdir}/librxkad.a ${with_afs_libdir}/librx.a ${with_afs_libdir}/afs/libsys.a ${with_afs_libdir}/libubik.a ${with_afs_libdir}/liblwp.a ${with_afs_libdir}/afs/util.a ${with_afs_libdir}/afs/libcom_err.a" if test -f ${with_afs_libdir}/afs/libaudit.a; then AFS_LIBS="$AFS_LIBS ${with_afs_libdir}/afs/libaudit.a" fi if test -f /usr/ucblib/libucb.a; then # this is CMU ADD LIBPATH TO if test "$andrew_cv_runpath_switch" = "none" ; then AFS_LDFLAGS="-L/usr/ucblib ${AFS_LDFLAGS}" else AFS_LDFLAGS="-L/usr/ucblib ${AFS_LDFLAGS} $andrew_cv_runpath_switch/usr/ucblib" fi AFS_LIBS="$AFS_LIBS -lc -lucb" fi if test -f ${with_afs_libdir}/afs/libdes.a; then AFS_LIBS="$AFS_LIBS ${with_afs_libdir}/afs/libdes.a" else AFS_LIBS="$AFS_LIBS -ldes" fi if ${cyrus_cv_afs_sigvec+:} false; then : $as_echo_n "(cached) " >&6 else SAVE_LIBS="$LIBS" LIBS="${with_afs_libdir}/liblwp.a" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if AFS libraries need sigvec" >&5 $as_echo_n "checking if AFS libraries need sigvec... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ IOMGR_Initialize(); int main () { IOMGR_Initialize() ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } cyrus_cv_afs_sigvec="no" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } cyrus_cv_afs_sigvec="yes" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi if test "$cyrus_cv_afs_sigvec" = yes; then if test "$cant_find_sigvec" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find a sigvec for AFS libraries which seem to need one." >&5 $as_echo "$as_me: WARNING: Can't find a sigvec for AFS libraries which seem to need one." >&2;} else AFS_LIBS="${AFS_LIBS} $cyrus_cv_sigveclib" $as_echo "@%:@define HAVE_AFSKRB /**/" >>confdefs.h fi else AFS_LIBS="${AFS_LIBS}" $as_echo "@%:@define HAVE_AFSKRB /**/" >>confdefs.h fi LIBS="$SAVE_LIBS" fi LDAP_CPPFLAGS="" LDAP_LDFLAGS="" LDAP_LIBS="" if test "x$with_ldap" != "xno"; then if test ! -d $with_ldap; then with_ldap=/usr/local fi LDAP_CPPFLAGS="$CPPFLAGS -I${with_ldap}/include" LDAP_LDFLAGS="$LDFLAGS -L${with_ldap}/lib" LDAP_LIBS="" save_CPPFLAGS=$CPPFLAGS save_LDFLAGS=$LDFLAGS CPPFLAGS=$LDAP_CPPFLAGS LDFLAGS=$LDAP_LDFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_initialize in -lldap" >&5 $as_echo_n "checking for ldap_initialize in -lldap... " >&6; } if ${ac_cv_lib_ldap_ldap_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lldap -llber $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 ldap_initialize (); int main () { return ldap_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ldap_ldap_initialize=yes else ac_cv_lib_ldap_ldap_initialize=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_ldap_ldap_initialize" >&5 $as_echo "$ac_cv_lib_ldap_ldap_initialize" >&6; } if test "x$ac_cv_lib_ldap_ldap_initialize" = xyes; then : $as_echo "@%:@define HAVE_LDAP /**/" >>confdefs.h LDAP_LIBS="-lldap -llber" fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$LDAP_LDFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ldap_initialize in -lldap" >&5 $as_echo_n "checking for ldap_initialize in -lldap... " >&6; } if ${ac_cv_lib_ldap_ldap_initialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lldap -llber $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 ldap_initialize (); int main () { return ldap_initialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ldap_ldap_initialize=yes else ac_cv_lib_ldap_ldap_initialize=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_ldap_ldap_initialize" >&5 $as_echo "$ac_cv_lib_ldap_ldap_initialize" >&6; } if test "x$ac_cv_lib_ldap_ldap_initialize" = xyes; then : $as_echo "@%:@define HAVE_LDAP /**/" >>confdefs.h LDAP_LIBS="-lldap -llber" fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS fi if test "x$enable_afs" = "xyes" -o "x$with_ldap" != "xno"; then EXTRA_SUBDIRS="${EXTRA_SUBDIRS} ptclient" EXTRA_OUTPUT="${EXTRA_OUTPUT} ptclient/Makefile" $as_echo "@%:@define WITH_PTS /**/" >>confdefs.h fi SERVER_SUBDIRS="master imap" @%:@ Check whether --enable-server was given. if test "${enable_server+set}" = set; then : enableval=$enable_server; if test "$enableval" = no; then SERVER_SUBDIRS="" fi fi # We always output a server makefile (just because we can) @%:@ Check whether --with-krb was given. if test "${with_krb+set}" = set; then : withval=$with_krb; with_krb="$withval" else with_krb="no" fi @%:@ Check whether --with-krbimpl was given. if test "${with_krbimpl+set}" = set; then : withval=$with_krbimpl; with_krbimpl="$withval" else with_krbimpl="kth" fi @%:@ Check whether --enable-statickrb was given. if test "${enable_statickrb+set}" = set; then : enableval=$enable_statickrb; with_statickrb="yes" else with_statickrb="no" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_search in -lresolv" >&5 $as_echo_n "checking for res_search in -lresolv... " >&6; } if ${ac_cv_lib_resolv_res_search+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lresolv $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 res_search (); int main () { return res_search (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_resolv_res_search=yes else ac_cv_lib_resolv_res_search=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_resolv_res_search" >&5 $as_echo "$ac_cv_lib_resolv_res_search" >&6; } if test "x$ac_cv_lib_resolv_res_search" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBRESOLV 1 _ACEOF LIBS="-lresolv $LIBS" fi if test "$with_statickrb" = "yes" -a ! -d "$with_krb"; then as_fn_error $? "--enable-statickrb specified but --with-krb did not specify a valid directory" "$LINENO" 5 fi if test "$with_krb" != "no"; then @%:@ Check whether --with-krbdes was given. if test "${with_krbdes+set}" = set; then : withval=$with_krbdes; with_krbdes="$withval" else with_krbdes="yes" fi if test "$with_krbdes" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for des_ecb_encrypt in -ldes" >&5 $as_echo_n "checking for des_ecb_encrypt in -ldes... " >&6; } if ${ac_cv_lib_des_des_ecb_encrypt+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldes $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 des_ecb_encrypt (); int main () { return des_ecb_encrypt (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_des_des_ecb_encrypt=yes else ac_cv_lib_des_des_ecb_encrypt=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_des_des_ecb_encrypt" >&5 $as_echo "$ac_cv_lib_des_des_ecb_encrypt" >&6; } if test "x$ac_cv_lib_des_des_ecb_encrypt" = xyes; then : if test "$with_statickrb" = "yes"; then KRB_LIBS="$with_krb/lib/libdes.a" else KRB_LIBS="-ldes" fi else as_fn_error $? "The Kerberos DES library is required for Kerberos support. You might want --with-auth=unix." "$LINENO" 5 fi fi fi if test -d ${with_krb}; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Kerberos includes" >&5 $as_echo_n "checking for Kerberos includes... " >&6; } if ${cyrus_cv_krbinclude+:} false; then : $as_echo_n "(cached) " >&6 else for krbhloc in include/kerberosIV include do if test -f ${with_krb}/${krbhloc}/krb.h ; then cyrus_cv_krbinclude=${with_krb}/${krbhloc} break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cyrus_cv_krbinclude" >&5 $as_echo "$cyrus_cv_krbinclude" >&6; } if test -n "${cyrus_cv_krbinclude}"; then CPPFLAGS="$CPPFLAGS -I${cyrus_cv_krbinclude}" fi # this is CMU ADD LIBPATH if test "$andrew_cv_runpath_switch" = "none" ; then LDFLAGS="-L${with_krb}/lib ${LDFLAGS}" else LDFLAGS="-L${with_krb}/lib $andrew_cv_runpath_switch${with_krb}/lib ${LDFLAGS}" fi fi if test "$with_krbimpl" != "kth"; then KRBLIB="krb4" else KRBLIB="krb" fi if test "$with_des" != no; then ac_fn_c_check_header_mongrel "$LINENO" "krb.h" "ac_cv_header_krb_h" "$ac_includes_default" if test "x$ac_cv_header_krb_h" = xyes; then : as_ac_Lib=`$as_echo "ac_cv_lib_${KRBLIB}''_krb_mk_priv" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb_mk_priv in -l${KRBLIB}" >&5 $as_echo_n "checking for krb_mk_priv in -l${KRBLIB}... " >&6; } if eval \${$as_ac_Lib+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-l${KRBLIB} $KRB_LIBS $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char krb_mk_priv (); int main () { return krb_mk_priv (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$as_ac_Lib=yes" else eval "$as_ac_Lib=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi eval ac_res=\$$as_ac_Lib { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Lib"\" = x"yes"; then : if test "$with_statickrb" = "yes"; then KRB_LIBS="$KRB_LIBS $with_krb/lib/lib${KRBLIB}.a" else KRB_LIBS="$KRB_LIBS -l${KRBLIB}" fi else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No Kerberos V4 found" >&5 $as_echo "$as_me: WARNING: No Kerberos V4 found" >&2;}; krb4=no fi else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No Kerberos V4 found" >&5 $as_echo "$as_me: WARNING: No Kerberos V4 found" >&2;}; krb4=no fi else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No DES library found for Kerberos V4 support" >&5 $as_echo "$as_me: WARNING: No DES library found for Kerberos V4 support" >&2;} krb4=no fi if test "${krb4}" != no; then $as_echo "@%:@define HAVE_KRB /**/" >>confdefs.h fi LIBS="$KRB_LIBS $LIBS" SASL_GSSAPI_LIBS_SET="yes" IMAP_PROGS="" @%:@ Check whether --with-openssl was given. if test "${with_openssl+set}" = set; then : withval=$with_openssl; with_openssl="${withval}" fi OPENSSL_INC= OPENSSL_LIB= case "$with_openssl" in no) with_openssl="no";; ""|yes) LIB_RSAREF="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RSAPublicEncrypt in -lrsaref" >&5 $as_echo_n "checking for RSAPublicEncrypt in -lrsaref... " >&6; } if ${ac_cv_lib_rsaref_RSAPublicEncrypt+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrsaref $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 RSAPublicEncrypt (); int main () { return RSAPublicEncrypt (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rsaref_RSAPublicEncrypt=yes else ac_cv_lib_rsaref_RSAPublicEncrypt=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_rsaref_RSAPublicEncrypt" >&5 $as_echo "$ac_cv_lib_rsaref_RSAPublicEncrypt" >&6; } if test "x$ac_cv_lib_rsaref_RSAPublicEncrypt" = xyes; then : LIB_RSAREF="-lRSAglue -lrsaref"; cmu_have_rsaref=yes else cmu_have_rsaref=no fi with_openssl="yes" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BIO_accept in -lcrypto" >&5 $as_echo_n "checking for BIO_accept in -lcrypto... " >&6; } if ${ac_cv_lib_crypto_BIO_accept+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcrypto $LIB_RSAREF $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 BIO_accept (); int main () { return BIO_accept (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_crypto_BIO_accept=yes else ac_cv_lib_crypto_BIO_accept=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_BIO_accept" >&5 $as_echo "$ac_cv_lib_crypto_BIO_accept" >&6; } if test "x$ac_cv_lib_crypto_BIO_accept" = xyes; then : LIBS="-lcrypto $LIB_RSAREF ${LIBS}" else with_openssl="no" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SSL_CTX_new in -lssl" >&5 $as_echo_n "checking for SSL_CTX_new in -lssl... " >&6; } if ${ac_cv_lib_ssl_SSL_CTX_new+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lssl -lcrypto $LIB_RSAREF $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 SSL_CTX_new (); int main () { return SSL_CTX_new (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ssl_SSL_CTX_new=yes else ac_cv_lib_ssl_SSL_CTX_new=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_SSL_CTX_new" >&5 $as_echo "$ac_cv_lib_ssl_SSL_CTX_new" >&6; } if test "x$ac_cv_lib_ssl_SSL_CTX_new" = xyes; then : LIBS="-lssl ${LIBS}" else with_openssl="no" fi ;; *) OPENSSL_INC="-I${with_openssl}/include" OPENSSL_LIBPATH="${with_openssl}/lib" OPENSSL_LIB="-L${OPENSSL_LIBPATH}" CPPFLAGS="${CPPFLAGS} ${OPENSSL_INC}" # this is CMU ADD LIBPATH if test "$andrew_cv_runpath_switch" = "none" ; then LDFLAGS="-L${OPENSSL_LIBPATH} ${LDFLAGS}" else LDFLAGS="-L${OPENSSL_LIBPATH} $andrew_cv_runpath_switch${OPENSSL_LIBPATH} ${LDFLAGS}" fi # this is CMU ADD LIBPATH TO if test "$andrew_cv_runpath_switch" = "none" ; then OPENSSL_LIB="-L${OPENSSL_LIBPATH} ${OPENSSL_LIB}" else OPENSSL_LIB="-L${OPENSSL_LIBPATH} ${OPENSSL_LIB} $andrew_cv_runpath_switch${OPENSSL_LIBPATH}" fi LIBS="${LIBS} -lssl -lcrypto";; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for openssl" >&5 $as_echo_n "checking for openssl... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_openssl" >&5 $as_echo "$with_openssl" >&6; } if test "$with_openssl" != "no"; then $as_echo "@%:@define HAVE_SSL /**/" >>confdefs.h IMAP_PROGS="$IMAP_PROGS tls_prune" if test "${krb4}" != no; then $as_echo "@%:@define OPENSSL_ENABLE_OLD_DES_SUPPORT /**/" >>confdefs.h $as_echo "@%:@define OPENSSL_DES_LIBDES_COMPATIBILITY /**/" >>confdefs.h fi fi @%:@ Check whether --with-egd-socket was given. if test "${with_egd_socket+set}" = set; then : withval=$with_egd_socket; EGD_SOCKET="$withval" fi if test -n "$EGD_SOCKET" ; then cat >>confdefs.h <<_ACEOF @%:@define EGD_SOCKET "$EGD_SOCKET" _ACEOF fi @%:@ Check whether --with-lib-subdir was given. if test "${with_lib_subdir+set}" = set; then : withval=$with_lib_subdir; fi # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 $as_echo_n "checking size of long... " >&6; } if ${ac_cv_sizeof_long+:} false; then : $as_echo_n "(cached) " >&6 else if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : else if test "$ac_cv_type_long" = yes; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot compute sizeof (long) See \`config.log' for more details" "$LINENO" 5; } else ac_cv_sizeof_long=0 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 $as_echo "$ac_cv_sizeof_long" >&6; } cat >>confdefs.h <<_ACEOF @%:@define SIZEOF_LONG $ac_cv_sizeof_long _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking what directory libraries are found in" >&5 $as_echo_n "checking what directory libraries are found in... " >&6; } if ${ac_cv_cmu_lib_subdir+:} false; then : $as_echo_n "(cached) " >&6 else test "X$with_lib_subdir" = "Xyes" && with_lib_subdir= test "X$with_lib_subdir" = "Xno" && with_lib_subdir= if test "X$with_lib_subdir" = "X" ; then ac_cv_cmu_lib_subdir=lib if test $ac_cv_sizeof_long -eq 4 ; then test -d /usr/lib32 && ac_cv_cmu_lib_subdir=lib32 fi if test $ac_cv_sizeof_long -eq 8 ; then test -d /usr/lib64 && ac_cv_cmu_lib_subdir=lib64 fi else ac_cv_cmu_lib_subdir=$with_lib_subdir fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cmu_lib_subdir" >&5 $as_echo "$ac_cv_cmu_lib_subdir" >&6; } CMU_LIB_SUBDIR=$ac_cv_cmu_lib_subdir @%:@ Check whether --with-zlib was given. if test "${with_zlib+set}" = set; then : withval=$with_zlib; with_zlib=$withval else with_zlib="yes" fi save_CPPFLAGS=$CPPFLAGS save_LDFLAGS=$LDFLAGS if test -d $with_zlib; then CPPFLAGS="${CPPFLAGS} -I${with_lib}/include" # this is CMU ADD LIBPATH if test "$andrew_cv_runpath_switch" = "none" ; then LDFLAGS="-L${with_zlib}/$CMU_LIB_SUBDIR ${LDFLAGS}" else LDFLAGS="-L${with_zlib}/$CMU_LIB_SUBDIR $andrew_cv_runpath_switch${with_zlib}/$CMU_LIB_SUBDIR ${LDFLAGS}" fi fi ZLIB="" case "$with_zlib" in no) with_zlib="no";; *) ac_fn_c_check_header_mongrel "$LINENO" "zlib.h" "ac_cv_header_zlib_h" "$ac_includes_default" if test "x$ac_cv_header_zlib_h" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for deflate in -lz" >&5 $as_echo_n "checking for deflate in -lz... " >&6; } if ${ac_cv_lib_z_deflate+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lz $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 deflate (); int main () { return deflate (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_z_deflate=yes else ac_cv_lib_z_deflate=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_z_deflate" >&5 $as_echo "$ac_cv_lib_z_deflate" >&6; } if test "x$ac_cv_lib_z_deflate" = xyes; then : LIBS="${LIBS} -lz"; with_zlib="yes" else with_zlib="no" fi else with_zlib=no fi ;; esac if test "$with_zlib" != "no"; then $as_echo "@%:@define HAVE_ZLIB /**/" >>confdefs.h ZLIB="-lz" else CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for zlib" >&5 $as_echo_n "checking for zlib... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_zlib" >&5 $as_echo "$with_zlib" >&6; } @%:@ Check whether --with-zephyr was given. if test "${with_zephyr+set}" = set; then : withval=$with_zephyr; with_zephyr="${withval}" fi if test -z "$with_zephyr"; then if test -f /usr/local/lib/libzephyr.a; then with_zephyr="/usr/local" elif test -f /usr/lib/libzephyr.a; then with_zephyr="/usr" fi fi ZEPHYR_LIBS="" case "$with_zephyr" in no) true;; ""|yes) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZInitialize in -lzephyr" >&5 $as_echo_n "checking for ZInitialize in -lzephyr... " >&6; } if ${ac_cv_lib_zephyr_ZInitialize+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lzephyr $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 ZInitialize (); int main () { return ZInitialize (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_zephyr_ZInitialize=yes else ac_cv_lib_zephyr_ZInitialize=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_zephyr_ZInitialize" >&5 $as_echo "$ac_cv_lib_zephyr_ZInitialize" >&6; } if test "x$ac_cv_lib_zephyr_ZInitialize" = xyes; then : ZEPHYR_LIBS="-lzephyr" else with_zephyr="no" fi ;; *) ZEPHYR_LIBS="-lzephyr";; esac if test "$with_zephyr" != "no"; then $as_echo "@%:@define HAVE_ZEPHYR /**/" >>confdefs.h fi @%:@ Check whether --with-pidfile was given. if test "${with_pidfile+set}" = set; then : withval=$with_pidfile; MASTERPIDFILE="$withval" else MASTERPIDFILE="/var/run/cyrus-master.pid" fi MASTERPIDFILE="\"$MASTERPIDFILE\"" cat >>confdefs.h <<_ACEOF @%:@define MASTER_PIDFILE $MASTERPIDFILE _ACEOF @%:@ Check whether --enable-idled was given. if test "${enable_idled+set}" = set; then : enableval=$enable_idled; if test "$enable_val" != no; then IMAP_PROGS="$IMAP_PROGS idled" fi fi ENABLE_NNTP=no @%:@ Check whether --enable-nntp was given. if test "${enable_nntp+set}" = set; then : enableval=$enable_nntp; ENABLE_NNTP=$enableval if test "$ENABLE_NNTP" != no; then IMAP_PROGS="$IMAP_PROGS nntpd fetchnews" fi fi ENABLE_MURDER=no @%:@ Check whether --enable-murder was given. if test "${enable_murder+set}" = set; then : enableval=$enable_murder; ENABLE_MURDER=$enableval fi if test "$ENABLE_MURDER" != no; then IMAP_PROGS="$IMAP_PROGS mupdate" # for master/slave auto-selection for ac_header in sys/sockio.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/sockio.h" "ac_cv_header_sys_sockio_h" "$ac_includes_default" if test "x$ac_cv_header_sys_sockio_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_SYS_SOCKIO_H 1 _ACEOF fi done fi ENABLE_REPLICATION=no @%:@ Check whether --enable-replication was given. if test "${enable_replication+set}" = set; then : enableval=$enable_replication; ENABLE_REPLICATION=$enableval if test "$ENABLE_REPLICATION" != no; then IMAP_PROGS="$IMAP_PROGS sync_client sync_server sync_reset" fi fi @%:@ Check whether --with-com_err was given. if test "${with_com_err+set}" = set; then : withval=$with_com_err; fi if test -z "$with_com_err"; then # no value supplied { $as_echo "$as_me:${as_lineno-$LINENO}: checking for com_err in -lcom_err" >&5 $as_echo_n "checking for com_err in -lcom_err... " >&6; } if ${ac_cv_lib_com_err_com_err+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lcom_err $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 com_err (); int main () { return com_err (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_com_err_com_err=yes else ac_cv_lib_com_err_com_err=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_com_err_com_err" >&5 $as_echo "$ac_cv_lib_com_err_com_err" >&6; } if test "x$ac_cv_lib_com_err_com_err" = xyes; then : # com_err is already in library path # guess we're okay # can use system com_err with_com_err="" ac_fn_c_check_header_mongrel "$LINENO" "et/com_err.h" "ac_cv_header_et_com_err_h" "$ac_includes_default" if test "x$ac_cv_header_et_com_err_h" = xyes; then : $as_echo "@%:@define HAVE_ET_COM_ERR_H /**/" >>confdefs.h else ac_fn_c_check_header_mongrel "$LINENO" "com_err.h" "ac_cv_header_com_err_h" "$ac_includes_default" if test "x$ac_cv_header_com_err_h" = xyes; then : else as_fn_error $? "cannot locate com_err.h" "$LINENO" 5 fi fi # Extract the first word of "compile_et", so it can be a program name with args. set dummy compile_et; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_COMPILE_ET+:} false; then : $as_echo_n "(cached) " >&6 else case $COMPILE_ET in [\\/]* | ?:[\\/]*) ac_cv_path_COMPILE_ET="$COMPILE_ET" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_COMPILE_ET="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_COMPILE_ET" && ac_cv_path_COMPILE_ET="no compile et" ;; esac fi COMPILE_ET=$ac_cv_path_COMPILE_ET if test -n "$COMPILE_ET"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_ET" >&5 $as_echo "$COMPILE_ET" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else if test -f /usr/local/include/com_err.h -o -f /usr/local/include/et/com_err.h; then with_com_err="/usr/local" # Extract the first word of "/usr/local/bin/compile_et", so it can be a program name with args. set dummy /usr/local/bin/compile_et; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_COMPILE_ET+:} false; then : $as_echo_n "(cached) " >&6 else case $COMPILE_ET in [\\/]* | ?:[\\/]*) ac_cv_path_COMPILE_ET="$COMPILE_ET" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_COMPILE_ET="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_COMPILE_ET" && ac_cv_path_COMPILE_ET="no compile et" ;; esac fi COMPILE_ET=$ac_cv_path_COMPILE_ET if test -n "$COMPILE_ET"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_ET" >&5 $as_echo "$COMPILE_ET" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi elif test -f /usr/include/com_err.h -o -f /usr/include/et/com_err.h; then with_com_err="/usr" # Extract the first word of "/usr/bin/compile_et", so it can be a program name with args. set dummy /usr/bin/compile_et; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_COMPILE_ET+:} false; then : $as_echo_n "(cached) " >&6 else case $COMPILE_ET in [\\/]* | ?:[\\/]*) ac_cv_path_COMPILE_ET="$COMPILE_ET" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_COMPILE_ET="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_COMPILE_ET" && ac_cv_path_COMPILE_ET="no compile et" ;; esac fi COMPILE_ET=$ac_cv_path_COMPILE_ET if test -n "$COMPILE_ET"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_ET" >&5 $as_echo "$COMPILE_ET" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else # use ours with_com_err=yes fi fi if test "${with_com_err}" = "no"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: com_err is required; included version will be used." >&5 $as_echo "$as_me: WARNING: com_err is required; included version will be used." >&2;} with_com_err="yes" fi if test "${COMPILE_ET}" = "no compile et" -o "${COMPILE_ET}" = ""; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Parts of com_err distribuion were found, but not compile_et." >&5 $as_echo "$as_me: WARNING: Parts of com_err distribuion were found, but not compile_et." >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Will build com_err from included sources." >&5 $as_echo "$as_me: WARNING: Will build com_err from included sources." >&2;} with_com_err="yes" # build it ourselves fi fi case "$with_com_err" in # built-in et yes) # use the com_err we're gonna build COMPILE_ET="../com_err/et/compile_et" ;; "") # no problem, we already have it in the paths # we do nothing to pick it up ;; *) # use whatever they told us, or whatever we found COMPILE_ET="${with_com_err}/bin/compile_et" esac if test "$with_com_err" != yes ; then TEST1=".cyrus-configure-test-$$" /bin/rm -f $TEST1.et $TEST1.h $TEST1.c echo "error_table imap" >> $TEST1.et echo "ec IMAP_TESTING," >> $TEST1.et echo " \"Testing\"" >> $TEST1.et echo "end" >> $TEST1.et "${COMPILE_ET}" $TEST1.et > /dev/null compile_et_ok=no if test -f $TEST1.h ; then if test `awk '/IMAP_TESTING/{print $3}' $TEST1.h 2>/dev/null` = "(-1904809472L)" ; then compile_et_ok=yes fi fi /bin/rm -f $TEST1.et $TEST1.h $TEST1.c if test "$compile_et_ok" = no ; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems $COMPILE_ET is buggy, building our own" >&5 $as_echo "$as_me: WARNING: It seems $COMPILE_ET is buggy, building our own" >&2;} COMPILE_ET="../com_err/et/compile_et" # build it ourselves fi fi case "$with_com_err" in # built-in et yes) # use the com_err we're gonna build COM_ERR_LIBS="../com_err/et/libcom_err.a" COM_ERR_LDFLAGS="" COM_ERR_CPPFLAGS="-I\${top_srcdir}/com_err/et" PRE_SUBDIRS="com_err/et ${PRE_SUBDIRS}" EXTRA_OUTPUT="${EXTRA_OUTPUT} com_err/et/Makefile" ;; "") # no problem, we already have it in the paths # we do nothing to pick it up COM_ERR_LIBS="-lcom_err" # hope it's not shared # we already set COMPILE_ET, or we didn't get here COM_ERR_LDFLAGS="" COM_ERR_CPPFLAGS="" ;; *) # use whatever they told us, or whatever we found COM_ERR_LIBS="${with_com_err}/lib/libcom_err.a" COM_ERR_CPPFLAGS="-I${with_com_err}/include" # Ever get the feeling people hide this stuff on purpose? if test -d "${with_com_err}/include/et" ; then COM_ERR_CPPFLAGS="-I${with_com_err}/include/et" fi esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for modern syslog" >&5 $as_echo_n "checking for modern syslog... " >&6; } if ${cyrus_cv_lib_syslog+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef LOG_LOCAL6 #include #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : cyrus_cv_lib_syslog=yes else cyrus_cv_lib_syslog=no fi rm -f conftest.err conftest.i conftest.$ac_ext fi if test $cyrus_cv_lib_syslog = no; then PRE_SUBDIRS="${PRE_SUBDIRS} syslog" EXTRA_OUTPUT="${EXTRA_OUTPUT} syslog/Makefile" DEPLIBS="${DEPLIBS} ../syslog/libsyslog.a" CPPFLAGS="$CPPFLAGS -I\$(srcdir)/../syslog" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cyrus_cv_lib_syslog" >&5 $as_echo "$cyrus_cv_lib_syslog" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking which syslog facility to use" >&5 $as_echo_n "checking which syslog facility to use... " >&6; } SYSLOG_FACILITY=LOG_LOCAL6 @%:@ Check whether --with-syslogfacility was given. if test "${with_syslogfacility+set}" = set; then : withval=$with_syslogfacility; if test "$withval" != "yes" -a "$withval" != "no" ; then SYSLOG_FACILITY=LOG_$withval fi; fi cat >>confdefs.h <<_ACEOF @%:@define SYSLOG_FACILITY $SYSLOG_FACILITY _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSLOG_FACILITY" >&5 $as_echo "$SYSLOG_FACILITY" >&6; } ac_fn_c_check_func "$LINENO" "getdtablesize" "ac_cv_func_getdtablesize" if test "x$ac_cv_func_getdtablesize" = xyes; then : $as_echo "@%:@define HAVE_GETDTABLESIZE 1" >>confdefs.h else case " $LIB@&t@OBJS " in *" getdtablesize.$ac_objext "* ) ;; *) LIB@&t@OBJS="$LIB@&t@OBJS getdtablesize.$ac_objext" ;; esac fi @%:@ Check whether --enable-cmulocal was given. if test "${enable_cmulocal+set}" = set; then : enableval=$enable_cmulocal; if test "$enableval" = yes; then EXTRA_SUBDIRS="${EXTRA_SUBDIRS} netnews depot" EXTRA_OUTPUT="${EXTRA_OUTPUT} depot/Makefile" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking to use old sieve service name" >&5 $as_echo_n "checking to use old sieve service name... " >&6; } @%:@ Check whether --enable-oldsievename was given. if test "${enable_oldsievename+set}" = set; then : enableval=$enable_oldsievename; if test "$enableval" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "@%:@define OLD_SIEVE_SERVICE_NAME /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi @%:@ Check whether --enable-netscapehack was given. if test "${enable_netscapehack+set}" = set; then : enableval=$enable_netscapehack; if test "$enableval" = yes; then $as_echo "@%:@define ENABLE_X_NETSCAPE_HACK /**/" >>confdefs.h fi fi ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBDL 1 _ACEOF LIBS="-ldl $LIBS" fi fi ac_fn_c_check_func "$LINENO" "crypt" "ac_cv_func_crypt" if test "x$ac_cv_func_crypt" = xyes; then : cmu_have_crypt=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for crypt in -lcrypt" >&5 $as_echo_n "checking for crypt in -lcrypt... " >&6; } if ${ac_cv_lib_crypt_crypt+:} false; 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" = xyes; then : LIB_CRYPT="-lcrypt"; cmu_have_crypt=yes else cmu_have_crypt=no fi fi @%:@ Check whether --enable-gssapi was given. if test "${enable_gssapi+set}" = set; then : enableval=$enable_gssapi; gssapi=$enableval else gssapi=yes fi @%:@ Check whether --with-gss_impl was given. if test "${with_gss_impl+set}" = set; then : withval=$with_gss_impl; gss_impl=$withval else gss_impl=auto fi if test "$gssapi" != no; then platform= case "${host}" in *-*-linux*) platform=__linux ;; *-*-hpux*) platform=__hpux ;; *-*-irix*) platform=__irix ;; *-*-solaris2*) # When should we use __sunos? platform=__solaris ;; *-*-aix*) ###_AIX platform=__aix ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The system type is not recognized. If you believe that CyberSafe GSSAPI works on this platform, please update the configure script" >&5 $as_echo "$as_me: WARNING: The system type is not recognized. If you believe that CyberSafe GSSAPI works on this platform, please update the configure script" >&2;} if test "$gss_impl" = "cybersafe"; then as_fn_error $? "CyberSafe was forced, cannot continue as platform is not supported" "$LINENO" 5 fi ;; esac cmu_saved_CPPFLAGS=$CPPFLAGS if test -d ${gssapi}; then CPPFLAGS="$CPPFLAGS -I$gssapi/include" # We want to keep -I in our CPPFLAGS, but only if we succeed cmu_saved_CPPFLAGS=$CPPFLAGS ### I am not sure how useful is this (and whether this is required at all ### especially when we have to provide two -L flags for new CyberSafe LDFLAGS="$LDFLAGS -L$gssapi/lib" if test -n "$platform"; then if test "$gss_impl" = "auto" -o "$gss_impl" = "cybersafe"; then CPPFLAGS="$CPPFLAGS -D$platform" if test -d "${gssapi}/appsec-sdk/include"; then CPPFLAGS="$CPPFLAGS -I${gssapi}/appsec-sdk/include" fi fi fi fi ac_fn_c_check_header_mongrel "$LINENO" "gssapi.h" "ac_cv_header_gssapi_h" "$ac_includes_default" if test "x$ac_cv_header_gssapi_h" = xyes; then : else ac_fn_c_check_header_mongrel "$LINENO" "gssapi/gssapi.h" "ac_cv_header_gssapi_gssapi_h" "$ac_includes_default" if test "x$ac_cv_header_gssapi_gssapi_h" = xyes; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling GSSAPI - no include files found" >&5 $as_echo "$as_me: WARNING: Disabling GSSAPI - no include files found" >&2;}; gssapi=no fi fi CPPFLAGS=$cmu_saved_CPPFLAGS fi if test "$gssapi" != no; then if test "$ac_cv_header_gssapi_h" = "yes" -o "$ac_cv_header_gssapi_gssapi_h" = "yes"; then $as_echo "@%:@define HAVE_GSSAPI_H /**/" >>confdefs.h fi # We need to find out which gssapi implementation we are # using. Supported alternatives are: MIT Kerberos 5, # Heimdal Kerberos 5 (http://www.pdc.kth.se/heimdal), # CyberSafe Kerberos 5 (http://www.cybersafe.com/) # and Sun SEAM (http://wwws.sun.com/software/security/kerberos/) # # The choice is reflected in GSSAPIBASE_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_search in -lresolv" >&5 $as_echo_n "checking for res_search in -lresolv... " >&6; } if ${ac_cv_lib_resolv_res_search+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lresolv $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 res_search (); int main () { return res_search (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_resolv_res_search=yes else ac_cv_lib_resolv_res_search=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_resolv_res_search" >&5 $as_echo "$ac_cv_lib_resolv_res_search" >&6; } if test "x$ac_cv_lib_resolv_res_search" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_LIBRESOLV 1 _ACEOF LIBS="-lresolv $LIBS" fi if test -d ${gssapi}; then gssapi_dir="${gssapi}/lib" GSSAPIBASE_LIBS="-L$gssapi_dir" GSSAPIBASE_STATIC_LIBS="-L$gssapi_dir" else # FIXME: This is only used for building cyrus, and then only as # a real hack. it needs to be fixed. gssapi_dir="/usr/local/lib" fi # Check a full link against the Heimdal libraries. # If this fails, check a full link against the MIT libraries. # If this fails, check a full link against the CyberSafe libraries. # If this fails, check a full link against the Solaris 8 and up libgss. if test "$gss_impl" = "auto" -o "$gss_impl" = "heimdal"; then gss_failed=0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_unwrap in -lgssapi" >&5 $as_echo_n "checking for gss_unwrap in -lgssapi... " >&6; } if ${ac_cv_lib_gssapi_gss_unwrap+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgssapi ${GSSAPIBASE_LIBS} -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err ${LIB_SOCKET} $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 gss_unwrap (); int main () { return gss_unwrap (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_gssapi_gss_unwrap=yes else ac_cv_lib_gssapi_gss_unwrap=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_gssapi_gss_unwrap" >&5 $as_echo "$ac_cv_lib_gssapi_gss_unwrap" >&6; } if test "x$ac_cv_lib_gssapi_gss_unwrap" = xyes; then : gss_impl="heimdal" else gss_failed=1 fi if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then gss_impl="failed" fi fi if test "$gss_impl" = "auto" -o "$gss_impl" = "mit"; then # check for libkrb5support first { $as_echo "$as_me:${as_lineno-$LINENO}: checking for krb5int_getspecific in -lkrb5support" >&5 $as_echo_n "checking for krb5int_getspecific in -lkrb5support... " >&6; } if ${ac_cv_lib_krb5support_krb5int_getspecific+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lkrb5support ${LIB_SOCKET} $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 krb5int_getspecific (); int main () { return krb5int_getspecific (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_krb5support_krb5int_getspecific=yes else ac_cv_lib_krb5support_krb5int_getspecific=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_krb5support_krb5int_getspecific" >&5 $as_echo "$ac_cv_lib_krb5support_krb5int_getspecific" >&6; } if test "x$ac_cv_lib_krb5support_krb5int_getspecific" = xyes; then : K5SUP=-lkrb5support K5SUPSTATIC=$gssapi_dir/libkrb5support.a fi gss_failed=0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_unwrap in -lgssapi_krb5" >&5 $as_echo_n "checking for gss_unwrap in -lgssapi_krb5... " >&6; } if ${ac_cv_lib_gssapi_krb5_gss_unwrap+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgssapi_krb5 ${GSSAPIBASE_LIBS} -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP} ${LIB_SOCKET} $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 gss_unwrap (); int main () { return gss_unwrap (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_gssapi_krb5_gss_unwrap=yes else ac_cv_lib_gssapi_krb5_gss_unwrap=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_gssapi_krb5_gss_unwrap" >&5 $as_echo "$ac_cv_lib_gssapi_krb5_gss_unwrap" >&6; } if test "x$ac_cv_lib_gssapi_krb5_gss_unwrap" = xyes; then : gss_impl="mit" else gss_failed=1 fi if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then gss_impl="failed" fi fi # For Cybersafe one has to set a platform define in order to make compilation work if test "$gss_impl" = "auto" -o "$gss_impl" = "cybersafe"; then cmu_saved_CPPFLAGS=$CPPFLAGS cmu_saved_GSSAPIBASE_LIBS=$GSSAPIBASE_LIBS # FIXME - Note that the libraries are in .../lib64 for 64bit kernels if test -d "${gssapi}/appsec-rt/lib"; then GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -L${gssapi}/appsec-rt/lib" fi CPPFLAGS="$CPPFLAGS -D$platform" if test -d "${gssapi}/appsec-sdk/include"; then CPPFLAGS="$CPPFLAGS -I${gssapi}/appsec-sdk/include" fi gss_failed=0 # Check for CyberSafe with two libraries first, than fall back to a single # library (older CyberSafe) unset ac_cv_lib_gss_csf_gss_acq_user { $as_echo "$as_me:${as_lineno-$LINENO}: checking for csf_gss_acq_user in -lgss" >&5 $as_echo_n "checking for csf_gss_acq_user in -lgss... " >&6; } if ${ac_cv_lib_gss_csf_gss_acq_user+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgss ${GSSAPIBASE_LIBS} -lgss -lcstbk5 $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 csf_gss_acq_user (); int main () { return csf_gss_acq_user (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_gss_csf_gss_acq_user=yes else ac_cv_lib_gss_csf_gss_acq_user=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_gss_csf_gss_acq_user" >&5 $as_echo "$ac_cv_lib_gss_csf_gss_acq_user" >&6; } if test "x$ac_cv_lib_gss_csf_gss_acq_user" = xyes; then : gss_impl="cybersafe03" else unset ac_cv_lib_gss_csf_gss_acq_user; { $as_echo "$as_me:${as_lineno-$LINENO}: checking for csf_gss_acq_user in -lgss" >&5 $as_echo_n "checking for csf_gss_acq_user in -lgss... " >&6; } if ${ac_cv_lib_gss_csf_gss_acq_user+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgss $GSSAPIBASE_LIBS -lgss $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 csf_gss_acq_user (); int main () { return csf_gss_acq_user (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_gss_csf_gss_acq_user=yes else ac_cv_lib_gss_csf_gss_acq_user=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_gss_csf_gss_acq_user" >&5 $as_echo "$ac_cv_lib_gss_csf_gss_acq_user" >&6; } if test "x$ac_cv_lib_gss_csf_gss_acq_user" = xyes; then : gss_impl="cybersafe" else gss_failed=1 fi fi if test "$gss_failed" = "1"; then # Restore variables GSSAPIBASE_LIBS=$cmu_saved_GSSAPIBASE_LIBS CPPFLAGS=$cmu_saved_CPPFLAGS if test "$gss_impl" != "auto"; then gss_impl="failed" fi fi fi if test "$gss_impl" = "auto" -o "$gss_impl" = "seam"; then gss_failed=0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gss_unwrap in -lgss" >&5 $as_echo_n "checking for gss_unwrap in -lgss... " >&6; } if ${ac_cv_lib_gss_gss_unwrap+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgss -lgss $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 gss_unwrap (); int main () { return gss_unwrap (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_gss_gss_unwrap=yes else ac_cv_lib_gss_gss_unwrap=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_gss_gss_unwrap" >&5 $as_echo "$ac_cv_lib_gss_gss_unwrap" >&6; } if test "x$ac_cv_lib_gss_gss_unwrap" = xyes; then : gss_impl="seam" else gss_failed=1 fi if test "$gss_impl" != "auto" -a "$gss_failed" = "1"; then gss_impl="failed" fi fi if test "$gss_impl" = "mit"; then GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi_krb5 -lkrb5 -lk5crypto -lcom_err ${K5SUP}" GSSAPIBASE_STATIC_LIBS="$GSSAPIBASE_LIBS $gssapi_dir/libgssapi_krb5.a $gssapi_dir/libkrb5.a $gssapi_dir/libk5crypto.a $gssapi_dir/libcom_err.a ${K5SUPSTATIC}" elif test "$gss_impl" = "heimdal"; then CPPFLAGS="$CPPFLAGS -DKRB5_HEIMDAL" GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgssapi -lkrb5 -lasn1 -lroken ${LIB_CRYPT} ${LIB_DES} -lcom_err" GSSAPIBASE_STATIC_LIBS="$GSSAPIBASE_STATIC_LIBS $gssapi_dir/libgssapi.a $gssapi_dir/libkrb5.a $gssapi_dir/libasn1.a $gssapi_dir/libroken.a $gssapi_dir/libcom_err.a ${LIB_CRYPT}" elif test "$gss_impl" = "cybersafe03"; then # Version of CyberSafe with two libraries CPPFLAGS="$CPPFLAGS -D$platform -I${gssapi}/appsec-sdk/include" GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgss -lcstbk5" # there is no static libgss for CyberSafe GSSAPIBASE_STATIC_LIBS=none elif test "$gss_impl" = "cybersafe"; then CPPFLAGS="$CPPFLAGS -D$platform -I${gssapi}/appsec-sdk/include" GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lgss" # there is no static libgss for CyberSafe GSSAPIBASE_STATIC_LIBS=none elif test "$gss_impl" = "seam"; then GSSAPIBASE_LIBS=-lgss # there is no static libgss on Solaris 8 and up GSSAPIBASE_STATIC_LIBS=none elif test "$gss_impl" = "failed"; then gssapi="no" GSSAPIBASE_LIBS= GSSAPIBASE_STATIC_LIBS= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling GSSAPI - specified library not found" >&5 $as_echo "$as_me: WARNING: Disabling GSSAPI - specified library not found" >&2;} else gssapi="no" GSSAPIBASE_LIBS= GSSAPIBASE_STATIC_LIBS= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Disabling GSSAPI - no library" >&5 $as_echo "$as_me: WARNING: Disabling GSSAPI - no library" >&2;} fi fi # # Cybersafe defines both GSS_C_NT_HOSTBASED_SERVICE and GSS_C_NT_USER_NAME # in gssapi\rfckrb5.h # if test "$gssapi" != "no"; then if test "$gss_impl" = "cybersafe" -o "$gss_impl" = "cybersafe03"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef GSS_C_NT_HOSTBASED_SERVICE hostbased_service_gss_nt_yes #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "hostbased_service_gss_nt_yes" >/dev/null 2>&1; then : $as_echo "@%:@define HAVE_GSS_C_NT_HOSTBASED_SERVICE /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cybersafe define not found" >&5 $as_echo "$as_me: WARNING: Cybersafe define not found" >&2;} fi rm -f conftest* elif test "$ac_cv_header_gssapi_h" = "yes"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "GSS_C_NT_HOSTBASED_SERVICE" >/dev/null 2>&1; then : $as_echo "@%:@define HAVE_GSS_C_NT_HOSTBASED_SERVICE /**/" >>confdefs.h fi rm -f conftest* elif test "$ac_cv_header_gssapi_gssapi_h"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "GSS_C_NT_HOSTBASED_SERVICE" >/dev/null 2>&1; then : $as_echo "@%:@define HAVE_GSS_C_NT_HOSTBASED_SERVICE /**/" >>confdefs.h fi rm -f conftest* fi if test "$gss_impl" = "cybersafe" -o "$gss_impl" = "cybersafe03"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef GSS_C_NT_USER_NAME user_name_yes_gss_nt #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "user_name_yes_gss_nt" >/dev/null 2>&1; then : $as_echo "@%:@define HAVE_GSS_C_NT_USER_NAME /**/" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cybersafe define not found" >&5 $as_echo "$as_me: WARNING: Cybersafe define not found" >&2;} fi rm -f conftest* elif test "$ac_cv_header_gssapi_h" = "yes"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "GSS_C_NT_USER_NAME" >/dev/null 2>&1; then : $as_echo "@%:@define HAVE_GSS_C_NT_USER_NAME /**/" >>confdefs.h fi rm -f conftest* elif test "$ac_cv_header_gssapi_gssapi_h"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "GSS_C_NT_USER_NAME" >/dev/null 2>&1; then : $as_echo "@%:@define HAVE_GSS_C_NT_USER_NAME /**/" >>confdefs.h fi rm -f conftest* fi fi GSSAPI_LIBS="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking GSSAPI" >&5 $as_echo_n "checking GSSAPI... " >&6; } if test "$gssapi" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: with implementation ${gss_impl}" >&5 $as_echo "with implementation ${gss_impl}" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_search in -lresolv" >&5 $as_echo_n "checking for res_search in -lresolv... " >&6; } if ${ac_cv_lib_resolv_res_search+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lresolv $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 res_search (); int main () { return res_search (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_resolv_res_search=yes else ac_cv_lib_resolv_res_search=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_resolv_res_search" >&5 $as_echo "$ac_cv_lib_resolv_res_search" >&6; } if test "x$ac_cv_lib_resolv_res_search" = xyes; then : GSSAPIBASE_LIBS="$GSSAPIBASE_LIBS -lresolv" fi SASL_MECHS="$SASL_MECHS libgssapiv2.la" SASL_STATIC_OBJS="$SASL_STATIC_OBJS gssapi.o" SASL_STATIC_SRCS="$SASL_STATIC_SRCS \$(top_srcdir)/plugins/gssapi.c" cmu_save_LIBS="$LIBS" LIBS="$LIBS $GSSAPIBASE_LIBS" for ac_func in gsskrb5_register_acceptor_identity do : ac_fn_c_check_func "$LINENO" "gsskrb5_register_acceptor_identity" "ac_cv_func_gsskrb5_register_acceptor_identity" if test "x$ac_cv_func_gsskrb5_register_acceptor_identity" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY 1 _ACEOF fi done LIBS="$cmu_save_LIBS" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5 $as_echo "disabled" >&6; } fi @%:@ Check whether --with-sasl was given. if test "${with_sasl+set}" = set; then : withval=$with_sasl; with_sasl="$withval" else with_sasl="yes" fi @%:@ Check whether --with-staticsasl was given. if test "${with_staticsasl+set}" = set; then : withval=$with_staticsasl; with_staticsasl="$withval"; if test $with_staticsasl != "no"; then using_static_sasl="static" fi else with_staticsasl="no"; using_static_sasl="no" fi SASLFLAGS="" LIB_SASL="" cmu_saved_CPPFLAGS=$CPPFLAGS cmu_saved_LDFLAGS=$LDFLAGS cmu_saved_LIBS=$LIBS if test ${with_staticsasl} != "no"; then if test -d ${with_staticsasl}; then if test -d ${with_staticsasl}/lib64 ; then ac_cv_sasl_where_lib=${with_staticsasl}/lib64 else ac_cv_sasl_where_lib=${with_staticsasl}/lib fi ac_cv_sasl_where_lib=${with_staticsasl}/lib ac_cv_sasl_where_inc=${with_staticsasl}/include SASLFLAGS="-I$ac_cv_sasl_where_inc" LIB_SASL="-L$ac_cv_sasl_where_lib" CPPFLAGS="${cmu_saved_CPPFLAGS} -I${ac_cv_sasl_where_inc}" LDFLAGS="${cmu_saved_LDFLAGS} -L${ac_cv_sasl_where_lib}" else with_staticsasl="/usr" fi ac_fn_c_check_header_mongrel "$LINENO" "sasl/sasl.h" "ac_cv_header_sasl_sasl_h" "$ac_includes_default" if test "x$ac_cv_header_sasl_sasl_h" = xyes; then : ac_fn_c_check_header_mongrel "$LINENO" "sasl/saslutil.h" "ac_cv_header_sasl_saslutil_h" "$ac_includes_default" if test "x$ac_cv_header_sasl_saslutil_h" = xyes; then : for i42 in lib64 lib; do if test -r ${with_staticsasl}/$i42/libsasl2.a; then ac_cv_found_sasl=yes { $as_echo "$as_me:${as_lineno-$LINENO}: checking for static libsasl" >&5 $as_echo_n "checking for static libsasl... " >&6; } LIB_SASL="$LIB_SASL ${with_staticsasl}/$i42/libsasl2.a" fi done if test ! "$ac_cv_found_sasl" = "yes"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for static libsasl" >&5 $as_echo_n "checking for static libsasl... " >&6; } as_fn_error $? "Could not find ${with_staticsasl}/lib*/libsasl2.a" "$LINENO" 5 fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: found" >&5 $as_echo "found" >&6; } if test "x$SASL_GSSAPI_LIBS_SET" = "x"; then LIB_SASL="$LIB_SASL $GSSAPIBASE_STATIC_LIBS" else SASL_GSSAPI_LIBS_SET="" cmu_saved_LIBS="$GSSAPIBASE_STATIC_LIBS $cmu_saved_LIBS" fi fi if test -d ${with_sasl}; then ac_cv_sasl_where_lib=${with_sasl}/lib ac_cv_sasl_where_inc=${with_sasl}/include DYNSASLFLAGS="-I$ac_cv_sasl_where_inc" if test "$ac_cv_sasl_where_lib" != ""; then # this is CMU ADD LIBPATH TO if test "$andrew_cv_runpath_switch" = "none" ; then LIB_DYN_SASL="-L$ac_cv_sasl_where_lib ${LIB_DYN_SASL}" else LIB_DYN_SASL="-L$ac_cv_sasl_where_lib ${LIB_DYN_SASL} $andrew_cv_runpath_switch$ac_cv_sasl_where_lib" fi fi LIB_DYN_SASL="$LIB_DYN_SASL -lsasl2" CPPFLAGS="${cmu_saved_CPPFLAGS} -I${ac_cv_sasl_where_inc}" LDFLAGS="${cmu_saved_LDFLAGS} -L${ac_cv_sasl_where_lib}" fi # be sure to check for a SASLv2 specific function ac_fn_c_check_header_mongrel "$LINENO" "sasl/sasl.h" "ac_cv_header_sasl_sasl_h" "$ac_includes_default" if test "x$ac_cv_header_sasl_sasl_h" = xyes; then : ac_fn_c_check_header_mongrel "$LINENO" "sasl/saslutil.h" "ac_cv_header_sasl_saslutil_h" "$ac_includes_default" if test "x$ac_cv_header_sasl_saslutil_h" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prop_get in -lsasl2" >&5 $as_echo_n "checking for prop_get in -lsasl2... " >&6; } if ${ac_cv_lib_sasl2_prop_get+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsasl2 $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 prop_get (); int main () { return prop_get (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_sasl2_prop_get=yes else ac_cv_lib_sasl2_prop_get=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_sasl2_prop_get" >&5 $as_echo "$ac_cv_lib_sasl2_prop_get" >&6; } if test "x$ac_cv_lib_sasl2_prop_get" = xyes; then : ac_cv_found_sasl=yes else ac_cv_found_sasl=no fi else ac_cv_found_sasl=no fi else ac_cv_found_sasl=no fi if test "$ac_cv_found_sasl" = "yes"; then if test "$ac_cv_sasl_where_lib" != ""; then # this is CMU ADD LIBPATH TO if test "$andrew_cv_runpath_switch" = "none" ; then DYNLIB_SASL="-L$ac_cv_sasl_where_lib ${DYNLIB_SASL}" else DYNLIB_SASL="-L$ac_cv_sasl_where_lib ${DYNLIB_SASL} $andrew_cv_runpath_switch$ac_cv_sasl_where_lib" fi fi DYNLIB_SASL="$DYNLIB_SASL -lsasl2" if test "$using_static_sasl" != "static"; then LIB_SASL=$DYNLIB_SASL SASLFLAGS=$DYNSASLFLAGS fi else DYNLIB_SASL="" DYNSASLFLAGS="" using_static_sasl="staticonly" fi if test "x$SASL_GSSAPI_LIBS_SET" != "x"; then SASL_GSSAPI_LIBS_SET="" cmu_saved_LIBS="$GSSAPIBASE_LIBS $cmu_saved_LIBS" fi LIBS="$cmu_saved_LIBS" LDFLAGS="$cmu_saved_LDFLAGS" CPPFLAGS="$cmu_saved_CPPFLAGS" if test "$ac_cv_found_sasl" != "yes"; then as_fn_error $? "Cannot continue without libsasl2. Get it from ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/." "$LINENO" 5 fi cmu_saved_CPPFLAGS=$CPPFLAGS CPPFLAGS="$CPPFLAGS $SASLFLAGS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef SASL_VERSION_MAJOR #error SASL_VERSION_MAJOR not defined #endif #ifndef SASL_VERSION_MINOR #error SASL_VERSION_MINOR not defined #endif #ifndef SASL_VERSION_STEP #error SASL_VERSION_STEP not defined #endif #if SASL_VERSION_MAJOR < 2 || SASL_VERSION_MINOR < 1 || SASL_VERSION_STEP < 7 #error SASL version is less than 2.1.7 #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else as_fn_error $? "Incorrect SASL headers found. This package requires SASL 2.1.7 or newer." "$LINENO" 5 fi rm -f conftest.err conftest.i conftest.$ac_ext CPPFLAGS=$cmu_saved_CPPFLAGS cmu_saved_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $LIB_SASL" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sasl_checkapop in -lsasl2" >&5 $as_echo_n "checking for sasl_checkapop in -lsasl2... " >&6; } if ${ac_cv_lib_sasl2_sasl_checkapop+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsasl2 $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 sasl_checkapop (); int main () { return sasl_checkapop (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_sasl2_sasl_checkapop=yes else ac_cv_lib_sasl2_sasl_checkapop=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_sasl2_sasl_checkapop" >&5 $as_echo "$ac_cv_lib_sasl2_sasl_checkapop" >&6; } if test "x$ac_cv_lib_sasl2_sasl_checkapop" = xyes; then : $as_echo "@%:@define HAVE_APOP /**/" >>confdefs.h else as_fn_error $? "libsasl2 without working sasl_checkapop. Cannot continue." "$LINENO" 5 fi LDFLAGS=$cmu_saved_LDFLAGS @%:@ Check whether --with-perl was given. if test "${with_perl+set}" = set; then : withval=$with_perl; with_perl="$withval" else with_perl="perl" fi if test "${with_perl}" = yes; then with_perl="perl" fi if test "${with_perl}" != no; then if test ${using_static_sasl} = "staticonly"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Cannot compile perl utilities using static libsasl" >&5 $as_echo "$as_me: WARNING: Cannot compile perl utilities using static libsasl" >&2;} with_perl="no" else for ac_prog in ${with_perl} perl do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_PERL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$PERL"; then ac_cv_prog_PERL="$PERL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_PERL="$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 PERL=$ac_cv_prog_PERL if test -n "$PERL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 $as_echo "$PERL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$PERL" && break done test -n "$PERL" || PERL="with_perl=notfound" fi fi if test "$with_perl" = "notfound"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Perl not found: Administrative tools won't be available" >&5 $as_echo "$as_me: WARNING: Perl not found: Administrative tools won't be available" >&2;} elif test "${with_perl}" != "no"; then EXTRA_SUBDIRS="${EXTRA_SUBDIRS} perl" PERL_SUBDIRS="imap" PERL="${with_perl}" case "${target_os}" in linux*|netbsd*|freebsd*|dragonfly*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for perl cccdlflags needed on \"${target_os}\"" >&5 $as_echo_n "checking for perl cccdlflags needed on \"${target_os}\"... " >&6; } eval `${PERL} -V:cccdlflags` PERL_CCCDLFLAGS="$cccdlflags" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL_CCCDLFLAGS" >&5 $as_echo "$PERL_CCCDLFLAGS" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: skipping check for perl cccdlflags on \"${target_os}\"" >&5 $as_echo "$as_me: WARNING: skipping check for perl cccdlflags on \"${target_os}\"" >&2;} esac fi if test "$sievedir" != "no"; then if test "$enable_server" != "no"; then EXTRA_SUBDIRS="${EXTRA_SUBDIRS} timsieved notifyd" EXTRA_OUTPUT="${EXTRA_OUTPUT} timsieved/Makefile notifyd/Makefile" fi PERL_SUBDIRS="${PERL_SUBDIRS} sieve" PERL_DEPSUBDIRS="sieve" EXTRA_OUTPUT="${EXTRA_OUTPUT} perl/sieve/Makefile perl/sieve/lib/Makefile" else PERL_DEPSUBDIRS="none" fi SNMP_SUBDIRS="" @%:@ Check whether --with-libwrap was given. if test "${with_libwrap+set}" = set; then : withval=$with_libwrap; with_libwrap=$withval else with_libwrap=yes fi if test "$with_libwrap" != no; then if test -d "$with_libwrap"; then CPPFLAGS="$CPPFLAGS -I${with_libwrap}/include" LDFLAGS="$LDFLAGS -L${with_libwrap}/$CMU_LIB_SUBDIR" fi cmu_save_LIBS="$LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for request_init in -lwrap" >&5 $as_echo_n "checking for request_init in -lwrap... " >&6; } if ${ac_cv_lib_wrap_request_init+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lwrap ${LIB_SOCKET} $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 request_init (); int main () { return request_init (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_wrap_request_init=yes else ac_cv_lib_wrap_request_init=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_wrap_request_init" >&5 $as_echo "$ac_cv_lib_wrap_request_init" >&6; } if test "x$ac_cv_lib_wrap_request_init" = xyes; then : ac_fn_c_check_header_mongrel "$LINENO" "tcpd.h" "ac_cv_header_tcpd_h" "$ac_includes_default" if test "x$ac_cv_header_tcpd_h" = xyes; then : else with_libwrap=no fi else with_libwrap=no fi LIBS="$cmu_save_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking libwrap support" >&5 $as_echo_n "checking libwrap support... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_libwrap" >&5 $as_echo "$with_libwrap" >&6; } LIB_WRAP="" if test "$with_libwrap" != no; then $as_echo "@%:@define HAVE_LIBWRAP /**/" >>confdefs.h LIB_WRAP="-lwrap" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for yp_get_default_domain in -lnsl" >&5 $as_echo_n "checking for yp_get_default_domain in -lnsl... " >&6; } if ${ac_cv_lib_nsl_yp_get_default_domain+:} false; 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 yp_get_default_domain (); int main () { return yp_get_default_domain (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nsl_yp_get_default_domain=yes else ac_cv_lib_nsl_yp_get_default_domain=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_yp_get_default_domain" >&5 $as_echo "$ac_cv_lib_nsl_yp_get_default_domain" >&6; } if test "x$ac_cv_lib_nsl_yp_get_default_domain" = xyes; then : LIB_WRAP="${LIB_WRAP} -lnsl" fi fi @%:@ Check whether --with-snmp was given. if test "${with_snmp+set}" = set; then : withval=$with_snmp; with_snmp=$withval else with_snmp=yes fi @%:@ Check whether --with-ucdsnmp was given. if test "${with_ucdsnmp+set}" = set; then : withval=$with_ucdsnmp; with_snmp=$withval fi if test "$with_snmp" != "no"; then if test "$with_snmp" = "yes"; then # Extract the first word of "net-snmp-config", so it can be a program name with args. set dummy net-snmp-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_SNMP_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $SNMP_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_SNMP_CONFIG="$SNMP_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_dummy="/usr/local/bin:$PATH" for as_dir in $as_dummy do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_SNMP_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi SNMP_CONFIG=$ac_cv_path_SNMP_CONFIG if test -n "$SNMP_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SNMP_CONFIG" >&5 $as_echo "$SNMP_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else SNMP_CONFIG="$with_snmp/bin/net-snmp-config" fi if test -x "$SNMP_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking NET SNMP libraries" >&5 $as_echo_n "checking NET SNMP libraries... " >&6; } SNMP_LIBS=`$SNMP_CONFIG --agent-libs` SNMP_PREFIX=`$SNMP_CONFIG --prefix` if test -n "$SNMP_LIBS" && test -n "$SNMP_PREFIX"; then CPPFLAGS="$CPPFLAGS -I${SNMP_PREFIX}/include" LIB_UCDSNMP=$SNMP_LIBS $as_echo "@%:@define HAVE_NETSNMP 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } for ac_header in net-snmp/agent/agent_module_config.h do : ac_fn_c_check_header_mongrel "$LINENO" "net-snmp/agent/agent_module_config.h" "ac_cv_header_net_snmp_agent_agent_module_config_h" "$ac_includes_default" if test "x$ac_cv_header_net_snmp_agent_agent_module_config_h" = xyes; then : cat >>confdefs.h <<_ACEOF @%:@define HAVE_NET_SNMP_AGENT_AGENT_MODULE_CONFIG_H 1 _ACEOF fi done else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not find the required paths. Please check your net-snmp installation." >&5 $as_echo "$as_me: WARNING: Could not find the required paths. Please check your net-snmp installation." >&2;} fi else if test "$with_snmp" != no; then if test -d "$with_snmp"; then CPPFLAGS="$CPPFLAGS -I${with_snmp}/include" LDFLAGS="$LDFLAGS -L${with_snmp}/$CMU_LIB_SUBDIR" fi cmu_save_LIBS="$LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sprint_objid in -lsnmp" >&5 $as_echo_n "checking for sprint_objid in -lsnmp... " >&6; } if ${ac_cv_lib_snmp_sprint_objid+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsnmp ${LIB_SOCKET} $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 sprint_objid (); int main () { return sprint_objid (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_snmp_sprint_objid=yes else ac_cv_lib_snmp_sprint_objid=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_snmp_sprint_objid" >&5 $as_echo "$ac_cv_lib_snmp_sprint_objid" >&6; } if test "x$ac_cv_lib_snmp_sprint_objid" = xyes; then : ac_fn_c_check_header_mongrel "$LINENO" "ucd-snmp/version.h" "ac_cv_header_ucd_snmp_version_h" "$ac_includes_default" if test "x$ac_cv_header_ucd_snmp_version_h" = xyes; then : else with_snmp=no fi else with_snmp=no fi LIBS="$cmu_save_LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking UCD SNMP libraries" >&5 $as_echo_n "checking UCD SNMP libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_snmp" >&5 $as_echo "$with_snmp" >&6; } LIB_UCDSNMP="" if test "$with_snmp" != no; then $as_echo "@%:@define HAVE_UCDSNMP 1" >>confdefs.h LIB_UCDSNMP="-lucdagent -lucdmibs -lsnmp" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for rpmdbOpen in -lrpm" >&5 $as_echo_n "checking for rpmdbOpen in -lrpm... " >&6; } if ${ac_cv_lib_rpm_rpmdbOpen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lrpm -lpopt $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 rpmdbOpen (); int main () { return rpmdbOpen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_rpm_rpmdbOpen=yes else ac_cv_lib_rpm_rpmdbOpen=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_rpm_rpmdbOpen" >&5 $as_echo "$ac_cv_lib_rpm_rpmdbOpen" >&6; } if test "x$ac_cv_lib_rpm_rpmdbOpen" = xyes; then : LIB_UCDSNMP="${LIB_UCDSNMP} -lrpm -lpopt" fi fi fi fi # Figure out what directories we're linking against. # Lots of fun for the whole family. # This probably chokes on anything with spaces in it. # All we want is the list of -L directories, and -L may or may not be # followed by a space. isdir=no libpath="" #echo "debug ldflags: << ${ldflags} >>" #echo "debug default_ldflags: << ${default_ldflags} >>" for flag in ${ldflags} ${default_ldflags}; do case $flag in -L) # it's a split -L option, we'll mark the next option as a dir. isdir=yes ;; -L*) # attached -L option: split off the directory larg=`echo $flag | sed -e 's:-L\(..*\):\1:'` libpath="${libpath} ${larg}" ;; *) if test $isdir = yes ; then libpath="${libpath} ${flag}" isdir=no fi esac done IMAP_COM_ERR_LIBS="${COM_ERR_LIBS}" IMAP_LIBS="${LIB_SASL} ${LIBS} ${SQL_LIBS}" ac_config_files="$ac_config_files man/Makefile master/Makefile lib/Makefile imap/Makefile imtest/Makefile netnews/Makefile perl/Makefile $EXTRA_OUTPUT Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIB@&t@OBJS; 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 LIB@&t@OBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in @%:@( *posix*) : set -o posix ;; @%:@( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in @%:@( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in @%:@(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH @%:@ as_fn_error STATUS ERROR [LINENO LOG_FD] @%:@ ---------------------------------------- @%:@ Output "`basename @S|@0`: error: ERROR" to stderr. If LINENO and LOG_FD are @%:@ provided, also output the error to LOG_FD, referencing LINENO. Then exit the @%:@ script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } @%:@ as_fn_error @%:@ as_fn_set_status STATUS @%:@ ----------------------- @%:@ Set @S|@? 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 @S|@as_val. Take advantage of shells that can avoid forks. The arguments @%:@ must be portable across @S|@(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in @%:@((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null @%:@ as_fn_mkdir_p @%:@ ------------- @%:@ Create "@S|@as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } @%:@ as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi @%:@ as_fn_executable_p FILE @%:@ ----------------------- @%:@ Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } @%:@ as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../@%:@@%:@ /;s/...$/ @%:@@%:@/;p;x;p;x' <<_ASBOX @%:@@%:@ Running $as_me. @%:@@%:@ _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _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" ;; "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; "master/Makefile") CONFIG_FILES="$CONFIG_FILES master/Makefile" ;; "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; "imap/Makefile") CONFIG_FILES="$CONFIG_FILES imap/Makefile" ;; "imtest/Makefile") CONFIG_FILES="$CONFIG_FILES imtest/Makefile" ;; "netnews/Makefile") CONFIG_FILES="$CONFIG_FILES netnews/Makefile" ;; "perl/Makefile") CONFIG_FILES="$CONFIG_FILES perl/Makefile" ;; "$EXTRA_OUTPUT") CONFIG_FILES="$CONFIG_FILES $EXTRA_OUTPUT" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac _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 $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi cyrus-imapd-2.4.18/configure.in0000644000175000017500000012675212546374065015353 0ustar ellieelliednl Process this file with autoconf to produce a configure script. dnl dnl Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved. dnl dnl Redistribution and use in source and binary forms, with or without dnl modification, are permitted provided that the following conditions dnl are met: dnl dnl 1. Redistributions of source code must retain the above copyright dnl notice, this list of conditions and the following disclaimer. dnl dnl 2. Redistributions in binary form must reproduce the above copyright dnl notice, this list of conditions and the following disclaimer in dnl the documentation and/or other materials provided with the dnl distribution. dnl dnl 3. The name "Carnegie Mellon University" must not be used to dnl endorse or promote products derived from this software without dnl prior written permission. For permission or any legal dnl details, please contact dnl Carnegie Mellon University dnl Center for Technology Transfer and Enterprise Creation dnl 4615 Forbes Avenue dnl Suite 302 dnl Pittsburgh, PA 15213 dnl (412) 268-7393, fax: (412) 268-7395 dnl innovation@andrew.cmu.edu dnl dnl 4. Redistributions of any form whatsoever must retain the following dnl acknowledgment: dnl "This product includes software developed by Computing Services dnl at Carnegie Mellon University (http://www.cmu.edu/computing/)." dnl dnl CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO dnl THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY dnl AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE dnl FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES dnl WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN dnl AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING dnl OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. dnl dnl $Id: configure.in,v 1.316 2010/01/06 17:01:26 murch Exp $ dnl dnl configure.in for the Cyrus imapd dnl AC_INIT(imap/imapd.c) AC_PREREQ([2.54]) AC_CONFIG_HEADER(config.h) AC_CANONICAL_SYSTEM dnl Useful hook for distributions AC_ARG_WITH(extraident,[ --with-extraident=STRING use STRING as extra version information], [AC_DEFINE_UNQUOTED(EXTRA_IDENT,"$withval", [Extra version information for imap/version.h])]) AC_CHECK_PROG(MAKEDEPEND,makedepend,makedepend,[`cd ${srcdir};pwd`/tools/not-mkdep]) if test "$MAKEDEPEND" != "makedepend"; then AC_MSG_WARN([Makedepend is not installed on this system. You should compile and install the version from the makedepend subdirectory.]) fi AC_ARG_WITH(login,,AC_ERROR([--with-login is no longer supported. Configure SASL appropriately instead.])) AC_ARG_WITH(cyrus-prefix,[ --with-cyrus-prefix=DIR use DIR as cyrus server install directory], cyrus_prefix="$withval",cyrus_prefix="/usr/cyrus") AC_SUBST(cyrus_prefix) AC_DEFINE_UNQUOTED(CYRUS_PATH,"$cyrus_prefix",[Where will we be installed?]) AC_ARG_WITH(service-path,[ --with-service-path=DIR use DIR as service install directory], service_path="$withval",service_path="$cyrus_prefix/bin") AC_SUBST(service_path) AC_DEFINE_UNQUOTED(SERVICE_PATH,"$service_path",[Directory to use for service binaries]) AC_ARG_WITH(cyrus-user,[ --with-cyrus-user=USERID use USERID cyrus userid], cyrus_user="$withval",cyrus_user="cyrus") AC_SUBST(cyrus_user) AC_DEFINE_UNQUOTED(CYRUS_USER, "$cyrus_user",[What user will we run as?]) AC_ARG_WITH(cyrus-group,[ --with-cyrus-group=GROUPID use GROUPID cyrus group], cyrus_group="$withval",cyrus_group="mail") AC_SUBST(cyrus_group) dnl allow users to override $sysconfdir, but retain old default (/etc) dnl if not specified if test $sysconfdir = '${prefix}/etc'; then sysconfdir="/etc" fi AC_DEFINE_UNQUOTED(SYSCONFDIR,"$sysconfdir",[Config File Location]) AC_PROG_CC AC_PROG_RANLIB AC_PROG_MAKE_SET AC_PROG_INSTALL AC_AIX AC_ISC_POSIX AC_PROG_AWK AC_C_CONST AC_SYS_LONG_FILE_NAMES if test $ac_cv_sys_long_file_names = no; then AC_MSG_ERROR(The Cyrus IMAPD requires support for long file names) fi AC_C_INLINE dnl Check the size of various types AC_CHECK_SIZEOF(int) AC_CHECK_SIZEOF(long) AC_CHECK_SIZEOF(size_t) AC_CHECK_SIZEOF(off_t) dnl Check if `long long int' is available AC_CHECK_SIZEOF(long long int) AC_CHECK_SIZEOF(unsigned long long int) if test "$ac_cv_sizeof_long_long_int" -eq 8 -a \ "$ac_cv_sizeof_unsigned_long_long_int" -eq 8; then AC_DEFINE(HAVE_LONG_LONG_INT,[],[Does the compiler support long long int?]) AC_C_BIGENDIAN fi CMU_C___ATTRIBUTE__ CMU_C_FPIC dnl check for -R, etc. switch CMU_GUESS_RUNPATH_SWITCH AC_CHECK_HEADERS(unistd.h sys/select.h sys/param.h stdarg.h) AC_REPLACE_FUNCS(memmove strcasecmp ftruncate strerror) AC_CHECK_FUNCS(strlcat strlcpy getgrouplist) AC_HEADER_DIRENT dnl check whether to use getpassphrase or getpass AC_CHECK_HEADERS(stdlib.h) AC_CHECK_FUNCS(getpassphrase) dnl do this before Berkeley DB/IPv6 detection CMU_SOCKETS LIBS="$LIBS ${LIB_SOCKET}" dnl check for IPv6 functions (fall back to sasl's if we don't have them) cyrus_cv_getaddrinfo=yes IPv6_CHECK_FUNC(getaddrinfo, [IPv6_CHECK_FUNC(gai_strerror, AC_DEFINE(HAVE_GETADDRINFO,[],[Do we have a getaddrinfo?]), cyrus_cv_getaddrinfo=no)], cyrus_cv_getaddrinfo=no) if test $cyrus_cv_getaddrinfo = no; then IPV6_OBJS="getaddrinfo.o" fi cyrus_cv_getnameinfo=yes IPv6_CHECK_FUNC(getnameinfo, AC_DEFINE(HAVE_GETNAMEINFO,[],[Do we have a getnameinfo?]), cyrus_cv_getnameinfo=no) if test $cyrus_cv_getnameinfo = no; then IPV6_OBJS="$IPV6_OBJS getnameinfo.o" fi IPv6_CHECK_SS_FAMILY() IPv6_CHECK_SA_LEN() AC_SUBST(IPV6_OBJS) dnl this is to check for time things AC_CHECK_HEADERS(sys/time.h) AC_HEADER_TIME AC_STRUCT_TM AC_STRUCT_TIMEZONE AC_SUBST(CPPFLAGS) AC_SUBST(PRE_SUBDIRS) AC_SUBST(EXTRA_SUBDIRS) AC_SUBST(DEPLIBS) AC_SUBST(LOCALDEFS) AC_FUNC_VPRINTF dnl function for doing each of the database backends dnl parameters: backend name, variable to set, withval CYRUSDB_OBJS="cyrusdb_flat.o cyrusdb_skiplist.o cyrusdb_quotalegacy.o" dnl Berkeley DB Detection AC_ARG_WITH(bdb, [ --with-bdb=DIR use Berkeley DB (in DIR) [[yes]] ], with_bdb=$withval, with_bdb="yes") dnl support old-style AC_ARG_WITH(dbdir,, with_bdb=$withval) case "$with_bdb" in no) use_berkeley="no" ;; yes) use_berkeley="yes" with_bdb_lib=none with_bdb_inc=none ;; *) use_berkeley="yes" with_bdb_lib="$with_bdb/lib" with_bdb_inc="$with_bdb/include" ;; esac if test "$use_berkeley" != "no"; then CYRUS_BERKELEY_DB_CHK() if test "$dblib" = "no"; then AC_ERROR([Berkeley DB 3.x or later was not found. You may need to supply the --with-bdb-libdir or --with-bdb-incdir configure options.]) fi if test "$with_bdb_lib" != "none"; then CMU_ADD_LIBPATH($with_bdb_lib) fi BDB_INC=${BDB_INCADD} BDB_LIB=${BDB_LIBADD} AC_SUBST(BDB_INC) AC_SUBST(BDB_LIB) LIBS="${LIBS} ${BDB_LIBADD}" CPPFLAGS="${BDB_INCADD} ${CPPFLAGS}" CYRUSDB_OBJS="$CYRUSDB_OBJS cyrusdb_berkeley.o" AC_DEFINE(HAVE_BDB,[],[Build in Berkeley DB support?]) fi dnl End Berkeley DB Detection dnl SQL DB Detection HAVE_SQL=0 dnl MySQL Detection AC_ARG_WITH(mysql, [ --with-mysql=DIR use MySQL (in DIR) [[no]] ], with_mysql=$withval, with_mysql="no") case "$with_mysql" in no) use_mysql="no" ;; yes) use_mysql="yes" with_mysql_lib=none with_mysql_inc=none ;; *) use_mysql="yes" with_mysql_lib="$with_mysql/lib" with_mysql_inc="$with_mysql/include" ;; esac if test "$use_mysql" != "no"; then CYRUS_MYSQL_CHK() if test "$mysqllib" = "no"; then AC_ERROR([MySQL was not found. You may need to supply the --with-mysql-libdir or --with-mysql-incdir configure options.]) else HAVE_SQL=1 fi if test "$with_mysql_lib" != "none"; then CMU_ADD_LIBPATH($with_mysql_lib) fi LIBS="${LIBS} ${MYSQL_LIBADD}" CPPFLAGS="${MYSQL_INCADD} ${CPPFLAGS}" AC_DEFINE(HAVE_MYSQL,[],[Build in MySQL support?]) fi dnl End MySQL Detection dnl PgSQL Detection AC_ARG_WITH(pgsql, [ --with-pgsql=DIR use PostgreSQL (in DIR) [[no]] ], with_pgsql=$withval, with_pgsql="no") case "$with_pgsql" in no) use_pgsql="no" ;; yes) use_pgsql="yes" with_pgsql_lib=none with_pgsql_inc=none ;; *) use_pgsql="yes" with_pgsql_lib="$with_pgsql/lib" with_pgsql_inc="$with_pgsql/include" ;; esac if test "$use_pgsql" != "no"; then CYRUS_PGSQL_CHK() if test "$pgsqllib" = "no"; then AC_ERROR([PgSQL was not found. You may need to supply the --with-pgsql-libdir or --with-pgsql-incdir configure options.]) else HAVE_SQL=1 fi if test "$with_pgsql_lib" != "none"; then CMU_ADD_LIBPATH($with_pgsql_lib) fi LIBS="${LIBS} ${PGSQL_LIBADD}" CPPFLAGS="${PGSQL_INCADD} ${CPPFLAGS}" AC_DEFINE(HAVE_PGSQL,[],[Build in PgSQL support?]) fi dnl End PgSQL Detection dnl SQLite Detection AC_ARG_WITH(sqlite, [ --with-sqlite=DIR use SQLite (in DIR) [[no]] ], with_sqlite=$withval, with_sqlite=no) case "$with_sqlite" in no) use_sqlite="no" ;; yes) use_sqlite="yes" with_sqlite_lib=none with_sqlite_inc=none ;; *) use_sqlite="yes" with_sqlite_lib="$with_sqlite/lib" with_sqlite_inc="$with_sqlite/include" ;; esac if test "$use_sqlite" != "no"; then CYRUS_SQLITE_CHK() if test "$sqlitelib" = "no"; then AC_ERROR([Sqlite was not found. You may need to supply the --with-sqlite-libdir or --with-sqlite-incdir configure options.]) else HAVE_SQL=1 fi if test "$with_sqlite_lib" != "none"; then CMU_ADD_LIBPATH($with_sqlite_lib) fi LIBS="${LIBS} ${SQLITE_LIBADD}" CPPFLAGS="${SQLITE_INCADD} ${CPPFLAGS}" AC_DEFINE(HAVE_SQLITE,[],[Build in SQLite support?]) fi dnl End SQLite Detection if test $HAVE_SQL = 1; then CYRUSDB_OBJS="${CYRUSDB_OBJS} cyrusdb_sql.o" fi dnl End SQL DB Detection AC_SUBST(CYRUSDB_OBJS) SIEVE_SUBDIRS="" sievedir="sieve" AC_ARG_ENABLE(sieve, [ --disable-sieve disable Sieve support], if test "$enableval" = no; then sievedir="no" fi) testpcre="yes" AC_ARG_ENABLE(pcre, [ --disable-pcre disable PCRE library], if test "$enableval" = no; then testpcre="no" fi) if test "$sievedir" != "no"; then SIEVE_OBJS="lmtp_sieve.o smtpclient.o" AC_SUBST(SIEVE_OBJS) SIEVE_LIBS="../${sievedir}/libsieve.a" AC_SUBST(SIEVE_LIBS) SIEVE_CPPFLAGS="-I\$(srcdir)/../$sievedir" AC_SUBST(SIEVE_CPPFLAGS) AC_DEFINE(USE_SIEVE,[],[Build in Sieve support?]) dnl Sieve configure stuff AC_PROG_YACC AC_PROG_LEX AC_CHECK_LIB(fl,main) if test "$testpcre" != "no"; then AC_CHECK_HEADER(pcreposix.h) if test "$ac_cv_header_pcreposix_h" = "yes"; then AC_MSG_CHECKING(for utf8 enabled pcre) AC_CACHE_VAL(cyrus_cv_pcre_utf8, AC_TRY_CPP([#include #ifndef REG_UTF8 #include #endif],cyrus_cv_pcre_utf8=yes,cyrus_cv_pcre_utf8=no)) AC_MSG_RESULT($cyrus_cv_pcre_utf8) else cyrus_cv_pcre_utf8="no" fi fi if test "$cyrus_cv_pcre_utf8" = "yes"; then LIBS="$LIBS -lpcre -lpcreposix"; AC_DEFINE(ENABLE_REGEX, [], [Do we have a regex library?]) AC_DEFINE(HAVE_PCREPOSIX_H, [], [Do we have usable pcre library?]) else AC_CHECK_HEADERS(rxposix.h) if test "$ac_cv_header_rxposix_h" = "yes"; then LIBS="$LIBS -lrx" AC_DEFINE(ENABLE_REGEX, [], [Do we have a regex library?]) else AC_SEARCH_LIBS(regcomp, regex, AC_DEFINE(ENABLE_REGEX, [], [Do we have a regex library?]), []) fi fi SIEVE_SUBDIRS="${SIEVE_SUBDIRS} $sievedir" EXTRA_OUTPUT="${EXTRA_OUTPUT} $sievedir/Makefile" fi AC_SUBST(SIEVE_SUBDIRS) dnl for et routines AC_FUNC_CHECK(strerror,AC_DEFINE(HAS_STRERROR,[],[Do we have strerror()?]), AC_DEFINE(NEED_SYS_ERRLIST,[],[Do we have a sys_errlist?])) dnl for master fd limits AC_CHECK_HEADERS(sys/resource.h) AC_CHECK_FUNCS(setrlimit) AC_CHECK_FUNCS(getrlimit) dnl for detaching terminal AC_CHECK_FUNCS(daemon setsid) dnl for turning off sockets AC_CHECK_FUNCS(shutdown) AC_EGREP_HEADER(socklen_t, sys/socket.h, AC_DEFINE(HAVE_SOCKLEN_T,[],[Do we have a socklen_t?])) AC_EGREP_HEADER(sockaddr_storage, sys/socket.h, AC_DEFINE(HAVE_STRUCT_SOCKADDR_STORAGE,[],[Do we have a sockaddr_storage?])) AC_EGREP_HEADER(rlim_t, sys/resource.h, AC_DEFINE(HAVE_RLIM_T,[],[Do we have an rlim_t?])) dnl Bunch of setproctitle stuff spt_type="" AC_CHECK_FUNC(setproctitle,spt_type=SPT_BUILTIN) if test "$spt_type" = ""; then dnl BSD/OS and FreeBSD put it in -lutil AC_CHECK_LIB(util,setproctitle,spt_type=SPT_BUILTIN LIBS="${LIBS} -lutil") fi if test "$spt_type" = ""; then AC_CHECK_HEADER(sys/pstat.h,spt_type=SPT_PSTAT) fi if test "$spt_type" = ""; then AC_CHECK_HEADER(sys/sysnews.h,spt_type=SPT_SYSMIPS) fi if test "$spt_type" = ""; then AC_MSG_CHECKING(for PS_STRINGS) AC_CACHE_VAL(cyrus_cv_sys_psstrings, AC_TRY_CPP([ #include #include #ifndef PS_STRINGS #include #endif],cyrus_cv_sys_psstrings=yes,cyrus_cv_sys_psstrings=no)) if test $cyrus_cv_sys_psstrings = yes; then spt_type=SPT_PSSTRINGS fi AC_MSG_RESULT($cyrus_cv_sys_psstrings) fi if test "$spt_type" = ""; then AC_MSG_CHECKING(for SCO) AC_CACHE_VAL(cyrus_cv_sys_sco, AC_TRY_CPP([ #ifndef _SCO_unix_ #include #endif],cyrus_cv_sys_sco=yes,cyrus_cv_sys_sco=no)) if test $cyrus_cv_sys_sco = yes; then spt_type=SPT_SCO fi AC_MSG_RESULT($cyrus_cv_sys_sco) fi if test "$spt_type" = ""; then AC_MSG_CHECKING(for setproctitle usability) AC_CACHE_VAL(cyrus_cv_sys_setproctitle, AC_TRY_CPP([ #if defined(DGUX) || defined(_SEQUENT_) || defined(apollo) #include #endif],cyrus_cv_sys_setproctitle=yes,cyrus_cv_sys_setproctitle=no)) if test $cyrus_cv_sys_setproctitle = no; then spt_type=SPT_NONE fi AC_MSG_RESULT($cyrus_cv_sys_setproctitle) fi if test "$spt_type" != ""; then AC_DEFINE_UNQUOTED(SPT_TYPE,$spt_type,[Do we already have setproctitle?]) fi AC_MSG_CHECKING(nonblocking method) AC_CACHE_VAL(cyrus_cv_sys_nonblock,AC_TRY_LINK([#include #include #include #ifndef FNDELAY #define FNDELAY O_NDELAY #endif],[fcntl(0, F_GETFL, 0)&FNDELAY], cyrus_cv_sys_nonblock=fcntl,cyrus_cv_sys_nonblock=ioctl)) WITH_NONBLOCK=$cyrus_cv_sys_nonblock AC_SUBST(WITH_NONBLOCK) AC_MSG_RESULT($WITH_NONBLOCK) AC_MSG_CHECKING(timezone GMT offset method) AC_CACHE_VAL(cyrus_cv_struct_sys_gmtoff,AC_TRY_COMPILE([ #include ],[struct tm tm; tm.tm_gmtoff = 0; ],cyrus_cv_struct_sys_gmtoff=tm,cyrus_cv_struct_sys_gmtoff=gmtime)) WITH_GMTOFF=$cyrus_cv_struct_sys_gmtoff AC_SUBST(WITH_GMTOFF) AC_MSG_RESULT($WITH_GMTOFF) AC_MSG_CHECKING(for shared mmap) AC_CACHE_VAL(cyrus_cv_func_mmap_shared,AC_TRY_RUN([ #include #include #include main() { char *base; int fd = open("conftestmmap", O_RDWR|O_CREAT|O_TRUNC, 0666); if (fd == -1) exit(1); if (write(fd, "test", 4) != 4) exit(1); fsync(fd); base = mmap((caddr_t)0, 100, PROT_READ, MAP_SHARED #ifdef MAP_FILE | MAP_FILE #endif #ifdef MAP_VARIABLE | MAP_VARIABLE #endif , fd, 0L); if (base == (caddr_t)-1) exit(1); if (strncmp(base, "test", 4) != 0) exit(1); if (write(fd, "test", 4) != 4) exit(1); fsync(fd); if (strncmp(base+4, "test", 4) != 0) exit(1); exit(0);} ],cyrus_cv_func_mmap_shared=yes,cyrus_cv_func_mmap_shared=no, cyrus_cv_func_mmap_shared=no)) AC_MSG_RESULT($cyrus_cv_func_mmap_shared) if test $cyrus_cv_func_mmap_shared = yes; then WITH_MAP="shared" else AC_MSG_CHECKING(for stupid shared mmap) AC_CACHE_VAL(cyrus_cv_func_mmap_stupidshared,AC_TRY_RUN([ #include #include #include main() { char *base; int fd = open("conftestmmap", O_RDWR|O_CREAT|O_TRUNC, 0666); if (fd == -1) exit(1); if (write(fd, "test", 4) != 4) exit(1); fsync(fd); base = mmap((caddr_t)0, 4, PROT_READ, MAP_SHARED #ifdef MAP_FILE | MAP_FILE #endif #ifdef MAP_VARIABLE | MAP_VARIABLE #endif , fd, 0L); if (base == (caddr_t)-1) exit(1); if (strncmp(base, "test", 4) != 0) exit(1); lseek(fd, 0L, 0); if (write(fd, "xyzz", 4) != 4) exit(1); fsync(fd); if (strncmp(base, "xyzz", 4) != 0) exit(1); exit(0);} ],cyrus_cv_func_mmap_stupidshared=yes,cyrus_cv_func_mmap_stupidshared=no, cyrus_cv_func_mmap_stupidshared=no)) AC_MSG_RESULT($cyrus_cv_func_mmap_stupidshared) if test $cyrus_cv_func_mmap_stupidshared = yes; then WITH_MAP="stupidshared" else AC_MSG_WARN([*** This system does not have a working mmap()]) AC_MSG_WARN(*** Expect a considerable performance penalty) WITH_MAP=nommap fi fi AC_SUBST(WITH_MAP) AC_ARG_WITH(lock, [ --with-lock=METHOD force use of METHOD for locking (flock or fcntl)], WITH_LOCK="$withval", [ AC_CHECK_FUNC(fcntl,WITH_LOCK="fcntl",[ AC_CHECK_FUNC(flock,WITH_LOCK="flock",[ AC_ERROR(unable to detect locking method) ]) ]) ]) AC_SUBST(WITH_LOCK) dnl check for fdatasync (used by cyrusdb_skiplist) LIB_RT="" AC_CHECK_FUNC(fdatasync, AC_DEFINE(HAVE_FDATASYNC,[],[Do we have fdatasync()?]), [ AC_CHECK_LIB(rt, fdatasync, [ LIB_RT="-lrt" AC_DEFINE(HAVE_FDATASYNC,[],[Do we have fdatasync()?]) ]) ]) dnl for makedepend and AFS. cant_find_sigvec=no AC_CACHE_VAL(cyrus_cv_sigveclib,[ dnl bsd classic flavor AC_CHECK_FUNC(sigvec, [ cyrus_cv_sigveclib="" ], [ dnl hp flavor AC_CHECK_LIB(BSD, sigvec, cyrus_cv_sigveclib="-lBSD", [ dnl not hp flavor SAVE_LDFLAGS="$LDFLAGS" dnl solaris flavor LDFLAGS="-L/usr/ucblib -R/usr/ucblib $LDFLAGS" AC_CHECK_LIB(ucb, sigvec, [ dnl more solaris flavor cyrus_cv_sigveclib="-lc -L/usr/ucblib -R/usr/ucblib -lucb"], [ cant_find_sigvec=yes ]) LDFLAGS="$SAVE_LDFLAGS"]) ]) ]) AC_SUBST(cyrus_cv_sigveclib) # ok, we still look for this stuff because of checking groups, but # all authentication goes through SASL AC_ARG_ENABLE([afs],[ --enable-afs Enable AFS with ptloader]) AC_ARG_WITH(afs-libdir,[ --with-afs-libdir=PATH use AFS libraries from PATH [[/usr/lib]]], afs_libdir="${withval}", afs_libdir="/usr/lib") AC_ARG_WITH(afs-incdir,[ --with-afs-incdir=PATH use AFS headers from PATH [[/usr/include]]], afs_incdir="${withval}", afs_incdir="/usr/include") AC_ARG_WITH(ldap, [ --with-ldap=DIR use LDAP (in DIR) (experimental) [/usr/local] ], with_ldap="${withval}", with_ldap="no") dnl select mode of afspts AC_ARG_ENABLE(krb5afspts,[ --enable-krb5afspts compile afskrb PTS module with krb5 support]) if test "x$enable_afs" = "xyes"; then # krb5afspts is only valid if AFS is enabled, so check inside here. AS_IF([test "x$enable_krb5afspts" = "xyes"], [SASL_SET_GSSAPI_LIBS AC_DEFINE(AFSPTS_USE_KRB5,[],[Should the AFS PTS plugin use krb5?]) ]) CFLAGS="${CFLAGS} -I${with_afs_incdir}/include" AFS_LIBS="${with_afs_libdir}/afs/libkauth.a ${with_afs_libdir}/afs/libprot.a ${with_afs_libdir}/afs/libauth.a ${with_afs_libdir}/afs/libsys.a ${with_afs_libdir}/librxkad.a ${with_afs_libdir}/librx.a ${with_afs_libdir}/afs/libsys.a ${with_afs_libdir}/libubik.a ${with_afs_libdir}/liblwp.a ${with_afs_libdir}/afs/util.a ${with_afs_libdir}/afs/libcom_err.a" if test -f ${with_afs_libdir}/afs/libaudit.a; then AFS_LIBS="$AFS_LIBS ${with_afs_libdir}/afs/libaudit.a" fi if test -f /usr/ucblib/libucb.a; then CMU_ADD_LIBPATH_TO(/usr/ucblib, AFS_LDFLAGS) AFS_LIBS="$AFS_LIBS -lc -lucb" fi if test -f ${with_afs_libdir}/afs/libdes.a; then AFS_LIBS="$AFS_LIBS ${with_afs_libdir}/afs/libdes.a" else AFS_LIBS="$AFS_LIBS -ldes" fi AC_CACHE_VAL(cyrus_cv_afs_sigvec,[ SAVE_LIBS="$LIBS" LIBS="${with_afs_libdir}/liblwp.a" AC_MSG_CHECKING(if AFS libraries need sigvec) dnl Does AFS need sigvec? We have to link against lwp and see dnl if IOMGR_Initialize wants it AC_TRY_LINK([IOMGR_Initialize();], [IOMGR_Initialize()], [ dnl it linked; don't need it AC_MSG_RESULT(no) cyrus_cv_afs_sigvec="no" ], [ dnl didn't link; pick up sigvec AC_MSG_RESULT(yes) cyrus_cv_afs_sigvec="yes" ]) ]) if test "$cyrus_cv_afs_sigvec" = yes; then if test "$cant_find_sigvec" = yes; then AC_MSG_WARN([Can't find a sigvec for AFS libraries which seem to need one.]) else AFS_LIBS="${AFS_LIBS} $cyrus_cv_sigveclib" AC_SUBST(AFS_LIBS) AC_SUBST(AFS_LDFLAGS) AC_DEFINE(HAVE_AFSKRB,[],[Should we build afskrb pts module?]) fi else AFS_LIBS="${AFS_LIBS}" AC_SUBST(AFS_LIBS) AC_SUBST(AFS_LDFLAGS) AC_DEFINE(HAVE_AFSKRB,[],[Should we build afskrb pts module?]) fi LIBS="$SAVE_LIBS" fi LDAP_CPPFLAGS="" LDAP_LDFLAGS="" LDAP_LIBS="" if test "x$with_ldap" != "xno"; then if test ! -d $with_ldap; then with_ldap=/usr/local fi LDAP_CPPFLAGS="$CPPFLAGS -I${with_ldap}/include" LDAP_LDFLAGS="$LDFLAGS -L${with_ldap}/lib" LDAP_LIBS="" save_CPPFLAGS=$CPPFLAGS save_LDFLAGS=$LDFLAGS CPPFLAGS=$LDAP_CPPFLAGS LDFLAGS=$LDAP_LDFLAGS AC_CHECK_LIB(ldap, ldap_initialize, [ AC_DEFINE(HAVE_LDAP,[],[Should we build ldap pts module?]) AC_SUBST(LDAP_CPPFLAGS) AC_SUBST(LDAP_LDFLAGS) AC_SUBST(LDAP_LIBS) LDAP_LIBS="-lldap -llber" ],,-llber) CPPFLAGS=$save_CPPFLAGS LDFLAGS=$LDAP_LDFLAGS AC_CHECK_LIB(ldap, ldap_initialize, [ AC_DEFINE(HAVE_LDAP,[],[Should we build ldap pts module?]) AC_SUBST(LDAP_CPPFLAGS) AC_SUBST(LDAP_LDFLAGS) AC_SUBST(LDAP_LIBS) LDAP_LIBS="-lldap -llber" ],,-llber) CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS fi if test "x$enable_afs" = "xyes" -o "x$with_ldap" != "xno"; then EXTRA_SUBDIRS="${EXTRA_SUBDIRS} ptclient" EXTRA_OUTPUT="${EXTRA_OUTPUT} ptclient/Makefile" AC_DEFINE(WITH_PTS,[],[Build in PTS support?]) fi SERVER_SUBDIRS="master imap" AC_ARG_ENABLE(server, [ --disable-server disable compiling servers], if test "$enableval" = no; then SERVER_SUBDIRS="" fi) AC_SUBST(SERVER_SUBDIRS) # We always output a server makefile (just because we can) dnl this is the new simple check for kerberos; since the person had to dnl compile SASL, we might as well use the same checks. AC_ARG_WITH(krb,[ --with-krb=PATH use Kerberos from PATH], with_krb="$withval", with_krb="no") AC_ARG_WITH(krbimpl,[ --with-krbimpl=\[kth|mit\] assume Kerberos 4 from KTH or MIT], with_krbimpl="$withval", with_krbimpl="kth") AC_ARG_ENABLE(statickrb, [ --enable-statickrb link Kerberos statically], with_statickrb="yes", with_statickrb="no") dnl In order to compile kerberos4, we need libkrb and libdes. dnl we might need -lresolv for kerberos AC_CHECK_LIB(resolv,res_search) if test "$with_statickrb" = "yes" -a ! -d "$with_krb"; then AC_MSG_ERROR([--enable-statickrb specified but --with-krb did not specify a valid directory]) fi if test "$with_krb" != "no"; then dnl Do we need DES for kerberos? AC_ARG_WITH(krbdes,[ --with-krbdes use Kerberos DES implementation [[yes]]], with_krbdes="$withval", with_krbdes="yes") if test "$with_krbdes" = "yes"; then AC_CHECK_LIB(des,des_ecb_encrypt, if test "$with_statickrb" = "yes"; then KRB_LIBS="$with_krb/lib/libdes.a" else KRB_LIBS="-ldes" fi, AC_MSG_ERROR([The Kerberos DES library is required for Kerberos support. You might want --with-auth=unix.])) fi fi dnl if we were ambitious, we'd look more aggressively for the dnl krb4 install if test -d ${with_krb}; then AC_CACHE_CHECK(for Kerberos includes, cyrus_cv_krbinclude, [ for krbhloc in include/kerberosIV include do if test -f ${with_krb}/${krbhloc}/krb.h ; then cyrus_cv_krbinclude=${with_krb}/${krbhloc} break fi done ]) if test -n "${cyrus_cv_krbinclude}"; then CPPFLAGS="$CPPFLAGS -I${cyrus_cv_krbinclude}" fi CMU_ADD_LIBPATH(${with_krb}/lib) fi if test "$with_krbimpl" != "kth"; then KRBLIB="krb4" else KRBLIB="krb" fi if test "$with_des" != no; then AC_CHECK_HEADER(krb.h, AC_CHECK_LIB(${KRBLIB}, krb_mk_priv, if test "$with_statickrb" = "yes"; then KRB_LIBS="$KRB_LIBS $with_krb/lib/lib${KRBLIB}.a" else KRB_LIBS="$KRB_LIBS -l${KRBLIB}" fi, AC_WARN(No Kerberos V4 found); krb4=no, $KRB_LIBS), AC_WARN(No Kerberos V4 found); krb4=no) else AC_WARN(No DES library found for Kerberos V4 support) krb4=no fi if test "${krb4}" != no; then AC_DEFINE(HAVE_KRB,[],[Support for Kerberos?]) fi LIBS="$KRB_LIBS $LIBS" SASL_SET_GSSAPI_LIBS dnl dnl Test for OpenSSL dnl IMAP_PROGS="" AC_ARG_WITH(openssl,[ --with-openssl=PATH use OpenSSL from PATH], with_openssl="${withval}") OPENSSL_INC= OPENSSL_LIB= case "$with_openssl" in no) with_openssl="no";; ""|yes) dnl if openssl has been compiled with the rsaref2 libraries, dnl we need to include the rsaref libraries in the crypto check LIB_RSAREF="" AC_CHECK_LIB(rsaref, RSAPublicEncrypt, LIB_RSAREF="-lRSAglue -lrsaref"; cmu_have_rsaref=yes, cmu_have_rsaref=no) with_openssl="yes" AC_CHECK_LIB(crypto,BIO_accept, LIBS="-lcrypto $LIB_RSAREF ${LIBS}", with_openssl="no", $LIB_RSAREF) AC_CHECK_LIB(ssl, SSL_CTX_new, LIBS="-lssl ${LIBS}", with_openssl="no", -lcrypto $LIB_RSAREF) ;; *) OPENSSL_INC="-I${with_openssl}/include" OPENSSL_LIBPATH="${with_openssl}/lib" OPENSSL_LIB="-L${OPENSSL_LIBPATH}" CPPFLAGS="${CPPFLAGS} ${OPENSSL_INC}" CMU_ADD_LIBPATH(${OPENSSL_LIBPATH}) CMU_ADD_LIBPATH_TO(${OPENSSL_LIBPATH}, OPENSSL_LIB) LIBS="${LIBS} -lssl -lcrypto";; esac AC_MSG_CHECKING(for openssl) AC_MSG_RESULT($with_openssl) if test "$with_openssl" != "no"; then AC_DEFINE(HAVE_SSL,[],[Build with SSL support?]) IMAP_PROGS="$IMAP_PROGS tls_prune" if test "${krb4}" != no; then AC_DEFINE(OPENSSL_ENABLE_OLD_DES_SUPPORT,[],[Configure OpenSSL to provide legacy des apis]) AC_DEFINE(OPENSSL_DES_LIBDES_COMPATIBILITY,[],[Configure OpenSSL to provide krb4-compatible legacy des apis]) fi fi AC_SUBST(OPENSSL_INC) AC_SUBST(OPENSSL_LIB) dnl dnl Allow for setting EGD socket file on systems without /dev/*random. dnl AC_ARG_WITH(egd-socket, [ --with-egd-socket=FILE Entropy Gathering Daemon socket pathname for systems without /dev/urandom], [ EGD_SOCKET="$withval" ] ) if test -n "$EGD_SOCKET" ; then AC_DEFINE_UNQUOTED(EGD_SOCKET, "$EGD_SOCKET", [Alternative to /dev/urandom?]) fi dnl dnl Test for zlib dnl CMU_HAVE_ZLIB AC_MSG_CHECKING(for zlib) AC_MSG_RESULT($with_zlib) AC_SUBST(ZLIB) dnl dnl Test for Zephyr dnl AC_ARG_WITH(zephyr,[ --with-zephyr[=PATH] enable Zephyr notification (installed on PATH)], with_zephyr="${withval}") if test -z "$with_zephyr"; then if test -f /usr/local/lib/libzephyr.a; then with_zephyr="/usr/local" elif test -f /usr/lib/libzephyr.a; then with_zephyr="/usr" fi fi ZEPHYR_LIBS="" case "$with_zephyr" in no) true;; ""|yes) AC_CHECK_LIB(zephyr,ZInitialize,ZEPHYR_LIBS="-lzephyr", with_zephyr="no",);; *) ZEPHYR_LIBS="-lzephyr";; esac AC_SUBST(ZEPHYR_LIBS) if test "$with_zephyr" != "no"; then AC_DEFINE(HAVE_ZEPHYR,[],[Build with Zephyr support?]) fi dnl dnl Set pidfile location dnl AC_ARG_WITH(pidfile,[ --with-pidfile[=PATH] pidfile in PATH (/var/run/cyrus-master.pid)], [MASTERPIDFILE="$withval"], [MASTERPIDFILE="/var/run/cyrus-master.pid"]) MASTERPIDFILE="\"$MASTERPIDFILE\"" AC_DEFINE_UNQUOTED(MASTER_PIDFILE, $MASTERPIDFILE,[Name of the pidfile for master]) dnl dnl see if we're compiling with IMAP idled support dnl AC_ARG_ENABLE(idled, [ --enable-idled enable IMAP idled support], if test "$enable_val" != no; then IMAP_PROGS="$IMAP_PROGS idled" fi) dnl dnl see if we're compiling with NNTP support dnl ENABLE_NNTP=no AC_ARG_ENABLE(nntp, [ --enable-nntp enable NNTP support], ENABLE_NNTP=$enableval if test "$ENABLE_NNTP" != no; then IMAP_PROGS="$IMAP_PROGS nntpd fetchnews" fi) dnl dnl see if we're compiling the Murder support programs dnl ENABLE_MURDER=no AC_ARG_ENABLE(murder, [ --enable-murder enable IMAP Murder support], ENABLE_MURDER=$enableval) if test "$ENABLE_MURDER" != no; then IMAP_PROGS="$IMAP_PROGS mupdate" # for master/slave auto-selection AC_CHECK_HEADERS(sys/sockio.h) fi dnl dnl see if we're compiling replication support programs dnl ENABLE_REPLICATION=no AC_ARG_ENABLE(replication, [ --enable-replication enable replication support (experimental)], ENABLE_REPLICATION=$enableval if test "$ENABLE_REPLICATION" != no; then IMAP_PROGS="$IMAP_PROGS sync_client sync_server sync_reset" fi) AC_SUBST(IMAP_PROGS) dnl dnl Try and find a system version of com_err. dnl If we see something that looks a little wacky, ignore it (there are many dnl deficient installs of com_err, unfortunately, which leave out compile_et) dnl There is also a broken re-implementation of compile_et, apparently derived dnl from the Kerberos project, being shipped in /usr/bin on MacOS X, see Bug #3711. dnl AC_ARG_WITH(com_err, [ --with-com_err=PATH use com_err from path -- includes in PATH/include, libs in PATH/lib, and compile_et in PATH/bin]) if test -z "$with_com_err"; then # no value supplied AC_CHECK_LIB(com_err, com_err, [ # com_err is already in library path # guess we're okay # can use system com_err with_com_err="" AC_CHECK_HEADER(et/com_err.h, [AC_DEFINE(HAVE_ET_COM_ERR_H,[],[We need et/com_err.h])], [AC_CHECK_HEADER(com_err.h,[],[AC_ERROR([cannot locate com_err.h])])]) AC_PATH_PROG(COMPILE_ET, compile_et, [no compile et]) ], [ if test -f /usr/local/include/com_err.h -o -f /usr/local/include/et/com_err.h; then with_com_err="/usr/local" AC_PATH_PROG(COMPILE_ET, /usr/local/bin/compile_et, [no compile et]) elif test -f /usr/include/com_err.h -o -f /usr/include/et/com_err.h; then with_com_err="/usr" AC_PATH_PROG(COMPILE_ET, /usr/bin/compile_et, [no compile et]) else # use ours with_com_err=yes fi ]) if test "${with_com_err}" = "no"; then AC_MSG_WARN([com_err is required; included version will be used.]) with_com_err="yes" fi if test "${COMPILE_ET}" = "no compile et" -o "${COMPILE_ET}" = ""; then AC_MSG_WARN([Parts of com_err distribuion were found, but not compile_et.]) AC_MSG_WARN([Will build com_err from included sources.]) with_com_err="yes" # build it ourselves fi fi dnl Set up $COMPILE_ET first, we need to test it case "$with_com_err" in # built-in et yes) # use the com_err we're gonna build COMPILE_ET="../com_err/et/compile_et" ;; "") # no problem, we already have it in the paths # we do nothing to pick it up ;; *) # use whatever they told us, or whatever we found COMPILE_ET="${with_com_err}/bin/compile_et" esac if test "$with_com_err" != yes ; then dnl Test that the specified compile_et produces correct output dnl See bug #3711 for why this is necessary TEST1=".cyrus-configure-test-$$" /bin/rm -f $TEST1.et $TEST1.h $TEST1.c echo "error_table imap" >> $TEST1.et echo "ec IMAP_TESTING," >> $TEST1.et echo " \"Testing\"" >> $TEST1.et echo "end" >> $TEST1.et "${COMPILE_ET}" $TEST1.et > /dev/null compile_et_ok=no if test -f $TEST1.h ; then if test `awk '/IMAP_TESTING/{print $3}' $TEST1.h 2>/dev/null` = "(-1904809472L)" ; then compile_et_ok=yes fi dnl Broken compile_et produces (2390157824L) fi /bin/rm -f $TEST1.et $TEST1.h $TEST1.c if test "$compile_et_ok" = no ; then AC_MSG_WARN([It seems $COMPILE_ET is buggy, building our own]) COMPILE_ET="../com_err/et/compile_et" # build it ourselves fi fi case "$with_com_err" in # built-in et yes) # use the com_err we're gonna build COM_ERR_LIBS="../com_err/et/libcom_err.a" COM_ERR_LDFLAGS="" COM_ERR_CPPFLAGS="-I\${top_srcdir}/com_err/et" PRE_SUBDIRS="com_err/et ${PRE_SUBDIRS}" EXTRA_OUTPUT="${EXTRA_OUTPUT} com_err/et/Makefile" ;; "") # no problem, we already have it in the paths # we do nothing to pick it up COM_ERR_LIBS="-lcom_err" # hope it's not shared # we already set COMPILE_ET, or we didn't get here COM_ERR_LDFLAGS="" COM_ERR_CPPFLAGS="" ;; *) # use whatever they told us, or whatever we found COM_ERR_LIBS="${with_com_err}/lib/libcom_err.a" COM_ERR_CPPFLAGS="-I${with_com_err}/include" # Ever get the feeling people hide this stuff on purpose? if test -d "${with_com_err}/include/et" ; then COM_ERR_CPPFLAGS="-I${with_com_err}/include/et" fi dnl CMU_ADD_LIBPATH_TO(${with_com_err}/lib, COM_ERR_LDFLAGS) esac AC_SUBST(COMPILE_ET) AC_SUBST(COM_ERR_LIBS) AC_SUBST(COM_ERR_LDFLAGS) AC_SUBST(COM_ERR_CPPFLAGS) AC_MSG_CHECKING(for modern syslog) AC_CACHE_VAL(cyrus_cv_lib_syslog, AC_TRY_CPP([#include #ifndef LOG_LOCAL6 #include #endif],cyrus_cv_lib_syslog=yes,cyrus_cv_lib_syslog=no)) if test $cyrus_cv_lib_syslog = no; then PRE_SUBDIRS="${PRE_SUBDIRS} syslog" EXTRA_OUTPUT="${EXTRA_OUTPUT} syslog/Makefile" DEPLIBS="${DEPLIBS} ../syslog/libsyslog.a" CPPFLAGS="$CPPFLAGS -I\$(srcdir)/../syslog" fi AC_MSG_RESULT($cyrus_cv_lib_syslog) AC_MSG_CHECKING(which syslog facility to use) SYSLOG_FACILITY=LOG_LOCAL6 AC_ARG_WITH(syslogfacility,[ --with-syslogfacility=FACILITY set the syslog facility to use (default LOCAL6)], [ if test "$withval" != "yes" -a "$withval" != "no" ; then SYSLOG_FACILITY=LOG_$withval fi; ]) AC_DEFINE_UNQUOTED(SYSLOG_FACILITY, $SYSLOG_FACILITY, [Syslog facility to use.]) AC_MSG_RESULT($SYSLOG_FACILITY) dnl Have to check getdtabalesize after adding ossup, as some ossups define it AC_REPLACE_FUNCS(getdtablesize) AC_ARG_ENABLE(cmulocal, [ --enable-cmulocal enable CMU-specific local support], if test "$enableval" = yes; then EXTRA_SUBDIRS="${EXTRA_SUBDIRS} netnews depot" EXTRA_OUTPUT="${EXTRA_OUTPUT} depot/Makefile" fi) AC_MSG_CHECKING(to use old sieve service name) AC_ARG_ENABLE(oldsievename, [ --enable-oldsievename enable the use of 'imap' as the sieve service name], if test "$enableval" = yes; then AC_MSG_RESULT(yes) AC_DEFINE(OLD_SIEVE_SERVICE_NAME,[],[Use "imap" as sieve service name?]) else AC_MSG_RESULT(no) fi, AC_MSG_RESULT(no)) AC_ARG_ENABLE(netscapehack, [ --enable-netscapehack enable Netscape hack for the menu option in Communicator to Administrate Mail], if test "$enableval" = yes; then AC_DEFINE(ENABLE_X_NETSCAPE_HACK,[],[Enable Netscape Menu Option Hack?]) fi) AC_CHECK_FUNC(dlopen,,[AC_CHECK_LIB(dl, dlopen)]) CMU_SASL2_REQUIRE_VER(2,1,7) CMU_SASL2_CHECKAPOP_REQUIRED AC_ARG_WITH(perl, [ --with-perl=PERL use PERL for perl], with_perl="$withval", with_perl="perl") if test "${with_perl}" = yes; then with_perl="perl" fi if test "${with_perl}" != no; then if test ${using_static_sasl} = "staticonly"; then AC_MSG_WARN([Cannot compile perl utilities using static libsasl]) with_perl="no" else AC_CHECK_PROGS(PERL, ${with_perl} perl, with_perl=notfound) fi fi if test "$with_perl" = "notfound"; then AC_MSG_WARN(Perl not found: Administrative tools won't be available) elif test "${with_perl}" != "no"; then dnl compile perl stuff EXTRA_SUBDIRS="${EXTRA_SUBDIRS} perl" dnl and compile perl/cyradm PERL_SUBDIRS="imap" PERL="${with_perl}" dnl add perl cccdlflags when building libraries -- this ensures that the dnl libraries will be compiled as PIC if perl requires PIC objects dnl -- this is needed on NetBSD and Linux, but seems to cause problems on atleast Solaris -- case "${target_os}" in linux*|netbsd*|freebsd*|dragonfly*) AC_MSG_CHECKING(for perl cccdlflags needed on "${target_os}") eval `${PERL} -V:cccdlflags` PERL_CCCDLFLAGS="$cccdlflags" AC_SUBST(PERL_CCCDLFLAGS) AC_MSG_RESULT($PERL_CCCDLFLAGS) ;; *) AC_MSG_WARN(skipping check for perl cccdlflags on "${target_os}") esac fi dnl for timsieved if test "$sievedir" != "no"; then if test "$enable_server" != "no"; then EXTRA_SUBDIRS="${EXTRA_SUBDIRS} timsieved notifyd" EXTRA_OUTPUT="${EXTRA_OUTPUT} timsieved/Makefile notifyd/Makefile" fi PERL_SUBDIRS="${PERL_SUBDIRS} sieve" PERL_DEPSUBDIRS="sieve" EXTRA_OUTPUT="${EXTRA_OUTPUT} perl/sieve/Makefile perl/sieve/lib/Makefile" else PERL_DEPSUBDIRS="none" fi dnl snmp dnl (agentx was depricated, but SNMP_SUBDIRS is conveinent as a placeholder) SNMP_SUBDIRS="" AC_SUBST(SNMP_SUBDIRS) CMU_LIBWRAP CMU_UCDSNMP # Figure out what directories we're linking against. # Lots of fun for the whole family. # This probably chokes on anything with spaces in it. # All we want is the list of -L directories, and -L may or may not be # followed by a space. isdir=no libpath="" #echo "debug ldflags: << ${ldflags} >>" #echo "debug default_ldflags: << ${default_ldflags} >>" for flag in ${ldflags} ${default_ldflags}; do case $flag in -L) # it's a split -L option, we'll mark the next option as a dir. isdir=yes ;; -L*) # attached -L option: split off the directory larg=`echo $flag | sed -e 's:-L\(..*\):\1:'` libpath="${libpath} ${larg}" ;; *) if test $isdir = yes ; then libpath="${libpath} ${flag}" isdir=no fi esac done IMAP_COM_ERR_LIBS="${COM_ERR_LIBS}" IMAP_LIBS="${LIB_SASL} ${LIBS} ${SQL_LIBS}" AC_SUBST(LIB_RT) AC_SUBST(IMAP_COM_ERR_LIBS) AC_SUBST(IMAP_LIBS) dnl AC_OUTPUT_COMMANDS([ dnl if test "$with_perl" != "no"; then dnl (cd perl/sieve/managesieve; $perl Makefile.PL PREFIX=$prefix) dnl (cd perl/imap; $perl Makefile.PL PREFIX=$prefix) dnl fi dnl ], perl=$PERL; with_perl=$with_perl; prefix=$prefix; SASL_LIB="$LIB_SASL"; SASL_INC="$SASLFLAGS"; export SASL_LIB SASL_INC) AC_SUBST(PERL_SUBDIRS) AC_SUBST(PERL_DEPSUBDIRS) AC_SUBST(PERL) AH_TOP([ /* * Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The name "Carnegie Mellon University" must not be used to * endorse or promote products derived from this software without * prior written permission. For permission or any legal * details, please contact * Carnegie Mellon University * Center for Technology Transfer and Enterprise Creation * 4615 Forbes Avenue * Suite 302 * Pittsburgh, PA 15213 * (412) 268-7393, fax: (412) 268-7395 * innovation@andrew.cmu.edu * * 4. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by Computing Services * at Carnegie Mellon University (http://www.cmu.edu/computing/)." * * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * $Id: configure.in,v 1.316 2010/01/06 17:01:26 murch Exp $ */ #ifndef _CYRUS_IMAPD_CONFIG_H_ #define _CYRUS_IMAPD_CONFIG_H_ ]) AH_BOTTOM([ /* time.h */ #if TIME_WITH_SYS_TIME # include # include #else # if HAVE_SYS_TIME_H # include # else # include # endif #endif /* com_err.h, as needed */ #ifndef IN_COM_ERR #ifdef HAVE_ET_COM_ERR_H #include #else #include #endif /* HAVE_ET_COM_ERR_H */ #endif /* IN_COM_ERR */ /* This allows us to work even when we don't have an fdatasync */ #ifndef HAVE_FDATASYNC #define fdatasync(fd) fsync(fd) #endif /* A similar setup for not having O_DSYNC */ #include #ifndef O_DSYNC # ifdef O_SYNC # define O_DSYNC O_SYNC /* POSIX */ # else # define O_DSYNC O_FSYNC /* BSD */ # endif #endif #ifndef HAVE___ATTRIBUTE__ /* Can't use attributes... */ #define __attribute__(foo) #endif #ifndef HAVE_SOCKLEN_T typedef unsigned int socklen_t; #endif #ifndef HAVE_RLIM_T typedef int rlim_t; #endif /* some potentially memory saving tradeoffs, preconfigured in memory-saving mode */ /* save the cmdlines for the ID command */ #undef ID_SAVE_CMDLINE /* IPv6 things */ #include #include #include #include #ifndef HAVE_STRUCT_SOCKADDR_STORAGE #define _SS_MAXSIZE 128 /* Implementation specific max size */ #define _SS_PADSIZE (_SS_MAXSIZE - sizeof (struct sockaddr)) struct sockaddr_storage { struct sockaddr ss_sa; char __ss_pad2[_SS_PADSIZE]; }; # define ss_family ss_sa.sa_family # define HAVE_SS_FAMILY #endif /* !HAVE_STRUCT_SOCKADDR_STORAGE */ #ifndef HAVE_SS_FAMILY #define ss_family __ss_family #endif #ifndef AF_INET6 /* Define it to something that should never appear */ #define AF_INET6 AF_MAX #endif #if !defined(HAVE_GETADDRINFO) || !defined(HAVE_GETNAMEINFO) #include "gai.h" #endif /* End IPv6 things */ #ifdef OLD_SIEVE_SERVICE_NAME #define SIEVE_SERVICE_NAME "imap" #else #define SIEVE_SERVICE_NAME "sieve" #endif /* filenames */ #define FNAME_DBDIR "/db" #define FNAME_USERDIR "/user/" #define FNAME_DOMAINDIR "/domain/" #define FNAME_LOGDIR "/log/" #define FNAME_PTSDB "/ptclient/ptscache.db" #define CONFIG_FILENAME (SYSCONFDIR "/imapd.conf") #define DEFAULT_MASTER_CONFIG_FILENAME (SYSCONFDIR "/cyrus.conf") #ifndef HAVE_SHUTDOWN #define shutdown(fd, mode) 0 #endif /* *printf() macros */ #if (SIZEOF_SIZE_T == SIZEOF_INT) #define SIZE_T_FMT "%u" #elif (SIZEOF_SIZE_T == SIZEOF_LONG) #define SIZE_T_FMT "%lu" #elif (SIZEOF_SIZE_T == SIZEOF_LONG_LONG_INT) #define SIZE_T_FMT "%llu" #else #error dont know what to use for SIZE_T_FMT #endif #if (SIZEOF_OFF_T == SIZEOF_LONG) #define OFF_T_FMT "%ld" #define strtoofft(nptr, endptr, base) strtol(nptr, endptr, base) #elif (SIZEOF_OFF_T == SIZEOF_LONG_LONG_INT) #define OFF_T_FMT "%lld" #define strtoofft(nptr, endptr, base) strtoll(nptr, endptr, base) #else #error dont know what to use for OFF_T_FMT #endif /* compile time options; think carefully before modifying */ enum { /* should we send an UNAVAILABLE message to master when * a service is exiting (master is already going to be * informed of the exit by the SIGCHLD signal anyway) ? */ MESSAGE_MASTER_ON_EXIT = 0, /* should a hierarchical rename stop on error? */ RENAME_STOP_ON_ERROR = 1, /* should we call fsync() to maybe help with softupdates? (it should) */ APPEND_ULTRA_PARANOID = 1, /* should we log extra information at the DEBUG level for DB stuff? * 0 -> nothing; 1 -> some; higher -> even more */ CONFIG_DB_VERBOSE = 1, /* log timing information to LOG_DEBUG */ CONFIG_TIMING_VERBOSE = 0, /* should we be pedantic about namespace or sleezy? */ SLEEZY_NAMESPACE = 1, /* should we do a fast TLS session shutdown? */ TLS_FAST_SHUTDOWN = 1, /* should we use the SQUAT engine to accelerate SEARCH? */ SQUAT_ENGINE = 1, /* should we have long LMTP error messages? */ LMTP_LONG_ERROR_MSGS = 1 }; #endif /* _CYRUS_IMAPD_CONFIG_H_ */ ]) dnl make sure that Makefile is the last thing output AC_OUTPUT(man/Makefile master/Makefile lib/Makefile imap/Makefile imtest/Makefile netnews/Makefile perl/Makefile $EXTRA_OUTPUT Makefile) cyrus-imapd-2.4.18/imtest/0000755000175000017500000000000012546374065014332 5ustar ellieelliecyrus-imapd-2.4.18/imtest/imtest.c0000644000175000017500000021720212546374065016007 0ustar ellieellie/* imtest.c -- IMAP/POP3/NNTP/LMTP/SMTP/MUPDATE/MANAGESIEVE test client * Ken Murchison (multi-protocol implementation) * Tim Martin (SASL implementation) * * Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The name "Carnegie Mellon University" must not be used to * endorse or promote products derived from this software without * prior written permission. For permission or any legal * details, please contact * Carnegie Mellon University * Center for Technology Transfer and Enterprise Creation * 4615 Forbes Avenue * Suite 302 * Pittsburgh, PA 15213 * (412) 268-7393, fax: (412) 268-7395 * innovation@andrew.cmu.edu * * 4. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by Computing Services * at Carnegie Mellon University (http://www.cmu.edu/computing/)." * * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * $Id: imtest.c,v 1.129 2010/01/06 17:01:43 murch Exp $ */ #include "config.h" #include #include #include #include #include #include #include #include #include #include #ifdef HAVE_STDARG_H #include #else #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include "prot.h" #include "hash.h" #include "imparse.h" #include "iptostring.h" #include "stristr.h" #include "util.h" #include "xmalloc.h" #include "xstrlcat.h" #include "xstrlcpy.h" #include "md5.h" #ifdef HAVE_SSL #include static SSL_CTX *tls_ctx = NULL; static SSL *tls_conn = NULL; static SSL_SESSION *tls_sess = NULL; #endif /* HAVE_SSL */ #define IMTEST_OK 0 #define IMTEST_FAIL -1 #define IMTEST_CLOSEME -2 typedef enum { STAT_CONT = 0, STAT_NO = 1, STAT_OK = 2 } imt_stat; /* global vars */ sasl_conn_t *conn; int sock; /* socket descriptor */ int verbose=0; struct protstream *pout, *pin; static char *authname = NULL; static char *username = NULL; static char *realm = NULL; static char *cmdline_password = NULL; static char *output_socket = NULL; static int output_socket_opened = 0; static ino_t output_socket_ino = 0; #define CONFIGHASHSIZE 30 /* relatively small */ static struct hash_table confighash; int mysasl_config(void*, const char*, const char*, const char**, unsigned*); extern int _sasl_debug; extern char *optarg; struct stringlist { char *str; struct stringlist *next; }; struct stringlist *strlist_head = NULL; /* callbacks we support */ static sasl_callback_t callbacks[] = { { SASL_CB_ECHOPROMPT, NULL, NULL }, { SASL_CB_NOECHOPROMPT, NULL, NULL }, { #ifdef SASL_CB_GETREALM SASL_CB_GETREALM, NULL, NULL }, { #endif SASL_CB_USER, NULL, NULL }, { SASL_CB_AUTHNAME, NULL, NULL }, { SASL_CB_PASS, NULL, NULL }, { SASL_CB_GETOPT, &mysasl_config, NULL }, { SASL_CB_LIST_END, NULL, NULL } }; struct protocol_t; struct banner_t { u_char is_capa; /* banner is capability response */ char *resp; /* end of banner response */ void *(*parse_banner)(char *str); /* [OPTIONAL] parse banner, returns 'rock' */ }; struct capa_cmd_t { char *cmd; /* capability command string (NULL = no capa cmd) */ char *resp; /* end of capability response */ char *tls; /* [OPTIONAL] TLS capability string */ char *login; /* [OPTIONAL] plaintext login cmd capability string */ char *auth; /* [OPTIONAL] AUTH (SASL) capability string */ char *compress; /* [OPTIONAL] COMPRESS capability string */ char *(*parse_mechlist)(const char *str, struct protocol_t *prot); /* [OPTIONAL] parse capability string, returns space-separated list of mechs */ }; struct tls_cmd_t { char *cmd; /* tls command string */ char *ok; /* start tls prompt */ char *fail; /* failure response */ u_char auto_capa; /* capability response sent automatically after TLS */ }; struct sasl_cmd_t { char *cmd; /* auth command string */ u_short maxlen; /* maximum command line length, (0 = initial response unsupported by protocol) */ u_char quote; /* quote arguments (literal for base64 data) */ char *ok; /* success response string */ char *fail; /* failure response string */ char *cont; /* continue response string (NULL = send/receive literals) */ char *cancel; /* cancel auth string */ char *(*parse_success)(char *str); /* [OPTIONAL] parse response for success data */ u_char auto_capa; /* capability response sent automatically after AUTH with SASL security layer */ }; struct compress_cmd_t { char *cmd; /* compress command string */ char *ok; /* success response string */ char *fail; /* failure response string */ }; struct logout_cmd_t { char *cmd; /* logout command string */ char *resp; /* logout response */ }; struct protocol_t { char *protocol; /* protocol service name */ char *sprotocol; /* SSL-wrapped service name (NULL = unsupported) */ char *service; /* SASL service name */ int login_enabled; /* [OPTIONAL] login command on/off by default; toggled by capability string */ struct banner_t banner; struct capa_cmd_t capa_cmd; struct tls_cmd_t tls_cmd; struct sasl_cmd_t sasl_cmd; struct compress_cmd_t compress_cmd; int (*do_auth)(struct sasl_cmd_t *sasl_cmd, void *rock, int login_enabled, char *mech, char *mechlist); /* [OPTIONAL] perform protocol-specific authentication; based on rock, login_enabled, mech, mechlist */ struct logout_cmd_t logout_cmd; /* these 3 are used for maintaining connection state */ void *(*init_conn)(void); /* generate a context (if needed). This context * must be malloc()ed and will be freed by * interactive() as each connection is reused */ int (*pipe)(char *buf, int len, void *rock); /* pipe a buffer to pout * may be necessary to keep * connection state */ int (*reset)(void *rock); /* perform any protocol-specific reset when we * lose connection on a unix domain socket * during interactive mode. If this is NULL we * assume that we should not attempt to reuse * connections (and just die at the end of one) */ }; void imtest_fatal(const char *msg, ...) __attribute__((noreturn)); void imtest_fatal(const char *msg, ...) { struct stat sbuf; if (output_socket && output_socket_opened && stat(output_socket, &sbuf) != -1 && sbuf.st_ino == output_socket_ino) { unlink(output_socket); } if (msg != NULL) { va_list ap; va_start(ap, msg); fprintf(stderr, "failure: "); vfprintf(stderr, msg, ap); fprintf(stderr, "\n"); va_end(ap); } exit(1); } /* libcyrus makes us define this */ void fatal(const char *msg, int code __attribute__((unused))) { imtest_fatal(msg); } int mysasl_config(void *context __attribute__((unused)), const char *plugin_name, const char *option, const char **result, unsigned *len) { *result = NULL; if (plugin_name) { /* first try it with the plugin name */ char opt[1024]; strlcpy(opt, plugin_name, sizeof(opt)); strlcat(opt, "_", sizeof(opt)); strlcat(opt, option, sizeof(opt)); *result = hash_lookup(opt, &confighash); } if (*result == NULL) { /* try without the plugin name */ *result = hash_lookup(option, &confighash); } if (*result != NULL) { if (len) { *len = strlen(*result); } return SASL_OK; } return SASL_FAIL; } #ifdef HAVE_SSL static int verify_depth; static int verify_error = X509_V_OK; static int do_dump = 0; #define CCERT_BUFSIZ 256 static char peer_CN[CCERT_BUFSIZ]; static char issuer_CN[CCERT_BUFSIZ]; char *tls_peer_CN = NULL; char *tls_issuer_CN = NULL; const char *tls_protocol = NULL; const char *tls_cipher_name = NULL; int tls_cipher_usebits = 0; int tls_cipher_algbits = 0; /* * Set up the cert things on the server side. We do need both the * private key (in key_file) and the cert (in cert_file). * Both files may be identical. * * This function is taken from OpenSSL apps/s_cb.c */ static int set_cert_stuff(SSL_CTX * ctx, char *cert_file, char *key_file) { if (cert_file != NULL) { if (SSL_CTX_use_certificate_chain_file(ctx, cert_file) <= 0) { printf("unable to get certificate from '%s'\n", cert_file); return (0); } if (key_file == NULL) key_file = cert_file; if (SSL_CTX_use_PrivateKey_file(ctx, key_file, SSL_FILETYPE_PEM) <= 0) { printf("unable to get private key from '%s'\n", key_file); return (0); } /* Now we know that a key and cert have been set against * the SSL context */ if (!SSL_CTX_check_private_key(ctx)) { printf("Private key does not match the certificate public key\n"); return (0); } } return (1); } /* taken from OpenSSL apps/s_cb.c */ static int verify_callback(int ok, X509_STORE_CTX * ctx) { char buf[256]; X509 *err_cert; int err; int depth; err_cert = X509_STORE_CTX_get_current_cert(ctx); err = X509_STORE_CTX_get_error(ctx); depth = X509_STORE_CTX_get_error_depth(ctx); X509_NAME_oneline(X509_get_subject_name(err_cert), buf, 256); if (verbose==1) printf("Peer cert verify depth=%d %s\n", depth, buf); if (!ok) { printf("verify error:num=%d:%s\n", err, X509_verify_cert_error_string(err)); if (verify_depth >= depth) { ok = 1; verify_error = X509_V_OK; } else { ok = 0; verify_error = X509_V_ERR_CERT_CHAIN_TOO_LONG; } } switch (ctx->error) { case X509_V_ERR_UNABLE_TO_GET_ISSUER_CERT: X509_NAME_oneline(X509_get_issuer_name(ctx->current_cert), buf, 256); printf("issuer= %s\n", buf); break; case X509_V_ERR_CERT_NOT_YET_VALID: case X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD: printf("cert not yet valid\n"); break; case X509_V_ERR_CERT_HAS_EXPIRED: case X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD: printf("cert has expired\n"); break; } if (verbose==1) printf("verify return:%d\n", ok); return (ok); } /* taken from OpenSSL apps/s_cb.c */ static RSA *tmp_rsa_cb(SSL * s __attribute__((unused)), int export __attribute__((unused)), int keylength) { static RSA *rsa_tmp = NULL; if (rsa_tmp == NULL) { rsa_tmp = RSA_generate_key(keylength, RSA_F4, NULL, NULL); } return (rsa_tmp); } /* taken from OpenSSL apps/s_cb.c * tim - this seems to just be giving logging messages */ static void apps_ssl_info_callback(SSL * s, int where, int ret) { char *str; int w; if (verbose==0) return; w = where & ~SSL_ST_MASK; if (w & SSL_ST_CONNECT) str = "SSL_connect"; else if (w & SSL_ST_ACCEPT) str = "SSL_accept"; else str = "undefined"; if (where & SSL_CB_LOOP) { printf("%s:%s\n", str, SSL_state_string_long(s)); } else if (where & SSL_CB_ALERT) { str = (where & SSL_CB_READ) ? "read" : "write"; if ((ret & 0xff) != SSL3_AD_CLOSE_NOTIFY) printf("SSL3 alert %s:%s:%s\n", str, SSL_alert_type_string_long(ret), SSL_alert_desc_string_long(ret)); } else if (where & SSL_CB_EXIT) { if (ret == 0) printf("%s:failed in %s\n", str, SSL_state_string_long(s)); else if (ret < 0) { printf("%s:error in %s %i\n", str, SSL_state_string_long(s),ret); } } } /* * Seed the random number generator. */ static int tls_rand_init(void) { #ifdef EGD_SOCKET return (RAND_egd(EGD_SOCKET)); #else /* otherwise let OpenSSL do it internally */ return 0; #endif } char *var_tls_CAfile=""; char *var_tls_CApath=""; /* * This is the setup routine for the SSL client. * * The skeleton of this function is taken from OpenSSL apps/s_client.c. */ static int tls_init_clientengine(int verifydepth, char *var_tls_cert_file, char *var_tls_key_file) { int off = 0; int verify_flags = SSL_VERIFY_NONE; char *CApath; char *CAfile; char *c_cert_file; char *c_key_file; if (verbose==1) printf("starting TLS engine\n"); SSL_load_error_strings(); SSLeay_add_ssl_algorithms(); if (tls_rand_init() == -1) { printf("TLS engine: cannot seed PRNG\n"); return IMTEST_FAIL; } tls_ctx = SSL_CTX_new(SSLv23_client_method()); if (tls_ctx == NULL) { return IMTEST_FAIL; }; off |= SSL_OP_ALL; /* Work around all known bugs */ SSL_CTX_set_options(tls_ctx, off); SSL_CTX_set_info_callback(tls_ctx, (void (*)()) apps_ssl_info_callback); if (strlen(var_tls_CAfile) == 0) CAfile = NULL; else CAfile = var_tls_CAfile; if (strlen(var_tls_CApath) == 0) CApath = NULL; else CApath = var_tls_CApath; if (CAfile || CApath) if ((!SSL_CTX_load_verify_locations(tls_ctx, CAfile, CApath)) || (!SSL_CTX_set_default_verify_paths(tls_ctx))) { printf("TLS engine: cannot load CA data\n"); return IMTEST_FAIL; } if (strlen(var_tls_cert_file) == 0) c_cert_file = NULL; else c_cert_file = var_tls_cert_file; if (strlen(var_tls_key_file) == 0) c_key_file = NULL; else c_key_file = var_tls_key_file; if (c_cert_file || c_key_file) if (!set_cert_stuff(tls_ctx, c_cert_file, c_key_file)) { printf("TLS engine: cannot load cert/key data\n"); return IMTEST_FAIL; } SSL_CTX_set_tmp_rsa_callback(tls_ctx, tmp_rsa_cb); verify_depth = verifydepth; SSL_CTX_set_verify(tls_ctx, verify_flags, verify_callback); return IMTEST_OK; } /* * taken from OpenSSL crypto/bio/b_dump.c, modified to save a lot of strcpy * and strcat by Matti Aarnio. */ #define TRUNCATE #define DUMP_WIDTH 16 static int tls_dump(const char *s, int len) { int ret = 0; char buf[160 + 1]; char *ss; int i; int j; int rows; int trunc; unsigned char ch; trunc = 0; #ifdef TRUNCATE for (; (len > 0) && ((s[len - 1] == ' ') || (s[len - 1] == '\0')); len--) trunc++; #endif rows = (len / DUMP_WIDTH); if ((rows * DUMP_WIDTH) < len) rows++; for (i = 0; i < rows; i++) { buf[0] = '\0'; /* start with empty string */ ss = buf; sprintf(ss, "%04x ", i * DUMP_WIDTH); ss += strlen(ss); for (j = 0; j < DUMP_WIDTH; j++) { if (((i * DUMP_WIDTH) + j) >= len) { strcpy(ss, " "); } else { ch = ((unsigned char) *((char *) (s) + i * DUMP_WIDTH + j)) & 0xff; sprintf(ss, "%02x%c", ch, j == 7 ? '|' : ' '); ss += 3; } } ss += strlen(ss); *ss+= ' '; for (j = 0; j < DUMP_WIDTH; j++) { if (((i * DUMP_WIDTH) + j) >= len) break; ch = ((unsigned char) *((char *) (s) + i * DUMP_WIDTH + j)) & 0xff; *ss+= (((ch >= ' ') && (ch <= '~')) ? ch : '.'); if (j == 7) *ss+= ' '; } *ss = 0; /* * if this is the last call then update the ddt_dump thing so that * we will move the selection point in the debug window */ printf("%s\n", buf); ret += strlen(buf); } #ifdef TRUNCATE if (trunc > 0) { sprintf(buf, "%04x - \n", len+ trunc); printf("%s\n", buf); ret += strlen(buf); } #endif return (ret); } /* taken from OpenSSL apps/s_cb.c */ static long bio_dump_cb(BIO * bio, int cmd, const char *argp, int argi, long argl __attribute__((unused)), long ret) { if (!do_dump) return (ret); if (cmd == (BIO_CB_READ | BIO_CB_RETURN)) { printf("read from %08lX [%08lX] (%d bytes => %ld (0x%lX))\n", (unsigned long) bio, (unsigned long) argp, argi, ret, ret); tls_dump(argp, (int) ret); return (ret); } else if (cmd == (BIO_CB_WRITE | BIO_CB_RETURN)) { printf("write to %08lX [%08lX] (%d bytes => %ld (0x%lX))\n", (unsigned long) bio, (unsigned long) argp, argi, ret, ret); tls_dump(argp, (int) ret); } return (ret); } int tls_start_clienttls(unsigned *layer, char **authid) { int sts; const SSL_CIPHER *cipher; X509 *peer; if (verbose==1) printf("setting up TLS connection\n"); if (tls_conn == NULL) { tls_conn = (SSL *) SSL_new(tls_ctx); } if (tls_conn == NULL) { printf("Could not allocate 'con' with SSL_new()\n"); return IMTEST_FAIL; } SSL_clear(tls_conn); if (!SSL_set_fd(tls_conn, sock)) { printf("SSL_set_fd failed\n"); return IMTEST_FAIL; } /* * This is the actual handshake routine. It will do all the negotiations * and will check the client cert etc. */ SSL_set_connect_state(tls_conn); /* * We do have an SSL_set_fd() and now suddenly a BIO_ routine is called? * Well there is a BIO below the SSL routines that is automatically * created for us, so we can use it for debugging purposes. */ if (verbose==1) BIO_set_callback(SSL_get_rbio(tls_conn), bio_dump_cb); /* Dump the negotiation for loglevels 3 and 4 */ if (verbose==1) do_dump = 1; if (tls_sess) /* Reuse a session if we have one */ SSL_set_session(tls_conn, tls_sess); if ((sts = SSL_connect(tls_conn)) <= 0) { printf("SSL_connect error %d\n", sts); tls_sess = SSL_get_session(tls_conn); if (tls_sess) { SSL_CTX_remove_session(tls_ctx, tls_sess); tls_sess = NULL; printf("SSL session removed\n"); } if (tls_conn!=NULL) SSL_free(tls_conn); tls_conn = NULL; return IMTEST_FAIL; } /* * Lets see, whether a peer certificate is available and what is * the actual information. We want to save it for later use. */ peer = SSL_get_peer_certificate(tls_conn); if (peer != NULL) { X509_NAME_get_text_by_NID(X509_get_subject_name(peer), NID_commonName, peer_CN, CCERT_BUFSIZ); tls_peer_CN = peer_CN; X509_NAME_get_text_by_NID(X509_get_issuer_name(peer), NID_commonName, issuer_CN, CCERT_BUFSIZ); if (verbose==1) printf("subject_CN=%s, issuer_CN=%s\n", peer_CN, issuer_CN); tls_issuer_CN = issuer_CN; } tls_protocol = SSL_get_version(tls_conn); cipher = SSL_get_current_cipher(tls_conn); tls_cipher_name = SSL_CIPHER_get_name(cipher); tls_cipher_usebits = SSL_CIPHER_get_bits(cipher, &tls_cipher_algbits); if (layer!=NULL) *layer = tls_cipher_usebits; if (authid!=NULL) *authid = tls_peer_CN; printf("TLS connection established: %s with cipher %s (%d/%d bits)\n", tls_protocol, tls_cipher_name, tls_cipher_usebits, tls_cipher_algbits); return IMTEST_OK; } void do_starttls(int ssl, char *keyfile, unsigned *ssf) { int result; char *auth_id; result=tls_init_clientengine(10, keyfile, keyfile); if (result!=IMTEST_OK) { if (ssl) { imtest_fatal("Start TLS engine failed\n"); } else { printf("Start TLS engine failed\n"); return; } } else { result=tls_start_clienttls(ssf, &auth_id); if (result!=IMTEST_OK) imtest_fatal("TLS negotiation failed!\n"); } /* TLS negotiation suceeded */ tls_sess = SSL_get_session(tls_conn); /* Save the session for reuse */ /* tell SASL about the negotiated layer */ result=sasl_setprop(conn, SASL_SSF_EXTERNAL, ssf); if (result!=SASL_OK) imtest_fatal("Error setting SASL property (external ssf)"); result=sasl_setprop(conn, SASL_AUTH_EXTERNAL, auth_id); if (result!=SASL_OK) imtest_fatal("Error setting SASL property (external auth_id)"); prot_settls (pin, tls_conn); prot_settls (pout, tls_conn); } #endif /* HAVE_SSL */ static sasl_security_properties_t *make_secprops(int min,int max) { sasl_security_properties_t *ret=(sasl_security_properties_t *) malloc(sizeof(sasl_security_properties_t)); ret->maxbufsize=1024; ret->min_ssf=min; ret->max_ssf=max; ret->security_flags=0; ret->property_names=NULL; ret->property_values=NULL; return ret; } /* * Initialize SASL and set necessary options */ static int init_sasl(char *service, char *serverFQDN, int minssf, int maxssf, unsigned flags) { int saslresult; sasl_security_properties_t *secprops=NULL; socklen_t addrsize; char localip[60], remoteip[60]; struct sockaddr_storage saddr_l; struct sockaddr_storage saddr_r; addrsize=sizeof(struct sockaddr_storage); if (getpeername(sock,(struct sockaddr *)&saddr_r,&addrsize)!=0) return IMTEST_FAIL; addrsize=sizeof(struct sockaddr_storage); if (getsockname(sock,(struct sockaddr *)&saddr_l,&addrsize)!=0) return IMTEST_FAIL; if(iptostring((struct sockaddr *)&saddr_l, addrsize, localip, 60)) return IMTEST_FAIL; if(iptostring((struct sockaddr *)&saddr_r, addrsize, remoteip, 60)) return IMTEST_FAIL; /* client new connection */ saslresult=sasl_client_new(service, serverFQDN, localip, remoteip, NULL, flags, &conn); if (saslresult!=SASL_OK) return IMTEST_FAIL; /* create a security structure and give it to sasl */ secprops = make_secprops(minssf, maxssf); if (secprops != NULL) { sasl_setprop(conn, SASL_SEC_PROPS, secprops); free(secprops); } return IMTEST_OK; } #define BUFSIZE 16384 imt_stat getauthline(struct sasl_cmd_t *sasl_cmd, char **line, int *linelen) { char buf[BUFSIZE]; int saslresult; unsigned len; char *str=(char *) buf; int ret = STAT_CONT; *line = NULL; *linelen = 0; do { str = prot_fgets(str, BUFSIZE, pin); if (str == NULL) imtest_fatal("prot layer failure"); printf("S: %s",str); } while(str[0] == '*'); /* Ignore potential untagged responses */ if (!strncasecmp(str, sasl_cmd->ok, strlen(sasl_cmd->ok))) { if (sasl_cmd->parse_success) { str = sasl_cmd->parse_success(str); if (!str) return STAT_OK; ret = STAT_OK; } else { return STAT_OK; } } else if (!strncasecmp(str, sasl_cmd->fail, strlen(sasl_cmd->fail))) { return STAT_NO; } else if (sasl_cmd->cont) { str += strlen(sasl_cmd->cont); /* jump past the continuation */ } else { /* literal */ len = atoi(str+1); str = prot_fgets(str, BUFSIZE, pin); if (str == NULL || strlen(str) < len) imtest_fatal("prot layer failure"); printf("S: %s", str); } if (*str != '\r') { /* trim CRLF */ char *p = str + strlen(str) - 1; if (p >= str && *p == '\n') *p-- = '\0'; if (p >= str && *p == '\r') *p-- = '\0'; /* alloc space for decoded response */ len = strlen(str) + 1; *line = malloc(len); if ((*line) == NULL) { return STAT_NO; } /* decode this line */ saslresult = sasl_decode64(str, strlen(str), *line, len, (unsigned *) linelen); if (saslresult != SASL_OK) { printf("base64 decoding error\n"); return STAT_NO; } } else { /* this is a blank */ *line = NULL; *linelen = 0; } return ret; } void interaction (int id, const char *challenge, const char *prompt, char **tresult, unsigned int *tlen) { char result[1024]; struct stringlist *cur; cur = malloc(sizeof(struct stringlist)); if(!cur) { *tlen=0; *tresult=NULL; return; } cur->str = NULL; cur->next = strlist_head; strlist_head = cur; if (id==SASL_CB_PASS && !cmdline_password) { printf("%s: ", prompt); cur->str=strdup(cyrus_getpass("")); *tlen=strlen(cur->str); *tresult = cur->str; return; } else if (id==SASL_CB_PASS && cmdline_password) { strcpy(result, cmdline_password); } else if (id==SASL_CB_USER) { if (username != NULL) { strcpy(result, username); } else { strcpy(result, ""); } } else if (id==SASL_CB_AUTHNAME) { if (authname != NULL) { strcpy(result, authname); } else { strcpy(result, getpwuid(getuid())->pw_name); } #ifdef SASL_CB_GETREALM } else if ((id==SASL_CB_GETREALM) && (realm != NULL)) { strcpy(result, realm); #endif } else { int c; if (((id==SASL_CB_ECHOPROMPT) || (id=SASL_CB_NOECHOPROMPT)) && (challenge != NULL)) { printf("Server challenge: %s\n", challenge); } printf("%s: ",prompt); if (id==SASL_CB_NOECHOPROMPT) { strcpy(result, cyrus_getpass("")); } else { fgets(result, sizeof(result) - 1, stdin); c = strlen(result); result[c - 1] = '\0'; } } *tlen = strlen(result); cur->str = (char *) malloc(*tlen+1); if(!cur->str) { *tresult = NULL; return; } memset(cur->str, 0, *tlen+1); memcpy(cur->str, result, *tlen); *tresult = cur->str; } void fillin_interactions(sasl_interact_t *tlist) { while (tlist->id!=SASL_CB_LIST_END) { interaction(tlist->id, tlist->challenge, tlist->prompt, (void *) &(tlist->result), &(tlist->len)); tlist++; } } static char *waitfor(char *tag, char *tag2, int echo) { static char str[1024]; do { if (prot_fgets(str, sizeof(str), pin) == NULL) { imtest_fatal("prot layer failure"); } if(echo) printf("S: %s", str); } while (strncmp(str, tag, strlen(tag)) && (tag2 ? strncmp(str, tag2, strlen(tag2)) : 1)); return str; } int auth_sasl(struct sasl_cmd_t *sasl_cmd, char *mechlist) { sasl_interact_t *client_interact = NULL; int saslresult; const char *out = NULL; unsigned int outlen = 0; char *in; int inlen; const char *mechusing; char inbase64[4096]; int inbase64len; char cmdbuf[40]; int sendliteral = sasl_cmd->quote; int initial_response = 1; imt_stat status; if (!sasl_cmd || !sasl_cmd->cmd) return IMTEST_FAIL; do { /* start authentication */ saslresult = sasl_client_start(conn, mechlist, &client_interact, /* do we support initial response? */ sasl_cmd->maxlen ? &out : NULL, &outlen, &mechusing); if (saslresult == SASL_INTERACT) fillin_interactions(client_interact); /* fill in prompts */ } while (saslresult == SASL_INTERACT); if ((saslresult != SASL_OK) && (saslresult != SASL_CONTINUE)) { return saslresult; } /* build the auth command */ if (sasl_cmd->quote) { sprintf(cmdbuf, "%s \"%s\"", sasl_cmd->cmd, mechusing); } else { sprintf(cmdbuf, "%s %s", sasl_cmd->cmd, mechusing); } printf("C: %s", cmdbuf); prot_printf(pout, "%s", cmdbuf); if (out) { /* initial response */ if (!outlen) { /* empty initial response */ printf(" ="); prot_printf(pout, " ="); out = NULL; } else if (!sendliteral && ((int) (strlen(cmdbuf) + outlen + 3) > sasl_cmd->maxlen)) { /* initial response is too long for auth command, so wait for a server challenge before sending it */ goto noinitresp; } else { /* full response -- encoded below */ printf(" "); prot_printf(pout, " "); } } else { goto noinitresp; } do { if (out) { /* response */ /* convert to base64 */ saslresult = sasl_encode64(out, outlen, inbase64, sizeof(inbase64), (unsigned *) &inbase64len); if (saslresult != SASL_OK) return saslresult; /* send to server */ if (sendliteral) { printf("%s{%d+}\r\n", initial_response ? "" : "C: ", inbase64len); prot_printf(pout, "{%d+}\r\n", inbase64len); prot_flush(pout); } printf("%s%s", initial_response ? "" : "C: ", inbase64); prot_write(pout, inbase64, inbase64len); out = NULL; } else if (sendliteral) { /* If we had no response, we still need to send the empty literal in this case */ printf("{0+}\r\nC: "); prot_printf(pout, "{0+}\r\n"); } else if (!initial_response) { printf("C: "); } noinitresp: initial_response = 0; printf("\r\n"); prot_printf(pout, "\r\n"); prot_flush(pout); /* get challenge/reply from the server */ status = getauthline(sasl_cmd, &in, &inlen); if ((status == STAT_CONT || (status == STAT_OK && in)) && (inlen || !out)) { /* no delayed initial response */ do { /* do the next step */ saslresult = sasl_client_step(conn, in, inlen, &client_interact, &out, &outlen); if (saslresult == SASL_INTERACT) fillin_interactions(client_interact); /* fill in prompts */ } while (saslresult == SASL_INTERACT); if (in) free(in); } if ((saslresult != SASL_OK) && (saslresult != SASL_CONTINUE)) { /* cancel the exchange */ printf("C: %s\r\n", sasl_cmd->cancel); prot_printf(pout, "%s\r\n", sasl_cmd->cancel); prot_flush(pout); return saslresult; } sendliteral = !sasl_cmd->cont; } while (status == STAT_CONT); return (status == STAT_OK) ? IMTEST_OK : IMTEST_FAIL; } /* initialize the network */ static int init_net(char *serverFQDN, char *port) { struct addrinfo hints, *res0 = NULL, *res; int err; memset(&hints, 0, sizeof(hints)); hints.ai_family = PF_UNSPEC; hints.ai_socktype = SOCK_STREAM; hints.ai_flags = AI_CANONNAME; if ((err = getaddrinfo(serverFQDN, port, &hints, &res0)) != 0) { fprintf(stderr, "getaddrinfo: %s\n", gai_strerror(err)); return IMTEST_FAIL; } if (res0->ai_canonname) strncpy(serverFQDN, res0->ai_canonname, 1023); for (res = res0; res; res = res->ai_next) { sock = socket(res->ai_family, res->ai_socktype, res->ai_protocol); if (sock < 0) continue; if (connect(sock, res->ai_addr, res->ai_addrlen) >= 0) break; close(sock); sock = -1; } freeaddrinfo(res0); if(sock < 0) { perror("connect"); return IMTEST_FAIL; } return IMTEST_OK; } static void logout(struct logout_cmd_t *logout_cmd, int wait) { printf("C: %s\r\n", logout_cmd->cmd); prot_printf(pout, "%s\r\n", logout_cmd->cmd); prot_flush(pout); /* only wait if we are explicitly told to */ if(wait) waitfor(logout_cmd->resp, NULL, 1); } static int gotsigint = 0; static void sigint_handler(int sig __attribute__((unused))) { gotsigint = 1; } static int haveinput(struct protstream *s) { /* Is something currently pending in our protstream's buffer? */ #ifdef HAVE_SSL if (s->cnt == 0 && s->tls_conn != NULL) { /* Maybe there's data pending in the SSL buffer? */ int n = SSL_pending(s->tls_conn); if (verbose) printf("SSL_pending=%d\n", n); return n; } #endif return s->cnt; } /* This needs to support 3 modes: * * 1. Terminal Interface Only * 2. File input * 3. Redirect to a unix socket - This mode needs to be sure that the * IMAP session is in an unselected state whenever the unix socket is * disconnected. * */ static void interactive(struct protocol_t *protocol, char *filename) { char buf[2048]; fd_set read_set, rset; fd_set write_set, wset; fd_set accept_set, aset; int nfds; int nfound; int count; int fd = 0, fd_out = 1, listen_sock = -1; void *rock = NULL; int donewritingfile = 0; struct sockaddr_un sunsock; int salen; /* open the file if available */ if (filename != NULL) { if ((fd = open(filename, O_RDONLY)) == -1) { fprintf(stderr,"Unable to open file: %s:", filename); perror(""); exit(1); } } else if(output_socket) { struct timeval tv; struct stat sbuf; /* can't have this and a file for input */ sunsock.sun_family = AF_UNIX; strcpy(sunsock.sun_path, output_socket); unlink(output_socket); listen_sock = socket(AF_UNIX, SOCK_STREAM, 0); if(listen_sock < 0) imtest_fatal("could not create output socket"); salen = sizeof(sunsock.sun_family) + strlen(sunsock.sun_path) + 1; if((bind(listen_sock, (struct sockaddr *)&sunsock, salen)) < 0) { imtest_fatal("could not bind output socket"); } if((listen(listen_sock, 5)) < 0) { imtest_fatal("could not listen to output socket"); } if(stat(output_socket, &sbuf) == -1) { imtest_fatal("could not stat output socket"); } output_socket_opened = 1; output_socket_ino = sbuf.st_ino; FD_ZERO(&accept_set); FD_SET(listen_sock, &accept_set); accept_again: if(rock) { free(rock); rock = NULL; } tv.tv_sec = 600; /* 10 minute timeout - xxx protocol specific? */ tv.tv_usec = 0; aset = accept_set; /* Have the separate select so that signals will wake us up * and we get a timeout to use on our own imap connection */ if(select(listen_sock + 1, &aset, NULL, NULL, &tv) <= 0) { /* either we timed out or had an error */ goto cleanup; } fd = fd_out = accept(listen_sock, NULL, NULL); if(fd < 0) imtest_fatal("accept failure"); if(protocol->init_conn) rock = protocol->init_conn(); } FD_ZERO(&read_set); FD_SET(fd, &read_set); /* In the terminal case fd == 0 */ FD_SET(sock, &read_set); FD_ZERO(&write_set); FD_SET(fd_out, &write_set); FD_SET(sock, &write_set); nfds = fd; if (nfds < sock) nfds = sock; if (nfds < fd_out) nfds = fd_out; nfds++; if (filename != NULL) { donewritingfile = 0; } /* add handler for SIGINT */ signal(SIGINT, sigint_handler); /* loop reading from network and from stdin as applicable */ while (1) { rset = read_set; wset = write_set; nfound = select(nfds, &rset, &wset, NULL, NULL); if (nfound < 0) { perror("select"); imtest_fatal("select"); } if (!output_socket && (FD_ISSET(0, &rset)) && (FD_ISSET(sock, &wset))) { /* There is explicit terminal input -- note this is only possible * if fd is 0 (and we are in terminal mode!). * We need to use stream API for this, which is why it * is different */ if (fgets(buf, sizeof (buf) - 1, stdin) == NULL) { logout(&protocol->logout_cmd, 0); FD_CLR(0, &read_set); } else { count = strlen(buf); /* If we read a full line, translate the newline * if necessary. */ if (buf[count - 1] == '\n' && (count < 2 || buf[count - 2] != '\r')) { buf[count - 1] = '\r'; buf[count] = '\n'; buf[count + 1] = '\0'; count++; } prot_write(pout, buf, count); } prot_flush(pout); } else if (FD_ISSET(sock, &rset) && (FD_ISSET(fd_out, &wset))) { /* This does input from remote for all modes */ do { count = prot_read(pin, buf, sizeof (buf) - 1); if (count == 0) { const char *str = prot_error(pin); if (str && strcmp(str, PROT_EOF_STRING)) { printf("Protection error: %s\n", prot_error(pin)); } close(sock); printf("Connection closed.\n"); return; } if (count < 0) { perror("read"); imtest_fatal("prot_read"); } if(output_socket) write(fd_out, buf, count); else { /* use the stream API */ buf[count] = '\0'; printf("%s", buf); } } while (haveinput(pin) > 0); } else if ((FD_ISSET(fd, &rset)) && (FD_ISSET(sock, &wset)) && (donewritingfile == 0)) { /* This does input for both socket and file modes */ int numr = read(fd, buf, sizeof(buf)); /* and send out over wire */ if (numr < 0) { perror("read"); imtest_fatal("read"); } else if (numr==0) { if(output_socket) { if(protocol->reset) { if(protocol->reset(rock) != IMTEST_OK) goto cleanup; } else /* no protocol->reset, we're done */ goto cleanup; close(fd); fd = 0; fd_out = 1; goto accept_again; } else { /* we're done, cleanup */ donewritingfile = 1; FD_CLR(fd,&read_set); /* send LOGOUT */ logout(&protocol->logout_cmd, 0); } } else { if (!output_socket) { /* echo for the user - if not in socket mode */ write(1, buf, numr); } if (output_socket && protocol->pipe) { if(protocol->pipe(buf, numr, rock) == IMTEST_CLOSEME) { if(protocol->reset) { if(protocol->reset(rock) != IMTEST_OK) goto cleanup; } else /* no protocol->reset, we're done */ goto cleanup; close(fd); fd = 0; fd_out = 1; goto accept_again; } } else { /* echo to remote */ prot_write(pout, buf, numr); prot_flush(pout); } } } else { /* if can't do anything else sleep */ usleep(1000); } /* received interrupt signal, logout */ if (gotsigint) goto cleanup; } cleanup: if(rock) free(rock); if(output_socket && output_socket_opened) { struct stat sbuf; close(fd); if (listen_sock != -1) close(listen_sock); if(stat(output_socket, &sbuf) != -1 && sbuf.st_ino == output_socket_ino) { unlink(output_socket); } } logout(&protocol->logout_cmd, 0); close(sock); printf("Connection closed.\n"); /* remove handler for SIGINT */ signal(SIGINT, SIG_DFL); return; } enum { AUTO_BANNER = -1, AUTO_NO = 0, AUTO_YES = 1 }; enum { CAPA_LOGIN = (1 << 0), CAPA_STARTTLS = (1 << 1), CAPA_COMPRESS = (1 << 2) }; static char *ask_capability(struct protocol_t *prot, unsigned long *capabilities, int automatic) { char str[1024] = ""; char *ret = NULL, *tmp, *resp; /* default state of login command unless toggled by capabilities */ *capabilities = prot->login_enabled; resp = (automatic == AUTO_BANNER) ? prot->banner.resp : prot->capa_cmd.resp; if (!automatic) { /* no capability command */ if (!prot->capa_cmd.cmd) return NULL; /* request capabilities of server */ printf("C: %s\r\n", prot->capa_cmd.cmd); prot_printf(pout, "%s\r\n", prot->capa_cmd.cmd); prot_flush(pout); } do { /* look for the end of the capabilities */ if (prot_fgets(str, sizeof(str), pin) == NULL) { if (!*str) imtest_fatal("prot layer failure"); else break; } printf("S: %s", str); /* check for login - toggles existing state */ if (prot->capa_cmd.login && strstr(str, prot->capa_cmd.login) != NULL) { *capabilities ^= CAPA_LOGIN; } /* check for starttls */ if (prot->capa_cmd.tls && strstr(str, prot->capa_cmd.tls) != NULL) { *capabilities |= CAPA_STARTTLS; } /* check for compress */ if (prot->capa_cmd.compress && strstr(str, prot->capa_cmd.compress) != NULL) { *capabilities |= CAPA_COMPRESS; } /* check for auth */ if (prot->capa_cmd.auth && (tmp = strstr(str, prot->capa_cmd.auth)) != NULL) { free(ret); /* avoid memory leak if duplicate mechlists */ if (prot->capa_cmd.parse_mechlist) ret = prot->capa_cmd.parse_mechlist(str, prot); else ret = strdup(tmp+strlen(prot->capa_cmd.auth)); } if (!resp) { /* multiline response with no distinct end (IMAP banner) */ prot_NONBLOCK(pin); } /* look for the end of the capabilities */ } while (!resp || strncasecmp(str, resp, strlen(resp))); prot_BLOCK(pin); return ret; } /* generic pipe functionality - break it into one line at a time, and * pass that into a per-protocol pipe function. */ struct generic_context_t { int (*pipe_oneline)(char *buf, int len, void *rock); void *rock; /* Deal with half-finished lines */ char *midLine; size_t midLineLen; }; static int generic_pipe(char *buf, int len, void *rock) { struct generic_context_t *text = (struct generic_context_t *)rock; char *toWrite = NULL, *toSend = NULL; int toWriteLen = 0; char *lineEnd = NULL; int ret = IMTEST_OK; /* do we have leftovers? -- if so, we append the new stuff */ if(text->midLine) { text->midLine = (char *)xrealloc(text->midLine, text->midLineLen+len+1); memcpy(text->midLine+text->midLineLen, buf, len); text->midLineLen += len; text->midLine[text->midLineLen] = '\0'; toWrite = text->midLine; toWriteLen = text->midLineLen; } else { toWrite = buf; toWriteLen = len; } /* one line at a time now */ while(toWrite && (lineEnd = memchr(toWrite, '\n', toWriteLen)) != NULL) { size_t len_todo; len_todo = lineEnd - toWrite + 1; /* +1 is to include the newline! */ toSend = (char *)xrealloc(toSend, len_todo + 1); memcpy(toSend, toWrite, len_todo); toSend[len_todo] = '\0'; ret = text->pipe_oneline(toSend, len_todo, text->rock); if(ret != IMTEST_OK) break; toWrite = lineEnd+1; /* +1 is to skip the newline! */ toWriteLen -= len_todo; if(toWriteLen <= 0) toWrite = NULL; } if(toWrite && ret == IMTEST_OK) { char *newMidLine; /* we need to save the leftover for next time */ newMidLine = (char *)xmalloc(toWriteLen); memcpy(newMidLine, toWrite, toWriteLen); if(text->midLine) free(text->midLine); text->midLine = newMidLine; text->midLineLen = toWriteLen; } else if (text->midLine || ret != IMTEST_OK) { free(text->midLine); text->midLine = NULL; text->midLineLen = 0; } free(toSend); return ret; } /*********************************** IMAP ************************************/ /* * Parse a mech list of the form: ... AUTH=foo AUTH=bar ... * * Return: string with mechs separated by spaces * */ static char *imap_parse_mechlist(const char *str, struct protocol_t *prot) { char *ret = xzmalloc(strlen(str)+1); char *tmp; int num = 0; if (strstr(str, " SASL-IR")) { /* server supports initial response in AUTHENTICATE command */ prot->sasl_cmd.maxlen = USHRT_MAX; } while ((tmp = strstr(str, " AUTH="))) { char *end = (tmp += 6); while((*end != ' ') && (*end != '\0')) end++; /* add entry to list */ if (num++ > 0) strcat(ret, " "); strlcat(ret, tmp, strlen(ret) + (end - tmp) + 1); /* reset the string */ str = end; } return ret; } static int auth_imap(void) { char str[1024]; /* we need username and password to do "login" */ char *username; unsigned int userlen; char *pass; unsigned int passlen; char *tag = "L01 "; str[0] = '\0'; interaction(SASL_CB_AUTHNAME, NULL, "Authname", &username, &userlen); interaction(SASL_CB_PASS, NULL, "Please enter your password", &pass, &passlen); printf("C: %sLOGIN %s {%d}\r\n", tag, username, passlen); prot_printf(pout,"%sLOGIN %s {%d}\r\n", tag, username, passlen); prot_flush(pout); if (!strncmp(waitfor("+", tag, 1), "+", 1)) { printf("C: \r\n"); prot_printf(pout,"%s\r\n", pass); prot_flush(pout); do { if (prot_fgets(str, sizeof(str), pin) == NULL) { imtest_fatal("prot layer failure"); } printf("S: %s", str); } while (strncmp(str, tag, strlen(tag))); } if (!strncasecmp(str+strlen(tag), "OK", 2)) { return IMTEST_OK; } else { return IMTEST_FAIL; } } static int imap_do_auth(struct sasl_cmd_t *sasl_cmd, void *rock __attribute__((unused)), int login_enabled, char *mech, char *mechlist) { int result = IMTEST_FAIL; if (mech) { if (!strcasecmp(mech, "login")) { if (!login_enabled) { printf("[Server advertised LOGINDISABLED]\n"); } else { result = auth_imap(); } } else if (!mechlist || !stristr(mechlist, mech)) { printf("[Server did not advertise AUTH=%s]\n", ucase(mech)); } else { result = auth_sasl(sasl_cmd, mech); } } else { if (mechlist) { result = auth_sasl(sasl_cmd, mechlist); } else if (login_enabled) { result = auth_imap(); } } return result; } struct imap_context_t { int inLiteral; }; static int imap_pipe_oneline(char *buf, int len, void *rock) { struct imap_context_t *text = (struct imap_context_t *)rock; int add_crlf = 0; /* hack for terminals */ if(text->inLiteral) { if(len <= text->inLiteral) { text->inLiteral -= len; } else { prot_write(pout, buf, text->inLiteral); buf += text->inLiteral; len -= text->inLiteral; text->inLiteral = 0; } } if(!text->inLiteral) { char c, *tag, *cmd, *tmp, *sparebuf = (char *)xstrdup(buf); int i; tmp = sparebuf; if(len > 4 && buf[len-1] == '\n' && buf[len-1] == '\r' && buf[len-2] == '}') { /* possible literal, with \r */ i = len-4; while(i > 0 && buf[i] != '{' && Uisdigit(buf[i])) i--; if(buf[i] == '{') text->inLiteral = atoi(buf + i + 1); } else if(len > 3 && buf[len-1] == '\n' && buf[len-2] == '}') { /* possible literal, no \r -- hack for terminals*/ i = len-3; while(i > 0 && buf[i] != '{' && Uisdigit(buf[i])) i--; if(buf[i] == '{') text->inLiteral = atoi(buf + i + 1); } /* We could still have another special case! */ c = imparse_word(&tmp, &tag); if(c == ' ') { c = imparse_word(&tmp, &cmd); if(c == '\n' || (c == '\r' && *tmp == '\n')){ /* Are we logging out? */ if(!strncasecmp(cmd, "LOGOUT", 6)) { free(sparebuf); return IMTEST_CLOSEME; } } } free(sparebuf); /* If the remote is sending only \n, clean it up for them */ if((len == 1 && buf[0] == '\n') || (len >= 2 && buf[len-2] != '\r')) { len -= 1; /* truncate \n */ add_crlf = 1; } } prot_write(pout, buf, len); if(add_crlf) prot_write(pout, "\r\n", 2); prot_flush(pout); return IMTEST_OK; } static void * imap_init_conn(void) { struct generic_context_t *ret; ret = (void *)xmalloc(sizeof(struct generic_context_t)); memset(ret, 0, sizeof(struct generic_context_t)); ret->rock = (void *)xmalloc(sizeof(struct imap_context_t)); memset(ret->rock, 0, sizeof(struct imap_context_t)); ret->pipe_oneline = &imap_pipe_oneline; return ret; } static int imap_reset(void *rock) { struct generic_context_t *gentext = (struct generic_context_t *)rock; struct imap_context_t *text = (struct imap_context_t *)gentext->rock; char tag[64]; static int i=0; if(text->inLiteral || gentext->midLine) return IMTEST_FAIL; snprintf(tag, sizeof(tag) - 1, "UN%d", i); prot_printf(pout, "%s UNSELECT\r\n", tag); prot_flush(pout); waitfor(tag, NULL, 0); return IMTEST_OK; } #define HEADERS "Date: Mon, 7 Feb 1994 21:52:25 -0800 (PST)\r\n \ From: Fred Foobar \r\n \ Subject: afternoon meeting\r\n \ To: mooch@owatagu.siam.edu\r\n \ Message-Id: \r\n \ MIME-Version: 1.0\r\n \ Content-Type: TEXT/PLAIN; CHARSET=US-ASCII\r\n\r\n" static int append_msg(char *mbox, int size) { int lup; prot_printf(pout,"A003 APPEND %s (\\Seen) {" SIZE_T_FMT "}\r\n", mbox,size+strlen(HEADERS)); /* do normal header foo */ prot_printf(pout,HEADERS); for (lup=0;lup' */ cp = str+3; while (cp && (start = strchr(cp, '<'))) { cp = start + 1; while (*cp && *cp != '@' && *cp != '<' && *cp != '>') cp++; if (*cp != '@') continue; while (*cp && *cp != '<' && *cp != '>') cp++; if (*cp == '>') { *(++cp) = '\0'; chal = strdup(start); if (!chal) imtest_fatal("memory error"); break; } } return chal; } static int auth_pop(void) { char str[1024]; /* we need username and password to do USER/PASS */ char *username; unsigned int userlen; char *pass; unsigned int passlen; interaction(SASL_CB_AUTHNAME, NULL, "Authname", &username, &userlen); printf("C: USER %s\r\n", username); prot_printf(pout,"USER %s\r\n", username); prot_flush(pout); if (prot_fgets(str, 1024, pin) == NULL) { imtest_fatal("prot layer failure"); } printf("S: %s", str); if (strncasecmp(str, "+OK", 3)) return IMTEST_FAIL; interaction(SASL_CB_PASS, NULL, "Please enter your password", &pass, &passlen); printf("C: PASS \r\n"); prot_printf(pout,"PASS %s\r\n",pass); prot_flush(pout); if (prot_fgets(str, 1024, pin) == NULL) { imtest_fatal("prot layer failure"); } printf("S: %s", str); if (!strncasecmp(str, "+OK", 3)) { return IMTEST_OK; } else { return IMTEST_FAIL; } } static int auth_apop(char *apop_chal) { char str[1024]; /* we need username and password to do "APOP" */ char *username; unsigned int userlen; char *pass; unsigned int passlen; int i; MD5_CTX ctx; unsigned char digest[MD5_DIGEST_LENGTH]; char digeststr[2*MD5_DIGEST_LENGTH+1]; interaction(SASL_CB_AUTHNAME, NULL, "Authname", &username, &userlen); interaction(SASL_CB_PASS,NULL, "Please enter your password", &pass, &passlen); MD5Init(&ctx); MD5Update(&ctx,apop_chal,strlen(apop_chal)); MD5Update(&ctx,pass,passlen); MD5Final(digest, &ctx); /* convert digest from binary to ASCII hex */ for (i = 0; i < 16; i++) sprintf(digeststr + (i*2), "%02x", digest[i]); printf("C: APOP %s %s\r\n", username, digeststr); prot_printf(pout,"APOP %s %s\r\n", username, digeststr); prot_flush(pout); if(prot_fgets(str, 1024, pin) == NULL) { imtest_fatal("prot layer failure"); } printf("S: %s", str); if (!strncasecmp(str, "+OK", 3)) { return IMTEST_OK; } else { return IMTEST_FAIL; } } static int pop3_do_auth(struct sasl_cmd_t *sasl_cmd, void *apop_chal, int user_enabled, char *mech, char *mechlist) { int result = IMTEST_FAIL; if (mech) { if (!strcasecmp(mech, "apop")) { if (!apop_chal) { printf("[Server did not advertise APOP challenge]\n"); } else { result = auth_apop((char *) apop_chal); } } else if (!strcasecmp(mech, "user")) { if (!user_enabled) { printf("[Server did not advertise USER]\n"); } else { result = auth_pop(); } } else if (!mechlist || !stristr(mechlist, mech)) { printf("[Server did not advertise SASL %s]\n", ucase(mech)); } else { result = auth_sasl(sasl_cmd, mech); } } else { if (mechlist) { result = auth_sasl(sasl_cmd, mechlist); } else if (apop_chal) { result = auth_apop((char *) apop_chal); } else if (user_enabled) { result = auth_pop(); } } return result; } /********************************** NNTP *************************************/ static int auth_nntp() { char str[1024]; /* we need username and password to do AUTHINFO USER/PASS */ char *username; unsigned int userlen; char *pass; unsigned int passlen; interaction(SASL_CB_AUTHNAME, NULL, "Authname", &username, &userlen); printf("C: AUTHINFO USER %s\r\n", username); prot_printf(pout,"AUTHINFO USER %s\r\n", username); prot_flush(pout); if (prot_fgets(str, 1024, pin) == NULL) { imtest_fatal("prot layer failure"); } printf("S: %s", str); if (!strncmp(str, "381", 3)) { interaction(SASL_CB_PASS, NULL, "Please enter your password", &pass, &passlen); printf("C: AUTHINFO PASS \r\n"); prot_printf(pout,"AUTHINFO PASS %s\r\n",pass); prot_flush(pout); if (prot_fgets(str, 1024, pin) == NULL) { imtest_fatal("prot layer failure"); } printf("S: %s", str); } if (!strncmp(str, "281", 3)) { return IMTEST_OK; } else { return IMTEST_FAIL; } } static int nntp_do_auth(struct sasl_cmd_t *sasl_cmd, void *rock __attribute__((unused)), int user_enabled, char *mech, char *mechlist) { int result = IMTEST_OK; if (mech) { if (!strcasecmp(mech, "user")) { if (!user_enabled) { printf("[Server did not advertise AUTHINFO USER]\n"); result = IMTEST_FAIL; } else { result = auth_nntp(user_enabled); } } else if (!mechlist || !stristr(mechlist, mech)) { printf("[Server did not advertise SASL %s]\n", ucase(mech)); result = IMTEST_FAIL; } else { result = auth_sasl(sasl_cmd, mech); } } else { if (mechlist) { result = auth_sasl(sasl_cmd, mechlist); } else if (user_enabled) { result = auth_nntp(); } } return result; } static char *nntp_parse_success(char *str) { char *success = NULL, *tmp; if (!strncmp(str, "283 ", 4)) { success = str+4; if ((tmp = strchr(success, ' '))) *tmp = '\0'; /* clip trailing comment */ } return success; } /******************************** LMTP/SMTP **********************************/ static int xmtp_do_auth(struct sasl_cmd_t *sasl_cmd, void *rock __attribute__((unused)), int login_enabled __attribute__((unused)), char *mech, char *mechlist) { int result = IMTEST_OK; if (mech) { result = auth_sasl(sasl_cmd, mech); } else if (mechlist) { result = auth_sasl(sasl_cmd, mechlist); } return result; } struct xmtp_context_t { int inData; }; /* This takes a NUL-terminated full line (including any trailing \r\n) */ static int xmtp_pipe_oneline(char *buf, int len, void *rock) { struct xmtp_context_t *text = (struct xmtp_context_t *)rock; if(text->inData && len <= 3) { if(buf[0] == '.' && (buf[1] == '\n' || (buf[1] == '\r' && buf[2] == '\n'))) { text->inData = 0; } } else if(!text->inData && len > 4 && len <= 6) { if(!strncasecmp(buf, "DATA", 4) && (buf[4] == '\n' || (buf[4] == '\r' && buf[5] == '\n'))) { text->inData = 1; } else if(!strncasecmp(buf, "QUIT", 4) && (buf[4] == '\n' || (buf[4] == '\r' && buf[5] == '\n'))) { return IMTEST_CLOSEME; } } prot_write(pout, buf, len); prot_flush(pout); return IMTEST_OK; } static void *xmtp_init_conn(void) { struct generic_context_t *ret; ret = (void *)xmalloc(sizeof(struct generic_context_t)); memset(ret, 0, sizeof(struct generic_context_t)); ret->rock = (void *)xmalloc(sizeof(struct xmtp_context_t)); memset(ret->rock, 0, sizeof(struct xmtp_context_t)); ret->pipe_oneline = &xmtp_pipe_oneline; return ret; } static int xmtp_reset(void *rock) { struct generic_context_t *gentext = (struct generic_context_t *)rock; struct xmtp_context_t *text = (struct xmtp_context_t *)gentext->rock; if(text->inData || gentext->midLine) return IMTEST_FAIL; prot_printf(pout, "RSET\r\n"); prot_flush(pout); waitfor("250", NULL, 1); return IMTEST_OK; } /******************************** MUPDATE ************************************/ /********************************* SIEVE *************************************/ static char *sieve_parse_success(char *str) { char *success = NULL, *tmp; if (!strncmp(str, "OK (", 4) && (tmp = strstr(str+4, "SASL \"")) != NULL) { success = tmp+6; /* skip SASL " */ tmp = strstr(success, "\""); if (tmp) *tmp = '\0'; /* clip " */ } return success; } /*****************************************************************************/ /* didn't give correct parameters; let's exit */ void usage(char *prog, char *prot) { printf("Usage: %s [options] hostname\n", prog); printf(" -p port : port to use (default=standard port for protocol)\n"); if (!strcasecmp(prot, "imap")) printf(" -z : timing test\n"); printf(" -k # : minimum protection layer required\n"); printf(" -l # : max protection layer (0=none; 1=integrity; etc)\n"); printf(" -u user : authorization name to use\n"); printf(" -a user : authentication name to use\n"); printf(" -w pass : password to use (if not supplied, we will prompt)\n"); printf(" -v : verbose\n"); printf(" -m mech : SASL mechanism to use\n"); if (!strcasecmp(prot, "imap")) printf(" (\"login\" for IMAP LOGIN)\n"); else if (!strcasecmp(prot, "pop3")) printf(" (\"user\" for USER/PASS, \"apop\" for APOP)\n"); else if (!strcasecmp(prot, "nntp")) printf(" (\"user\" for AUTHINFO USER/PASS\n"); printf(" -f file : pipe file into connection after authentication\n"); printf(" -r realm : realm\n"); #ifdef HAVE_SSL if (!strcasecmp(prot, "imap") || !strcasecmp(prot, "pop3") || !strcasecmp(prot, "nntp") || !strcasecmp(prot, "smtp")) printf(" -s : Enable %s over SSL (%ss)\n", prot, prot); if (strcasecmp(prot, "mupdate")) printf(" -t file : Enable TLS. file has the TLS public and private keys\n" " (specify \"\" to not use TLS for authentication)\n"); #endif /* HAVE_SSL */ #ifdef HAVE_ZLIB if (!strcasecmp(prot, "imap") || !strcasecmp(prot, "mupdate") || !strcasecmp(prot, "csync")) { printf(" -q : Enable %s COMPRESSion" " (before last authentication attempt)\n", prot); } #endif /* HAVE_ZLIB */ printf(" -c : enable challenge prompt callbacks\n" " (enter one-time password instead of secret pass-phrase)\n"); printf(" -n : number of auth attempts (default=1)\n"); printf(" -I file : output my PID to (file) (useful with -X)\n"); printf(" -x file : open the named socket for the interactive portion\n"); printf(" -X file : same as -X, except close all file descriptors & dameonize\n"); exit(1); } static struct protocol_t protocols[] = { { "imap", "imaps", "imap", 1, /* LOGIN available until LOGINDISABLED */ { 1, NULL, NULL }, { "C01 CAPABILITY", "C01 ", " STARTTLS", " LOGINDISABLED", " AUTH=", " COMPRESS=DEFLATE", &imap_parse_mechlist }, { "S01 STARTTLS", "S01 OK", "S01 NO", 0 }, { "A01 AUTHENTICATE", 0, /* no init resp until SASL-IR advertised */ 0, "A01 OK", "A01 NO", "+ ", "*", NULL, 0 }, { "Z01 COMPRESS DEFLATE", "Z01 OK", "Z01 NO" }, &imap_do_auth, { "Q01 LOGOUT", "Q01 " }, &imap_init_conn, &generic_pipe, &imap_reset }, { "pop3", "pop3s", "pop", 0, /* USER unavailable until advertised */ { 0, "+OK", &pop3_parse_banner }, { "CAPA", ".", "STLS", "USER", "SASL ", NULL, NULL }, { "STLS", "+OK", "-ERR", 0 }, { "AUTH", 255, 0, "+OK", "-ERR", "+ ", "*", NULL, 0 }, { NULL, NULL, NULL, }, &pop3_do_auth, { "QUIT", "+OK" }, NULL, NULL, NULL }, { "nntp", "nntps", "nntp", 0, /* AUTHINFO USER unavail until advertised */ { 0, "20", NULL }, { "CAPABILITIES", ".", "STARTTLS", "AUTHINFO USER", "SASL ", NULL, NULL }, { "STARTTLS", "382", "580", 0 }, { "AUTHINFO SASL", 512, 0, "28", "48", "383 ", "*", &nntp_parse_success, 0 }, { NULL, NULL, NULL, }, &nntp_do_auth, { "QUIT", "205" }, NULL, NULL, NULL }, { "lmtp", NULL, "lmtp", 0, { 0, "220 ", NULL }, { "LHLO lmtptest", "250 ", "STARTTLS", NULL, "AUTH ", NULL, NULL }, { "STARTTLS", "220", "454", 0 }, { "AUTH", 512, 0, "235", "5", "334 ", "*", NULL, 0 }, { NULL, NULL, NULL, }, &xmtp_do_auth, { "QUIT", "221" }, &xmtp_init_conn, &generic_pipe, &xmtp_reset }, { "smtp", "smtps", "smtp", 0, { 0, "220 ", NULL }, { "EHLO smtptest", "250 ", "STARTTLS", NULL, "AUTH ", NULL, NULL }, { "STARTTLS", "220", "454", 0 }, { "AUTH", 512, 0, "235", "5", "334 ", "*", NULL, 0 }, { NULL, NULL, NULL, }, &xmtp_do_auth, { "QUIT", "221" }, &xmtp_init_conn, &generic_pipe, &xmtp_reset }, { "mupdate", NULL, "mupdate", 0, { 1, "* OK", NULL }, { NULL , "* OK", "* STARTTLS", NULL, "* AUTH ", "* COMPRESS \"DEFLATE\"", NULL }, { "S01 STARTTLS", "S01 OK", "S01 NO", 1 }, { "A01 AUTHENTICATE", USHRT_MAX, 1, "A01 OK", "A01 NO", "", "*", NULL, 0 }, { "Z01 COMPRESS \"DEFLATE\"", "Z01 OK", "Z01 NO" }, NULL, { "Q01 LOGOUT", "Q01 " }, NULL, NULL, NULL }, { "sieve", NULL, SIEVE_SERVICE_NAME, 0, { 1, "OK", NULL }, { "CAPABILITY", "OK", "\"STARTTLS\"", NULL, "\"SASL\" ", NULL, NULL }, { "STARTTLS", "OK", "NO", 1 }, { "AUTHENTICATE", USHRT_MAX, 1, "OK", "NO", NULL, "*", &sieve_parse_success, 1 }, { NULL, NULL, NULL, }, NULL, { "LOGOUT", "OK" }, NULL, NULL, NULL }, { "csync", NULL, "csync", 0, { 1, "* OK", NULL }, { NULL , "* OK", "* STARTTLS", NULL, "* SASL ", "* COMPRESS DEFLATE", NULL }, { "STARTTLS", "OK", "NO", 1 }, { "AUTHENTICATE", USHRT_MAX, 0, "OK", "NO", "+ ", "*", NULL, 0 }, { "COMPRESS DEFLATE", "OK", "NO" }, NULL, { "EXIT", "OK" }, NULL, NULL, NULL }, { NULL, NULL, NULL, 0, { 0, NULL, NULL }, { NULL, NULL, NULL, NULL, NULL, NULL, NULL }, { NULL, NULL, NULL, 0 }, { NULL, 0, 0, NULL, NULL, NULL, NULL, NULL, 0 }, { NULL, NULL, NULL, }, NULL, { NULL, NULL }, NULL, NULL, NULL } }; int main(int argc, char **argv) { struct protocol_t *protocol; char *mechanism = NULL; char servername[1024]; char *filename=NULL; char *mechlist = NULL; unsigned ext_ssf = 0; const void *ssfp; sasl_ssf_t ssf; int maxssf = 128; int minssf = 0; int c; int result; int errflg = 0; char *prog; char *tls_keyfile=""; char *port = "", *prot = ""; int run_stress_test=0; int dotls=0, dossl=0, docompress=0; unsigned long capabilities = 0; char str[1024]; const char *pidfile = NULL; void *rock = NULL; int reauth = 1; int dochallenge = 0, noinitresp = 0; char *val; struct stringlist *cur, *cur_next; if (!construct_hash_table(&confighash, CONFIGHASHSIZE, 1)) { imtest_fatal("could not construct config hash table"); } /* do not buffer */ setbuf(stdin, NULL); setbuf(stdout, NULL); setbuf(stderr, NULL); prog = strrchr(argv[0], '/') ? strrchr(argv[0], '/')+1 : argv[0]; /* look at all the extra args */ while ((c = getopt(argc, argv, "P:qscizvk:l:p:u:a:m:f:r:t:n:I:x:X:w:o:?h")) != EOF) switch (c) { case 'P': prot = optarg; break; case 'q': #ifdef HAVE_ZLIB docompress=1; #else imtest_fatal("imtest was not compiled with zlib support\n"); #endif break; case 's': #ifdef HAVE_SSL dossl=1; #else imtest_fatal("imtest was not compiled with SSL/TLS support\n"); #endif break; case 'c': dochallenge=1; break; case 'i': noinitresp=1; break; case 'z': run_stress_test=1; break; case 'v': verbose=1; break; case 'k': minssf=atoi(optarg); break; case 'l': maxssf=atoi(optarg); break; case 'p': port = optarg; break; case 'u': username = optarg; break; case 'a': authname = optarg; break; case 'w': cmdline_password = optarg; break; case 'm': mechanism=optarg; break; case 'f': if(output_socket) imtest_fatal("cannot pipe a file when using unix domain socket output"); filename=optarg; break; case 'r': realm=optarg; break; case 't': #ifdef HAVE_SSL dotls=1; tls_keyfile=optarg; #else imtest_fatal("imtest was not compiled with SSL/TLS support\n"); #endif break; case 'n': reauth = atoi(optarg); if (reauth <= 0) imtest_fatal("number of auth attempts must be > 0\n"); break; case 'I': pidfile = optarg; break; case 'X': case 'x': if(filename) imtest_fatal("cannot pipe a file when using unix domain socket output"); if(output_socket) imtest_fatal("cannot specify both -X and -x"); output_socket = optarg; if(c == 'X'){ /* close all already-open file descriptors that are * not stdin/stdout/stderr */ int i, dsize = getdtablesize(); /* close all file descriptors */ for(i=0; iprotocol && strcasecmp(prot, protocol->protocol)) protocol++; if (!protocol->protocol) imtest_fatal("unknown protocol\n"); if (dossl && !protocol->sprotocol) imtest_fatal("protocol cannot be SSL-wrapped\n"); if (run_stress_test && strcmp(protocol->protocol, "imap")) imtest_fatal("stress test can only be run for IMAP\n"); if (errflg) { usage(prog, protocol->protocol); } if (!*port) { if (dossl) { port=protocol->sprotocol; } else { port=protocol->protocol; } } /* last arg is server name */ if (optind < argc) strncpy(servername, argv[optind], 1023); else { fprintf(stderr, "WARNING: no hostname supplied, assuming localhost\n\n"); strncpy(servername, "localhost", 1023); } if(pidfile) { FILE *pf; pf = fopen(pidfile, "w"); if(!pf) { fprintf(stderr, "could not open %s for writing\n",pidfile); perror("error"); exit(1); } fprintf(pf, "%d", getpid()); fclose(pf); } /* attempt to start sasl */ if (sasl_client_init(callbacks+(!dochallenge ? 2 : 0)) != IMTEST_OK) { imtest_fatal("SASL initialization"); } conn = NULL; do { if (conn) { /* send LOGOUT */ logout(&protocol->logout_cmd, 1); printf("Connection closed.\n\n"); prot_free(pin); prot_free(pout); #ifdef HAVE_SSL /* Properly shutdown TLS so that session can be reused */ if (tls_conn) { SSL_shutdown(tls_conn); SSL_set_shutdown(tls_conn, SSL_SENT_SHUTDOWN|SSL_RECEIVED_SHUTDOWN); } #endif close(sock); sasl_dispose(&conn); } if (init_net(servername, port) != IMTEST_OK) { imtest_fatal("Network initialization - cannot connect to %s:%s", servername, port); } if (init_sasl(protocol->service, servername, minssf, maxssf, protocol->sasl_cmd.parse_success ? SASL_SUCCESS_DATA : 0) != IMTEST_OK) { imtest_fatal("SASL initialization"); } /* set up the prot layer */ pin = prot_new(sock, 0); pout = prot_new(sock, 1); #ifdef HAVE_SSL if (dossl==1) { do_starttls(1, "", &ext_ssf); } #endif /* HAVE_SSL */ if (protocol->banner.is_capa) { /* try to get the capabilities from the banner */ mechlist = ask_capability(protocol, &capabilities, AUTO_BANNER); if (!mechlist && !(capabilities & CAPA_STARTTLS)) { /* found no capabilities in banner -> get them explicitly */ protocol->banner.is_capa = 0; } } else { do { /* look for the banner response */ if (prot_fgets(str, sizeof(str), pin) == NULL) { imtest_fatal("prot layer failure"); } printf("S: %s", str); /* parse it if need be */ if (protocol->banner.parse_banner) rock = protocol->banner.parse_banner(str); } while (strncasecmp(str, protocol->banner.resp, strlen(protocol->banner.resp))); } if (!protocol->banner.is_capa) { mechlist = ask_capability(protocol, &capabilities, AUTO_NO); } #ifdef HAVE_SSL if ((dossl==0) && (dotls==1) && (capabilities & CAPA_STARTTLS)) { char *resp; printf("C: %s\r\n", protocol->tls_cmd.cmd); prot_printf(pout, "%s\r\n", protocol->tls_cmd.cmd); prot_flush(pout); resp = waitfor(protocol->tls_cmd.ok, protocol->tls_cmd.fail, 1); if (!strncasecmp(resp, protocol->tls_cmd.ok, strlen(protocol->tls_cmd.ok))) { do_starttls(0, tls_keyfile, &ext_ssf); /* ask for the capabilities again */ if (verbose==1) printf("Asking for capabilities again " "since they might have changed\n"); if (mechlist) free(mechlist); mechlist = ask_capability(protocol, &capabilities, protocol->tls_cmd.auto_capa); } } else if ((dotls==1) && !(capabilities & CAPA_STARTTLS)) { imtest_fatal("STARTTLS not supported by the server!\n"); } #endif /* HAVE_SSL */ #ifdef HAVE_ZLIB if ((reauth == 1) && (docompress==1) && (capabilities & CAPA_COMPRESS)) { char *resp; printf("C: %s\r\n", protocol->compress_cmd.cmd); prot_printf(pout, "%s\r\n", protocol->compress_cmd.cmd); prot_flush(pout); resp = waitfor(protocol->compress_cmd.ok, protocol->compress_cmd.fail, 1); if (!strncasecmp(resp, protocol->compress_cmd.ok, strlen(protocol->compress_cmd.ok))) { prot_setcompress(pin); prot_setcompress(pout); } } #endif /* HAVE_ZLIB */ if (noinitresp) { /* don't use an initial response, even if its supported */ protocol->sasl_cmd.maxlen = 0; } if (protocol->do_auth) result = protocol->do_auth(&protocol->sasl_cmd, rock, capabilities & CAPA_LOGIN, mechanism, mechlist); else { if (mechanism) { result = auth_sasl(&protocol->sasl_cmd, mechanism); } else if (mechlist) { result = auth_sasl(&protocol->sasl_cmd, mechlist); } else { result = IMTEST_FAIL; } } if (rock) free(rock); if (result == IMTEST_OK) { printf("Authenticated.\n"); /* turn on layer if need be */ prot_setsasl(pin, conn); prot_setsasl(pout, conn); } else { const char *s = sasl_errstring(result, NULL, NULL); fprintf(stderr, "Authentication failed. %s\n", s); if (output_socket) { /* send LOGOUT and exit */ logout(&protocol->logout_cmd, 0); exit(1); } } result = sasl_getprop(conn, SASL_SSF, &ssfp); ssf = *((sasl_ssf_t *) ssfp); if (result != SASL_OK) { printf("SSF: unable to determine (SASL ERROR %d)\n", result); } else { printf("Security strength factor: %d\n", ext_ssf + ssf); if (ssf) { /* ask for the capabilities again */ char *new_mechlist; if (verbose==1) printf("Asking for capabilities again " "since they might have changed\n"); if (!strcmp(protocol->protocol, "sieve")) { /* XXX Hack to handle ManageSieve servers. * No way to tell from protocol if server will * automatically send capabilities, so we treat it * as optional. */ char ch; /* wait and probe for possible auto-capability response*/ usleep(250000); prot_NONBLOCK(pin); if ((ch = prot_getc(pin)) != EOF) { prot_ungetc(ch, pin); } else { protocol->sasl_cmd.auto_capa = 0; } prot_BLOCK(pin); } new_mechlist = ask_capability(protocol, &capabilities, protocol->sasl_cmd.auto_capa); if (new_mechlist && strcmp(new_mechlist, mechlist)) { printf("WARNING: possible MITM attack: " "list of available SASL mechanisms changed\n"); free(new_mechlist); } } } if (mechlist) free(mechlist); } while (--reauth); if (run_stress_test == 1) { send_recv_test(); } else { /* else run in interactive mode or pipe in a filename if applicable */ interactive(protocol, filename); } for (cur = strlist_head; cur; cur = cur_next) { cur_next = cur->next; free(cur->str); free(cur); } free_hash_table(&confighash, free); exit(0); } cyrus-imapd-2.4.18/imtest/.cvsignore0000644000175000017500000000003712546374065016332 0ustar ellieellieMakefile makedepend.log imtest cyrus-imapd-2.4.18/imtest/Makefile.in0000644000175000017500000000710412546374065016401 0ustar ellieellie# Makefile for imtest # # @configure_input@ # # Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # # 3. The name "Carnegie Mellon University" must not be used to # endorse or promote products derived from this software without # prior written permission. For permission or any legal # details, please contact # Carnegie Mellon University # Center for Technology Transfer and Enterprise Creation # 4615 Forbes Avenue # Suite 302 # Pittsburgh, PA 15213 # (412) 268-7393, fax: (412) 268-7395 # innovation@andrew.cmu.edu # # 4. Redistributions of any form whatsoever must retain the following # acknowledgment: # "This product includes software developed by Computing Services # at Carnegie Mellon University (http://www.cmu.edu/computing/)." # # CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO # THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY # AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE # FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN # AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING # OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. # # $Id: Makefile.in,v 1.33 2010/01/06 17:01:43 murch Exp $ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ CC = @CC@ INSTALL = @INSTALL@ RANLIB = @RANLIB@ DEFS = @DEFS@ @LOCALDEFS@ CPPFLAGS = -I.. -I$(srcdir)/../lib @COM_ERR_CPPFLAGS@ @CPPFLAGS@ @SASLFLAGS@ LIBS = @LIBS@ IMAP_LIBS = @IMAP_LIBS@ @LIB_RT@ DEPLIBS = ../lib/libcyrus.a ../lib/libcyrus_min.a @DEPLIBS@ CFLAGS = @CFLAGS@ LDFLAGS = @LDFLAGS@ @COM_ERR_LDFLAGS@ SHELL = /bin/sh MAKEDEPEND = @MAKEDEPEND@ PURIFY=/usr/local/bin/purify PUREOPT= -best-effort -windows=no -logfile=/tmp/pure/%v.%p.log -always_use_cache_dir prefix = @prefix@ exec_prefix = @exec_prefix@ cyrus_prefix = @cyrus_prefix@ all: imtest install: $(INSTALL) -s -m 755 imtest $(DESTDIR)$(exec_prefix)/bin ln -f $(DESTDIR)$(exec_prefix)/bin/imtest $(DESTDIR)$(exec_prefix)/bin/pop3test ln -f $(DESTDIR)$(exec_prefix)/bin/imtest $(DESTDIR)$(exec_prefix)/bin/nntptest ln -f $(DESTDIR)$(exec_prefix)/bin/imtest $(DESTDIR)$(exec_prefix)/bin/lmtptest ln -f $(DESTDIR)$(exec_prefix)/bin/imtest $(DESTDIR)$(exec_prefix)/bin/smtptest ln -f $(DESTDIR)$(exec_prefix)/bin/imtest $(DESTDIR)$(exec_prefix)/bin/mupdatetest ln -f $(DESTDIR)$(exec_prefix)/bin/imtest $(DESTDIR)$(exec_prefix)/bin/sivtest ln -f $(DESTDIR)$(exec_prefix)/bin/imtest $(DESTDIR)$(exec_prefix)/bin/synctest .c.o: $(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) $< imtest: imtest.o $(DEPLIBS) $(CC) $(LDFLAGS) -o imtest imtest.o $(DEPLIBS) $(IMAP_LIBS) imtest.pure: imtest.o $(DEPLIBS) $(PURIFY) $(PUREOPT) $(CC) $(LDFLAGS) -o imtest $(OBJS) $(DEPLIBS) $(LIBS) $(IMAP_LIBS) clean: rm -f *.o Makefile.bak makedepend.log imtest distclean: clean rm -f Makefile depend: ${MAKEDEPEND} $(CPPFLAGS) $(DEFS) $(CFLAGS) *.c $(srcdir)/*.c 1> makedepend.log 2>&1 # DO NOT DELETE THIS LINE -- make depend depends on it. cyrus-imapd-2.4.18/SIEVE/0000755000175000017500000000000012546374065013700 5ustar ellieelliecyrus-imapd-2.4.18/SIEVE/scripts/0000755000175000017500000000000012546374065015367 5ustar ellieelliecyrus-imapd-2.4.18/SIEVE/scripts/sieveshell.pl0000644000175000017500000000616012546374065020072 0ustar ellieellieuse SIEVE::managesieve; use Getopt::Long; $ret = GetOptions("a|authname:s", "u|username:s", "r|realm:s", "e|exec:s" ); if (!$ret || $#ARGV != 0) { show_help(); exit; } $acapserver = $ARGV[0]; $username = $opt_u; $authname = $opt_a; $realm = $opt_r; $exec = $opt_e; if (defined $exec) { $tmpfile = "/tmp/sieveshell.tmp"; open (TMP,">$tmpfile") || die "Unable to open tmp file"; print TMP $exec; close(TMP); open (TMP,"<$tmpfile") || die "Unable to open tmp file"; unlink($tmpfile); $filehandle = *TMP; } else { $filehandle = *STDIN; $interactive = 1; } sub list_cb { my($name, $isactive) = @_ ; print "$name "; if ($isactive == 1) { print " <- active script\n"; } else { print "\n"; } } sub prompt { my($type, $prompt) = @_ ; if (($type eq "username") && (defined $username)) { $username; return; } elsif (($type eq "authname") && (defined $authname)) { $authname; return; } elsif (($type eq "realm") && (defined $realm)) { $realm; return; } print "$prompt: "; $b = ; chop($b); $b; } sub show_help { print "Usage:\n"; print " sieveshell [-u username][-a authname][-r realm] \n"; print "\n"; print "help - this screen\n"; print "list - list scripts on server\n"; print "put - upload script to server (implicitly set active if no active script)\n"; print "get [] - get script. if no filename display to stdout\n"; print "delete - delete script.\n"; print "activate - set a script as the active script\n"; print "quit - Quit\n"; } # main code my $obj = sieve_get_handle($acapserver,"prompt","prompt","prompt","prompt"); if (!defined $obj) { die "Unable to connect to server"; } if ($interactive == 1) { print "> "; } while(<$filehandle>) { @words = split ' ',$_; if (($words[0] eq "put") || ($words[0] eq "p")) { $ret = sieve_put_file($obj, $words[1]); if ($ret != 0) { print "Upload failed\n"; } } elsif (($words[0] eq "list") || ($words[0] eq "l") || ($words[0] eq "ls")) { $ret = sieve_list($obj, "list_cb"); if ($ret != 0) { print "List command failed\n"; } } elsif (($words[0] eq "activate") || ($words[0] eq "a")) { $ret = sieve_activate($obj, $words[1]); if ($ret != 0) { print "Activate failed\n"; } } elsif (($words[0] eq "delete") || ($words[0] eq "d")) { $ret = sieve_delete($obj, $words[1]); if ($ret != 0) { print "Delete failed\n"; } } elsif (($words[0] eq "get") || ($words[0] eq "g")) { $ret = sieve_get($obj, $words[1], $str); if ($ret != 0) { print "get failed\n"; } else { if ($words[2]) { open (OUTPUT,">$words[2]") || die "Unable to open $words[2]"; print OUTPUT $str; close(OUTPUT); } else { print $str; } } } elsif (($words[0] eq "quit") || ($words[0] eq "q")) { exit 0; } elsif (($words[0] eq "help") || ($words[0] eq "?")) { show_help(); } else { print "Invalid command: $words[0]\n"; } if ($interactive == 1) { print "> "; } } cyrus-imapd-2.4.18/depot/0000755000175000017500000000000012546374065014140 5ustar ellieelliecyrus-imapd-2.4.18/depot/depot.conf0000644000175000017500000000062112546374065016121 0ustar ellieellieusr/local / usr/cyrus root.server/usr/cyrus etc root.server/etc ~delete lib/perl5/5.6.1/perllocal.pod ~delete lib/perl5/5.8.6/i686-linux-thread-multi-64int-ld/perllocal.pod ~delete lib/perl5/5.8.6/i686-linux/perllocal.pod ~delete lib/perl5/5.8.6/sparc-solaris-thread-multi-64int-ld/perllocal.pod ~delete lib/perl5/5.8.6/sparc-solaris/perllocal.pod ~delete lib/perl5/5.8.6/sun4-solaris/perllocal.pod cyrus-imapd-2.4.18/depot/.cvsignore0000644000175000017500000000001112546374065016130 0ustar ellieellieMakefile cyrus-imapd-2.4.18/depot/Makefile.in0000644000175000017500000000540312546374065016207 0ustar ellieellie# Makefile for CMU local support # # @configure_input@ # # Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # # 3. The name "Carnegie Mellon University" must not be used to # endorse or promote products derived from this software without # prior written permission. For permission or any legal # details, please contact # Carnegie Mellon University # Center for Technology Transfer and Enterprise Creation # 4615 Forbes Avenue # Suite 302 # Pittsburgh, PA 15213 # (412) 268-7393, fax: (412) 268-7395 # innovation@andrew.cmu.edu # # 4. Redistributions of any form whatsoever must retain the following # acknowledgment: # "This product includes software developed by Computing Services # at Carnegie Mellon University (http://www.cmu.edu/computing/)." # # CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO # THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY # AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE # FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN # AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING # OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. # # $Id: Makefile.in,v 1.9 2010/01/06 17:01:28 murch Exp $ srcdir = @srcdir@ VPATH = @srcdir@ CC = @CC@ INSTALL = @INSTALL@ RANLIB = @RANLIB@ DEFS = @DEFS@ CPPFLAGS = -I. -I$(srcdir) -I$(srcdir)/../lib -I$(srcdir)/../et @CPPFLAGS@ LIBS = @LIBS@ DEPLIBS = ../lib/libcyrus.a ../lib/libcyrus_min.a @DEPLIBS@ CFLAGS = @CFLAGS@ LDFLAGS = @LDFLAGS@ SHELL = /bin/sh MAKEDEPEND = @MAKEDEPEND@ prefix = @prefix@ exec_prefix = @exec_prefix@ cyrus_prefix = @cyrus_prefix@ all: install: $(srcdir)/../install-sh -d ${DESTDIR}/etc $(INSTALL) -m 644 $(srcdir)/depot.conf $(DESTDIR) $(INSTALL) -m 644 $(srcdir)/rc.local.imap $(DESTDIR)/etc $(INSTALL) -m 644 $(srcdir)/rc.local.ptclient $(DESTDIR)/etc .c.o: $(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) $< clean: rm -f *.o Makefile.bak makedepend.log distclean: clean rm -f Makefile depend: ${MAKEDEPEND} $(CPPFLAGS) $(DEFS) $(CFLAGS) *.c $(srcdir)/*.c \ 1>makedepend.log 2>&1 # DO NOT DELETE THIS LINE -- make depend depends on it. cyrus-imapd-2.4.18/depot/rc.local.imap0000644000175000017500000000021312546374065016501 0ustar ellieellie#!/bin/sh if [ -d /tmpfs ]; then mkdir /tmpfs/proc chown cyrus /tmpfs/proc fi echo "starting Cyrus system..." /usr/cyrus/bin/master & cyrus-imapd-2.4.18/depot/rc.local.ptclient0000644000175000017500000000051112546374065017376 0ustar ellieellie#!/bin/sh echo -n "Starting ptclient" > /dev/console ptscache="/var/ptclient/ptscache.db" /usr/local/bin/db_load -T -t hash -f /dev/null $ptscache touch $ptscache chown cyrus $ptscache chgrp mail $ptscache chmod 660 $ptscache /bin/su postman -c 'exec /usr/cyrus/bin/doptclient' > /dev/console 2>&1 & echo "." > /dev/console cyrus-imapd-2.4.18/README.andrew0000644000175000017500000000724112546374065015170 0ustar ellieellie#!/bin/sh # # This is internal documentation for Computing Services at # Carnegie Mellon University. # # Please refer to doc/readme.html for the 'real' README. # # smake -d init mf checkdepend all install exit 0 "configure" is no longer in the repository because it's built from "configure.in", and it's really annoying to keep checking it in only to realize that you don't understand the changes because they're all autoconf spew. to build configure: sh SMakefile to build: smake init all then, as admin (suid binaries on AFS) smake -d install If you get the error 'can not find sources', make sure imap/imap.c is mode a+r. ---- To make a release: - make sure the version number is correct (Makefile.in, imap/version.h) - add upgrade notes to doc/install-upgrade.html - add changes to doc/changes.html - make sure that contrib/drac_auth.patch applies cleanly - commit to repository - make dist - tag the CVS repository with cyrus-release-Major-Minor-Revision - upload tarball to /afs/andrew.cmu.edu/system/archive/cmu/anonftp/pub/cyrus - announce to: info-cyrus comp.mail.imap cyrus-announce freshmeat.net - update cyrusimap.web.cmu.edu:/usr/www/htdocs/downloads.html links to new version - update cyrusimap.web.cmu.edu:/usr/www/htdocs/imapd from tarball --- to bring up a new Andrew Cyrus server: package.protos for: a) backend server %define cyrus21 %define sasl2 %define is_imap %define is_backend %define is_saslauthd %define usesvxfs %define multiple_lun %define hasuser.permits F /etc/user.permits %define hasroot.permits F /etc/root.permits %include /afs/andrew.cmu.edu/wsadmin/cyrus2/src/cyrus.proto b) frontend server %define cyrus21 %define sasl2 %define uses_readwrite %define wsadmin /afs/.andrew.cmu.edu/wsadmin %define is_imap %define is_saslauthd %define is_frontend %include /afs/andrew.cmu.edu/wsadmin/cyrus2/src/cyrus.proto c) smtp server ???? - Larry? ---- Repackage, Reboot, (and redepot/repackage again) - Key the machine (imap, lmtp, smtp, pop, and put them in /imap/conf/srvtab) - remove the rcmd (and smtp?) key from /imap/conf/srvtab - frontends also need mupdate key - create k5 keys: /usr/local/etc/ktutil srv2key chgrp cyrus /etc/krb5.keytab chmod g+r /etc/krb5.keytab - Generate an SSL key for the machine and install to /imap/conf/server.pem (preferrably signed correctly) Something like: mail-fe3:sun4x_58:/imap/conf# openssl req -new -x509 -nodes -out /imap/conf/serv er.pem -keyout /imap/conf/server.pem Using configuration from /usr/local/lib/openssl/openssl.cnf Generating a 1024 bit RSA private key ............++++++ ..........++++++ writing new private key to '/imap/conf/server.pem' ----- You are about to be asked to enter information that will be incorporated into your certificate request. What you are about to enter is what is called a Distinguished Name or a DN. There are quite a few fields but you can leave some blank For some fields there will be a default value, If you enter '.', the field will be left blank. ----- Country Name (2 letter code) [AU]:US State or Province Name (full name) [Some-State]:Pennsylvania Locality Name (eg, city) []:Pittsburgh Organization Name (eg, company) [Internet Widgits Pty Ltd]:Carnegie Mellon University Organizational Unit Name (eg, section) []:Andrew Systems Group Common Name (eg, YOUR name) []:mail-fe3.andrew.cmu.edu Email Address []:advisor@andrew.cmu.edu - is it a backend? run tools/mkimap (as cyrus!) ---------------------------------------------------------------------- To use Insure++ . uncomment appropriate lines from SMakefile . copy psrc to /.psrc . make sure environment variables HOME and (maybe) USER are properly set . mkdir /tmp/insure; chmod 777 /tmp/insure cyrus-imapd-2.4.18/timsieved/0000755000175000017500000000000012546374065015016 5ustar ellieelliecyrus-imapd-2.4.18/timsieved/codes.h0000644000175000017500000000425312546374065016270 0ustar ellieellie/* codes.h -- error codes functions in timsieved may return * Tim Martin * 9/21/99 * * Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The name "Carnegie Mellon University" must not be used to * endorse or promote products derived from this software without * prior written permission. For permission or any legal * details, please contact * Carnegie Mellon University * Center for Technology Transfer and Enterprise Creation * 4615 Forbes Avenue * Suite 302 * Pittsburgh, PA 15213 * (412) 268-7393, fax: (412) 268-7395 * innovation@andrew.cmu.edu * * 4. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by Computing Services * at Carnegie Mellon University (http://www.cmu.edu/computing/)." * * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * $Id: codes.h,v 1.8 2010/01/06 17:02:01 murch Exp $ */ #ifndef _CODES_H_ #define _CODES_H_ #include "version.h" #define TIMSIEVE_OK 0 #define TIMSIEVE_FAIL -10 #define TIMSIEVE_NOMEM -2 #define TIMSIEVE_BADPORT -5 #define TIMSIEVE_NOEXIST -6 #define TRUE 1 #define FALSE 0 #define BLOCKSIZE 1024 #endif cyrus-imapd-2.4.18/timsieved/scripttest.h0000644000175000017500000000415512546374065017400 0ustar ellieellie/* scripttest.h -- test whether the sieve script is valid * Tim Martin * * Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The name "Carnegie Mellon University" must not be used to * endorse or promote products derived from this software without * prior written permission. For permission or any legal * details, please contact * Carnegie Mellon University * Center for Technology Transfer and Enterprise Creation * 4615 Forbes Avenue * Suite 302 * Pittsburgh, PA 15213 * (412) 268-7393, fax: (412) 268-7395 * innovation@andrew.cmu.edu * * 4. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by Computing Services * at Carnegie Mellon University (http://www.cmu.edu/computing/)." * * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * $Id: scripttest.h,v 1.12 2010/01/06 17:02:01 murch Exp $ */ #ifndef INCLUDE_SCRIPTTEST_H_ #define INCLUDE_SCRIPTTEST_H_ extern sieve_interp_t *interp; int build_sieve_interp(void); int is_script_parsable(FILE *f, char **errstr, sieve_script_t **ret); #endif cyrus-imapd-2.4.18/timsieved/scripttest.c0000644000175000017500000001455612546374065017401 0ustar ellieellie/* scripttest.c -- test wheather the sieve script is valid * Tim Martin * * Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The name "Carnegie Mellon University" must not be used to * endorse or promote products derived from this software without * prior written permission. For permission or any legal * details, please contact * Carnegie Mellon University * Center for Technology Transfer and Enterprise Creation * 4615 Forbes Avenue * Suite 302 * Pittsburgh, PA 15213 * (412) 268-7393, fax: (412) 268-7395 * innovation@andrew.cmu.edu * * 4. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by Computing Services * at Carnegie Mellon University (http://www.cmu.edu/computing/)." * * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * $Id: scripttest.c,v 1.26 2010/01/06 17:02:01 murch Exp $ */ #ifdef HAVE_CONFIG_H #include #endif #include "sieve_interface.h" #include "scripttest.h" #include #include "codes.h" #include "xmalloc.h" #include #include /* to make larry's stupid functions happy :) */ void foo(void) { fatal("stub function called", 0); } sieve_vacation_t vacation = { 0, /* min response */ 0, /* max response */ (sieve_callback *) &foo, /* autorespond() */ (sieve_callback *) &foo /* send_response() */ }; static int sieve_notify(void *ac __attribute__((unused)), void *interp_context __attribute__((unused)), void *script_context __attribute__((unused)), void *message_context __attribute__((unused)), const char **errmsg __attribute__((unused))) { fatal("stub function called", 0); return SIEVE_FAIL; } int mysieve_error(int lineno, const char *msg, void *i __attribute__((unused)), void *s) { char buf[1024]; char **errstr = (char **) s; snprintf(buf, 80, "line %d: %s\r\n", lineno, msg); *errstr = xrealloc(*errstr, strlen(*errstr) + strlen(buf) + 30); syslog(LOG_DEBUG, "%s", buf); strcat(*errstr, buf); return SIEVE_OK; } /* returns TRUE or FALSE */ int build_sieve_interp(void) { int res; res = sieve_interp_alloc(&interp, NULL); if (res != SIEVE_OK) { syslog(LOG_ERR, "sieve_interp_alloc() returns %d\n", res); return TIMSIEVE_FAIL; } res = sieve_register_redirect(interp, (sieve_callback *) &foo); if (res != SIEVE_OK) { syslog(LOG_ERR, "sieve_register_redirect() returns %d\n", res); return TIMSIEVE_FAIL; } res = sieve_register_discard(interp, (sieve_callback *) &foo); if (res != SIEVE_OK) { syslog(LOG_ERR, "sieve_register_discard() returns %d\n", res); return TIMSIEVE_FAIL; } res = sieve_register_reject(interp, (sieve_callback *) &foo); if (res != SIEVE_OK) { syslog(LOG_ERR, "sieve_register_reject() returns %d\n", res); return TIMSIEVE_FAIL; } res = sieve_register_fileinto(interp, (sieve_callback *) &foo); if (res != SIEVE_OK) { syslog(LOG_ERR, "sieve_register_fileinto() returns %d\n", res); return TIMSIEVE_FAIL; } res = sieve_register_keep(interp, (sieve_callback *) &foo); if (res != SIEVE_OK) { syslog(LOG_ERR, "sieve_register_keep() returns %d\n", res); return TIMSIEVE_FAIL; } res = sieve_register_imapflags(interp, NULL); if (res != SIEVE_OK) { syslog(LOG_ERR, "sieve_register_imapflags() returns %d\n", res); return TIMSIEVE_FAIL; } res = sieve_register_size(interp, (sieve_get_size *) &foo); if (res != SIEVE_OK) { syslog(LOG_ERR, "sieve_register_size() returns %d\n", res); return TIMSIEVE_FAIL; } res = sieve_register_header(interp, (sieve_get_header *) &foo); if (res != SIEVE_OK) { syslog(LOG_ERR, "sieve_register_header() returns %d\n", res); return TIMSIEVE_FAIL; } res = sieve_register_envelope(interp, (sieve_get_envelope *) &foo); if (res != SIEVE_OK) { syslog(LOG_ERR, "sieve_register_envelope() returns %d\n", res); return TIMSIEVE_FAIL; } res = sieve_register_body(interp, (sieve_get_body *) &foo); if (res != SIEVE_OK) { syslog(LOG_ERR, "sieve_register_body() returns %d\n", res); return TIMSIEVE_FAIL; } res = sieve_register_include(interp, (sieve_get_include *) &foo); if (res != SIEVE_OK) { syslog(LOG_ERR, "sieve_register_include() returns %d\n", res); return TIMSIEVE_FAIL; } res = sieve_register_vacation(interp, &vacation); if (res != SIEVE_OK) { syslog(LOG_ERR, "sieve_register_vacation() returns %d\n", res); return TIMSIEVE_FAIL; } res = sieve_register_notify(interp, &sieve_notify); if (res != SIEVE_OK) { syslog(LOG_ERR, "sieve_register_notify() returns %d\n", res); return TIMSIEVE_FAIL; } res = sieve_register_parse_error(interp, &mysieve_error); if (res != SIEVE_OK) { syslog(LOG_ERR, "sieve_register_parse_error() returns %d\n", res); return TIMSIEVE_FAIL; } return TIMSIEVE_OK; } /* returns TRUE or FALSE */ int is_script_parsable(FILE *stream, char **errstr, sieve_script_t **ret) { sieve_script_t *s; int res; rewind(stream); *errstr = (char *) xmalloc(20 * sizeof(char)); strcpy(*errstr, "script errors:\r\n"); res = sieve_script_parse(interp, stream, errstr, &s); if (res == SIEVE_OK) { if(ret) { *ret = s; } else { sieve_script_free(&s); } free(*errstr); *errstr = NULL; } return (res == SIEVE_OK) ? TIMSIEVE_OK : TIMSIEVE_FAIL; } cyrus-imapd-2.4.18/timsieved/timsieved.c0000644000175000017500000002535612546374065017166 0ustar ellieellie/* timsieved.c -- main file for timsieved (sieve script accepting program) * Tim Martin * 9/21/99 * * Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The name "Carnegie Mellon University" must not be used to * endorse or promote products derived from this software without * prior written permission. For permission or any legal * details, please contact * Carnegie Mellon University * Center for Technology Transfer and Enterprise Creation * 4615 Forbes Avenue * Suite 302 * Pittsburgh, PA 15213 * (412) 268-7393, fax: (412) 268-7395 * innovation@andrew.cmu.edu * * 4. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by Computing Services * at Carnegie Mellon University (http://www.cmu.edu/computing/)." * * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * $Id: timsieved.c,v 1.65 2010/01/06 17:02:01 murch Exp $ */ #ifdef HAVE_CONFIG_H #include #endif #include /* yay! sasl */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "sieve_interface.h" #include "prot.h" #include "libconfig.h" #include "xmalloc.h" #include "exitcodes.h" #include "iptostring.h" #include "global.h" #include "codes.h" #include "actions.h" #include "parser.h" #include "lex.h" #include "mystring.h" #include "auth.h" #include "acl.h" #include "backend.h" #include "mboxlist.h" #include "proxy.h" #include "util.h" #include "xstrlcat.h" #include "xstrlcpy.h" #include "scripttest.h" #include "sync_log.h" /* global state */ const int config_need_data = 0; sieve_interp_t *interp = NULL; static struct { char *ipremoteport; char *iplocalport; } saslprops = {NULL,NULL}; sasl_conn_t *sieved_saslconn; /* the sasl connection context */ struct auth_state *sieved_authstate = 0; struct sockaddr_storage sieved_localaddr; struct sockaddr_storage sieved_remoteaddr; int sieved_timeout; struct protstream *sieved_out; struct protstream *sieved_in; int sieved_logfd = -1; int sieved_haveaddr = 0; char sieved_clienthost[NI_MAXHOST*2+1] = "[local]"; int sieved_userisadmin; int sieved_domainfromip = 0; /* the sasl proxy policy context */ static struct proxy_context sieved_proxyctx = { 1, 1, &sieved_authstate, &sieved_userisadmin, NULL }; /* PROXY stuff */ struct backend *backend = NULL; static void bitpipe(void); /* end PROXY stuff */ /* * Cleanly shut down and exit */ void shut_down(int code) __attribute__ ((noreturn)); void shut_down(int code) { /* free interpreter */ if (interp) sieve_interp_free(&interp); /* close backend connection */ if (backend) { backend_disconnect(backend); free(backend); } /* close mailboxes */ mboxlist_close(); mboxlist_done(); /* cleanup */ if (sieved_out) { prot_flush(sieved_out); prot_free(sieved_out); } if (sieved_in) prot_free(sieved_in); if (sieved_logfd != -1) close(sieved_logfd); #ifdef HAVE_SSL tls_shutdown_serverengine(); #endif cyrus_done(); cyrus_reset_stdio(); /* done */ exit(code); } void cmdloop() { int ret = FALSE; if (chdir("/tmp/")) { syslog(LOG_ERR, "Failed to chdir to /tmp/"); ret = TRUE; /* exit immediately */ } capabilities(sieved_out, sieved_saslconn, 0, 0, 0); /* initialize lexer */ lex_init(); while (ret != TRUE) { if (backend) { /* create a pipe from client to backend */ bitpipe(); /* pipe has been closed */ return; } ret = parser(sieved_out, sieved_in); } sync_log_done(); /* done */ shut_down(0); } void printstring(const char *s __attribute__((unused))) { /* needed to link against annotate.o */ fatal("printstring() executed, but its not used for timsieved!", EC_SOFTWARE); } void fatal(const char *s, int code) { static int recurse_code = 0; if (recurse_code) { /* We were called recursively. Just give up */ exit(recurse_code); } recurse_code = code; prot_printf(sieved_out, "NO Fatal error: %s\r\n", s); prot_flush(sieved_out); shut_down(EC_TEMPFAIL); } static struct sasl_callback mysasl_cb[] = { { SASL_CB_GETOPT, (mysasl_cb_ft *) &mysasl_config, NULL }, { SASL_CB_PROXY_POLICY, (mysasl_cb_ft *) &mysasl_proxy_policy, (void*) &sieved_proxyctx }, { SASL_CB_CANON_USER, (mysasl_cb_ft *) &mysasl_canon_user, (void*) &sieved_domainfromip }, { SASL_CB_LIST_END, NULL, NULL } }; int service_init(int argc __attribute__((unused)), char **argv __attribute__((unused)), char **envp __attribute__((unused))) { global_sasl_init(1, 1, mysasl_cb); /* open mailboxes */ mboxlist_init(0); mboxlist_open(NULL); if (build_sieve_interp() != TIMSIEVE_OK) shut_down(EX_SOFTWARE); return 0; } /* Called by service API to shut down the service */ void service_abort(int error) { shut_down(error); } int service_main(int argc __attribute__((unused)), char **argv __attribute__((unused)), char **envp __attribute__((unused))) { socklen_t salen; char remoteip[60], localip[60]; sasl_security_properties_t *secprops = NULL; char hbuf[NI_MAXHOST]; int niflags; sync_log_init(); /* set up the prot streams */ sieved_in = prot_new(0, 0); sieved_out = prot_new(1, 1); sieved_timeout = config_getint(IMAPOPT_TIMEOUT); if (sieved_timeout < 10) sieved_timeout = 10; sieved_timeout *= 60; prot_settimeout(sieved_in, sieved_timeout); prot_setflushonread(sieved_in, sieved_out); signal(SIGPIPE, SIG_IGN); if (geteuid() == 0) fatal("must run as the Cyrus user", -6); /* Find out name of client host */ salen = sizeof(sieved_remoteaddr); if (getpeername(0, (struct sockaddr *)&sieved_remoteaddr, &salen) == 0 && (sieved_remoteaddr.ss_family == AF_INET || sieved_remoteaddr.ss_family == AF_INET6)) { if (getnameinfo((struct sockaddr *)&sieved_remoteaddr, salen, hbuf, sizeof(hbuf), NULL, 0, NI_NAMEREQD) == 0) { strncpy(sieved_clienthost, hbuf, sizeof(hbuf)); } else { sieved_clienthost[0] = '\0'; } niflags = NI_NUMERICHOST; #ifdef NI_WITHSCOPEID if (((struct sockaddr *)&sieved_remoteaddr)->sa_family == AF_INET6) niflags |= NI_WITHSCOPEID; #endif if (getnameinfo((struct sockaddr *)&sieved_remoteaddr, salen, hbuf, sizeof(hbuf), NULL, 0, niflags) != 0) strlcpy(hbuf, "unknown", sizeof(hbuf)); strlcat(sieved_clienthost, "[", sizeof(sieved_clienthost)); strlcat(sieved_clienthost, hbuf, sizeof(sieved_clienthost)); strlcat(sieved_clienthost, "]", sizeof(sieved_clienthost)); salen = sizeof(sieved_localaddr); if(getsockname(0, (struct sockaddr *)&sieved_localaddr, &salen) == 0) { sieved_haveaddr = 1; } } /* other params should be filled in */ if (sasl_server_new(SIEVE_SERVICE_NAME, config_servername, NULL, NULL, NULL, NULL, SASL_SUCCESS_DATA, &sieved_saslconn) != SASL_OK) fatal("SASL failed initializing: sasl_server_new()", -1); if(iptostring((struct sockaddr *)&sieved_remoteaddr, salen, remoteip, 60) == 0) { sasl_setprop(sieved_saslconn, SASL_IPREMOTEPORT, remoteip); saslprops.ipremoteport = xstrdup(remoteip); } if(iptostring((struct sockaddr *)&sieved_localaddr, salen, localip, 60) == 0) { sasl_setprop(sieved_saslconn, SASL_IPLOCALPORT, localip); saslprops.iplocalport = xstrdup(localip); } /* will always return something valid */ secprops = mysasl_secprops(0); sasl_setprop(sieved_saslconn, SASL_SEC_PROPS, secprops); if (actions_init() != TIMSIEVE_OK) fatal("Error initializing actions",-1); cmdloop(); /* never reaches */ exit(EC_SOFTWARE); } /* Reset the given sasl_conn_t to a sane state */ int reset_saslconn(sasl_conn_t **conn, sasl_ssf_t ssf, char *authid) { int ret = 0; sasl_security_properties_t *secprops = NULL; sasl_dispose(conn); /* do initialization typical of service_main */ ret = sasl_server_new(SIEVE_SERVICE_NAME, config_servername, NULL, NULL, NULL, NULL, SASL_SUCCESS_DATA, conn); if(ret != SASL_OK) return ret; if(saslprops.ipremoteport) ret = sasl_setprop(*conn, SASL_IPREMOTEPORT, saslprops.ipremoteport); if(ret != SASL_OK) return ret; if(saslprops.iplocalport) ret = sasl_setprop(*conn, SASL_IPLOCALPORT, saslprops.iplocalport); if(ret != SASL_OK) return ret; secprops = mysasl_secprops(0); ret = sasl_setprop(*conn, SASL_SEC_PROPS, secprops); if(ret != SASL_OK) return ret; /* end of service_main initialization excepting SSF */ /* If we have TLS/SSL info, set it */ if(ssf) { ret = sasl_setprop(*conn, SASL_SSF_EXTERNAL, &ssf); if(ret != SASL_OK) return ret; } if(authid) { ret = sasl_setprop(*conn, SASL_AUTH_EXTERNAL, authid); if(ret != SASL_OK) return ret; } /* End TLS/SSL Info */ return SASL_OK; } /* we've authenticated the client, we've connected to the backend. now it's all up to them */ static void bitpipe(void) { struct protgroup *protin = protgroup_new(2); int shutdown = 0; char buf[4096]; protgroup_insert(protin, sieved_in); protgroup_insert(protin, backend->in); do { /* Flush any buffered output */ prot_flush(sieved_out); prot_flush(backend->out); /* check for shutdown file */ if (shutdown_file(buf, sizeof(buf))) { shutdown = 1; goto done; } } while (!proxy_check_input(protin, sieved_in, sieved_out, backend->in, backend->out, 0)); done: /* ok, we're done. */ protgroup_free(protin); if (shutdown) prot_printf(sieved_out, "NO \"%s\"\r\n", buf); return; } cyrus-imapd-2.4.18/timsieved/parser.c0000644000175000017500000006000212546374065016454 0ustar ellieellie/* parser.c -- parser used by timsieved * Tim Martin * 9/21/99 * * Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The name "Carnegie Mellon University" must not be used to * endorse or promote products derived from this software without * prior written permission. For permission or any legal * details, please contact * Carnegie Mellon University * Center for Technology Transfer and Enterprise Creation * 4615 Forbes Avenue * Suite 302 * Pittsburgh, PA 15213 * (412) 268-7393, fax: (412) 268-7395 * innovation@andrew.cmu.edu * * 4. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by Computing Services * at Carnegie Mellon University (http://www.cmu.edu/computing/)." * * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * $Id: parser.c,v 1.55 2010/01/06 17:02:01 murch Exp $ */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #ifdef HAVE_UNISTD_H #include #endif #include #include #include #include "libconfig.h" #include "global.h" #include "auth.h" #include "backend.h" #include "mboxname.h" #include "mboxlist.h" #include "xmalloc.h" #include "xstrlcpy.h" #include "prot.h" #include "tls.h" #include "lex.h" #include "actions.h" #include "exitcodes.h" #include "telemetry.h" extern char sieved_clienthost[250]; extern int sieved_domainfromip; extern int sieved_userisadmin; /* xxx these are both leaked, but we only handle one connection at a * time... */ extern sasl_conn_t *sieved_saslconn; /* the sasl connection context */ const char *referral_host = NULL; int authenticated = 0; int verify_only = 0; int starttls_done = 0; sasl_ssf_t sasl_ssf = 0; #ifdef HAVE_SSL /* our tls connection, if any */ static SSL *tls_conn = NULL; #endif /* HAVE_SSL */ extern int sieved_timeout; /* from elsewhere */ void fatal(const char *s, int code); extern int sieved_logfd; extern struct backend *backend; /* forward declarations */ static void cmd_logout(struct protstream *sieved_out, struct protstream *sieved_in); static int cmd_authenticate(struct protstream *sieved_out, struct protstream *sieved_in, mystring_t *mechanism_name, mystring_t *initial_challenge, const char **errmsg); static void cmd_unauthenticate(struct protstream *sieved_out, struct protstream *sieved_in); static int cmd_starttls(struct protstream *sieved_out, struct protstream *sieved_in); static char *sieve_parsesuccess(char *str, const char **status) { char *success = NULL, *tmp; if (!strncmp(str, "OK (", 4) && (tmp = strstr(str+4, "SASL \"")) != NULL) { success = tmp+6; /* skip SASL " */ tmp = strstr(success, "\""); if (tmp) *tmp = '\0'; /* clip " */ } if (status) *status = NULL; return success; } static struct protocol_t sieve_protocol = { "sieve", SIEVE_SERVICE_NAME, { 1, "OK" }, { "CAPABILITY", NULL, "OK", NULL, { { "\"SASL\" ", CAPA_AUTH }, { "\"STARTTLS\"", CAPA_STARTTLS }, { NULL, 0 } } }, { "STARTTLS", "OK", "NO", 1 }, { "AUTHENTICATE", USHRT_MAX, 1, "OK", "NO", NULL, "*", &sieve_parsesuccess, AUTO_CAPA_AUTH_SSF }, { NULL, NULL, NULL }, { NULL, NULL, NULL }, { "LOGOUT", NULL, "OK" } }; /* Returns TRUE if we are done */ int parser(struct protstream *sieved_out, struct protstream *sieved_in) { int token = EOL; const char *error_msg = "Generic Error"; mystring_t *mechanism_name = NULL; mystring_t *initial_challenge = NULL; mystring_t *sieve_name = NULL; mystring_t *sieve_data = NULL; unsigned long num; int ret = FALSE; /* get one token from the lexer */ while(token == EOL) token = timlex(NULL, NULL, sieved_in); if (!authenticated && (token > 255) && (token!=AUTHENTICATE) && (token!=LOGOUT) && (token!=CAPABILITY) && (token!=NOOP) && (!tls_enabled() || (token!=STARTTLS))) { error_msg = "Authenticate first"; if (token!=EOL) lex_setrecovering(); goto error; } if (verify_only && (token > 255) && (token!=PUTSCRIPT) && (token!=LOGOUT)) { error_msg = "Script verification only"; if (token!=EOL) lex_setrecovering(); goto error; } switch (token) { case EOF: /* timlex() will return EOF when the remote disconnects badly */ syslog(LOG_WARNING, "Lost connection to client -- exiting"); prot_printf(sieved_out, "BYE \"Shutdown TCP timeout\"\r\n"); ret = TRUE; goto done; break; case AUTHENTICATE: if (timlex(NULL, NULL, sieved_in)!=SPACE) { error_msg = "SPACE must occur after AUTHENTICATE"; goto error; } if (timlex(&mechanism_name, NULL, sieved_in)!=STRING) { error_msg = "Did not specify mechanism name"; goto error; } token = timlex(NULL, NULL, sieved_in); if (token != EOL) { /* optional client first challenge */ if (token!=SPACE) { error_msg = "Expected SPACE"; goto error; } if (timlex(&initial_challenge, NULL, sieved_in)!=STRING) { error_msg = "Expected string"; goto error; } token = timlex(NULL, NULL, sieved_in); } if (token != EOL) { error_msg = "Expected EOL"; goto error; } if (authenticated) prot_printf(sieved_out, "NO \"Already authenticated\"\r\n"); else if (cmd_authenticate(sieved_out, sieved_in, mechanism_name, initial_challenge, &error_msg)==FALSE) { error_msg = "Authentication Error"; goto error; } #if 0 /* XXX - not implemented in sieveshell*/ /* referral_host is non-null only once we are authenticated */ if(referral_host) goto do_referral; #endif break; case CAPABILITY: if (timlex(NULL, NULL, sieved_in)!=EOL) { error_msg = "Expected EOL"; goto error; } if(referral_host) goto do_referral; capabilities(sieved_out, sieved_saslconn, starttls_done, authenticated, sasl_ssf); break; case HAVESPACE: if (timlex(NULL, NULL, sieved_in)!=SPACE) { error_msg = "SPACE must occur after HAVESPACE"; goto error; } if (timlex(&sieve_name, NULL, sieved_in)!=STRING) { error_msg = "Did not specify script name"; goto error; } if (timlex(NULL, NULL, sieved_in)!=SPACE) { error_msg = "Expected SPACE"; goto error; } if (timlex(NULL, &num, sieved_in)!=NUMBER) { error_msg = "Expected Number"; goto error; } if (timlex(NULL, NULL, sieved_in)!=EOL) { error_msg = "Expected EOL"; goto error; } if(referral_host) goto do_referral; cmd_havespace(sieved_out, sieve_name, num); break; case LOGOUT: token = timlex(NULL, NULL, sieved_in); /* timlex() will return LOGOUT when the remote disconnects badly */ if (token!=EOL && token!=EOF && token!=LOGOUT) { error_msg = "Garbage after logout command"; goto error; } /* no referral for logout */ cmd_logout(sieved_out, sieved_in); ret = TRUE; goto done; break; case GETSCRIPT: if (timlex(NULL, NULL, sieved_in)!=SPACE) { error_msg = "SPACE must occur after GETSCRIPT"; goto error; } if (timlex(&sieve_name, NULL, sieved_in)!=STRING) { error_msg = "Did not specify script name"; goto error; } if (timlex(NULL, NULL, sieved_in)!=EOL) { error_msg = "Expected EOL"; goto error; } if(referral_host) goto do_referral; getscript(sieved_out, sieve_name); break; case PUTSCRIPT: if (timlex(NULL, NULL, sieved_in)!=SPACE) { error_msg = "SPACE must occur after PUTSCRIPT"; goto error; } if (timlex(&sieve_name, NULL, sieved_in)!=STRING) { error_msg = "Did not specify script name"; goto error; } if (timlex(NULL, NULL, sieved_in)!=SPACE) { error_msg = "Expected SPACE"; goto error; } if (timlex(&sieve_data, NULL, sieved_in)!=STRING) { error_msg = "Did not specify legal script data length"; goto error; } if (timlex(NULL, NULL, sieved_in)!=EOL) { error_msg = "Expected EOL"; goto error; } if(referral_host) goto do_referral; putscript(sieved_out, sieve_name, sieve_data, verify_only); break; case SETACTIVE: if (timlex(NULL, NULL, sieved_in)!=SPACE) { error_msg = "SPACE must occur after SETACTIVE"; goto error; } if (timlex(&sieve_name, NULL, sieved_in)!=STRING) { error_msg = "Did not specify script name"; goto error; } if (timlex(NULL, NULL, sieved_in)!=EOL) { error_msg = "Expected EOL"; goto error; } if(referral_host) goto do_referral; setactive(sieved_out, sieve_name); break; case DELETESCRIPT: if (timlex(NULL, NULL, sieved_in)!=SPACE) { error_msg = "SPACE must occur after DELETESCRIPT"; goto error; } if (timlex(&sieve_name, NULL, sieved_in)!=STRING) { error_msg = "Did not specify script name"; goto error; } if (timlex(NULL, NULL, sieved_in)!=EOL) { error_msg = "Expected EOL"; goto error; } if(referral_host) goto do_referral; deletescript(sieved_out, sieve_name); break; case LISTSCRIPTS: if (timlex(NULL, NULL, sieved_in)!=EOL) { error_msg = "Expected EOL"; goto error; } if(referral_host) goto do_referral; listscripts(sieved_out); break; case STARTTLS: if (timlex(NULL, NULL, sieved_in)!=EOL) { error_msg = "Expected EOL"; goto error; } /* XXX discard any input pipelined after STARTTLS */ prot_flush(sieved_in); if(referral_host) goto do_referral; cmd_starttls(sieved_out, sieved_in); break; case NOOP: token = timlex(NULL, NULL, sieved_in); mystring_t *noop_param = NULL; if (token != EOL) { /* optional string parameter */ if (token!=SPACE) { error_msg = "Expected SPACE"; goto error; } if (timlex(&noop_param, NULL, sieved_in)!=STRING) { error_msg = "Expected string"; free(noop_param); goto error; } token = timlex(NULL, NULL, sieved_in); } if (token != EOL) { error_msg = "Expected EOL"; free(noop_param); goto error; } if (noop_param != NULL) { int temp; char* dataptr = string_DATAPTR(noop_param); prot_printf(sieved_out, "OK (TAG {%d}\r\n", noop_param->len); for (temp = 0; temp < noop_param->len; temp++) prot_putc(dataptr[temp], sieved_out); prot_printf(sieved_out, ") \"Done\"\r\n"); free(noop_param); } else prot_printf(sieved_out, "OK \"Done\"\r\n"); break; case UNAUTHENTICATE: if (timlex(NULL, NULL, sieved_in)!=EOL) { error_msg = "Expected EOL"; goto error; } cmd_unauthenticate(sieved_out, sieved_in); break; default: error_msg="Expected a command. Got something else."; goto error; break; } done: /* free memory */ free(mechanism_name); free(initial_challenge); free(sieve_name); free(sieve_data); prot_flush(sieved_out); return ret; error: /* free memory */ free(mechanism_name); free(initial_challenge); free(sieve_name); free(sieve_data); prot_printf(sieved_out, "NO \"%s\"\r\n",error_msg); prot_flush(sieved_out); return FALSE; do_referral: { char buf[4096]; char *c; /* Truncate the hostname if necessary */ strlcpy(buf, referral_host, sizeof(buf)); c = strchr(buf, '!'); if(c) *c = '\0'; prot_printf(sieved_out, "BYE (REFERRAL \"sieve://%s\") \"Try Remote.\"\r\n", buf); ret = TRUE; goto done; } } void cmd_logout(struct protstream *sieved_out, struct protstream *sieved_in __attribute__((unused))) { prot_printf(sieved_out, "OK \"Logout Complete\"\r\n"); prot_flush(sieved_out); } static sasl_ssf_t ssf = 0; static char *authid = NULL; extern int reset_saslconn(sasl_conn_t **conn, sasl_ssf_t ssf, char *authid); static void cmd_unauthenticate(struct protstream *sieved_out, struct protstream *sieved_in) { if (chdir("/tmp/")) syslog(LOG_ERR, "Failed to chdir to /tmp/"); reset_saslconn(&sieved_saslconn, sieved_in->saslssf, authid); prot_unsetsasl(sieved_out); prot_unsetsasl(sieved_in); prot_printf(sieved_out, "OK\r\n"); authenticated = 0; } static int cmd_authenticate(struct protstream *sieved_out, struct protstream *sieved_in, mystring_t *mechanism_name, mystring_t *initial_challenge, const char **errmsg) { int sasl_result; char *mech = string_DATAPTR(mechanism_name); mystring_t *clientinstr=NULL; char *clientin = NULL; unsigned int clientinlen = 0; const char *serverout=NULL; unsigned int serveroutlen; const void *canon_user, *val; char *username; int ret = TRUE; clientinstr = initial_challenge; if (clientinstr!=NULL) { clientin=(char *) malloc(clientinstr->len*2); if (clientinstr->len) { sasl_result=sasl_decode64(string_DATAPTR(clientinstr), clientinstr->len, clientin, clientinstr->len*2, &clientinlen); } else { clientinlen = 0; sasl_result = SASL_OK; } if (sasl_result!=SASL_OK) { *errmsg="error base64 decoding string"; syslog(LOG_NOTICE, "badlogin: %s %s %s", sieved_clienthost, mech, "error base64 decoding string"); if(reset_saslconn(&sieved_saslconn, ssf, authid) != SASL_OK) fatal("could not reset the sasl_conn_t after failure", EC_TEMPFAIL); return FALSE; } } sasl_result = sasl_server_start(sieved_saslconn, mech, clientin, clientinlen, &serverout, &serveroutlen); while (sasl_result==SASL_CONTINUE) { int token1; int token2; mystring_t *str, *blahstr; char *inbase64; unsigned int inbase64len; /* convert to base64 */ inbase64 = xmalloc(serveroutlen*2+1); sasl_encode64(serverout, serveroutlen, inbase64, serveroutlen*2+1, &inbase64len); /* send out the string always as a literal */ prot_printf(sieved_out, "{%d}\r\n",inbase64len); prot_write(sieved_out,inbase64,inbase64len); prot_printf(sieved_out,"\r\n"); token1 = timlex(&str, NULL, sieved_in); if (token1==STRING) { clientin=(char *) malloc(str->len*2); if (str->len) { sasl_result=sasl_decode64(string_DATAPTR(str), str->len, clientin, str->len*2, &clientinlen); } else { clientinlen = 0; sasl_result = SASL_OK; } if (sasl_result!=SASL_OK) { *errmsg="error base64 decoding string"; syslog(LOG_NOTICE, "badlogin: %s %s %s", sieved_clienthost, mech, "error base64 decoding string"); if(reset_saslconn(&sieved_saslconn, ssf, authid) != SASL_OK) fatal("could not reset the sasl_conn_t after failure", EC_TEMPFAIL); return FALSE; } } else { *errmsg="Expected STRING-xxx1"; if(reset_saslconn(&sieved_saslconn, ssf, authid) != SASL_OK) fatal("could not reset the sasl_conn_t after failure", EC_TEMPFAIL); return FALSE; } token2 = timlex(&blahstr, NULL, sieved_in); /* we want to see a STRING followed by EOL */ if ((token1==STRING) && (token2==EOL)) { sasl_result = sasl_server_step(sieved_saslconn, clientin, clientinlen, &serverout, &serveroutlen); } else { *errmsg = "expected a STRING followed by an EOL"; syslog(LOG_NOTICE, "badlogin: %s %s %s", sieved_clienthost, mech, "expected string"); if(reset_saslconn(&sieved_saslconn, ssf, authid) != SASL_OK) fatal("could not reset the sasl_conn_t after failure", EC_TEMPFAIL); return FALSE; } } if (sasl_result!=SASL_OK) { /* convert to user error code */ if(sasl_result == SASL_NOUSER) sasl_result = SASL_BADAUTH; *errmsg = (const char *) sasl_errstring(sasl_result,NULL,NULL); syslog(LOG_NOTICE, "badlogin: %s %s %s", sieved_clienthost, mech, *errmsg); if(reset_saslconn(&sieved_saslconn, ssf, authid) != SASL_OK) fatal("could not reset the sasl_conn_t after failure", EC_TEMPFAIL); return FALSE; } /* get the userid from SASL */ sasl_result=sasl_getprop(sieved_saslconn, SASL_USERNAME, &canon_user); if (sasl_result!=SASL_OK) { *errmsg = "Internal SASL error"; syslog(LOG_ERR, "SASL: sasl_getprop SASL_USERNAME: %s", sasl_errstring(sasl_result, NULL, NULL)); if(reset_saslconn(&sieved_saslconn, ssf, authid) != SASL_OK) fatal("could not reset the sasl_conn_t after failure", EC_TEMPFAIL); return FALSE; } username = xstrdup((const char *) canon_user); verify_only = !strcmp(username, "anonymous"); if (!verify_only) { /* Check for a remote mailbox (should we setup a redirect?) */ struct namespace sieved_namespace; char inboxname[MAX_MAILBOX_BUFFER]; struct mboxlist_entry mbentry; int r; /* Set namespace */ if ((r = mboxname_init_namespace(&sieved_namespace, 0)) != 0) { syslog(LOG_ERR, "%s", error_message(r)); fatal(error_message(r), EC_CONFIG); } /* Translate any separators in userid */ mboxname_hiersep_tointernal(&sieved_namespace, username, config_virtdomains ? strcspn(username, "@") : 0); (*sieved_namespace.mboxname_tointernal)(&sieved_namespace, "INBOX", username, inboxname); r = mboxlist_lookup(inboxname, &mbentry, NULL); if(r && !sieved_userisadmin) { /* lookup error */ syslog(LOG_ERR, "%s", error_message(r)); if(reset_saslconn(&sieved_saslconn, ssf, authid) != SASL_OK) fatal("could not reset the sasl_conn_t after failure", EC_TEMPFAIL); ret = FALSE; goto cleanup; } if(mbentry.mbtype & MBTYPE_REMOTE) { /* It's a remote mailbox */ if (config_getswitch(IMAPOPT_SIEVE_ALLOWREFERRALS)) { /* We want to set up a referral */ if (sieved_domainfromip) { char *authname, *p; /* get a new copy of the userid */ free(username); username = xstrdup((const char *) canon_user); /* get the authid from SASL */ sasl_result=sasl_getprop(sieved_saslconn, SASL_AUTHUSER, &canon_user); if (sasl_result!=SASL_OK) { *errmsg = "Internal SASL error"; syslog(LOG_ERR, "SASL: sasl_getprop SASL_AUTHUSER: %s", sasl_errstring(sasl_result, NULL, NULL)); if(reset_saslconn(&sieved_saslconn, ssf, authid) != SASL_OK) fatal("could not reset the sasl_conn_t after failure", EC_TEMPFAIL); ret = FALSE; goto cleanup; } authname = xstrdup((const char *) canon_user); if ((p = strchr(authname, '@'))) *p = '%'; if ((p = strchr(username, '@'))) *p = '%'; referral_host = (char*) xmalloc(strlen(authname)+1+strlen(username)+1+ strlen(mbentry.partition)+1); sprintf((char*) referral_host, "%s;%s@%s", authname, username, mbentry.partition); free(authname); } else referral_host = xstrdup(mbentry.partition); } else { /* We want to set up a connection to the backend for proxying */ const char *statusline = NULL; char *c; /* xxx hide the fact that we are storing partitions */ c = strchr(mbentry.partition, '!'); if(c) *c = '\0'; backend = backend_connect(NULL, mbentry.partition, &sieve_protocol, username, NULL, &statusline); if (!backend) { syslog(LOG_ERR, "couldn't authenticate to backend server"); prot_printf(sieved_out, "NO \"%s\"\r\n", statusline ? statusline : "Authentication to backend server failed"); prot_flush(sieved_out); goto cleanup; } } } else if (actions_setuser(username) != TIMSIEVE_OK) { *errmsg = "internal error"; syslog(LOG_ERR, "error in actions_setuser()"); if(reset_saslconn(&sieved_saslconn, ssf, authid) != SASL_OK) fatal("could not reset the sasl_conn_t after failure", EC_TEMPFAIL); ret = FALSE; goto cleanup; } } /* Yay! authenticated */ if(serverout) { char *inbase64; unsigned int inbase64len; /* convert to base64 */ inbase64 = xmalloc(serveroutlen*2+1); sasl_encode64(serverout, serveroutlen, inbase64, serveroutlen*2+1, &inbase64len); prot_printf(sieved_out, "OK (SASL \"%s\")\r\n", inbase64); free(inbase64); } else { prot_printf(sieved_out, "OK\r\n"); } syslog(LOG_NOTICE, "login: %s %s %s%s %s", sieved_clienthost, username, mech, starttls_done ? "+TLS" : "", "User logged in"); authenticated = 1; prot_setsasl(sieved_in, sieved_saslconn); prot_setsasl(sieved_out, sieved_saslconn); sasl_getprop(sieved_saslconn, SASL_SSF, &val); sasl_ssf = *((sasl_ssf_t *) val); if (sasl_ssf && config_getswitch(IMAPOPT_SIEVE_SASL_SEND_UNSOLICITED_CAPABILITY)) { capabilities(sieved_out, sieved_saslconn, starttls_done, authenticated, sasl_ssf); prot_flush(sieved_out); } /* Create telemetry log */ sieved_logfd = telemetry_log(username, sieved_in, sieved_out, 0); cleanup: /* free memory */ free(username); return ret; } #ifdef HAVE_SSL static int cmd_starttls(struct protstream *sieved_out, struct protstream *sieved_in) { int result; int *layerp; /* SASL and openssl have different ideas about whether ssf is signed */ layerp = (int *) &ssf; if (starttls_done == 1) { prot_printf(sieved_out, "NO \"TLS already active\"\r\n"); return TIMSIEVE_FAIL; } result=tls_init_serverengine("sieve", 5, /* depth to verify */ 1, /* can client auth? */ 1); /* TLS only? */ if (result == -1) { syslog(LOG_ERR, "error initializing TLS"); prot_printf(sieved_out, "NO \"Error initializing TLS\"\r\n"); return TIMSIEVE_FAIL; } prot_printf(sieved_out, "OK \"Begin TLS negotiation now\"\r\n"); /* must flush our buffers before starting tls */ prot_flush(sieved_out); result=tls_start_servertls(0, /* read */ 1, /* write */ sieved_timeout, layerp, &authid, &tls_conn); /* if error */ if (result==-1) { prot_printf(sieved_out, "NO \"Starttls failed\"\r\n"); syslog(LOG_NOTICE, "STARTTLS failed: %s", sieved_clienthost); return TIMSIEVE_FAIL; } /* tell SASL about the negotiated layer */ result = sasl_setprop(sieved_saslconn, SASL_SSF_EXTERNAL, &ssf); if (result != SASL_OK) { fatal("sasl_setprop() failed: cmd_starttls()", EC_TEMPFAIL); } result = sasl_setprop(sieved_saslconn, SASL_AUTH_EXTERNAL, authid); if (result != SASL_OK) { fatal("sasl_setprop() failed: cmd_starttls()", EC_TEMPFAIL); } /* tell the prot layer about our new layers */ prot_settls(sieved_in, tls_conn); prot_settls(sieved_out, tls_conn); starttls_done = 1; return capabilities(sieved_out, sieved_saslconn, starttls_done, authenticated, sasl_ssf); } #else static int cmd_starttls(struct protstream *sieved_out, struct protstream *sieved_in) { fatal("cmd_starttls() called, but no OpenSSL", EC_SOFTWARE); } #endif /* HAVE_SSL */ cyrus-imapd-2.4.18/timsieved/actions.h0000644000175000017500000000624212546374065016633 0ustar ellieellie/* actions.h -- executes the commands (creating, deleting scripts etc..) for timsieved * Tim Martin * 9/21/99 * * Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The name "Carnegie Mellon University" must not be used to * endorse or promote products derived from this software without * prior written permission. For permission or any legal * details, please contact * Carnegie Mellon University * Center for Technology Transfer and Enterprise Creation * 4615 Forbes Avenue * Suite 302 * Pittsburgh, PA 15213 * (412) 268-7393, fax: (412) 268-7395 * innovation@andrew.cmu.edu * * 4. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by Computing Services * at Carnegie Mellon University (http://www.cmu.edu/computing/)." * * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * $Id: actions.h,v 1.14 2010/01/06 17:02:01 murch Exp $ */ #ifndef _ACTIONS_H_ #define _ACTIONS_H_ #include "prot.h" #include "mystring.h" /* * Get the list of capabilities * */ int capabilities(struct protstream *conn, sasl_conn_t *saslconn, int starttls_done, int authenticated, sasl_ssf_t sasl_ssf); /* * Get a sieve scripe with name "name" and output it's contents * */ int getscript(struct protstream *conn, mystring_t *name); /* * Put a scripts in the server with 'name' whose contents should be 'data' * */ int putscript(struct protstream *conn, mystring_t *name, mystring_t *data, int verify_only); /* * Delete the script with name 'name' * */ int deletescript(struct protstream *conn, mystring_t *name); /* * Is there space for this script? * */ int cmd_havespace(struct protstream *sieved_out, mystring_t *sieve_name, unsigned long num); /* * List all the scripts for the user. place a '*' next to the active one * if there is one * */ int listscripts(struct protstream *conn); /* * Set 'name' as the active sieve script * */ int setactive(struct protstream *conn, mystring_t *name); /* * Initialize * */ int actions_init(void); /* * Set user after sucessful authentication * */ int actions_setuser(const char *userid); #endif cyrus-imapd-2.4.18/timsieved/lex.c0000644000175000017500000002053312546374065015755 0ustar ellieellie/* lex.c -- lexer for timsieved * Tim Martin * 9/21/99 * * Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The name "Carnegie Mellon University" must not be used to * endorse or promote products derived from this software without * prior written permission. For permission or any legal * details, please contact * Carnegie Mellon University * Center for Technology Transfer and Enterprise Creation * 4615 Forbes Avenue * Suite 302 * Pittsburgh, PA 15213 * (412) 268-7393, fax: (412) 268-7395 * innovation@andrew.cmu.edu * * 4. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by Computing Services * at Carnegie Mellon University (http://www.cmu.edu/computing/)." * * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * $Id: lex.c,v 1.30 2010/01/06 17:02:01 murch Exp $ */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include "tls.h" #include "lex.h" #include "codes.h" #include "actions.h" #include "libconfig.h" #include "global.h" #include "util.h" #include "xmalloc.h" static int token_lookup (char *str, int len __attribute__((unused))) { switch (*str) { case 'a': if (strcmp(str, "authenticate")==0) return AUTHENTICATE; break; case 'c': if (strcmp(str, "capability")==0) return CAPABILITY; break; case 'd': if (strcmp(str, "deletescript")==0) return DELETESCRIPT; break; case 'g': if (strcmp(str, "getscript")==0) return GETSCRIPT; break; case 'h': if (strcmp(str, "havespace")==0) return HAVESPACE; break; case 'l': if (strcmp(str, "listscripts")==0) return LISTSCRIPTS; if (strcmp(str, "logout")==0) return LOGOUT; break; case 'n': if (strcmp(str, "noop")==0) return NOOP; break; case 'p': if (strcmp(str, "putscript")==0) return PUTSCRIPT; break; case 's': if (strcmp(str, "setactive")==0) return SETACTIVE; if (strcmp(str, "starttls")==0 && tls_enabled()) return STARTTLS; break; case 'u': if (strcmp(str, "unauthenticate")==0) return UNAUTHENTICATE; break; } /* error, nothing matched */ return -1; } /* current state the lexer is in */ static int lexer_state = LEXER_STATE_NORMAL; #define ERR() { \ lexer_state=LEXER_STATE_RECOVER; \ return TIMSIEVE_FAIL; \ } #define ERR_PUSHBACK() { \ prot_ungetc(ch, stream); \ ERR(); \ } void lex_setrecovering(void) { lexer_state = LEXER_STATE_RECOVER; } static unsigned long maxscriptsize=0; static char *buffer; int lex_init(void) { maxscriptsize = config_getint(IMAPOPT_SIEVE_MAXSCRIPTSIZE); maxscriptsize *= 1024; buffer = (char *) xmalloc(maxscriptsize); return 0; } /** * if outstr is NULL it isn't filled in */ int timlex(mystring_t **outstr, unsigned long *outnum, struct protstream *stream) { int ch; char *buff_ptr; char *buff_end; unsigned long tmpnum = 0; unsigned long count=0; int result = TIMSIEVE_OK; buff_ptr = buffer; /* ptr into the buffer */ buff_end = buffer + maxscriptsize - 10; /* ptr to end of buffer */ while (1) { /* get a character this may block on a read if there is nothing in the buffer */ ch=prot_getc(stream); if (ch==EOF) { /* Lost connection */ return EOF; } switch (lexer_state) { case LEXER_STATE_RECOVER: if (ch == '\n') { lexer_state=LEXER_STATE_NORMAL; } if (ch == '\r') lexer_state=LEXER_STATE_RECOVER_CR; break; case LEXER_STATE_RECOVER_CR: if (ch == '\n') lexer_state=LEXER_STATE_NORMAL; break; case LEXER_STATE_CR: if (ch == '\n') { lexer_state=LEXER_STATE_NORMAL; return EOL; } /* otherwise, life is bad */ ERR_PUSHBACK(); case LEXER_STATE_QSTR: if (ch == '\"') { /* End of the string */ if (outstr!=NULL) { *outstr = NULL; result = string_allocate(buff_ptr - buffer, buffer, outstr); if (result != TIMSIEVE_OK) ERR_PUSHBACK(); } /*} */ lexer_state=LEXER_STATE_NORMAL; return STRING; } /* illegal character */ if (ch == '\0' || ch == '\r' || ch == '\n' || 0x7F < ((unsigned char)ch)) { ERR_PUSHBACK(); } /* Otherwise, we're appending a character */ if (buff_end <= buff_ptr) ERR_PUSHBACK(); /* too long! */ if (ch == '\\') { ch=prot_getc(stream); if (result != TIMSIEVE_OK) ERR(); if (ch != '\"' && ch != '\\') ERR_PUSHBACK(); } *buff_ptr++ = ch; break; case LEXER_STATE_LITERAL: if (('0' <= ch) && (ch <= '9')) { unsigned long newcount = count * 10 + (ch - '0'); if (newcount < count) ERR_PUSHBACK(); /* overflow */ /* * XXX This should be fatal if non-synchronizing. */ count = newcount; break; } if (ch != '+') ERR_PUSHBACK(); ch=prot_getc(stream); if (ch != '}') ERR_PUSHBACK(); ch=prot_getc(stream); if (ch < 0) ERR(); if (ch != '\r') ERR_PUSHBACK(); ch=prot_getc(stream); if (ch < 0) ERR(); if (ch != '\n') ERR_PUSHBACK(); if (count > maxscriptsize) { /* too big, eat the input */ for(;count > 0;count--) { if(prot_getc(stream)==EOF) break; } ERR(); } if (outstr!=NULL) { *outstr = NULL; result = string_allocate(count, NULL, outstr); if (result != TIMSIEVE_OK) ERR_PUSHBACK(); } /* there is a literal string on the wire. let's read it */ if (outstr!=NULL) { char *it = string_DATAPTR(*outstr), *end = it + count; while (it < end) { *it=prot_getc(stream); it++; } } else { /* just read the chars and throw them away */ unsigned long lup; for (lup=0;lup no copy */ mystring_t ** str); int string_copy(mystring_t *oldstr, mystring_t **newstr); void string_free(mystring_t **str); int string_compare(mystring_t *str1, mystring_t *str2); int string_comparestr(mystring_t *str1, char *str2); int string_compare_with(mystring_t *str1, mystring_t *str2, mystring_t *comp); /*eq_result_t string_equal_cstr(const mystring_t * str, const char *cstr);*/ #define string_DATAPTR(s) (((char *) s)+sizeof(mystring_t)) int safe_to_use_quoted(char *str, int len); #endif /* INCLUDED_MYSTRING_H */ cyrus-imapd-2.4.18/timsieved/mystring.c0000644000175000017500000000506412546374065017043 0ustar ellieellie/* $Id: mystring.c,v 1.8 2006/11/30 17:11:25 murch Exp $ */ #ifdef HAVE_CONFIG_H #include #endif #include "mystring.h" #include "codes.h" #include #include int string_allocate(int length, const char *buf, /* NULL => no copy */ mystring_t ** str) { *str=(mystring_t *) malloc(sizeof(mystring_t)+length+1); (*str)->len=length; if (buf==NULL) return TIMSIEVE_OK; /* copy the data into the string object */ memcpy(((char *)(*str))+sizeof(mystring_t), buf, length); ((char *) (*str))[sizeof(mystring_t)+length]='\0'; return TIMSIEVE_OK; } int string_copy(mystring_t *oldstr, mystring_t **newstr) { int result; result=string_allocate(oldstr->len, string_DATAPTR(oldstr), newstr); return result; } void string_free(mystring_t **str) { free(*str); } int string_compare(mystring_t *str1, mystring_t *str2) { char *data1; char *data2; int lup; if (str1->len!=str2->len) return TIMSIEVE_FAIL; data1=string_DATAPTR(str1); data2=string_DATAPTR(str2); for (lup=0;luplen;lup++) if (data1[lup]!=data2[lup]) return TIMSIEVE_FAIL; return TIMSIEVE_OK; } int string_compare_with(mystring_t *str1, mystring_t *str2, mystring_t *comp __attribute__((unused))) { char *data1; char *data2; int lup; int len1=str1->len; int len2=str2->len; int low=len1; if (len2data2[lup]) { return 1; } else { /* continue */ } if (len1==len2) return 0; if (len1len!=str2len) return TIMSIEVE_FAIL; data1=string_DATAPTR(str1); data2=str2; for (lup=0;luplen;lup++) if (data1[lup]!=data2[lup]) return TIMSIEVE_FAIL; return TIMSIEVE_OK; } int safe_to_use_quoted(char *str, int len) { char *end=str+len; if (len > 4096) return FALSE; while (str < end) { if (*str == '\0' /* check illegal chars... */ || *str == '\r' || *str == '\n' #ifdef __CHAR_UNSIGNED__ || 0x7F < *str #else || *str < 0 #endif ) return FALSE; if (*str == '\"' /* check len, with \ escapes... */ || *str == '\\') if (4096 < ++len) return FALSE; ++str; } return TRUE; } cyrus-imapd-2.4.18/timsieved/Makefile.in0000644000175000017500000000665712546374065017101 0ustar ellieellie# Makefile.in - timsieved makefile # # @configure_input@ # # Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in # the documentation and/or other materials provided with the # distribution. # # 3. The name "Carnegie Mellon University" must not be used to # endorse or promote products derived from this software without # prior written permission. For permission or any legal # details, please contact # Carnegie Mellon University # Center for Technology Transfer and Enterprise Creation # 4615 Forbes Avenue # Suite 302 # Pittsburgh, PA 15213 # (412) 268-7393, fax: (412) 268-7395 # innovation@andrew.cmu.edu # # 4. Redistributions of any form whatsoever must retain the following # acknowledgment: # "This product includes software developed by Computing Services # at Carnegie Mellon University (http://www.cmu.edu/computing/)." # # CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO # THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY # AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE # FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN # AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING # OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. # # $Id: Makefile.in,v 1.29 2010/01/06 17:02:00 murch Exp $ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ CC = @CC@ RANLIB = @RANLIB@ INSTALL = @INSTALL@ CYRUS_USER=@cyrus_user@ CYRUS_GROUP=@cyrus_group@ DEFS = @DEFS@ @LOCALDEFS@ CPPFLAGS = -I.. -I$(srcdir)/../sieve -I$(srcdir)/../imap -I$(srcdir)/../lib @COM_ERR_CPPFLAGS@ @CPPFLAGS@ @SASLFLAGS@ CFLAGS = @CFLAGS@ LDFLAGS = @LDFLAGS@ prefix = @prefix@ exec_prefix = @exec_prefix@ cyrus_prefix = @cyrus_prefix@ service_path = @service_path@ MAKEDEPEND = @MAKEDEPEND@ TIMSIEVED_LIBS = @TIMSIEVED_LIBS@ SERVICE=../master/service.o IMAP_LIBS = @IMAP_LIBS@ @LIB_RT@ IMAP_COM_ERR_LIBS = @IMAP_COM_ERR_LIBS@ LIB_WRAP = @LIB_WRAP@ LIBS = $(IMAP_COM_ERR_LIBS) DEPLIBS=../sieve/libsieve.a ../imap/mutex_fake.o ../imap/libimap.a ../lib/libcyrus.a ../lib/libcyrus_min.a @DEPLIBS@ PURIFY=/usr/local/bin/purify PUREOPT=-best-effort all: timsieved install: $(INSTALL) -m 755 timsieved $(DESTDIR)$(service_path) OBJS= actions.o lex.o mystring.o scripttest.o timsieved.o parser.o \ ../imap/proxy.o timsieved: $(OBJS) $(SERVICE) $(CC) $(LDFLAGS) -o timsieved \ $(SERVICE) $(OBJS) $(DEPLIBS) $(IMAP_LIBS) $(LIBS) $(LIB_WRAP) timsieved.pure: $(OBJS) $(SERVICE) $(PURIFY) $(PUREOPT) \ $(CC) $(LDFLAGS) -o timsieved.pure \ $(SERVICE) $(OBJS) $(DEPLIBS) $(IMAP_LIBS) $(LIBS) $(LIB_WRAP) clean: rm -f timsieved *~ *.o *.a Makefile.bak makedepend.log distclean: clean rm -f Makefile depend: ${MAKEDEPEND} $(CPPFLAGS) $(DEFS) -I$(srcdir) $(CFLAGS) *.c $(srcdir)/*.c 1>makedepend.log 2>&1 .c.o: $(CC) -c $(CPPFLAGS) $(DEFS) $(CFLAGS) \ $< # DO NOT DELETE THIS LINE -- make depend depends on it. cyrus-imapd-2.4.18/timsieved/actions.c0000644000175000017500000004077412546374065016636 0ustar ellieellie/* actions.c -- executes the commands for timsieved * Tim Martin * * Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The name "Carnegie Mellon University" must not be used to * endorse or promote products derived from this software without * prior written permission. For permission or any legal * details, please contact * Carnegie Mellon University * Center for Technology Transfer and Enterprise Creation * 4615 Forbes Avenue * Suite 302 * Pittsburgh, PA 15213 * (412) 268-7393, fax: (412) 268-7395 * innovation@andrew.cmu.edu * * 4. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by Computing Services * at Carnegie Mellon University (http://www.cmu.edu/computing/)." * * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * $Id: actions.c,v 1.48 2010/01/06 17:02:01 murch Exp $ */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "prot.h" #include "tls.h" #include "util.h" #include "global.h" #include "libconfig.h" #include "xmalloc.h" #include "xstrlcat.h" #include "xstrlcpy.h" #include "sieve_interface.h" #include "codes.h" #include "actions.h" #include "scripttest.h" #include "sync_log.h" /* after a user has authentication, our current directory is their Sieve directory! */ extern int sieved_userisadmin; static char *sieve_dir_config = NULL; static const char *sieved_userid = NULL; int actions_init(void) { int sieve_usehomedir = 0; sieve_usehomedir = config_getswitch(IMAPOPT_SIEVEUSEHOMEDIR); if (!sieve_usehomedir) { sieve_dir_config = (char *) config_getstring(IMAPOPT_SIEVEDIR); } else { /* can't use home directories with timsieved */ syslog(LOG_ERR, "can't use home directories"); return TIMSIEVE_FAIL; } return TIMSIEVE_OK; } int actions_setuser(const char *userid) { char userbuf[1024], *user, *domain = NULL; size_t size = 1024, len; int result; char *sieve_dir = (char *) xzmalloc(size+1); sieved_userid = xstrdup(userid); user = (char *) userid; if (config_virtdomains && strchr(user, '@')) { /* split the user and domain */ strlcpy(userbuf, userid, sizeof(userbuf)); user = userbuf; if ((domain = strrchr(user, '@'))) *domain++ = '\0'; } len = strlcpy(sieve_dir, sieve_dir_config, size); if (domain) { char dhash = (char) dir_hash_c(domain, config_fulldirhash); len += snprintf(sieve_dir+len, size-len, "%s%c/%s", FNAME_DOMAINDIR, dhash, domain); } if (sieved_userisadmin) { strlcat(sieve_dir, "/global", size); } else { char hash = (char) dir_hash_c(user, config_fulldirhash); snprintf(sieve_dir+len, size-len, "/%c/%s", hash, user); } result = chdir(sieve_dir); if (result != 0) { result = cyrus_mkdir(sieve_dir, 0755); if (!result) result = mkdir(sieve_dir, 0755); if (!result) result = chdir(sieve_dir); if (result) { syslog(LOG_ERR, "mkdir %s: %m", sieve_dir); free(sieve_dir); return TIMSIEVE_FAIL; } } free(sieve_dir); return TIMSIEVE_OK; } /* * * Everything but '/' and '\0' are valid. * */ static int scriptname_valid(mystring_t *name) { int lup; char *ptr; /* must be at least one character long */ if (name->len < 1) return TIMSIEVE_FAIL; ptr=string_DATAPTR(name); for (lup=0;luplen;lup++) { if ((ptr[lup]=='/') || (ptr[lup]=='\0')) return TIMSIEVE_FAIL; } return TIMSIEVE_OK; } int capabilities(struct protstream *conn, sasl_conn_t *saslconn, int starttls_done, int authenticated, sasl_ssf_t sasl_ssf) { const char *sasllist; int mechcount; /* implementation */ prot_printf(conn, "\"IMPLEMENTATION\" \"Cyrus timsieved%s %s\"\r\n", config_mupdate_server ? " (Murder)" : "", cyrus_version()); /* SASL */ if ((!authenticated || sasl_ssf) && sasl_listmech(saslconn, NULL, "\"SASL\" \"", " ", "\"\r\n", &sasllist, NULL, &mechcount) == SASL_OK/* && mechcount > 0*/) { prot_printf(conn,"%s",sasllist); } /* Sieve capabilities */ prot_printf(conn,"\"SIEVE\" \"%s\"\r\n",sieve_listextensions(interp)); if (tls_enabled() && !starttls_done && !authenticated) { prot_printf(conn, "\"STARTTLS\"\r\n"); } prot_printf(conn, "\"UNAUTHENTICATE\"\r\n"); prot_printf(conn,"OK\r\n"); return TIMSIEVE_OK; } int getscript(struct protstream *conn, mystring_t *name) { FILE *stream; struct stat filestats; /* returned by stat */ int size; /* size of the file */ int result; int cnt; char path[1024]; result = scriptname_valid(name); if (result!=TIMSIEVE_OK) { prot_printf(conn,"NO \"Invalid script name\"\r\n"); return result; } snprintf(path, 1023, "%s.script", string_DATAPTR(name)); result = stat(path, &filestats); if (result != 0) { prot_printf(conn,"NO (NONEXISTENT) \"Script doesn't exist\"\r\n"); return TIMSIEVE_NOEXIST; } size = filestats.st_size; stream = fopen(path, "r"); if (stream == NULL) { prot_printf(conn,"NO \"fopen failed\"\r\n"); return TIMSIEVE_NOEXIST; } prot_printf(conn, "{%d}\r\n", size); cnt = 0; while (cnt < size) { char buf[BLOCKSIZE]; int amount=BLOCKSIZE; if (size-cnt < BLOCKSIZE) amount=size-cnt; if (fread(buf, 1, BLOCKSIZE, stream) == 0) { if (ferror(stream)) { fatal("fatal error (fread)", 0); } } prot_write(conn, buf, amount); cnt += amount; } prot_printf(conn,"\r\n"); prot_printf(conn, "OK\r\n"); fclose(stream); return TIMSIEVE_OK; } /* counts the number of scripts user has that are DIFFERENT from name. used for enforcing quotas */ static int countscripts(char *name) { DIR *dp; struct dirent *dir; size_t length; int number=0; char myname[1024]; snprintf(myname, 1023, "%s.script", name); if ((dp = opendir(".")) == NULL) { return -1; } while ((dir=readdir(dp)) != NULL) { length=strlen(dir->d_name); if (length >= strlen(".script") && (strcmp(dir->d_name + (length - 7), ".script") == 0)) { /* this is a sieve script */ if (strcmp(myname, dir->d_name) != 0) { /* and it's different from me */ number++; } } } closedir(dp); return number; } /* save name as a sieve script */ int putscript(struct protstream *conn, mystring_t *name, mystring_t *data, int verify_only) { FILE *stream; char *dataptr; char *errstr; int i; int last_was_r = 0; int result; char path[1024], p2[1024]; char bc_path[1024], bc_p2[1024]; int maxscripts; sieve_script_t *s; result = scriptname_valid(name); if (result!=TIMSIEVE_OK) { prot_printf(conn,"NO \"Invalid script name\"\r\n"); return result; } if (verify_only) stream = tmpfile(); else { /* see if this would put the user over quota */ maxscripts = config_getint(IMAPOPT_SIEVE_MAXSCRIPTS); if (countscripts(string_DATAPTR(name))+1 > maxscripts) { prot_printf(conn, "NO (QUOTA/MAXSCRIPTS) \"You are only allowed %d scripts on this server\"\r\n", maxscripts); return TIMSIEVE_FAIL; } snprintf(path, 1023, "%s.script.NEW", string_DATAPTR(name)); stream = fopen(path, "w+"); } if (stream == NULL) { prot_printf(conn, "NO \"Unable to open script for writing (%s)\"\r\n", path); return TIMSIEVE_NOEXIST; } dataptr = string_DATAPTR(data); /* copy data to file - replacing any lone \r or \n with the * \r\n pair so notify messages are SMTP compatible */ for (i = 0; i < data->len; i++) { if (last_was_r) { if (dataptr[i] != '\n') putc('\n', stream); } else { if (dataptr[i] == '\n') putc('\r', stream); } putc(dataptr[i], stream); last_was_r = (dataptr[i] == '\r'); } if (last_was_r) putc('\n', stream); /* let's make sure this is a valid script (no parse errors) */ result = is_script_parsable(stream, &errstr, &s); if (result != TIMSIEVE_OK) { if (errstr && *errstr) { prot_printf(conn, "NO {" SIZE_T_FMT "}\r\n%s\r\n", strlen(errstr), errstr); free(errstr); } else { if (errstr) free(errstr); prot_printf(conn, "NO \"parse failed\"\r\n"); } fclose(stream); unlink(path); return result; } fflush(stream); fclose(stream); if (!verify_only) { int fd; bytecode_info_t *bc; /* Now, generate the bytecode */ if(sieve_generate_bytecode(&bc, s) == -1) { unlink(path); sieve_script_free(&s); prot_printf(conn, "NO \"bytecode generate failed\"\r\n"); return TIMSIEVE_FAIL; } /* Now, open the new file */ snprintf(bc_path, 1023, "%s.bc.NEW", string_DATAPTR(name)); fd = open(bc_path, O_CREAT | O_TRUNC | O_WRONLY, 0600); if(fd < 0) { unlink(path); sieve_free_bytecode(&bc); sieve_script_free(&s); prot_printf(conn, "NO \"couldn't open bytecode file\"\r\n"); return TIMSIEVE_FAIL; } /* Now, emit the bytecode */ if(sieve_emit_bytecode(fd, bc) == -1) { close(fd); unlink(path); unlink(bc_path); sieve_free_bytecode(&bc); sieve_script_free(&s); prot_printf(conn, "NO \"bytecode emit failed\"\r\n"); return TIMSIEVE_FAIL; } sieve_free_bytecode(&bc); sieve_script_free(&s); close(fd); /* Now, rename! */ snprintf(p2, 1023, "%s.script", string_DATAPTR(name)); snprintf(bc_p2, 1023, "%s.bc", string_DATAPTR(name)); rename(path, p2); rename(bc_path, bc_p2); } prot_printf(conn, "OK\r\n"); sync_log_sieve(sieved_userid); return TIMSIEVE_OK; } /* delete the active script */ static int deleteactive(struct protstream *conn) { if (unlink("defaultbc") != 0) { prot_printf(conn,"NO \"Unable to unlink active script\"\r\n"); return TIMSIEVE_FAIL; } sync_log_sieve(sieved_userid); return TIMSIEVE_OK; } /* is this the active script? */ static int isactive(char *name) { char filename[1024]; char activelink[1024]; snprintf(filename, 1023, "%s.bc", name); memset(activelink, 0, sizeof(activelink)); if ((readlink("defaultbc", activelink, sizeof(activelink)-1) < 0) && (errno != ENOENT)) { syslog(LOG_ERR, "readlink(defaultbc): %m"); return FALSE; } if (!strcmp(filename, activelink)) { return TRUE; } else { return FALSE; } } /* delete a sieve script */ int deletescript(struct protstream *conn, mystring_t *name) { int result; char path[1024]; result = scriptname_valid(name); if (result!=TIMSIEVE_OK) { prot_printf(conn,"NO \"Invalid script name\"\r\n"); return result; } snprintf(path, 1023, "%s.script", string_DATAPTR(name)); if (isactive(string_DATAPTR(name))) { prot_printf(conn, "NO (ACTIVE) \"Active script cannot be deleted\"\r\n"); return TIMSIEVE_FAIL; } result = unlink(path); if (result != 0) { if (result == ENOENT) prot_printf(conn, "NO (NONEXISTENT) \"Script %s does not exist.\"\r\n", string_DATAPTR(name)); else prot_printf(conn,"NO \"Error deleting script\"\r\n"); return TIMSIEVE_FAIL; } snprintf(path, 1023, "%s.bc", string_DATAPTR(name)); result = unlink(path); if (result != 0) { prot_printf(conn,"NO \"Error deleting bytecode\"\r\n"); return TIMSIEVE_FAIL; } sync_log_sieve(sieved_userid); prot_printf(conn,"OK\r\n"); return TIMSIEVE_OK; } /* list the scripts user has available */ int listscripts(struct protstream *conn) { DIR *dp; struct dirent *dir; size_t length; /* open the directory */ dp=opendir("."); if (dp==NULL) { prot_printf(conn,"NO \"Error opening directory\"\r\n"); return TIMSIEVE_FAIL; } while ((dir=readdir(dp)) != NULL) /* while there are files here */ { length=strlen(dir->d_name); if (length >= strlen(".script")) /* if ends in .script */ { if (strcmp(dir->d_name + (length - 7), ".script")==0) { char *namewo=(char *) xmalloc(length-6); memcpy(namewo, dir->d_name, length-7); namewo[length-7]='\0'; if (isactive(namewo)==TRUE) prot_printf(conn,"\"%s\" ACTIVE\r\n", namewo); else prot_printf(conn,"\"%s\"\r\n", namewo); free(namewo); } } } closedir(dp); prot_printf(conn,"OK\r\n"); return TIMSIEVE_OK; } /* does the script 'str' exist return TRUE | FALSE */ static int exists(char *str) { char filename[1024]; struct stat filestats; /* returned by stat */ int result; snprintf(filename, 1023, "%s.script", str); result = stat(filename,&filestats); if (result != 0) { return FALSE; } return TRUE; } /* set the sieve script 'name' to be the active script */ int setactive(struct protstream *conn, mystring_t *name) { int result; char filename[1024]; /* if string name is empty, disable active script */ if (!strlen(string_DATAPTR(name))) { if (deleteactive(conn) != TIMSIEVE_OK) return TIMSIEVE_FAIL; prot_printf(conn,"OK\r\n"); return TIMSIEVE_OK; } result = scriptname_valid(name); if (result!=TIMSIEVE_OK) { prot_printf(conn,"NO \"Invalid script name\"\r\n"); return result; } if (exists(string_DATAPTR(name))==FALSE) { prot_printf(conn,"NO (NONEXISTENT) \"Script does not exist\"\r\n"); return TIMSIEVE_NOEXIST; } /* if script already is the active one just say ok */ if (isactive(string_DATAPTR(name))==TRUE) { prot_printf(conn,"OK\r\n"); return TIMSIEVE_OK; } /* get the name of the active sieve script */ snprintf(filename, sizeof(filename), "%s.bc", string_DATAPTR(name)); /* ok we want to do this atomically so let's - make .NEW as a hard link - rename it to */ result = symlink(filename, "defaultbc.NEW"); if (result) { syslog(LOG_ERR, "symlink(%s, defaultbc.NEW): %m", filename); prot_printf(conn, "NO \"Can't make link\"\r\n"); return TIMSIEVE_FAIL; } result = rename("defaultbc.NEW", "defaultbc"); if (result) { unlink("defaultbc.NEW"); syslog(LOG_ERR, "rename(defaultbc.NEW, defaultbc): %m"); prot_printf(conn,"NO \"Error renaming\"\r\n"); return TIMSIEVE_FAIL; } sync_log_sieve(sieved_userid); prot_printf(conn,"OK\r\n"); return TIMSIEVE_OK; } int cmd_havespace(struct protstream *conn, mystring_t *sieve_name, unsigned long num) { int result; int maxscripts; unsigned long maxscriptsize; result = scriptname_valid(sieve_name); if (result!=TIMSIEVE_OK) { prot_printf(conn,"NO \"Invalid script name\"\r\n"); return result; } /* see if the size of the script is too big */ maxscriptsize = config_getint(IMAPOPT_SIEVE_MAXSCRIPTSIZE); maxscriptsize *= 1024; if (num > maxscriptsize) { prot_printf(conn, "NO (QUOTA/MAXSIZE) \"Script size is too large. " "Max script size is %ld bytes\"\r\n", maxscriptsize); return TIMSIEVE_FAIL; } /* see if this would put the user over quota */ maxscripts = config_getint(IMAPOPT_SIEVE_MAXSCRIPTS); if (countscripts(string_DATAPTR(sieve_name))+1 > maxscripts) { prot_printf(conn, "NO (QUOTA/MAXSCRIPTS) \"You are only allowed %d scripts on this server\"\r\n", maxscripts); return TIMSIEVE_FAIL; } prot_printf(conn,"OK\r\n"); return TIMSIEVE_OK; } cyrus-imapd-2.4.18/timsieved/parser.h0000644000175000017500000000403012546374065016460 0ustar ellieellie/* parser.h * Tim Martin * 9/21/99 * * Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The name "Carnegie Mellon University" must not be used to * endorse or promote products derived from this software without * prior written permission. For permission or any legal * details, please contact * Carnegie Mellon University * Center for Technology Transfer and Enterprise Creation * 4615 Forbes Avenue * Suite 302 * Pittsburgh, PA 15213 * (412) 268-7393, fax: (412) 268-7395 * innovation@andrew.cmu.edu * * 4. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by Computing Services * at Carnegie Mellon University (http://www.cmu.edu/computing/)." * * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * $Id: parser.h,v 1.6 2010/01/06 17:02:01 murch Exp $ */ #ifndef PARSER_H #define PARSER_H #include "prot.h" int parser(struct protstream *sieved_out, struct protstream *sieved_in); #endif /* PARSER_H */ cyrus-imapd-2.4.18/timsieved/TODO0000644000175000017500000000031612546374065015506 0ustar ellieellie$Id: TODO,v 1.5 2003/08/01 13:22:25 rjs3 Exp $ does authenticating leak memory? (mechanism name parameter in yacc not freed?) - leg 9/29/99 document the sieve quotas in: sieve.html (yet to be written) cyrus-imapd-2.4.18/timsieved/lex.h0000644000175000017500000000550512546374065015764 0ustar ellieellie/* lex.h -- lexer for timsieved * Tim Martin * 9/21/99 * * Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The name "Carnegie Mellon University" must not be used to * endorse or promote products derived from this software without * prior written permission. For permission or any legal * details, please contact * Carnegie Mellon University * Center for Technology Transfer and Enterprise Creation * 4615 Forbes Avenue * Suite 302 * Pittsburgh, PA 15213 * (412) 268-7393, fax: (412) 268-7395 * innovation@andrew.cmu.edu * * 4. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by Computing Services * at Carnegie Mellon University (http://www.cmu.edu/computing/)." * * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * $Id: lex.h,v 1.13 2010/01/06 17:02:01 murch Exp $ */ #ifndef _LEX_H_ #define _LEX_H_ #include "prot.h" #include "mystring.h" #define LEXER_STATE_RECOVER 61 #define LEXER_STATE_RECOVER_CR 62 #define LEXER_STATE_CR 63 #define LEXER_STATE_QSTR 64 #define LEXER_STATE_LITERAL 65 #define LEXER_STATE_NUMBER 66 #define LEXER_STATE_NORMAL 67 #define LEXER_STATE_ATOM 68 /* possible tokens */ #define SPACE 32 /* these must be above 255 */ #define EOL 300 #define STRING 301 #define NUMBER 302 #define AUTHENTICATE 400 #define LOGOUT 401 #define GETSCRIPT 402 #define PUTSCRIPT 403 #define SETACTIVE 404 #define LISTSCRIPTS 405 #define DELETESCRIPT 406 #define CAPABILITY 407 #define HAVESPACE 408 #define STARTTLS 409 #define NOOP 410 #define UNAUTHENTICATE 411 int lex_init(void); int timlex(mystring_t **outstr, unsigned long *outnum, struct protstream *stream); void lex_setrecovering(void); #endif cyrus-imapd-2.4.18/timsieved/exitcodes.h0000644000175000017500000000770412546374065017166 0ustar ellieellie/* exitcodes.h -- wrapper around sysextis.h * * Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The name "Carnegie Mellon University" must not be used to * endorse or promote products derived from this software without * prior written permission. For permission or any legal * details, please contact * Carnegie Mellon University * Center for Technology Transfer and Enterprise Creation * 4615 Forbes Avenue * Suite 302 * Pittsburgh, PA 15213 * (412) 268-7393, fax: (412) 268-7395 * innovation@andrew.cmu.edu * * 4. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by Computing Services * at Carnegie Mellon University (http://www.cmu.edu/computing/)." * * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * $Id: exitcodes.h,v 1.6 2010/01/06 17:02:01 murch Exp $ */ /* Sendmail has some weird ideas on what constitutes permenant failure. On more than one occasion, we have gotten burned by this moving users around through various inadvisable means, screwing up the mailboxes file, whatever. We don't want to fail out permenantly on things like EX_USAGE, EX_SOFTWARE, etc., because that generally means someone was just screwing with the mail store and we don't want to lose mail. Instead, we map these EC_* codes to EX_* codes, thereby lying to Sendmail, since we don't derive any benefit from Sendmail knowing what the error was. We just want it to retry all the time anyway. This way, should sendmail's behavior be different and we start deriving benefit from Sendmail knowing stuff, we can easily change it back. So other code uses the EC_* error, then we maybe change it to TEMPFAIL if we don't agree on whether the error should be permenant or not. Comments below stolen from sysexits.h. */ #ifndef INCLUDED_EXITCODES_H #define INCLUDED_EXITCODES_H #include #define EC_OK 0 /* successful termination */ #define EC_USAGE EX_TEMPFAIL /* command line usage error */ #define EC_DATAERR EX_DATAERR /* data format error */ #define EC_NOINPUT EX_TEMPFAIL /* cannot open input */ #define EC_NOUSER EX_NOUSER /* addressee unknown */ #define EC_NOHOST EX_TEMPFAIL /* host name unknown */ #define EC_UNAVAILABLE EX_TEMPFAIL /* service unavailable */ #define EC_SOFTWARE EX_TEMPFAIL /* internal software error */ #define EC_OSERR EX_TEMPFAIL /* system error (e.g., can't fork) */ #define EC_OSFILE EX_TEMPFAIL /* critical OS file missing */ #define EC_CANTCREAT EX_TEMPFAIL /* can't create (user) output file */ #define EC_IOERR EX_TEMPFAIL /* input/output error */ #define EC_TEMPFAIL EX_TEMPFAIL /* user is invited to retry */ #define EC_PROTOCOL EX_TEMPFAIL /* remote error in protocol */ #define EC_NOPERM EX_TEMPFAIL /* permission denied */ #define EC_CONFIG EX_TEMPFAIL /* configuration error */ #endif /* INCLUDED_EXITCODES_H */ cyrus-imapd-2.4.18/sieve/0000755000175000017500000000000012546375260014136 5ustar ellieelliecyrus-imapd-2.4.18/sieve/bytecode.h0000644000175000017500000001764112546374065016120 0ustar ellieellie/* bytecode.h -- bytecode definition * * Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The name "Carnegie Mellon University" must not be used to * endorse or promote products derived from this software without * prior written permission. For permission or any legal * details, please contact * Carnegie Mellon University * Center for Technology Transfer and Enterprise Creation * 4615 Forbes Avenue * Suite 302 * Pittsburgh, PA 15213 * (412) 268-7393, fax: (412) 268-7395 * innovation@andrew.cmu.edu * * 4. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by Computing Services * at Carnegie Mellon University (http://www.cmu.edu/computing/)." * * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ #ifndef SIEVE_BYTECODE_H #define SIEVE_BYTECODE_H /* for debugging*/ #define DUMPCODE 0 #define VERBOSE 0 /*for finding correctly aligned bytes on strings*/ /* bump to the next multiple of 4 bytes */ #define ROUNDUP(num) (((num) + 3) & 0xFFFFFFFC) /* yes, lots of these are superfluous, it's for clarity */ typedef union { int op; /* OPTYPE */ int value; int jump; int listlen; /* store strings (need 2 consecutive bytecodes) */ int len; char *str; } bytecode_t; /* For sanity during input on 64-bit platforms. * str should only be accessed as (char *)&str, but given the use of * unwrap_string, this should be OK */ typedef union { int op; /* OPTYPE */ int value; int jump; int listlen; /* store strings (need 2 consecutive bytecodes) */ int len; int str; } bytecode_input_t; /* version 0x01 scripts were written in host byte order. * we don't want to use this version number again and cause a mess * this isn't a huge concern, since this is version ntohl(1), or 16777216 * * version 0x02 scripts started using network byte order (recompile) * version 0x03 scripts implemented short-circuiting of testlists (recompile) * version 0x04 scripts implemented BODY, INCLUDE and COPY extensions * version 0x05 scripts implemented updated VACATION (:from and :handle) * version 0x06 scripts used in 2.5 (implemented updated VACATION (:seconds)) * version 0x07 scripts used in 2.5 (implemented updated INCLUDE (:once and :optional)) * version 0x08 scripts used in 2.5 (implemented DATE and INDEX extensions) * version 0x09 scripts implemented IMAP4FLAGS extension */ #define BYTECODE_VERSION 0x09 #define BYTECODE_MIN_VERSION 0x03 /* minimum supported version */ #define BYTECODE_MAGIC "CyrSBytecode" #define BYTECODE_MAGIC_LEN 12 /* Should be multiple of 4 */ /* IMPORTANT: To maintain forward compatibility of bytecode, please only add * new instructions to the end of these enums. (The reason these values * are all duplicated here is to avoid silliness if this caveat is forgotten * about in the other tables.) */ enum bytecode { B_STOP, B_KEEP_ORIG, /* legacy keep w/o support for :copy and :flags */ B_DISCARD, B_REJECT, /* require reject */ B_FILEINTO_ORIG, /* legacy fileinto w/o support for :copy */ B_REDIRECT_ORIG, /* legacy redirect w/o support for :copy */ B_IF, B_MARK, /* require imapflags */ B_UNMARK, /* require imapflags */ B_ADDFLAG, /* require imap4flags */ B_SETFLAG, /* require imap4flags */ B_REMOVEFLAG, /* require imap4flags */ B_NOTIFY, /* require notify */ B_DENOTIFY, /* require notify */ B_VACATION, /* require vacation */ B_NULL, B_JUMP, B_INCLUDE, /* require include */ B_RETURN, /* require include */ B_FILEINTO_COPY, /* legacy fileinto w/o support for :flags */ B_REDIRECT, B_RESERVED_VACATION, /* require vacation */ B_KEEP, B_FILEINTO /* require fileinto */ }; enum bytecode_comps { BC_FALSE, BC_TRUE, BC_NOT, BC_EXISTS, BC_SIZE, BC_ANYOF, BC_ALLOF, BC_ADDRESS, BC_ENVELOPE, /* require envelope */ BC_HEADER, BC_BODY, /* require body */ BC_RESERVED_DATE, /* require date */ BC_RESERVED_CURRENTDATE, /* require date */ BC_RESERVED_ADDRESS, BC_RESERVED_HEADER, BC_HASFLAG /* require imap4flags */ }; /* currently one enum so as to help determine where values are being misused. * we have left placeholders incase we need to add more later to the middle */ enum bytecode_tags { /* Size Tests */ B_OVER, B_UNDER, B_SIZE_PLACEHOLDER_1, B_SIZE_PLACEHOLDER_2, /* Relational Match Types */ B_GT, /* require relational */ B_GE, /* require relational */ B_LT, /* require relational */ B_LE, /* require relational */ B_EQ, /* require relational */ B_NE, /* require relational */ B_RELATIONAL_PLACEHOLDER_1, B_RELATIONAL_PLACEHOLDER_2, /* Priorities */ B_LOW, /* require notify */ B_NORMAL, /* require notify */ B_HIGH, /* require notify */ B_ANY, /* require notify */ B_PRIORITY_PLACEHOLDER_1, B_PRIORITY_PLACEHOLDER_2, B_PRIORITY_PLACEHOLDER_3, B_PRIORITY_PLACEHOLDER_4, /* Address Parts */ B_ALL, B_LOCALPART, B_DOMAIN, B_USER, /* require subaddress */ B_DETAIL, /* require subaddress */ B_ADDRESS_PLACEHOLDER_1, B_ADDRESS_PLACEHOLDER_2, B_ADDRESS_PLACEHOLDER_3, B_ADDRESS_PLACEHOLDER_4, /* Comparators */ B_ASCIICASEMAP, B_OCTET, B_ASCIINUMERIC, /* require comparator-i;ascii-numeric */ B_COMPARATOR_PLACEHOLDER_1, B_COMPARATOR_PLACEHOLDER_2, B_COMPARATOR_PLACEHOLDER_3, B_COMPARATOR_PLACEHOLDER_4, /* Match Types */ B_IS, B_CONTAINS, B_MATCHES, B_REGEX, /* require regex */ B_COUNT, /* require relational */ B_VALUE, /* require relational */ B_MATCH_PLACEHOLDER_1, B_MATCH_PLACEHOLDER_2, B_MATCH_PLACEHOLDER_3, B_MATCH_PLACEHOLDER_4, /* Body Transforms */ B_RAW, /* require body */ B_TEXT, /* require body */ B_CONTENT, /* require body */ B_TRANSFORM_PLACEHOLDER_1, B_TRANSFORM_PLACEHOLDER_2, B_TRANSFORM_PLACEHOLDER_3, B_TRANSFORM_PLACEHOLDER_4, B_TRANSFORM_PLACEHOLDER_5, /* Script locations */ B_PERSONAL, /* require include */ B_GLOBAL, /* require include */ B_LOCATION_PLACEHOLDER_1, B_LOCATION_PLACEHOLDER_2, B_LOCATION_PLACEHOLDER_3, B_LOCATION_PLACEHOLDER_4, /* Zones */ B_RESERVED_TIMEZONE, B_RESERVED_ORIGINALZONE, B_RESERVED_ZONE_PLACEHOLDER_1, B_RESERVED_ZONE_PLACEHOLDER_2, /* Date Parts */ B_RESERVED_YEAR, B_RESERVED_MONTH, B_RESERVED_DAY, B_RESERVED_DATE, B_RESERVED_JULIAN, B_RESERVED_HOUR, B_RESERVED_MINUTE, B_RESERVED_SECOND, B_RESERVED_TIME, B_RESERVED_ISO8601, B_RESERVED_STD11, B_RESERVED_ZONE, B_RESERVED_WEEKDAY, B_RESERVED_DATEPART_PLACEHOLDER_1, B_RESERVED_DATEPART_PLACEHOLDER_2, B_RESERVED_DATEPART_PLACEHOLDER_3, B_RESERVED_DATEPART_PLACEHOLDER_4 }; #endif cyrus-imapd-2.4.18/sieve/bc_emit.c0000644000175000017500000005011112546374065015704 0ustar ellieellie/* bc_emit.c -- sieve bytecode - pass 2 of the compiler * Rob Siemborski * Jen Smith * * Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The name "Carnegie Mellon University" must not be used to * endorse or promote products derived from this software without * prior written permission. For permission or any legal * details, please contact * Carnegie Mellon University * Center for Technology Transfer and Enterprise Creation * 4615 Forbes Avenue * Suite 302 * Pittsburgh, PA 15213 * (412) 268-7393, fax: (412) 268-7395 * innovation@andrew.cmu.edu * * 4. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by Computing Services * at Carnegie Mellon University (http://www.cmu.edu/computing/)." * * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * $Id: bc_emit.c,v 1.5 2010/01/06 17:01:58 murch Exp $ */ #ifdef HAVE_CONFIG_H #include #endif #include "xmalloc.h" #include "sieve_interface.h" #include "bytecode.h" #include #include #include #if DUMPCODE void dump(bytecode_info_t *d, int level); #endif static inline int write_int (int fd, int x) { int y=htonl(x); return (write(fd, &y, sizeof(int))); } struct bytecode_info { bytecode_t *data;/* pointer to almost-flat bytecode */ size_t scriptend; /* used by emit code to know final length of bytecode */ size_t reallen; /* allocated length of 'data' */ }; /* Pad null bytes onto the end of the string we just wrote */ /* returns -1 on failure or number of bytes written on success */ static int align_string(int fd, int string_len) { /* Keep in mind that we always want to pad a string with *at least* * one zero, that's why sometimes we have to pad with 4 */ int needed = sizeof(int) - (string_len % sizeof(int)); if (needed>= 0 && needed <=4) { if (write(fd, "\0\0\0\0", needed) == -1) return -1; } return needed; } /*all functions keep codep up to date as they use it. the amount that has been written to the file is maintained by the filelen variable in bc_action_emit the other bc_xxx_emit funtions keep track of how much they (and any functions they call) have written and return this value */ /* Write out a stringlist to a given file descriptor. * return # of bytes written on success and -1 on error */ /* stringlist: <# listitems> */ static int bc_stringlist_emit(int fd, int *codep, bytecode_info_t *bc) { int len = bc->data[(*codep)++].len; int i; int ret; int wrote = 2*sizeof(int); int begin,end; /* Write out number of items in the list */ if (write_int(fd, len)== -1) return -1 ; /* skip one spot end of list position*/ begin=lseek(fd,0,SEEK_CUR); lseek(fd,sizeof(int),SEEK_CUR); /* Loop through all the items of the list, writing out length and string * in sequence */ for(i=0; i < len; i++) { int datalen = bc->data[(*codep)++].len; if(write_int(fd, datalen) == -1) return -1; wrote += sizeof(int); if(write(fd, bc->data[(*codep)++].str, datalen) == -1) return -1; wrote += datalen; ret = align_string(fd,datalen); if(ret == -1) return -1; wrote+=ret; } end=lseek(fd,0,SEEK_CUR); if (end < 0) return -1; /* go back and write end of list position */ lseek(fd,begin,SEEK_SET); if(write_int(fd, end) == -1) return -1; /* return to the end */ lseek(fd,end,SEEK_SET); return wrote; } static int bc_test_emit(int fd, int *codep, bytecode_info_t *bc); /* Write out a testlist to a given file descriptor. * return # of bytes written on success and -1 on error */ static int bc_testlist_emit(int fd, int *codep, bytecode_info_t *bc) { int len = bc->data[(*codep)++].len; int i; int ret; int begin, end; int wrote = 2*sizeof(int); /* Write out number of items in the list */ if(write_int(fd, len)== -1) return -1; /* skip one spot for end of list position*/ begin = lseek(fd, 0, SEEK_CUR); lseek(fd, sizeof(int), SEEK_CUR); /* Loop through all the items of the list, writing out each * test as we reach it in sequence. */ for(i=0; i < len; i++) { int nextcodep = bc->data[(*codep)++].jump; ret = bc_test_emit(fd, codep, bc); if(ret < 0 ) return -1; wrote+=ret; *codep = nextcodep; } end = lseek(fd, 0, SEEK_CUR); if (end < 0) return -1; /* go back and write the end of list position */ lseek(fd,begin,SEEK_SET); if(write_int(fd, end) == -1) return -1; /*return to the end */ lseek(fd,end,SEEK_SET); return wrote; } /* emit the bytecode for a test. returns -1 on failure or size of * emitted bytecode on success */ static int bc_test_emit(int fd, int *codep, bytecode_info_t *bc) { int wrote=0;/* Relative offset to account for interleaved strings */ int ret; /* Temporary Return Value Variable */ /* Output this opcode */ if(write_int(fd, bc->data[(*codep)].op) == -1) return -1; wrote += sizeof(int); switch(bc->data[(*codep)++].op) { case BC_TRUE: case BC_FALSE: /* No parameter opcodes */ break; case BC_NOT: { /* Single parameter: another test */ ret = bc_test_emit(fd, codep, bc); if(ret < 0) return -1; else wrote+=ret; break; } case BC_ALLOF: case BC_ANYOF: /*where we jump to?*/ /* Just drop a testlist */ ret = bc_testlist_emit(fd, codep, bc); if(ret < 0) return -1; else wrote+=ret; break; case BC_SIZE: /* Drop tag and number */ if(write_int(fd, bc->data[(*codep)].value) == -1) return -1; if(write_int(fd, bc->data[(*codep)+1].value) == -1) return -1; wrote += 2 * sizeof(int); (*codep) += 2; break; case BC_EXISTS: { int ret; ret = bc_stringlist_emit(fd, codep, bc); if(ret < 0) return -1; wrote += ret; break; } case BC_HEADER: case BC_HASFLAG: { int ret; /* Drop match type */ if(write_int(fd, bc->data[(*codep)].value) == -1) return -1; wrote += sizeof(int); (*codep)++; /*now drop relation*/ if(write_int(fd, bc->data[(*codep)].value) == -1) return -1; wrote += sizeof(int); (*codep)++; /*drop comparator */ if(write_int(fd, bc->data[(*codep)].value) == -1) return -1; wrote += sizeof(int); (*codep)++; /* Now drop haystacks */ ret = bc_stringlist_emit(fd, codep, bc); if(ret < 0) return -1; wrote+=ret; /* Now drop needles */ ret = bc_stringlist_emit(fd, codep, bc); if(ret < 0) return -1; wrote+=ret; break; } case BC_ADDRESS: case BC_ENVELOPE: { int ret; /* Drop match type */ if(write_int(fd, bc->data[(*codep)].value) == -1) return -1; wrote += sizeof(int); (*codep)++; /*drop comparator */ if(write_int(fd, bc->data[(*codep)].value) == -1) return -1; wrote += sizeof(int); (*codep)++; /*now drop relation*/ if(write_int(fd, bc->data[(*codep)].value) == -1) return -1; wrote += sizeof(int); (*codep)++; /*now drop address part*/ if(write_int(fd, bc->data[(*codep)].value) == -1) return -1; wrote += sizeof(int); (*codep)++; /* Now drop headers */ ret = bc_stringlist_emit(fd, codep, bc); if(ret < 0) return -1; wrote+=ret; /* Now drop data */ ret = bc_stringlist_emit(fd, codep, bc); if(ret < 0) return -1; wrote+=ret; break; } case BC_BODY: { int ret; /* Drop match type */ if(write_int(fd, bc->data[(*codep)].value) == -1) return -1; wrote += sizeof(int); (*codep)++; /*drop comparator */ if(write_int(fd, bc->data[(*codep)].value) == -1) return -1; wrote += sizeof(int); (*codep)++; /*now drop relation*/ if(write_int(fd, bc->data[(*codep)].value) == -1) return -1; wrote += sizeof(int); (*codep)++; /*now drop transform*/ if(write_int(fd, bc->data[(*codep)].value) == -1) return -1; wrote += sizeof(int); (*codep)++; /*now drop offset*/ if(write_int(fd, bc->data[(*codep)].value) == -1) return -1; wrote += sizeof(int); (*codep)++; /*now drop content-types*/ ret = bc_stringlist_emit(fd, codep, bc); if(ret < 0) return -1; wrote+=ret; /* Now drop data */ ret = bc_stringlist_emit(fd, codep, bc); if(ret < 0) return -1; wrote+=ret; break; } default: /* Unknown testcode? */ return -1; } return wrote; } /* emit the bytecode to a file descriptor given a flattened parse tree * returns -1 on failure, size of emitted bytecode on success. * * this takes care of everything except the comparisons */ static int bc_action_emit(int fd, int codep, int stopcodep, bytecode_info_t *bc, int filelen) { int len; /* Temporary Length Variable */ int ret; /* Temporary Return Value Variable */ int start_filelen = filelen; int i; /*debugging variable to check filelen*/ /*int location;*/ syslog(LOG_DEBUG, "entered bc_action_emit with filelen: %d", filelen); /* All non-string data MUST be sizeof(int) byte alligned so the end of each string may require a pad */ /* * Note that for purposes of jumps you must multiply codep by sizeof(int) */ while(codep < stopcodep) { /* Output this opcode */ if(write_int(fd, bc->data[codep].op) == -1) return -1; filelen+=sizeof(int); switch(bc->data[codep++].op) { case B_IF: { /* IF * test * jump (false condition) * then * (if there is an else) jump(finish) * (if there is an else) else */ int testEndLoc=-1; int testdist, thendist, elsedist; int c; int jumpFalseLoc=-1;/*this is the location that is being reserved for the first jump command we jump to the false condition of the test*/ int jumpEndLoc=-1; /* this is the location that is being reserved for the optional jump command it jumps over the else statement to the end*/ int jumpto=-1; int jumpop= B_JUMP; /*leave space to store the location of end of the test*/ ret = lseek(fd, sizeof(int), SEEK_CUR); if(ret == -1) return ret; testEndLoc=filelen; filelen+=sizeof(int); /* spew the test */ c=codep+3; testdist = bc_test_emit(fd, &c, bc); if(testdist == -1)return -1; filelen +=testdist; /*store the location for hte end of the test *this is important for short circuiting of allof/anyof*/ jumpto=filelen/4; if(lseek(fd, testEndLoc, SEEK_SET) == -1) return -1; if(write_int(fd,jumpto) == -1) return -1; if(lseek(fd,filelen,SEEK_SET) == -1) return -1; /* leave space for jump */ if(write_int(fd, jumpop) == -1) return -1; ret = lseek(fd, sizeof(int), SEEK_CUR); if(ret == -1) return ret; jumpFalseLoc=filelen+sizeof(int); filelen +=2*sizeof(int); /*jumpop + jump*/ /* spew the then code */ thendist = bc_action_emit(fd, bc->data[codep].value, bc->data[codep+1].value, bc, filelen); filelen+=thendist; /* there is an else case */ if(bc->data[codep+2].value != -1) { /* leave space for jump */ if(write_int(fd, jumpop) == -1) return -1; ret = lseek(fd, sizeof(int), SEEK_CUR); if(ret == -1) return ret; jumpEndLoc=filelen+sizeof(int); filelen+=2*sizeof(int);/*jumpop + jump*/ } /*put previous jump to the end of the then code, *or the end of the jump if there is an else case */ jumpto=filelen/4; if(lseek(fd, jumpFalseLoc, SEEK_SET) == -1) return -1; if(write_int(fd,jumpto) == -1) return -1; if(lseek(fd,filelen,SEEK_SET) == -1) return -1; /* there is an else case */ if(bc->data[codep+2].value != -1) { /* spew the else code */ elsedist = bc_action_emit(fd, bc->data[codep+1].value, bc->data[codep+2].value, bc, filelen); filelen+=elsedist; /*put jump to the end of the else code*/ jumpto=filelen/4; if(lseek(fd, jumpEndLoc, SEEK_SET) == -1) return -1; if(write_int(fd,jumpto) == -1) return -1; if(lseek(fd,filelen,SEEK_SET) == -1) return -1; codep = bc->data[codep+2].value; } else { codep = bc->data[codep+1].value; } break; } case B_KEEP: /* Flags Stringlist, Copy (word) */ /* Dump a stringlist of flags */ ret = bc_stringlist_emit(fd, &codep, bc); if(ret < 0) return -1; filelen += ret; if(write_int(fd,bc->data[codep++].value) == -1) return -1; filelen += sizeof(int); break; case B_FILEINTO: /* Flags Stringlist, Copy (word), Folder String */ /* Dump a stringlist of flags */ ret = bc_stringlist_emit(fd, &codep, bc); if(ret < 0) return -1; filelen += ret; /* Write Copy */ if(write_int(fd,bc->data[codep++].value) == -1) return -1; filelen += sizeof(int); /* Write string length of Folder */ len = bc->data[codep++].len; if(write_int(fd,len) == -1) return -1; filelen+=sizeof(int); /* Write Folder */ if(write(fd,bc->data[codep++].str,len) == -1) return -1; ret = align_string(fd, len); if(ret == -1) return -1; filelen += len + ret; break; case B_REDIRECT: /* Copy (word), Address String */ if(write_int(fd,bc->data[codep++].value) == -1) return -1; filelen += sizeof(int); len = bc->data[codep++].len; if(write_int(fd,len) == -1) return -1; filelen+=sizeof(int); if(write(fd,bc->data[codep++].str,len) == -1) return -1; ret = align_string(fd, len); if(ret == -1) return -1; filelen += len + ret; break; case B_REJECT: /*just a string*/ len = bc->data[codep++].len; if(write_int(fd,len) == -1) return -1; filelen+=sizeof(int); if(write(fd,bc->data[codep++].str,len) == -1) return -1; ret = align_string(fd, len); if(ret == -1) return -1; filelen += len + ret; break; case B_SETFLAG: case B_ADDFLAG: case B_REMOVEFLAG: /* Dump just a stringlist */ ret = bc_stringlist_emit(fd, &codep, bc); if(ret < 0) return -1; filelen += ret; break; case B_NOTIFY: /* method string, id string, options string list, priotity, Message String */ /*method and id*/ for(i=0; i<2; i++) { len = bc->data[codep++].len; if(write_int(fd,len) == -1) return -1; filelen += sizeof(int); if(len == -1) { /* this will probably only happen for the id */ /* this is a nil string */ /* skip the null pointer and make up for it * by adjusting the offset */ codep++; } else { if(write(fd,bc->data[codep++].str,len) == -1) return -1; ret = align_string(fd, len); if(ret == -1) return -1; filelen += len + ret; } } /*options */ ret = bc_stringlist_emit(fd, &codep, bc); if(ret < 0) return -1; filelen+=ret; /*priority*/ if(write_int(fd, bc->data[codep].value) == -1) return -1; codep++; filelen += sizeof(int); len = bc->data[codep++].len; if(write_int(fd,len) == -1) return -1; filelen += sizeof(int); if(write(fd,bc->data[codep++].str,len) == -1) return -1; ret = align_string(fd, len); if(ret == -1) return -1; filelen += len + ret; break; case B_DENOTIFY: /* priority num,comptype num,relat num, comp string*/ /* priority*/ if(write_int(fd, bc->data[codep].value) == -1) return -1; filelen += sizeof(int); codep++; /* comptype */ if(write_int(fd, bc->data[codep].value) == -1) return -1; filelen += sizeof(int); codep++; /* relational*/ if(write_int(fd, bc->data[codep].value) == -1) return -1; filelen += sizeof(int); codep++; /* comp string*/ len = bc->data[codep++].len; if(write_int(fd,len) == -1) return -1; filelen += sizeof(int); if(len == -1) { /* this is a nil string */ /* skip the null pointer and make up for it * by adjusting the offset */ codep++; } else { if(write(fd,bc->data[codep++].str,len) == -1) return -1; ret = align_string(fd, len); if(ret == -1) return -1; filelen += len + ret; } break; case B_VACATION: /* Address list, Subject String, Message String, Days (word), Mime (word), From String, Handle String */ /*new code-this might be broken*/ ret = bc_stringlist_emit(fd, &codep, bc); if(ret < 0) return -1; filelen += ret; /*end of new code*/ for(i=0; i<2; i++) {/*writing strings*/ /*write length of string*/ len = bc->data[codep++].len; if(write_int(fd,len) == -1) return -1; filelen += sizeof(int); if(len == -1) { /* this is a nil string */ /* skip the null pointer and make up for it * by adjusting the offset */ codep++; } else { /*write string*/ if(write(fd,bc->data[codep++].str,len) == -1) return -1; ret = align_string(fd, len); if(ret == -1) return -1; filelen += len + ret; } } /* Days*/ if(write_int(fd,bc->data[codep].value) == -1) return -1; codep++; filelen += sizeof(int); /*Mime */ if(write_int(fd,bc->data[codep].value) == -1) return -1; codep++; for(i=0; i<2; i++) {/*writing strings*/ /*write length of string*/ len = bc->data[codep++].len; if(write_int(fd,len) == -1) return -1; filelen += sizeof(int); if(len == -1) { /* this is a nil string */ /* skip the null pointer and make up for it * by adjusting the offset */ codep++; } else { /*write string*/ if(write(fd,bc->data[codep++].str,len) == -1) return -1; ret = align_string(fd, len); if(ret == -1) return -1; filelen += len + ret; } } filelen += sizeof(int); break; case B_INCLUDE: /* Location (word), Filename String */ /* Location */ if(write_int(fd, bc->data[codep].value) == -1) return -1; filelen += sizeof(int); codep++; /* Filename */ len = bc->data[codep++].len; if(write_int(fd,len) == -1) return -1; filelen += sizeof(int); if(write(fd,bc->data[codep++].str,len) == -1) return -1; ret = align_string(fd, len); if(ret == -1) return -1; filelen += len + ret; break; case B_NULL: case B_STOP: case B_DISCARD: case B_MARK: case B_UNMARK: case B_RETURN: /* No Parameters! */ break; default: /* Unknown opcode? */ return -1; } } return filelen - start_filelen; } /* spew the bytecode to disk */ int sieve_emit_bytecode(int fd, bytecode_info_t *bc) { /* First output version number (4 bytes) */ int data = BYTECODE_VERSION; /*this is a string, so it is happy*/ if(write(fd, BYTECODE_MAGIC, BYTECODE_MAGIC_LEN) == -1) return -1; if(write_int(fd, data) == -1) return -1; #if DUMPCODE dump(bc, 0); #endif /*the sizeof(int) is to account for the version # at the begining*/ return bc_action_emit(fd, 0, bc->scriptend, bc, sizeof(int) + BYTECODE_MAGIC_LEN); } cyrus-imapd-2.4.18/sieve/varlist.c0000644000175000017500000000254012546374065015771 0ustar ellieellie/* * varlist.c * * Created on: Sep 29, 2014 * Author: James Cassell */ #include "varlist.h" #include #include "xmalloc.h" variable_list_t *varlist_new(void) { variable_list_t *vl; vl = xzmalloc(sizeof(variable_list_t)); vl->var = strarray_new(); return vl; } variable_list_t *varlist_select(variable_list_t *vl, const char *name) { if (!vl) { return NULL; } if ((!name && !vl->name) || (!(name && vl->name) && strcmp(name, vl->name))) { return vl; } return varlist_select(vl->next, name); } variable_list_t *varlist_end(variable_list_t *vl) { if (!vl) { return NULL; } if (!vl->next) { return vl; } return varlist_end(vl->next); } variable_list_t *varlist_extend(variable_list_t *vl) { if (!vl) { return NULL; } return (varlist_end(vl))->next = varlist_new(); } void varlist_fini(variable_list_t *vl) { if (!vl) { return; } if (vl->name) { free(vl->name); vl->name = NULL; } if (vl->var) { strarray_fini(vl->var); vl->var = NULL; } varlist_free(vl->next); vl->next = NULL; } void varlist_free(variable_list_t *vl) { variable_list_t *next = NULL; if (!vl) { return; } next = vl->next; if (vl->name) { free(vl->name); } if (vl->var) { strarray_free(vl->var); } free(vl); varlist_free(next); } cyrus-imapd-2.4.18/sieve/sieve.y0000644000175000017500000011662012546374065015453 0ustar ellieellie%{ /* sieve.y -- sieve parser * Larry Greenfield * * Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The name "Carnegie Mellon University" must not be used to * endorse or promote products derived from this software without * prior written permission. For permission or any legal * details, please contact * Carnegie Mellon University * Center for Technology Transfer and Enterprise Creation * 4615 Forbes Avenue * Suite 302 * Pittsburgh, PA 15213 * (412) 268-7393, fax: (412) 268-7395 * innovation@andrew.cmu.edu * * 4. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by Computing Services * at Carnegie Mellon University (http://www.cmu.edu/computing/)." * * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * $Id: sieve.y,v 1.45.2.1 2010/02/12 03:41:11 brong Exp $ */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include "xmalloc.h" #include "comparator.h" #include "interp.h" #include "script.h" #include "tree.h" #include "flags.h" #include "../lib/imapurl.h" #include "../lib/util.h" #include "../lib/imparse.h" #include "../lib/libconfig.h" #define ERR_BUF_SIZE 1024 char errbuf[ERR_BUF_SIZE]; /* definitions */ extern int addrparse(void); struct vtags { int days; strarray_t *addresses; char *subject; char *from; char *handle; int mime; }; struct htags { char *comparator; int comptag; int relation; }; struct aetags { int addrtag; char *comparator; int comptag; int relation; }; struct btags { int transform; int offset; strarray_t *content_types; char *comparator; int comptag; int relation; }; struct ntags { char *method; char *id; strarray_t *options; int priority; char *message; }; struct dtags { int comptag; int relation; void *pattern; int priority; }; static commandlist_t *ret; static sieve_script_t *parse_script; static char *check_reqs(strarray_t *sl); struct ftags { int copy; strarray_t *flags; }; static test_t *build_address(int t, struct aetags *ae, strarray_t *sl, strarray_t *pl); static test_t *build_header(int t, struct htags *h, strarray_t *sl, strarray_t *pl); static test_t *build_body(int t, struct btags *b, strarray_t *pl); static test_t *build_hasflag(int t, struct htags *h, strarray_t *pl); static commandlist_t *build_vacation(int t, struct vtags *h, char *s); static commandlist_t *build_notify(int t, struct ntags *n); static commandlist_t *build_denotify(int t, struct dtags *n); static commandlist_t *build_keep(int t, struct ftags *f); static commandlist_t *build_fileinto(int t, struct ftags *f, char *folder); static commandlist_t *build_redirect(int t, int c, char *a); static struct aetags *new_aetags(void); static struct aetags *canon_aetags(struct aetags *ae); static void free_aetags(struct aetags *ae); static struct htags *new_htags(void); static struct htags *canon_htags(struct htags *h); static void free_htags(struct htags *h); static struct btags *new_btags(void); static struct btags *canon_btags(struct btags *b); static void free_btags(struct btags *b); static struct vtags *new_vtags(void); static struct vtags *canon_vtags(struct vtags *v); static void free_vtags(struct vtags *v); static struct ntags *new_ntags(void); static struct ntags *canon_ntags(struct ntags *n); static void free_ntags(struct ntags *n); static struct dtags *new_dtags(void); static struct dtags *canon_dtags(struct dtags *d); static void free_dtags(struct dtags *d); static int verify_stringlist(strarray_t *sl, int (*verify)(char *)); static int verify_mailbox(char *s); static int verify_address(char *s); static int verify_header(char *s); static int verify_addrheader(char *s); static int verify_envelope(char *s); static int verify_relat(char *s); static struct ftags *new_ftags(void); static struct ftags *canon_ftags(struct ftags *f); static void free_ftags(struct ftags *f); #ifdef ENABLE_REGEX static int verify_regex(char *s, int cflags); static int verify_regexs(const strarray_t *sl, char *comp); #endif static int verify_utf8(char *s); int yyerror(const char *msg); extern int yylex(void); extern void yyrestart(FILE *f); #define YYERROR_VERBOSE /* i want better error messages! */ /* byacc default is 500, bison default is 10000 - go with the larger to support big sieve scripts (see Bug #3461) */ #define YYSTACKSIZE 10000 %} %union { int nval; char *sval; strarray_t *sl; test_t *test; testlist_t *testl; commandlist_t *cl; struct vtags *vtag; struct aetags *aetag; struct htags *htag; struct btags *btag; struct ntags *ntag; struct dtags *dtag; struct ftags *ftag; } %token NUMBER %token STRING %token IF ELSIF ELSE %token REJCT FILEINTO REDIRECT KEEP STOP DISCARD VACATION REQUIRE %token SETFLAG ADDFLAG REMOVEFLAG MARK UNMARK HASFLAG FLAGS %token NOTIFY DENOTIFY %token ANYOF ALLOF EXISTS SFALSE STRUE HEADER NOT SIZE ADDRESS ENVELOPE BODY %token COMPARATOR IS CONTAINS MATCHES REGEX COUNT VALUE OVER UNDER %token GT GE LT LE EQ NE %token ALL LOCALPART DOMAIN USER DETAIL %token RAW TEXT CONTENT %token DAYS ADDRESSES SUBJECT FROM HANDLE MIME %token METHOD ID OPTIONS LOW NORMAL HIGH ANY MESSAGE %token INCLUDE PERSONAL GLOBAL RETURN %token COPY %type commands command action elsif block %type stringlist strings %type test %type comptag relcomp sizetag addrparttag addrorenv location copy rtags %type testlist tests %type htags %type aetags %type btags %type vtags %type ntags %type dtags %type priority %type ftags %% start: reqs { ret = NULL; } | reqs commands { ret = $2; } ; reqs: /* empty */ | require reqs ; require: REQUIRE stringlist ';' { char *err = check_reqs($2); if (err) { yyerror(err); free(err); YYERROR; } } ; commands: command { $$ = $1; } | command commands { $1->next = $2; $$ = $1; } ; command: action ';' { $$ = $1; } | IF test block elsif { $$ = new_if($2, $3, $4); } | error ';' { $$ = new_command(STOP); } ; elsif: /* empty */ { $$ = NULL; } | ELSIF test block elsif { $$ = new_if($2, $3, $4); } | ELSE block { $$ = $2; } ; action: REJCT STRING { if (!parse_script->support.reject) { yyerror("reject MUST be enabled with \"require\""); YYERROR; } if (!verify_utf8($2)) { YYERROR; /* vu should call yyerror() */ } $$ = new_command(REJCT); $$->u.str = $2; } | FILEINTO ftags STRING { if (!parse_script->support.fileinto) { yyerror("fileinto MUST be enabled with \"require\""); YYERROR; } if (!verify_mailbox($3)) { YYERROR; /* vm should call yyerror() */ } $$ = build_fileinto(FILEINTO, $2, $3); } | REDIRECT rtags STRING { if (!verify_address($3)) { YYERROR; /* va should call yyerror() */ } $$ = build_redirect(REDIRECT, $2, $3); } | KEEP ftags { $$ = build_keep(KEEP,canon_ftags($2)); } | STOP { $$ = new_command(STOP); } | DISCARD { $$ = new_command(DISCARD); } | VACATION vtags STRING { if (!parse_script->support.vacation) { yyerror("vacation MUST be enabled with \"require\""); YYERROR; } if (($2->mime == -1) && !verify_utf8($3)) { YYERROR; /* vu should call yyerror() */ } $$ = build_vacation(VACATION, canon_vtags($2), $3); } | SETFLAG stringlist { if (!(parse_script->support.imapflags || parse_script->support.imap4flags)) { yyerror("imap4flags MUST be enabled with \"require\""); YYERROR; } verify_flaglist($2); if(!$2->count) { strarray_add($2, ""); } $$ = new_command(SETFLAG); $$->u.sl = $2; } | ADDFLAG stringlist { if (!(parse_script->support.imapflags || parse_script->support.imap4flags)) { yyerror("imap4flags MUST be enabled with \"require\""); YYERROR; } verify_flaglist($2); if(!$2->count) { strarray_add($2, ""); } $$ = new_command(ADDFLAG); $$->u.sl = $2; } | REMOVEFLAG stringlist { if (!(parse_script->support.imapflags || parse_script->support.imap4flags)) { yyerror("imap4flags MUST be enabled with \"require\""); YYERROR; } verify_flaglist($2); if(!$2->count) { strarray_add($2, ""); } $$ = new_command(REMOVEFLAG); $$->u.sl = $2; } | MARK { if (!parse_script->support.imapflags) { yyerror("imapflags MUST be enabled with \"require\""); YYERROR; } $$ = new_command(MARK); } | UNMARK { if (!parse_script->support.imapflags) { yyerror("imapflags MUST be enabled with \"require\""); YYERROR; } $$ = new_command(UNMARK); } | NOTIFY ntags { if (!parse_script->support.notify) { yyerror("notify MUST be enabled with \"require\""); $$ = new_command(NOTIFY); YYERROR; } else { $$ = build_notify(NOTIFY, canon_ntags($2)); } } | DENOTIFY dtags { if (!parse_script->support.notify) { yyerror("notify MUST be enabled with \"require\""); $$ = new_command(DENOTIFY); YYERROR; } else { $$ = build_denotify(DENOTIFY, canon_dtags($2)); if ($$ == NULL) { yyerror("unable to find a compatible comparator"); YYERROR; } } } | INCLUDE location STRING { if (!parse_script->support.include) { yyerror("include MUST be enabled with \"require\""); YYERROR; } $$ = new_command(INCLUDE); $$->u.inc.location = $2; int i; for (i=0; $3[i] != '\0'; i++) if ($3[i] == '/') { yyerror("included script name must not contain slash"); YYERROR; break; } $$->u.inc.script = $3; } | RETURN { if (!parse_script->support.include) { yyerror("include MUST be enabled with \"require\""); YYERROR; } $$ = new_command(RETURN); } ; location: /* empty */ { $$ = PERSONAL; } | PERSONAL { $$ = PERSONAL; } | GLOBAL { $$ = GLOBAL; } ; ntags: /* empty */ { $$ = new_ntags(); } | ntags ID STRING { if ($$->id != NULL) { yyerror("duplicate :method"); YYERROR; } else { $$->id = $3; } } | ntags METHOD STRING { if ($$->method != NULL) { yyerror("duplicate :method"); YYERROR; } else { $$->method = $3; } } | ntags OPTIONS stringlist { if ($$->options != NULL) { yyerror("duplicate :options"); YYERROR; } else { $$->options = $3; } } | ntags priority { if ($$->priority != -1) { yyerror("duplicate :priority"); YYERROR; } else { $$->priority = $2; } } | ntags MESSAGE STRING { if ($$->message != NULL) { yyerror("duplicate :message"); YYERROR; } else { $$->message = $3; } } ; dtags: /* empty */ { $$ = new_dtags(); } | dtags priority { if ($$->priority != -1) { yyerror("duplicate priority level"); YYERROR; } else { $$->priority = $2; } } | dtags comptag STRING { if ($$->comptag != -1) { yyerror("duplicate comparator type tag"); YYERROR; } $$->comptag = $2; #ifdef ENABLE_REGEX if ($$->comptag == REGEX) { int cflags = REG_EXTENDED | REG_NOSUB | REG_ICASE; if (!verify_regex($3, cflags)) { YYERROR; } } #endif $$->pattern = $3; } | dtags relcomp STRING { $$ = $1; if ($$->comptag != -1) { yyerror("duplicate comparator type tag"); YYERROR; } else { $$->comptag = $2; $$->relation = verify_relat($3); if ($$->relation==-1) {YYERROR; /*vr called yyerror()*/ } } } ; priority: LOW { $$ = LOW; } | NORMAL { $$ = NORMAL; } | HIGH { $$ = HIGH; } ; vtags: /* empty */ { $$ = new_vtags(); } | vtags DAYS NUMBER { if ($$->days != -1) { yyerror("duplicate :days"); YYERROR; } else { $$->days = $3; } } | vtags ADDRESSES stringlist { if ($$->addresses != NULL) { yyerror("duplicate :addresses"); YYERROR; } else if (!verify_stringlist($3, verify_address)) { YYERROR; } else { $$->addresses = $3; } } | vtags SUBJECT STRING { if ($$->subject != NULL) { yyerror("duplicate :subject"); YYERROR; } else if (!verify_utf8($3)) { YYERROR; /* vu should call yyerror() */ } else { $$->subject = $3; } } | vtags FROM STRING { if ($$->from != NULL) { yyerror("duplicate :from"); YYERROR; } else if (!verify_address($3)) { YYERROR; /* va should call yyerror() */ } else { $$->from = $3; } } | vtags HANDLE STRING { if ($$->handle != NULL) { yyerror("duplicate :handle"); YYERROR; } else if (!verify_utf8($3)) { YYERROR; /* vu should call yyerror() */ } else { $$->handle = $3; } } | vtags MIME { if ($$->mime != -1) { yyerror("duplicate :mime"); YYERROR; } else { $$->mime = MIME; } } ; stringlist: '[' strings ']' { $$ = $2; } | STRING { $$ = strarray_new(); strarray_appendm($$, $1); } ; strings: STRING { $$ = strarray_new(); strarray_appendm($$, $1); } | strings ',' STRING { $$ = $1; strarray_appendm($$, $3); } ; block: '{' commands '}' { $$ = $2; } | '{' '}' { $$ = NULL; } ; test: ANYOF testlist { $$ = new_test(ANYOF); $$->u.tl = $2; } | ALLOF testlist { $$ = new_test(ALLOF); $$->u.tl = $2; } | EXISTS stringlist { $$ = new_test(EXISTS); $$->u.sl = $2; } | SFALSE { $$ = new_test(SFALSE); } | STRUE { $$ = new_test(STRUE); } | HEADER htags stringlist stringlist { if (!verify_stringlist($3, verify_header)) { YYERROR; /* vh should call yyerror() */ } if (!verify_stringlist($4, verify_utf8)) { YYERROR; /* vu should call yyerror() */ } $2 = canon_htags($2); #ifdef ENABLE_REGEX if ($2->comptag == REGEX) { if (!(verify_regexs($4, $2->comparator))) { YYERROR; } } #endif $$ = build_header(HEADER, $2, $3, $4); if ($$ == NULL) { yyerror("unable to find a compatible comparator"); YYERROR; } } | HASFLAG htags stringlist { if (!parse_script->support.imap4flags) { yyerror("imap4flags MUST be enabled with \"require\""); YYERROR; } $2 = canon_htags($2); #ifdef ENABLE_REGEX if ($2->comptag == REGEX) { if (!(verify_regexs($3, $2->comparator))) { YYERROR; } } #endif $$ = build_hasflag(HASFLAG, $2, $3); if ($$ == NULL) { yyerror("unable to find a compatible comparator"); YYERROR; } } | addrorenv aetags stringlist stringlist { if (($1 == ADDRESS) && !verify_stringlist($3, verify_addrheader)) { YYERROR; } else if (($1 == ENVELOPE) && !verify_stringlist($3, verify_envelope)) { YYERROR; } $2 = canon_aetags($2); #ifdef ENABLE_REGEX if ($2->comptag == REGEX) { if (!( verify_regexs($4, $2->comparator))) { YYERROR; } } #endif $$ = build_address($1, $2, $3, $4); if ($$ == NULL) { yyerror("unable to find a compatible comparator"); YYERROR; } } | BODY btags stringlist { if (!parse_script->support.body) { yyerror("body MUST be enabled with \"require\""); YYERROR; } if (!verify_stringlist($3, verify_utf8)) { YYERROR; /* vu should call yyerror() */ } $2 = canon_btags($2); #ifdef ENABLE_REGEX if ($2->comptag == REGEX) { if (!(verify_regexs($3, $2->comparator))) { YYERROR; } } #endif $$ = build_body(BODY, $2, $3); if ($$ == NULL) { yyerror("unable to find a compatible comparator"); YYERROR; } } | NOT test { $$ = new_test(NOT); $$->u.t = $2; } | SIZE sizetag NUMBER { $$ = new_test(SIZE); $$->u.sz.t = $2; $$->u.sz.n = $3; } | error { $$ = NULL; } ; addrorenv: ADDRESS { $$ = ADDRESS; } | ENVELOPE {if (!parse_script->support.envelope) {yyerror("envelope MUST be enabled with \"require\""); YYERROR;} else{$$ = ENVELOPE; } } ; aetags: /* empty */ { $$ = new_aetags(); } | aetags addrparttag { $$ = $1; if ($$->addrtag != -1) { yyerror("duplicate or conflicting address part tag"); YYERROR; } else { $$->addrtag = $2; } } | aetags comptag { $$ = $1; if ($$->comptag != -1) { yyerror("duplicate comparator type tag"); YYERROR; } else { $$->comptag = $2; } } | aetags relcomp STRING{ $$ = $1; if ($$->comptag != -1) { yyerror("duplicate comparator type tag"); YYERROR; } else { $$->comptag = $2; $$->relation = verify_relat($3); if ($$->relation==-1) {YYERROR; /*vr called yyerror()*/ } } } | aetags COMPARATOR STRING { $$ = $1; if ($$->comparator != NULL) { yyerror("duplicate comparator tag"); YYERROR; } else if (!strcmp($3, "i;ascii-numeric") && !parse_script->support.i_ascii_numeric) { yyerror("comparator-i;ascii-numeric MUST be enabled with \"require\""); YYERROR; } else { $$->comparator = $3; } } ; htags: /* empty */ { $$ = new_htags(); } | htags comptag { $$ = $1; if ($$->comptag != -1) { yyerror("duplicate comparator type tag"); YYERROR; } else { $$->comptag = $2; } } | htags relcomp STRING { $$ = $1; if ($$->comptag != -1) { yyerror("duplicate comparator type tag"); YYERROR; } else { $$->comptag = $2; $$->relation = verify_relat($3); if ($$->relation==-1) {YYERROR; /*vr called yyerror()*/ } } } | htags COMPARATOR STRING { $$ = $1; if ($$->comparator != NULL) { yyerror("duplicate comparator tag"); YYERROR; } else if (!strcmp($3, "i;ascii-numeric") && !parse_script->support.i_ascii_numeric) { yyerror("comparator-i;ascii-numeric MUST be enabled with \"require\""); YYERROR; } else { $$->comparator = $3; } } ; btags: /* empty */ { $$ = new_btags(); } | btags RAW { $$ = $1; if ($$->transform != -1) { yyerror("duplicate or conflicting transform tag"); YYERROR; } else { $$->transform = RAW; } } | btags TEXT { $$ = $1; if ($$->transform != -1) { yyerror("duplicate or conflicting transform tag"); YYERROR; } else { $$->transform = TEXT; } } | btags CONTENT stringlist { $$ = $1; if ($$->transform != -1) { yyerror("duplicate or conflicting transform tag"); YYERROR; } else { $$->transform = CONTENT; $$->content_types = $3; } } | btags comptag { $$ = $1; if ($$->comptag != -1) { yyerror("duplicate comparator type tag"); YYERROR; } else { $$->comptag = $2; } } | btags relcomp STRING { $$ = $1; if ($$->comptag != -1) { yyerror("duplicate comparator type tag"); YYERROR; } else { $$->comptag = $2; $$->relation = verify_relat($3); if ($$->relation==-1) {YYERROR; /*vr called yyerror()*/ } } } | btags COMPARATOR STRING { $$ = $1; if ($$->comparator != NULL) { yyerror("duplicate comparator tag"); YYERROR; } else if (!strcmp($3, "i;ascii-numeric") && !parse_script->support.i_ascii_numeric) { yyerror("comparator-i;ascii-numeric MUST be enabled with \"require\""); YYERROR; } else { $$->comparator = $3; } } ; addrparttag: ALL { $$ = ALL; } | LOCALPART { $$ = LOCALPART; } | DOMAIN { $$ = DOMAIN; } | USER { if (!parse_script->support.subaddress) { yyerror("subaddress MUST be enabled with \"require\""); YYERROR; } $$ = USER; } | DETAIL { if (!parse_script->support.subaddress) { yyerror("subaddress MUST be enabled with \"require\""); YYERROR; } $$ = DETAIL; } ; comptag: IS { $$ = IS; } | CONTAINS { $$ = CONTAINS; } | MATCHES { $$ = MATCHES; } | REGEX { if (!parse_script->support.regex) { yyerror("regex MUST be enabled with \"require\""); YYERROR; } $$ = REGEX; } ; relcomp: COUNT { if (!parse_script->support.relational) { yyerror("relational MUST be enabled with \"require\""); YYERROR; } $$ = COUNT; } | VALUE { if (!parse_script->support.relational) { yyerror("relational MUST be enabled with \"require\""); YYERROR; } $$ = VALUE; } ; sizetag: OVER { $$ = OVER; } | UNDER { $$ = UNDER; } ; copy: COPY { if (!parse_script->support.copy) { yyerror("copy MUST be enabled with \"require\""); YYERROR; } $$ = 1; } ; ftags: /* empty */ { $$ = new_ftags(); } | ftags copy { $$ = $1; if ($$->copy) { yyerror("duplicate copy tag"); YYERROR; } else { $$->copy = $2; } } | ftags FLAGS stringlist { if (!parse_script->support.imap4flags) { yyerror("imap4flags MUST be enabled with \"require\""); YYERROR; } $$ = $1; if ($$->flags != NULL) { yyerror("duplicate flags tag"); YYERROR; } else { verify_flaglist($3); if(!$3->count) { strarray_add($3, ""); } $$->flags = $3; } } ; rtags: /* empty */ { $$ = 0; } | rtags copy { $$ = $1; if ($$) { yyerror("duplicate copy tag"); YYERROR; } else { $$ = $2; } } ; testlist: '(' tests ')' { $$ = $2; } ; tests: test { $$ = new_testlist($1, NULL); } | test ',' tests { $$ = new_testlist($1, $3); } ; %% commandlist_t *sieve_parse(sieve_script_t *script, FILE *f) { commandlist_t *t; parse_script = script; yyrestart(f); if (yyparse()) { t = NULL; } else { t = ret; } ret = NULL; return t; } int yyerror(const char *msg) { extern int yylineno; int ret; parse_script->err++; if (parse_script->interp.err) { ret = parse_script->interp.err(yylineno, msg, parse_script->interp.interp_context, parse_script->script_context); } return 0; } static char *check_reqs(strarray_t *sa) { char *s; char *err = NULL, *p, sep = ':'; size_t alloc = 0; while ((s = strarray_shift(sa))) { if (!script_require(parse_script, s)) { if (!err) { alloc = 100; p = err = xmalloc(alloc); p += sprintf(p, "Unsupported feature(s) in \"require\""); } else if ((size_t) (p - err + strlen(s) + 5) > alloc) { alloc += 100; err = xrealloc(err, alloc); p = err + strlen(err); } p += sprintf(p, "%c \"%s\"", sep, s); sep = ','; } free(s); } return err; } static test_t *build_address(int t, struct aetags *ae, strarray_t *sl, strarray_t *pl) { test_t *ret = new_test(t); /* can be either ADDRESS or ENVELOPE */ assert((t == ADDRESS) || (t == ENVELOPE)); if (ret) { ret->u.ae.comptag = ae->comptag; ret->u.ae.relation=ae->relation; ret->u.ae.comparator=xstrdup(ae->comparator); ret->u.ae.sl = sl; ret->u.ae.pl = pl; ret->u.ae.addrpart = ae->addrtag; free_aetags(ae); } return ret; } static test_t *build_header(int t, struct htags *h, strarray_t *sl, strarray_t *pl) { test_t *ret = new_test(t); /* can be HEADER or HASFLAG */ assert((t == HEADER) || (t == HASFLAG)); if (ret) { ret->u.h.comptag = h->comptag; ret->u.h.relation=h->relation; ret->u.h.comparator=xstrdup(h->comparator); ret->u.h.sl = sl; ret->u.h.pl = pl; free_htags(h); } return ret; } static test_t *build_hasflag(int t, struct htags *h, strarray_t *pl) { return build_header(t,h,NULL,pl); } static test_t *build_body(int t, struct btags *b, strarray_t *pl) { test_t *ret = new_test(t); /* can be BODY */ assert(t == BODY); if (ret) { ret->u.b.comptag = b->comptag; ret->u.b.relation = b->relation; ret->u.b.comparator = xstrdup(b->comparator); ret->u.b.transform = b->transform; ret->u.b.offset = b->offset; ret->u.b.content_types = b->content_types; b->content_types = NULL; ret->u.b.pl = pl; free_btags(b); } return ret; } static commandlist_t *build_vacation(int t, struct vtags *v, char *reason) { commandlist_t *ret = new_command(t); assert(t == VACATION); if (ret) { ret->u.v.subject = v->subject; v->subject = NULL; ret->u.v.from = v->from; v->from = NULL; ret->u.v.handle = v->handle; v->handle = NULL; ret->u.v.days = v->days; ret->u.v.mime = v->mime; ret->u.v.addresses = v->addresses; v->addresses = NULL; free_vtags(v); ret->u.v.message = reason; } return ret; } static commandlist_t *build_notify(int t, struct ntags *n) { commandlist_t *ret = new_command(t); assert(t == NOTIFY); if (ret) { ret->u.n.method = n->method; n->method = NULL; ret->u.n.id = n->id; n->id = NULL; ret->u.n.options = n->options; n->options = NULL; ret->u.n.priority = n->priority; ret->u.n.message = n->message; n->message = NULL; free_ntags(n); } return ret; } static commandlist_t *build_denotify(int t, struct dtags *d) { commandlist_t *ret = new_command(t); assert(t == DENOTIFY); if (ret) { ret->u.d.comptag = d->comptag; ret->u.d.relation=d->relation; ret->u.d.pattern = d->pattern; d->pattern = NULL; ret->u.d.priority = d->priority; free_dtags(d); } return ret; } static commandlist_t *build_keep(int t, struct ftags *f) { commandlist_t *ret = new_command(t); assert(t == KEEP); if (ret) { ret->u.k.copy = f->copy; ret->u.k.flags = f->flags; f->flags = NULL; free_ftags(f); } return ret; } static commandlist_t *build_fileinto(int t, struct ftags *f, char *folder) { commandlist_t *ret = new_command(t); assert(t == FILEINTO); if (ret) { ret->u.f.copy = f->copy; ret->u.f.flags = f->flags; f->flags = NULL; if (config_getswitch(IMAPOPT_SIEVE_UTF8FILEINTO)) { ret->u.f.folder = xmalloc(5 * strlen(folder) + 1); UTF8_to_mUTF7(ret->u.f.folder, folder); free(folder); } else { ret->u.f.folder = folder; } free_ftags(f); } return ret; } static commandlist_t *build_redirect(int t, int copy, char *address) { commandlist_t *ret = new_command(t); assert(t == REDIRECT); if (ret) { ret->u.r.copy = copy; ret->u.r.address = address; } return ret; } static struct aetags *new_aetags(void) { struct aetags *r = (struct aetags *) xmalloc(sizeof(struct aetags)); r->addrtag = r->comptag = r->relation=-1; r->comparator=NULL; return r; } static struct aetags *canon_aetags(struct aetags *ae) { if (ae->addrtag == -1) { ae->addrtag = ALL; } if (ae->comparator == NULL) { ae->comparator = xstrdup("i;ascii-casemap"); } if (ae->comptag == -1) { ae->comptag = IS; } return ae; } static void free_aetags(struct aetags *ae) { free(ae->comparator); free(ae); } static struct htags *new_htags(void) { struct htags *r = (struct htags *) xmalloc(sizeof(struct htags)); r->comptag = r->relation= -1; r->comparator = NULL; return r; } static struct htags *canon_htags(struct htags *h) { if (h->comparator == NULL) { h->comparator = xstrdup("i;ascii-casemap"); } if (h->comptag == -1) { h->comptag = IS; } return h; } static void free_htags(struct htags *h) { free(h->comparator); free(h); } static struct btags *new_btags(void) { struct btags *r = (struct btags *) xmalloc(sizeof(struct btags)); r->transform = r->offset = r->comptag = r->relation = -1; r->content_types = NULL; r->comparator = NULL; return r; } static struct btags *canon_btags(struct btags *b) { if (b->transform == -1) { b->transform = TEXT; } if (b->content_types == NULL) { b->content_types = strarray_new(); if (b->transform == RAW) { strarray_append(b->content_types, ""); } else { strarray_append(b->content_types, "text"); } } if (b->offset == -1) { b->offset = 0; } if (b->comparator == NULL) { b->comparator = xstrdup("i;ascii-casemap"); } if (b->comptag == -1) { b->comptag = IS; } return b; } static void free_btags(struct btags *b) { if (b->content_types) { strarray_free(b->content_types); } free(b->comparator); free(b); } static struct vtags *new_vtags(void) { struct vtags *r = (struct vtags *) xmalloc(sizeof(struct vtags)); r->days = -1; r->addresses = NULL; r->subject = NULL; r->from = NULL; r->handle = NULL; r->mime = -1; return r; } static struct vtags *canon_vtags(struct vtags *v) { assert(parse_script->interp.vacation != NULL); if (v->days == -1) { v->days = 7; } if (v->days < parse_script->interp.vacation->min_response) { v->days = parse_script->interp.vacation->min_response; } if (v->days > parse_script->interp.vacation->max_response) { v->days = parse_script->interp.vacation->max_response; } if (v->mime == -1) { v->mime = 0; } return v; } static void free_vtags(struct vtags *v) { if (v->addresses) { strarray_free(v->addresses); } if (v->subject) { free(v->subject); } if (v->from) { free(v->from); } if (v->handle) { free(v->handle); } free(v); } static struct ntags *new_ntags(void) { struct ntags *r = (struct ntags *) xmalloc(sizeof(struct ntags)); r->method = NULL; r->id = NULL; r->options = NULL; r->priority = -1; r->message = NULL; return r; } static struct ntags *canon_ntags(struct ntags *n) { if (n->priority == -1) { n->priority = NORMAL; } if (n->message == NULL) { n->message = xstrdup("$from$: $subject$"); } if (n->method == NULL) { n->method = xstrdup("default"); } return n; } static struct dtags *canon_dtags(struct dtags *d) { if (d->priority == -1) { d->priority = ANY; } if (d->comptag == -1) { d->comptag = ANY; } return d; } static void free_ntags(struct ntags *n) { if (n->method) { free(n->method); } if (n->id) { free(n->id); } if (n->options) { strarray_free(n->options); } if (n->message) { free(n->message); } free(n); } static struct dtags *new_dtags(void) { struct dtags *r = (struct dtags *) xmalloc(sizeof(struct dtags)); r->comptag = r->priority= r->relation = -1; r->pattern = NULL; return r; } static void free_dtags(struct dtags *d) { if (d->pattern) free(d->pattern); free(d); } static struct ftags *new_ftags(void) { struct ftags *f = (struct ftags *) xmalloc(sizeof(struct ftags)); f->copy = 0; f->flags = NULL; return f; } static struct ftags *canon_ftags(struct ftags *f) { return f; } static void free_ftags(struct ftags *f) { if (f->flags) { strarray_free(f->flags); } free(f); } static int verify_stringlist(strarray_t *sa, int (*verify)(char *)) { int i; for (i = 0 ; i < sa->count ; i++) if (!verify(sa->data[i])) return 0; return 1; } char *addrptr; /* pointer to address string for address lexer */ char addrerr[500]; /* buffer for address parser error messages */ static int verify_address(char *s) { addrptr = s; addrerr[0] = '\0'; /* paranoia */ if (addrparse()) { snprintf(errbuf, ERR_BUF_SIZE, "address '%s': %s", s, addrerr); yyerror(errbuf); return 0; } return 1; } static int verify_mailbox(char *s) { if (!verify_utf8(s)) return 0; /* xxx if not a mailbox, call yyerror */ return 1; } static int verify_header(char *hdr) { char *h = hdr; while (*h) { /* field-name = 1*ftext ftext = %d33-57 / %d59-126 ; Any character except ; controls, SP, and ; ":". */ if (!((*h >= 33 && *h <= 57) || (*h >= 59 && *h <= 126))) { snprintf(errbuf, ERR_BUF_SIZE, "header '%s': not a valid header", hdr); yyerror(errbuf); return 0; } h++; } return 1; } static int verify_addrheader(char *hdr) { const char **h, *hdrs[] = { "from", "sender", "reply-to", /* RFC2822 originator fields */ "to", "cc", "bcc", /* RFC2822 destination fields */ "resent-from", "resent-sender", /* RFC2822 resent fields */ "resent-to", "resent-cc", "resent-bcc", "return-path", /* RFC2822 trace fields */ "disposition-notification-to", /* RFC2298 MDN request fields */ "delivered-to", /* non-standard (loop detection) */ "approved", /* RFC1036 moderator/control fields */ NULL }; if (!config_getswitch(IMAPOPT_RFC3028_STRICT)) return verify_header(hdr); for (lcase(hdr), h = hdrs; *h; h++) { if (!strcmp(*h, hdr)) return 1; } snprintf(errbuf, ERR_BUF_SIZE, "header '%s': not a valid header for an address test", hdr); yyerror(errbuf); return 0; } static int verify_envelope(char *env) { lcase(env); if (!config_getswitch(IMAPOPT_RFC3028_STRICT) || !strcmp(env, "from") || !strcmp(env, "to") || !strcmp(env, "auth")) { return 1; } snprintf(errbuf, ERR_BUF_SIZE, "env-part '%s': not a valid part for an envelope test", env); yyerror(errbuf); return 0; } static int verify_relat(char *r) {/* this really should have been a token to begin with.*/ lcase(r); if (!strcmp(r, "gt")) {return GT;} else if (!strcmp(r, "ge")) {return GE;} else if (!strcmp(r, "lt")) {return LT;} else if (!strcmp(r, "le")) {return LE;} else if (!strcmp(r, "ne")) {return NE;} else if (!strcmp(r, "eq")) {return EQ;} else{ snprintf(errbuf, ERR_BUF_SIZE, "flag '%s': not a valid relational operation", r); yyerror(errbuf); return -1; } } #ifdef ENABLE_REGEX static int verify_regex(char *s, int cflags) { int ret; regex_t *reg = (regex_t *) xmalloc(sizeof(regex_t)); #ifdef HAVE_PCREPOSIX_H /* support UTF8 comparisons */ cflags |= REG_UTF8; #endif if ((ret = regcomp(reg, s, cflags)) != 0) { (void) regerror(ret, reg, errbuf, ERR_BUF_SIZE); yyerror(errbuf); free(reg); return 0; } free(reg); return 1; } static int verify_regexs(const strarray_t *sa, char *comp) { int i; int cflags = REG_EXTENDED | REG_NOSUB; if (!strcmp(comp, "i;ascii-casemap")) { cflags |= REG_ICASE; } for (i = 0 ; i < sa->count ; i++) { if ((verify_regex(sa->data[i], cflags)) == 0) return 0; } return 1; } #endif /* * Valid UTF-8 check (from RFC 2640 Annex B.1) * * The following routine checks if a byte sequence is valid UTF-8. This * is done by checking for the proper tagging of the first and following * bytes to make sure they conform to the UTF-8 format. It then checks * to assure that the data part of the UTF-8 sequence conforms to the * proper range allowed by the encoding. Note: This routine will not * detect characters that have not been assigned and therefore do not * exist. */ static int verify_utf8(char *s) { const char *buf = s; const char *endbuf = s + strlen(s); unsigned char byte2mask = 0x00, c; int trailing = 0; /* trailing (continuation) bytes to follow */ while (buf != endbuf) { c = *buf++; if (trailing) { if ((c & 0xC0) == 0x80) { /* Does trailing byte follow UTF-8 format? */ if (byte2mask) { /* Need to check 2nd byte for proper range? */ if (c & byte2mask) /* Are appropriate bits set? */ byte2mask = 0x00; else break; } trailing--; } else break; } else { if ((c & 0x80) == 0x00) /* valid 1 byte UTF-8 */ continue; else if ((c & 0xE0) == 0xC0) /* valid 2 byte UTF-8 */ if (c & 0x1E) { /* Is UTF-8 byte in proper range? */ trailing = 1; } else break; else if ((c & 0xF0) == 0xE0) { /* valid 3 byte UTF-8 */ if (!(c & 0x0F)) { /* Is UTF-8 byte in proper range? */ byte2mask = 0x20; /* If not, set mask to check next byte */ } trailing = 2; } else if ((c & 0xF8) == 0xF0) { /* valid 4 byte UTF-8 */ if (!(c & 0x07)) { /* Is UTF-8 byte in proper range? */ byte2mask = 0x30; /* If not, set mask to check next byte */ } trailing = 3; } else if ((c & 0xFC) == 0xF8) { /* valid 5 byte UTF-8 */ if (!(c & 0x03)) { /* Is UTF-8 byte in proper range? */ byte2mask = 0x38; /* If not, set mask to check next byte */ } trailing = 4; } else if ((c & 0xFE) == 0xFC) { /* valid 6 byte UTF-8 */ if (!(c & 0x01)) { /* Is UTF-8 byte in proper range? */ byte2mask = 0x3C; /* If not, set mask to check next byte */ } trailing = 5; } else break; } } if ((buf != endbuf) || trailing) { snprintf(errbuf, ERR_BUF_SIZE, "string '%s': not valid utf8", s); yyerror(errbuf); return 0; } return 1; } cyrus-imapd-2.4.18/sieve/comparator.c0000644000175000017500000003003612546374065016455 0ustar ellieellie/* comparator.c -- comparator functions * Larry Greenfield * Ken Murchison (rewritten to handle relational ops and non-terminated text) * * Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The name "Carnegie Mellon University" must not be used to * endorse or promote products derived from this software without * prior written permission. For permission or any legal * details, please contact * Carnegie Mellon University * Center for Technology Transfer and Enterprise Creation * 4615 Forbes Avenue * Suite 302 * Pittsburgh, PA 15213 * (412) 268-7393, fax: (412) 268-7395 * innovation@andrew.cmu.edu * * 4. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by Computing Services * at Carnegie Mellon University (http://www.cmu.edu/computing/)." * * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * $Id: comparator.c,v 1.26 2010/01/06 17:01:59 murch Exp $ */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include "comparator.h" #include "tree.h" #include "sieve.h" #include "bytecode.h" #include "xmalloc.h" #include "util.h" /*!!! uses B_CONTAINS not CONTAINS, etc, only works with bytecode*/ typedef int (*compare_t)(const void *, size_t, const void *); /* --- relational comparators --- */ /* these are generic wrappers in which 'rock' is the compare function */ static int rel_eq(const char *text, size_t tlen, const char *pat, void *rock) { compare_t compar = (compare_t) rock; return (compar(text, tlen, pat) == 0); } static int rel_ne(const char *text, size_t tlen, const char *pat, void *rock) { compare_t compar = (compare_t) rock; return (compar(text, tlen, pat) != 0); } static int rel_gt(const char *text, size_t tlen, const char *pat, void *rock) { compare_t compar = (compare_t) rock; return (compar(text, tlen, pat) > 0); } static int rel_ge(const char *text, size_t tlen, const char *pat, void *rock) { compare_t compar = (compare_t) rock; return (compar(text, tlen, pat) >= 0); } static int rel_lt(const char *text, size_t tlen, const char *pat, void *rock) { compare_t compar = (compare_t) rock; return (compar(text, tlen, pat) < 0); } static int rel_le(const char *text, size_t tlen, const char *pat, void *rock) { compare_t compar = (compare_t) rock; return (compar(text, tlen, pat) <= 0); } /* --- i;octet comparators --- */ /* just compare the two; pat should be NULL terminated */ static int octet_cmp_(const char *text, size_t tlen, const char *pat, int casemap) { size_t plen, sl, i; int r = 0; plen = strlen(pat); sl = tlen < plen ? tlen : plen; for (i = 0; !r && i < sl; i++) { r = casemap ? toupper(text[i]) - toupper(pat[i]) : text[i] - pat[i]; } if (r == 0) return (tlen - plen); else return r; } static int octet_cmp(const char *text, size_t tlen, const char *pat) { return octet_cmp_(text, tlen, pat, 0); } /* we implement boyer-moore for hell of it, since this is probably not very useful for sieve */ #if 0 int boyer_moore(char *text, char *pat) { int i, j; /* indexes */ int M = strlen(pat); /* length of pattern */ int N = strlen(text); /* length of text */ int skip[256]; /* table of how much to skip, based on each character */ /* initialize skip table */ for (i = 0; i < 256; i++) skip[i] = M; for (i = 0; i < M; i++) skip[(int) pat[i]] = M-i-1; /* look for pat in text */ i = j = M-1; do { if (pat[j] == text[i]) { i--; j--; } else { if (M-j > skip[(int) text[i]]) { i = i + M - j; } else { i = i + skip[(int) text[i]]; } j = M-1; } } while (!((j < 0) || (i >= N))); /* i+1 is the position of the match if i < N */ return (i < N) ? 1 : 0; } #endif /* we do a brute force attack */ static int octet_contains_(const char *text, size_t tlen, const char *pat, int casemap) { int N = tlen; int M = strlen(pat); int i, j; i = 0, j = 0; while ((j < M) && (i < N)) { if ((text[i] == pat[j]) || (casemap && (toupper(text[i]) == toupper(pat[j])))) { i++; j++; } else { i = i - j + 1; j = 0; } } return (j == M); /* we found a match! */ } static int octet_contains(const char *text, size_t tlen, const char *pat, void *rock __attribute__((unused))) { return octet_contains_(text, tlen, pat, 0); } static int octet_matches_(const char *text, size_t tlen, const char *pat, int casemap) { const char *p; const char *t; char c; t = text; p = pat; for (;;) { if (*p == '\0') { /* ran out of pattern */ return (!tlen); } c = *p++; switch (c) { case '?': if (!tlen) { return 0; } t++; tlen--; break; case '*': while (*p == '*' || *p == '?') { if (*p == '?') { /* eat the character now */ if (!tlen) { return 0; } t++; tlen--; } /* coalesce into a single wildcard */ p++; } if (*p == '\0') { /* wildcard at end of string, any remaining text is ok */ return 1; } while (tlen) { /* recurse */ if (octet_matches_(t, tlen, p, casemap)) return 1; t++; tlen--; } break; case '\\': c = *p++; /* falls through */ default: if ((c == *t) || (casemap && (toupper(c) == toupper(*t)))) { t++; tlen--; } else { /* literal char doesn't match */ return 0; } } } /* never reaches */ } static int octet_matches(const char *text, size_t tlen, const char *pat, void *rock __attribute__((unused))) { return octet_matches_(text, tlen, pat, 0); } #ifdef ENABLE_REGEX static int octet_regex(const char *text, size_t tlen, const char *pat, void *rock __attribute__((unused))) { int r; #ifdef REG_STARTEND /* pcre, BSD, some linuxes support this handy trick */ regmatch_t pm[1]; pm[0].rm_so = 0; pm[0].rm_eo = tlen; r = !regexec((regex_t *) pat, text, 0, pm, REG_STARTEND); #else #ifdef HAVE_RX_POSIX_H /* rx provides regnexec, that will work too */ r = !regnexec((regex_t *) pat, text, tlen, 0, NULL, 0); #else /* regexec() requires a NUL-terminated string, and we have no * guarantee that "text" is one. Also, it may be only exactly * tlen's length, so we can't safely check. Always dup. */ char *buf = (char *) xstrndup(text, tlen); r = !regexec((regex_t *) pat, buf, 0, NULL, 0); free(buf); #endif /* HAVE_RX_POSIX_H */ #endif /* REG_STARTEND */ return r; } #endif /* --- i;ascii-casemap comparators --- */ static int ascii_casemap_cmp(const char *text, size_t tlen, const char *pat) { return octet_cmp_(text, tlen, pat, 1); } static int ascii_casemap_contains(const char *text, size_t tlen, const char *pat, void *rock __attribute__((unused))) { return octet_contains_(text, tlen, pat, 1); } static int ascii_casemap_matches(const char *text, size_t tlen, const char *pat, void *rock __attribute__((unused))) { return octet_matches_(text, tlen, pat, 1); } /* i;ascii-numeric; only supports relational tests * * A \ B number not-num * number A ? B A < B * not-num A > B A == B */ /* From RFC 2244: * * The i;ascii-numeric comparator interprets strings as decimal * positive integers represented as US-ASCII digits. All values * which do not begin with a US-ASCII digit are considered equal * with an ordinal value higher than all non-NIL single-valued * attributes. Otherwise, all US-ASCII digits (octet values * 0x30 to 0x39) are interpreted starting from the beginning of * the string to the first non-digit or the end of the string. */ static int ascii_numeric_cmp(const char *text, size_t tlen, const char *pat) { unsigned text_digit_len; unsigned pat_digit_len; if (Uisdigit(*pat)) { if (Uisdigit(*text)) { /* Count how many digits each string has */ for (text_digit_len = 0; tlen-- && Uisdigit(text[text_digit_len]); text_digit_len++); for (pat_digit_len = 0; Uisdigit(pat[pat_digit_len]); pat_digit_len++); if (text_digit_len < pat_digit_len) { /* Pad "text" with leading 0s */ while (pat_digit_len > text_digit_len) { /* "text" can only be less or equal to "pat" */ if ('0' < *pat) { return (-1); } pat++; pat_digit_len--; } } else if (text_digit_len > pat_digit_len) { /* Pad "pad" with leading 0s */ while (text_digit_len > pat_digit_len) { /* "pad" can only be greater or equal to "text" */ if (*text > '0') { return 1; } text++; text_digit_len--; } } /* CLAIM: If we here, we have two non-empty digital suffixes of equal length */ while (text_digit_len > 0) { if (*text < *pat) { return -1; } else if (*text > *pat) { return 1; } /* Characters are equal, carry on */ text++; pat++; text_digit_len--; } return (0); } else { return 1; } } else if (Uisdigit(*text)) { return -1; } else { return 0; /* both not digits */ } } static comparator_t *lookup_rel(int relation) { comparator_t *ret; ret = NULL; switch (relation) { case B_EQ: ret = &rel_eq; break; case B_NE: ret = &rel_ne; break; case B_GT: ret = &rel_gt; break; case B_GE: ret = &rel_ge; break; case B_LT: ret = &rel_lt; break; case B_LE: ret = &rel_le; } return ret; } comparator_t *lookup_comp(int comp, int mode, int relation, void **comprock) { comparator_t *ret; ret = NULL; *comprock = NULL; #if VERBOSE printf("comp%d mode%d relat%d \n", comp, mode, relation); #endif switch (comp) { case B_OCTET: switch (mode) { case B_IS: ret = &rel_eq; *comprock = (void **) &octet_cmp; break; case B_CONTAINS: ret = &octet_contains; break; case B_MATCHES: ret = &octet_matches; break; #ifdef ENABLE_REGEX case B_REGEX: ret = &octet_regex; break; #endif case B_VALUE: ret = lookup_rel(relation); *comprock = (void **) &octet_cmp; break; } break; /*end of octet */ case B_ASCIICASEMAP: switch (mode) { case B_IS: ret = &rel_eq; *comprock = (void **) &ascii_casemap_cmp; break; case B_CONTAINS: ret = &ascii_casemap_contains; break; case B_MATCHES: ret = &ascii_casemap_matches; break; #ifdef ENABLE_REGEX case B_REGEX: /* the ascii-casemap destinction is made during the compilation of the regex in verify_regex() */ ret = &octet_regex; break; #endif case B_VALUE: ret = lookup_rel(relation); *comprock = (void **) &ascii_casemap_cmp; break; } break;/*end of ascii casemap */ case B_ASCIINUMERIC: switch (mode) { case B_IS: ret = &rel_eq; *comprock = (void **) &ascii_numeric_cmp; break; case B_COUNT: case B_VALUE: ret = lookup_rel(relation); *comprock = (void **) &ascii_numeric_cmp; break; } break; } return ret; } cyrus-imapd-2.4.18/sieve/interp.c0000644000175000017500000001720012546374065015605 0ustar ellieellie/* interp.c -- sieve script interpretor builder * Larry Greenfield * * Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The name "Carnegie Mellon University" must not be used to * endorse or promote products derived from this software without * prior written permission. For permission or any legal * details, please contact * Carnegie Mellon University * Center for Technology Transfer and Enterprise Creation * 4615 Forbes Avenue * Suite 302 * Pittsburgh, PA 15213 * (412) 268-7393, fax: (412) 268-7395 * innovation@andrew.cmu.edu * * 4. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by Computing Services * at Carnegie Mellon University (http://www.cmu.edu/computing/)." * * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * $Id: interp.c,v 1.27 2010/01/06 17:01:59 murch Exp $ */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include "xmalloc.h" #include "xstrlcat.h" #include "sieve_interface.h" #include "interp.h" #include "libconfig.h" #define EXT_LEN 4096 /* build a sieve interpretor */ int sieve_interp_alloc(sieve_interp_t **interp, void *interp_context) { sieve_interp_t *i; static int initonce; if (!initonce) { initialize_siev_error_table(); initonce = 1; } *interp = NULL; i = (sieve_interp_t *) xmalloc(sizeof(sieve_interp_t)); if (i == NULL) { return SIEVE_NOMEM; } i->redirect = i->discard = i->reject = i->fileinto = i->keep = NULL; i->getsize = NULL; i->getheader = NULL; i->getenvelope = NULL; i->getbody = NULL; i->getinclude = NULL; i->vacation = NULL; i->notify = NULL; i->markflags = NULL; i->interp_context = interp_context; i->err = NULL; *interp = i; return SIEVE_OK; } const char *sieve_listextensions(sieve_interp_t *i) { static int done = 0; static char extensions[EXT_LEN] = ""; if (!done++) { unsigned long config_sieve_extensions = config_getbitfield(IMAPOPT_SIEVE_EXTENSIONS); /* add comparators */ strlcat(extensions, "comparator-i;ascii-numeric", EXT_LEN); /* add actions */ if (i->fileinto && (config_sieve_extensions & IMAP_ENUM_SIEVE_EXTENSIONS_FILEINTO)) strlcat(extensions, " fileinto", EXT_LEN); if (i->reject && (config_sieve_extensions & IMAP_ENUM_SIEVE_EXTENSIONS_REJECT)) strlcat(extensions, " reject", EXT_LEN); if (i->vacation && (config_sieve_extensions & IMAP_ENUM_SIEVE_EXTENSIONS_VACATION)) strlcat(extensions, " vacation", EXT_LEN); if (i->markflags && (config_sieve_extensions & IMAP_ENUM_SIEVE_EXTENSIONS_IMAPFLAGS)) strlcat(extensions, " imapflags", EXT_LEN); if (i->notify && (config_sieve_extensions & IMAP_ENUM_SIEVE_EXTENSIONS_NOTIFY)) strlcat(extensions, " notify", EXT_LEN); if (i->getinclude && (config_sieve_extensions & IMAP_ENUM_SIEVE_EXTENSIONS_INCLUDE)) strlcat(extensions, " include", EXT_LEN); /* add tests */ if (i->getenvelope && (config_sieve_extensions & IMAP_ENUM_SIEVE_EXTENSIONS_ENVELOPE)) strlcat(extensions, " envelope", EXT_LEN); if (i->getbody && (config_sieve_extensions & IMAP_ENUM_SIEVE_EXTENSIONS_BODY)) strlcat(extensions, " body", EXT_LEN); if (config_sieve_extensions & IMAP_ENUM_SIEVE_EXTENSIONS_IMAP4FLAGS) strlcat(extensions, " imap4flags", EXT_LEN); /* add match-types */ if (config_sieve_extensions & IMAP_ENUM_SIEVE_EXTENSIONS_RELATIONAL) strlcat(extensions, " relational", EXT_LEN); #ifdef ENABLE_REGEX if (config_sieve_extensions & IMAP_ENUM_SIEVE_EXTENSIONS_REGEX) strlcat(extensions, " regex", EXT_LEN); #endif /* add misc extensions */ if (config_sieve_extensions & IMAP_ENUM_SIEVE_EXTENSIONS_SUBADDRESS) strlcat(extensions, " subaddress", EXT_LEN); if (config_sieve_extensions & IMAP_ENUM_SIEVE_EXTENSIONS_COPY) strlcat(extensions, " copy", EXT_LEN); } return extensions; } int sieve_interp_free(sieve_interp_t **interp) { free(*interp); return SIEVE_OK; } /* add the callbacks */ int sieve_register_redirect(sieve_interp_t *interp, sieve_callback *f) { interp->redirect = f; return SIEVE_OK; } int sieve_register_discard(sieve_interp_t *interp, sieve_callback *f) { interp->discard = f; return SIEVE_OK; } int sieve_register_reject(sieve_interp_t *interp, sieve_callback *f) { interp->reject = f; return SIEVE_OK; } int sieve_register_fileinto(sieve_interp_t *interp, sieve_callback *f) { interp->fileinto = f; return SIEVE_OK; } int sieve_register_keep(sieve_interp_t *interp, sieve_callback *f) { interp->keep = f; return SIEVE_OK; } int sieve_register_imapflags(sieve_interp_t *interp, const strarray_t *mark) { static strarray_t default_mark = STRARRAY_INITIALIZER; if (!default_mark.count) strarray_append(&default_mark, "\\flagged"); interp->markflags = (mark && mark->data && mark->count) ? mark : &default_mark; return SIEVE_OK; } int sieve_register_notify(sieve_interp_t *interp, sieve_callback *f) { interp->notify = f; return SIEVE_OK; } /* add the callbacks for messages. again, undefined if used after sieve_script_parse */ int sieve_register_size(sieve_interp_t *interp, sieve_get_size *f) { interp->getsize = f; return SIEVE_OK; } int sieve_register_header(sieve_interp_t *interp, sieve_get_header *f) { interp->getheader = f; return SIEVE_OK; } int sieve_register_envelope(sieve_interp_t *interp, sieve_get_envelope *f) { interp->getenvelope = f; return SIEVE_OK; } int sieve_register_include(sieve_interp_t *interp, sieve_get_include *f) { interp->getinclude = f; return SIEVE_OK; } int sieve_register_body(sieve_interp_t *interp, sieve_get_body *f) { interp->getbody = f; return SIEVE_OK; } int sieve_register_vacation(sieve_interp_t *interp, sieve_vacation_t *v) { if (!interp->getenvelope) { return SIEVE_NOT_FINALIZED; /* we need envelope for vacation! */ } if (v->min_response == 0) v->min_response = 3; if (v->max_response == 0) v->max_response = 90; if (v->min_response < 0 || v->max_response < 7 || !v->autorespond || !v->send_response) { return SIEVE_FAIL; } interp->vacation = v; return SIEVE_OK; } int sieve_register_parse_error(sieve_interp_t *interp, sieve_parse_error *f) { interp->err = f; return SIEVE_OK; } int sieve_register_execute_error(sieve_interp_t *interp, sieve_execute_error *f) { interp->execute_err = f; return SIEVE_OK; } int interp_verify(sieve_interp_t *i) { if (i->redirect && i->keep && i->getsize && i->getheader) { return SIEVE_OK; } else { return SIEVE_NOT_FINALIZED; } } cyrus-imapd-2.4.18/sieve/bc_generate.c0000644000175000017500000005334012546374065016547 0ustar ellieellie/* bc_generate.c -- sieve bytecode- almost flattened bytecode * Rob Siemborski * * Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The name "Carnegie Mellon University" must not be used to * endorse or promote products derived from this software without * prior written permission. For permission or any legal * details, please contact * Carnegie Mellon University * Center for Technology Transfer and Enterprise Creation * 4615 Forbes Avenue * Suite 302 * Pittsburgh, PA 15213 * (412) 268-7393, fax: (412) 268-7395 * innovation@andrew.cmu.edu * * 4. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by Computing Services * at Carnegie Mellon University (http://www.cmu.edu/computing/)." * * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * $Id: bc_generate.c,v 1.6 2010/01/06 17:01:58 murch Exp $ */ #ifdef HAVE_CONFIG_H #include #endif #include "xmalloc.h" #include "sieve_interface.h" #include "script.h" #include "tree.h" #include "sieve.h" #include "bytecode.h" #include #include struct bytecode_info { bytecode_t *data;/* pointer to almost-flat bytecode */ size_t scriptend; /* used by emit code to know final length of bytecode */ size_t reallen; /* allocated length of 'data' */ }; static int bc_test_generate(int codep, bytecode_info_t *retval, test_t *t); /* returns false if the request can't be satisfied, true if it can. */ static int atleast(bytecode_info_t *arr, size_t len) { if(arr->reallen < len) { /* too small; double if that's big enough, otherwise increase to the requested size. */ arr->reallen = (len > arr->reallen * 2 ? len : arr->reallen * 2); arr->data = xrealloc(arr->data, arr->reallen*sizeof(bytecode_t)); if(!arr->data) { /* out of memory? */ return 0; } } return 1; } /* * functions of the form bc_XXX_generate have the following properties: * on success they return an int that corresponds to the next empty location * for code, and on failure they return -1. * * they will take a bytecode_info_t as a parameter and modify it by * making it larger and adding more bytecommands in the pass 1 form */ /* given a location and a string list, compile it into almost-flat form. * etc... */ static int bc_stringlist_generate(int codep, bytecode_info_t *retval, strarray_t *sa) { int len_codep = codep; int strcount = 0; int i; codep++; /* Bounds check the string list length */ if(!atleast(retval,codep+1)) return -1; if (sa) { for (i = 0 ; i < sa->count ; i++) { char *s = sa->data[i]; strcount++; assert(s!=NULL); /* Bounds check for each string before we allocate it */ if(!atleast(retval,codep+2)) return -1; retval->data[codep++].len = strlen(s); retval->data[codep++].str = s; } } retval->data[len_codep].listlen = strcount; return codep; } /* write a list of tests into almost-flat form, starting at codep. * returns the next code location, -1 on error. */ /* ... */ static int bc_testlist_generate(int codep, bytecode_info_t *retval, testlist_t *tl) { int len_codep = codep; int testcount = 0; testlist_t *cur; codep++; /* Bounds check the test list length */ if(!atleast(retval,codep+1)) return -1; for(cur=tl; cur; cur=cur->next) { int oldcodep = codep; /* Make room for tail marker */ if(!atleast(retval,codep+1)) return -1; testcount++; codep = bc_test_generate(codep+1, retval, cur->t); retval->data[oldcodep].jump = codep; } retval->data[len_codep].listlen = testcount; return codep; } /* output a relation into almost-flat form at codep. * returns new codep on success, -1 on failure. */ static int bc_relation_generate(int codep, bytecode_info_t *retval, int relat) { if (!atleast(retval, codep + 1)) return -1; switch (relat) { case GT: retval->data[codep++].value= B_GT; break; case GE: retval->data[codep++].value= B_GE; break; case LT: retval->data[codep++].value= B_LT; break; case LE: retval->data[codep++].value= B_LE; break; case EQ: retval->data[codep++].value= B_EQ; break; case NE: retval->data[codep++].value= B_NE; break; default: /* comparator has no relational field */ retval->data[codep++].value= -1; break; } return codep; } /* writes a single comparator into almost-flat form starting at codep. * will always write out 3 words * returns the next code location or -1 on error. */ static int bc_comparator_generate(int codep, bytecode_info_t *retval, int comptag, int relat, const char *comparator) { assert(retval != NULL); /* comptag */ if (!atleast(retval, codep + 1)) return -1; switch (comptag) { case IS: retval->data[codep++].value = B_IS; break; case CONTAINS: retval->data[codep++].value = B_CONTAINS; break; case MATCHES: retval->data[codep++].value = B_MATCHES; break; #ifdef ENABLE_REGEX case REGEX: retval->data[codep++].value = B_REGEX; break; #endif case COUNT: retval->data[codep++].value = B_COUNT; break; case VALUE: retval->data[codep++].value = B_VALUE; break; default: return -1; } /*relation*/ codep = bc_relation_generate(codep, retval, relat); /* comparator (value specified with :comparator) */ if (!atleast(retval, codep + 1)) return -1; /* xxx perhaps extend comparator.h to have lookup_comp return an index, and then lookup_by_index return the actual comparator? we can then eliminate the comptag above, too. */ if (!strcmp (comparator, "i;octet")) retval->data[codep++].value = B_OCTET; else if (!strcmp (comparator, "i;ascii-casemap")) retval->data[codep++].value = B_ASCIICASEMAP; else if (!strcmp (comparator, "i;ascii-numeric")) retval->data[codep++].value = B_ASCIINUMERIC; return codep; } /* writes a single test into almost-flat form starting at codep. * returns the next code location or -1 on error. */ static int bc_test_generate(int codep, bytecode_info_t *retval, test_t *t) { if(!retval) return -1; switch(t->type) { case STRUE: /* BC_TRUE */ if(!atleast(retval,codep+1)) return -1; retval->data[codep++].op = BC_TRUE; break; case SFALSE:/* BC_FALSE */ if(!atleast(retval,codep+1)) return -1; retval->data[codep++].op = BC_FALSE; break; case NOT: /* BC_NOT {subtest : test} */ if(!atleast(retval,codep+1)) return -1; retval->data[codep++].op = BC_NOT; codep = bc_test_generate(codep, retval, t->u.t); if (codep == -1) return -1; break; case SIZE: /* BC_SIZE (B_OVER | B_UNDER) {size : int} */ if(!atleast(retval,codep+3)) return -1; retval->data[codep++].op = BC_SIZE; retval->data[codep++].value = (t->u.sz.t == OVER ? B_OVER : B_UNDER); retval->data[codep++].value = t->u.sz.n; break; case EXISTS:/* BC_EXISTS { headers : string list } */ if(!atleast(retval,codep+1)) return -1; retval->data[codep++].op = BC_EXISTS; codep= bc_stringlist_generate(codep, retval, t->u.sl); break; case ANYOF:/* BC_ANYOF { tests : test list } */ if(!atleast(retval,codep+1)) return -1; retval->data[codep++].op = BC_ANYOF; codep=bc_testlist_generate(codep, retval, t->u.tl); if (codep == -1) return -1; break; case ALLOF: /* BC_ALLOF { tests : test list } */ if(!atleast(retval,codep+1)) return -1; retval->data[codep++].op = BC_ALLOF; codep= bc_testlist_generate(codep, retval, t->u.tl); if (codep == -1) return -1; break; case HEADER: case HASFLAG: /* (BC_HEADER | BC_HASFLAG) { c: comparator } { haystacks : string list } { patterns : string list } */ if(!atleast(retval,codep + 1)) return -1; retval->data[codep++].op = (t->type == HEADER) ? BC_HEADER : BC_HASFLAG; /* comparator */ codep = bc_comparator_generate(codep, retval, t->u.h.comptag, t->u.h.relation, t->u.h.comparator); if (codep == -1) return -1; /* haystacks */ codep = bc_stringlist_generate(codep, retval, t->u.h.sl); if (codep == -1) return -1; /* pattern */ codep = bc_stringlist_generate(codep, retval, t->u.h.pl); if (codep == -1) return -1; break; case ADDRESS: case ENVELOPE: /* (BC_ADDRESS | BC_ENVELOPE) {c : comparator} (B_ALL | B_LOCALPART | ...) { header : string list } { pattern : string list } */ if(!atleast(retval,codep+1)) return -1; retval->data[codep++].op = (t->type == ADDRESS) ? BC_ADDRESS : BC_ENVELOPE; codep = bc_comparator_generate(codep, retval,t->u.ae.comptag, t->u.ae.relation, t->u.ae.comparator); if (codep == -1) return -1; if(!atleast(retval,codep+1)) return -1; /*address part*/ switch(t->u.ae.addrpart) { case ALL: retval->data[codep++].value = B_ALL; break; case LOCALPART: retval->data[codep++].value = B_LOCALPART; break; case DOMAIN: retval->data[codep++].value = B_DOMAIN; break; case USER: retval->data[codep++].value = B_USER; break; case DETAIL: retval->data[codep++].value = B_DETAIL; break; default: return -1; } /*headers*/ codep = bc_stringlist_generate(codep, retval, t->u.ae.sl); if (codep == -1) return -1; /*patterns*/ codep = bc_stringlist_generate(codep, retval, t->u.ae.pl); if (codep == -1) return -1; break; case BODY: /* BC_BODY {c : comparator} (B_RAW | B_TEXT | ...) { content-types : stringlist } { offset : int } { pattern : string list } */ if(!atleast(retval,codep+1)) return -1; retval->data[codep++].op = BC_BODY; codep = bc_comparator_generate(codep, retval,t->u.b.comptag, t->u.b.relation, t->u.b.comparator); if (codep == -1) return -1; if(!atleast(retval,codep+2)) return -1; /*transform*/ switch(t->u.b.transform) { case RAW: retval->data[codep++].value = B_RAW; break; case TEXT: retval->data[codep++].value = B_TEXT; break; case CONTENT: retval->data[codep++].value = B_CONTENT; break; default: return -1; } /*offset*/ retval->data[codep++].value = t->u.b.offset; /*content-types*/ codep = bc_stringlist_generate(codep, retval, t->u.b.content_types); if (codep == -1) return -1; /*patterns*/ codep = bc_stringlist_generate(codep, retval, t->u.b.pl); if (codep == -1) return -1; break; default: return -1; } return codep; } /* generate a not-quite-flattened bytecode */ /* returns address of next instruction or -1 on error*/ /* needs current instruction, buffer for the code, and a current parse tree */ /* sieve is cool because everything is immediate! */ static int bc_action_generate(int codep, bytecode_info_t *retval, commandlist_t *c) { int jumploc,baseloc; if(!retval) return -1; if (c==NULL) { if(!atleast(retval,codep+1)) return -1; retval->data[codep++].op = B_NULL; } else { do { switch(c->type) { case STOP: /* STOP (no arguments) */ if(!atleast(retval,codep+1)) return -1; retval->data[codep++].op = B_STOP; break; case DISCARD: /* DISCARD (no arguments) */ if(!atleast(retval,codep+1)) return -1; retval->data[codep++].op = B_DISCARD; break; case KEEP: /* KEEP STRINGLIST flags VALUE copy */ if (!atleast(retval, codep+1)) return -1; retval->data[codep++].op = B_KEEP; codep = bc_stringlist_generate(codep,retval,c->u.k.flags); if (codep == -1) return -1; if(!atleast(retval,codep+1)) return -1; retval->data[codep++].value = c->u.k.copy; break; case MARK: /* MARK (no arguments) */ if(!atleast(retval,codep+1)) return -1; retval->data[codep++].op = B_MARK; break; case UNMARK: /* UNMARK (no arguments) */ if(!atleast(retval,codep+1)) return -1; retval->data[codep++].op = B_UNMARK; break; case RETURN: /* RETURN (no arguments) */ if(!atleast(retval,codep+1)) return -1; retval->data[codep++].op = B_RETURN; break; case DENOTIFY: /* DENOTIFY */ if(!atleast(retval,codep+6)) return -1; retval->data[codep++].op = B_DENOTIFY; switch(c->u.d.priority) { case LOW: retval->data[codep++].value = B_LOW; break; case NORMAL: retval->data[codep++].value = B_NORMAL; break; case HIGH: retval->data[codep++].value = B_HIGH; break; case ANY: retval->data[codep++].value = B_ANY; break; default: return -1; } switch(c->u.d.comptag) { case IS: retval->data[codep++].value = B_IS; break; case CONTAINS: retval->data[codep++].value = B_CONTAINS; break; case MATCHES: retval->data[codep++].value = B_MATCHES; break; #ifdef ENABLE_REGEX case REGEX: retval->data[codep++].value = B_REGEX; break; #endif case ANY: retval->data[codep++].value = B_ANY; break; default: return -1; } codep = bc_relation_generate(codep, retval, c->u.d.relation); if(c->u.d.pattern) { retval->data[codep++].len = strlen(c->u.d.pattern); retval->data[codep++].str = c->u.d.pattern; } else { retval->data[codep++].len = -1; retval->data[codep++].str = NULL; } break; case REJCT: /* REJECT (STRING: len + dataptr) */ if(!atleast(retval,codep+3)) return -1; retval->data[codep++].op = B_REJECT; retval->data[codep++].len = strlen(c->u.str); retval->data[codep++].str = c->u.str; break; case FILEINTO: /* FILEINTO STRINGLIST flags VALUE copy STRING folder */ if (!atleast(retval, codep+1)) return -1; retval->data[codep++].op = B_FILEINTO; codep = bc_stringlist_generate(codep, retval, c->u.f.flags); if(codep == -1) return -1; if (!atleast(retval, codep+3)) return -1; retval->data[codep++].value = c->u.f.copy; retval->data[codep++].len = strlen(c->u.f.folder); retval->data[codep++].str = c->u.f.folder; break; case REDIRECT: /* REDIRECT VALUE copy STRING address */ if(!atleast(retval,codep+4)) return -1; retval->data[codep++].op = B_REDIRECT; retval->data[codep++].value = c->u.r.copy; retval->data[codep++].len = strlen(c->u.r.address); retval->data[codep++].str = c->u.r.address; break; case ADDFLAG: /* ADDFLAG stringlist */ if(!atleast(retval,codep+1)) return -1; retval->data[codep++].op = B_ADDFLAG; codep = bc_stringlist_generate(codep,retval,c->u.sl); if(codep == -1) return -1; break; case SETFLAG: /* SETFLAG stringlist */ if(!atleast(retval,codep+1)) return -1; retval->data[codep++].op = B_SETFLAG; codep = bc_stringlist_generate(codep,retval,c->u.sl); if(codep == -1) return -1; break; case REMOVEFLAG: /* REMOVEFLAG stringlist */ if(!atleast(retval,codep+1)) return -1; retval->data[codep++].op = B_REMOVEFLAG; codep = bc_stringlist_generate(codep,retval,c->u.sl); if(codep == -1) return -1; break; case NOTIFY: /* NOTIFY (STRING: len + dataptr) (STRING: len + dataptr) stringlist (STRING: len + dataptr) (STRING: len + dataptr) method/id /options list/priority/message */ if(!atleast(retval,codep+5)) return -1; retval->data[codep++].op = B_NOTIFY; retval->data[codep++].len = strlen(c->u.n.method); retval->data[codep++].str = c->u.n.method; if (c->u.n.id) { retval->data[codep++].len = strlen(c->u.n.id); retval->data[codep++].str = c->u.n.id; } else { retval->data[codep++].len = -1; retval->data[codep++].str = NULL; } codep = bc_stringlist_generate(codep,retval,c->u.n.options); if(codep == -1) return -1; if(!atleast(retval,codep+3)) return -1; switch(c->u.n.priority) { case LOW: retval->data[codep++].value = B_LOW; break; case NORMAL: retval->data[codep++].value = B_NORMAL; break; case HIGH: retval->data[codep++].value = B_HIGH; break; case ANY: retval->data[codep++].value = B_ANY; break; default: return -1; } retval->data[codep++].len = strlen(c->u.n.message); retval->data[codep++].str = c->u.n.message; break; case VACATION: /* VACATION STRINGLIST addresses STRING subject (if len is -1, then subject was NULL) STRING message (again, len == -1 means message was NULL) VALUE days VALUE mime STRING from (if len is -1, then from was NULL) STRING handle (again, len == -1 means handle was NULL) */ if(!atleast(retval,codep+1)) return -1; retval->data[codep++].op = B_VACATION; codep = bc_stringlist_generate(codep,retval,c->u.v.addresses); if (codep == -1) return -1; if (!atleast(retval,codep+2)) return -1; if(c->u.v.subject) { retval->data[codep++].len = strlen(c->u.v.subject); retval->data[codep++].str = c->u.v.subject; } else { retval->data[codep++].len = -1; retval->data[codep++].str = NULL; } if (!atleast(retval,codep+2)) return -1; if(c->u.v.message) { retval->data[codep++].len = strlen(c->u.v.message); retval->data[codep++].str = c->u.v.message; } else { retval->data[codep++].len = -1; retval->data[codep++].str = NULL; } if (!atleast(retval,codep+2)) return -1; retval->data[codep++].value = c->u.v.days; retval->data[codep++].value = c->u.v.mime; if (!atleast(retval,codep+2)) return -1; if(c->u.v.from) { retval->data[codep++].len = strlen(c->u.v.from); retval->data[codep++].str = c->u.v.from; } else { retval->data[codep++].len = -1; retval->data[codep++].str = NULL; } if (!atleast(retval,codep+2)) return -1; if(c->u.v.handle) { retval->data[codep++].len = strlen(c->u.v.handle); retval->data[codep++].str = c->u.v.handle; } else { retval->data[codep++].len = -1; retval->data[codep++].str = NULL; } if(codep == -1) return -1; break; case INCLUDE: /* INCLUDE VALUE location STRING filename */ if(!atleast(retval,codep+4)) return -1; retval->data[codep++].op = B_INCLUDE; switch(c->u.inc.location) { case PERSONAL: retval->data[codep++].value = B_PERSONAL; break; case GLOBAL: retval->data[codep++].value = B_GLOBAL; break; default: return -1; } retval->data[codep++].len = strlen(c->u.inc.script); retval->data[codep++].str = c->u.inc.script; break; case IF: { int jumpVal; /* IF (int: begin then block) (int: end then block/begin else block) (int:end else block) (-1 if no else block) (test) (then block) (else block)(optional) */ baseloc = codep; /* Allocate operator + jump table offsets */ if(!atleast(retval,codep+4)) return -1; jumploc = codep+4; retval->data[codep++].op = B_IF; /* begining of then code */ jumpVal= bc_test_generate(jumploc,retval,c->u.i.t); if(jumpVal == -1) return -1; else { retval->data[codep].jump = jumpVal; codep++; } /* find then code and offset to else code, * we want to write this code starting at the offset we * just found */ jumpVal= bc_action_generate(jumpVal,retval, c->u.i.do_then); if(jumpVal == -1) return -1; else retval->data[codep].jump = jumpVal; codep++; /* write else code if its there*/ if(c->u.i.do_else) { jumpVal= bc_action_generate(jumpVal,retval, c->u.i.do_else); if(jumpVal == -1) { return -1; } else { retval->data[codep].jump = jumpVal; } /* Update code pointer to end of else code */ codep = retval->data[codep].jump; } else { /*there is no else block, so its -1*/ retval->data[codep].jump = -1; /* Update code pointer to end of then code */ codep = retval->data[codep-1].jump; } break; } default: /* no such action known */ return -1; } /* generate from next command */ c = c->next; } while(c); } /*scriptend may be updated before the end, but it will be updated at the end, which is what matters.*/ retval->scriptend=codep; return codep; } /* Entry point to the bytecode emitter module */ int sieve_generate_bytecode(bytecode_info_t **retval, sieve_script_t *s) { commandlist_t *c; if(!retval) return -1; if(!s) return -1; c = s->cmds; /* if c is NULL, it is handled in bc_action_generate and a script with only BC_NULL is returned */ *retval = xmalloc(sizeof(bytecode_info_t)); if(!(*retval)) return -1; memset(*retval, 0, sizeof(bytecode_info_t)); return bc_action_generate(0, *retval, c); } void sieve_free_bytecode(bytecode_info_t **p) { if(!p || !*p) return; if((*p)->data) free((*p)->data); free(*p); *p = NULL; } cyrus-imapd-2.4.18/sieve/addr.h0000644000175000017500000000404312546375260015222 0ustar ellieellie/* A Bison parser, made by GNU Bison 2.5. */ /* Bison interface for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { ATOM = 258, QTEXT = 259, DTEXT = 260 }; #endif /* Tokens. */ #define ATOM 258 #define QTEXT 259 #define DTEXT 260 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef int YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif extern YYSTYPE addrlval; cyrus-imapd-2.4.18/sieve/flags.h0000644000175000017500000000030612546374065015404 0ustar ellieellie/* * flags.h * * Created on: Oct 6, 2014 * Author: James Cassell */ #ifndef FLAGS_H_ #define FLAGS_H_ #include "strarray.h" int verify_flaglist(strarray_t *sl); #endif /* FLAGS_H_ */ cyrus-imapd-2.4.18/sieve/tree.h0000644000175000017500000001077412546374065015261 0ustar ellieellie/* tree.h -- abstract syntax tree * Larry Greenfield * * Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The name "Carnegie Mellon University" must not be used to * endorse or promote products derived from this software without * prior written permission. For permission or any legal * details, please contact * Carnegie Mellon University * Center for Technology Transfer and Enterprise Creation * 4615 Forbes Avenue * Suite 302 * Pittsburgh, PA 15213 * (412) 268-7393, fax: (412) 268-7395 * innovation@andrew.cmu.edu * * 4. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by Computing Services * at Carnegie Mellon University (http://www.cmu.edu/computing/)." * * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * $Id: tree.h,v 1.13 2010/01/06 17:02:00 murch Exp $ */ #ifndef TREE_H #define TREE_H #include "comparator.h" #include "strarray.h" /* abstract syntax tree for sieve */ typedef struct Commandlist commandlist_t; typedef struct Test test_t; typedef struct Testlist testlist_t; typedef struct Tag tag_t; typedef struct Taglist taglist_t; struct Tag { int type; char *arg; }; struct Taglist { tag_t *t; taglist_t *next; }; struct Test { int type; union { testlist_t *tl; /* anyof, allof */ strarray_t *sl; /* exists */ struct { /* it's a header or hasflag test */ int comptag; char * comparator; int relation; void *comprock; strarray_t *sl; strarray_t *pl; } h; struct { /* it's an address or envelope test */ int comptag; char * comparator; int relation; void *comprock; strarray_t *sl; strarray_t *pl; int addrpart; } ae; struct { /* it's a body test */ int comptag; int relation; char * comparator; void *comprock; int transform; int offset; strarray_t *content_types; strarray_t *pl; } b; test_t *t; /* not */ struct { /* size */ int t; /* tag */ int n; /* param */ } sz; } u; }; struct Testlist { test_t *t; testlist_t *next; }; struct Commandlist { int type; union { char *str; strarray_t *sl; /* the parameters */ struct { /* it's an if statement */ test_t *t; commandlist_t *do_then; commandlist_t *do_else; } i; struct { /* it's an include action */ int location; char *script; } inc; struct { /* it's a keep action */ int copy; strarray_t *flags; } k; struct { /* it's a fileinto action */ char *folder; int copy; strarray_t *flags; } f; struct { /* it's a redirect action */ char *address; int copy; } r; struct { /* it's a vacation action */ char *subject; int days; strarray_t *addresses; char *message; char *from; char *handle; int mime; } v; struct { /* it's a notify action */ char *method; char *id; strarray_t *options; int priority; char *message; } n; struct { /* it's a denotify action */ int comptag; int relation; void *comprock; void *pattern; int priority; } d; } u; struct Commandlist *next; }; tag_t *new_tag(int type, char *s); taglist_t *new_taglist(tag_t *t, taglist_t *n); test_t *new_test(int type); testlist_t *new_testlist(test_t *t, testlist_t *n); commandlist_t *new_command(int type); commandlist_t *new_if(test_t *t, commandlist_t *y, commandlist_t *n); void free_test(test_t *t); void free_tree(commandlist_t *cl); #endif cyrus-imapd-2.4.18/sieve/message.c0000644000175000017500000003574412546374065015745 0ustar ellieellie/* message.c -- message parsing functions * Larry Greenfield * * Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The name "Carnegie Mellon University" must not be used to * endorse or promote products derived from this software without * prior written permission. For permission or any legal * details, please contact * Carnegie Mellon University * Center for Technology Transfer and Enterprise Creation * 4615 Forbes Avenue * Suite 302 * Pittsburgh, PA 15213 * (412) 268-7393, fax: (412) 268-7395 * innovation@andrew.cmu.edu * * 4. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by Computing Services * at Carnegie Mellon University (http://www.cmu.edu/computing/)." * * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * $Id: message.c,v 1.35 2010/01/06 17:01:59 murch Exp $ */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include "md5.h" #include "sieve_interface.h" #include "interp.h" #include "message.h" #include "parseaddr.h" #include "xmalloc.h" #include "xstrlcpy.h" #include "xstrlcat.h" #include "util.h" /* reject message m with message msg * * incompatible with: fileinto, redirect */ int do_reject(action_list_t *a, const char *msg) { action_list_t *b = NULL; /* see if this conflicts with any previous actions taken on this message */ while (a != NULL) { b = a; if (a->a == ACTION_FILEINTO || a->a == ACTION_KEEP || a->a == ACTION_REDIRECT || a->a == ACTION_REJECT || a->a == ACTION_VACATION || a->a == ACTION_SETFLAG || a->a == ACTION_ADDFLAG || a->a == ACTION_REMOVEFLAG || a->a == ACTION_MARK || a->a == ACTION_UNMARK ) return SIEVE_RUN_ERROR; a = a->next; } /* add to the action list */ a = (action_list_t *) xmalloc(sizeof(action_list_t)); if (a == NULL) return SIEVE_NOMEM; a->a = ACTION_REJECT; a->cancel_keep = 1; a->u.rej.msg = msg; b->next = a; a->next = NULL; return 0; } /* fileinto message m into mailbox * * incompatible with: reject */ int do_fileinto(action_list_t *a, const char *mbox, int cancel_keep, strarray_t *imapflags) { action_list_t *b = NULL; /* see if this conflicts with any previous actions taken on this message */ while (a != NULL) { if (a->a == ACTION_REJECT) return SIEVE_RUN_ERROR; if (a->a == ACTION_FILEINTO && !strcmp(a->u.fil.mailbox, mbox)) { /* don't bother doing it twice */ /* check that we have a valid action */ if (b == NULL) { return SIEVE_INTERNAL_ERROR; } /* cut this action out of the list */ b->next = a->next; a->next = NULL; /* find the end of the list */ while (b->next != NULL) { b = b-> next; } /* add the action to the end of the list */ b->next = a; break; } b = a; a = a->next; } if (a == NULL) { /* add to the action list */ a = new_action_list(); if (a == NULL) return SIEVE_NOMEM; b->next = a; } a->a = ACTION_FILEINTO; a->cancel_keep |= cancel_keep; a->u.fil.mailbox = mbox; a->u.fil.imapflags = imapflags; return 0; } /* redirect message m to to addr * * incompatible with: reject */ int do_redirect(action_list_t *a, const char *addr, int cancel_keep) { action_list_t *b = NULL; /* xxx we should validate addr */ /* see if this conflicts with any previous actions taken on this message */ while (a != NULL) { b = a; if (a->a == ACTION_REJECT) return SIEVE_RUN_ERROR; a = a->next; } /* add to the action list */ a = (action_list_t *) xmalloc(sizeof(action_list_t)); if (a == NULL) return SIEVE_NOMEM; a->a = ACTION_REDIRECT; a->cancel_keep = cancel_keep; a->u.red.addr = addr; a->next = NULL; b->next = a; return 0; } /* keep message * * incompatible with: reject */ int do_keep(action_list_t *a, int cancel_keep, strarray_t *imapflags) { action_list_t *b = NULL; /* see if this conflicts with any previous actions taken on this message */ while (a != NULL) { if (a->a == ACTION_REJECT) return SIEVE_RUN_ERROR; if (a->a == ACTION_KEEP) { /* don't bother doing it twice */ /* check that we have a valid action */ if (b == NULL) { return SIEVE_INTERNAL_ERROR; } /* cut this action out of the list */ b->next = a->next; a->next = NULL; /* find the end of the list */ while (b->next != NULL) { b = b-> next; } /* add the action to the end of the list */ b->next = a; break; } b = a; a = a->next; } if(a == NULL) { /* add to the action list */ a = new_action_list(); if (a == NULL) return SIEVE_NOMEM; a->next = NULL; b->next = a; } a->a = ACTION_KEEP; a->cancel_keep |= cancel_keep; a->u.keep.imapflags = imapflags; return 0; } /* discard message m * * incompatible with: nothing---it doesn't cancel any actions */ int do_discard(action_list_t *a) { action_list_t *b = NULL; /* see if this conflicts with any previous actions taken on this message */ while (a != NULL) { b = a; if (a->a == ACTION_DISCARD) /* don't bother doing twice */ return 0; a = a->next; } /* add to the action list */ a = (action_list_t *) xmalloc(sizeof(action_list_t)); if (a == NULL) return SIEVE_NOMEM; a->a = ACTION_DISCARD; a->cancel_keep = 1; a->next = NULL; b->next = a; return 0; } static int makehash(unsigned char hash[], const char *s1, const char *s2, const char *s3) { MD5_CTX ctx; MD5Init(&ctx); MD5Update(&ctx, s1, strlen(s1)); MD5Update(&ctx, s2, strlen(s2)); if (s3) MD5Update(&ctx, s3, strlen(s3)); MD5Final(hash, &ctx); return SIEVE_OK; } int do_vacation(action_list_t *a, char *addr, char *fromaddr, char *subj, const char *msg, int days, int mime, const char *handle) { action_list_t *b = NULL; /* see if this conflicts with any previous actions taken on this message */ while (a != NULL) { b = a; if (a->a == ACTION_REJECT || a->a == ACTION_VACATION) /* vacation can't be used twice */ return SIEVE_RUN_ERROR; a = a->next; } /* add to the action list */ a = (action_list_t *) xmalloc(sizeof(action_list_t)); if (a == NULL) return SIEVE_NOMEM; a->a = ACTION_VACATION; a->cancel_keep = 0; a->u.vac.send.addr = addr; a->u.vac.send.fromaddr = fromaddr; a->u.vac.send.subj = subj; /* user specified subject */ a->u.vac.send.msg = msg; a->u.vac.send.mime = mime; if (handle) makehash(a->u.vac.autoresp.hash, addr, handle, NULL); else makehash(a->u.vac.autoresp.hash, addr, fromaddr, msg); a->u.vac.autoresp.days = days; a->next = NULL; b->next = a; return 0; } /* setflag f on message m * * incompatible with: reject */ int do_setflag(action_list_t *a) { action_list_t *b = NULL; /* see if this conflicts with any previous actions taken on this message */ while (a != NULL) { b = a; if (a->a == ACTION_REJECT) return SIEVE_RUN_ERROR; a = a->next; } /* add to the action list */ a = (action_list_t *) xmalloc(sizeof(action_list_t)); if (a == NULL) return SIEVE_NOMEM; a->a = ACTION_SETFLAG; a->cancel_keep = 0; b->next = a; a->next = NULL; return 0; } /* addflag f on message m * * incompatible with: reject */ int do_addflag(action_list_t *a, const char *flag) { action_list_t *b = NULL; /* see if this conflicts with any previous actions taken on this message */ while (a != NULL) { b = a; if (a->a == ACTION_REJECT) return SIEVE_RUN_ERROR; a = a->next; } /* add to the action list */ a = (action_list_t *) xmalloc(sizeof(action_list_t)); if (a == NULL) return SIEVE_NOMEM; a->a = ACTION_ADDFLAG; a->cancel_keep = 0; a->u.fla.flag = flag; b->next = a; a->next = NULL; return 0; } /* removeflag f on message m * * incompatible with: reject */ int do_removeflag(action_list_t *a, const char *flag) { action_list_t *b = NULL; /* see if this conflicts with any previous actions taken on this message */ while (a != NULL) { b = a; if (a->a == ACTION_REJECT) return SIEVE_RUN_ERROR; a = a->next; } /* add to the action list */ a = (action_list_t *) xmalloc(sizeof(action_list_t)); if (a == NULL) return SIEVE_NOMEM; a->a = ACTION_REMOVEFLAG; a->cancel_keep = 0; a->u.fla.flag = flag; b->next = a; a->next = NULL; return 0; } /* mark message m * * incompatible with: reject */ int do_mark(action_list_t *a) { action_list_t *b = NULL; /* see if this conflicts with any previous actions taken on this message */ while (a != NULL) { b = a; if (a->a == ACTION_REJECT) return SIEVE_RUN_ERROR; a = a->next; } /* add to the action list */ a = (action_list_t *) xmalloc(sizeof(action_list_t)); if (a == NULL) return SIEVE_NOMEM; a->a = ACTION_MARK; a->cancel_keep = 0; b->next = a; a->next = NULL; return 0; } /* unmark message m * * incompatible with: reject */ int do_unmark(action_list_t *a) { action_list_t *b = NULL; /* see if this conflicts with any previous actions taken on this message */ while (a != NULL) { b = a; if (a->a == ACTION_REJECT) return SIEVE_RUN_ERROR; a = a->next; } /* add to the action list */ a = (action_list_t *) xmalloc(sizeof(action_list_t)); if (a == NULL) return SIEVE_NOMEM; a->a = ACTION_UNMARK; a->cancel_keep = 0; b->next = a; a->next = NULL; return 0; } /* notify * * incompatible with: none */ int do_notify(notify_list_t *a, const char *id, const char *method, const char **options, const char *priority, const char *message) { notify_list_t *b = NULL; /* find the end of the notify list */ while (a != NULL) { b = a; a = a->next; } /* add to the notify list */ a = (notify_list_t *) xmalloc(sizeof(notify_list_t)); if (a == NULL) return SIEVE_NOMEM; b->next = a; a->isactive = 1; a->id = id; a->method = method; a->options = options; a->priority = priority; a->message = message; a->next = NULL; return 0; } /* denotify * * incomaptible with: none */ int do_denotify(notify_list_t *n, comparator_t *comp, const void *pat, void *comprock, const char *priority) { while (n != NULL) { if (n->isactive && (!priority || !strcasecmp(n->priority, priority)) && (!comp || (n->id && comp(n->id, strlen(n->id), pat, comprock)))) { n->isactive = 0; } n = n->next; } return 0; } /* given a header, extract an address out of it. if marker points to NULL, extract the first address. otherwise, it's an index into the header to say where to start extracting */ struct addr_marker { struct address *where; char *freeme; }; int parse_address(const char *header, void **data, void **marker) { struct addr_marker *am = (struct addr_marker *) *marker; parseaddr_list(header, (struct address **) data); am = (void *) xmalloc(sizeof(struct addr_marker)); am->where = *data; am->freeme = NULL; *marker = am; return SIEVE_OK; } char *get_address(address_part_t addrpart, void **data __attribute__((unused)), void **marker, int canon_domain) { char *ret = NULL; struct address *a; struct addr_marker *am = *marker; a = am->where; if (am->freeme) { free(am->freeme); am->freeme = NULL; } if (a == NULL) { ret = NULL; } else { if (canon_domain && a->domain) lcase(a->domain); switch (addrpart) { case ADDRESS_ALL: #define U_DOMAIN "unspecified-domain" #define U_USER "unknown-user" if (a->mailbox || a->domain) { char *m = a->mailbox ? a->mailbox : U_USER; char *d = a->domain ? a->domain : U_DOMAIN; am->freeme = (char *) xmalloc(strlen(m) + strlen(d) + 2); sprintf(am->freeme, "%s@%s", m, d); ret = am->freeme; } else { ret = NULL; } break; case ADDRESS_LOCALPART: ret = a->mailbox; break; case ADDRESS_DOMAIN: ret = a->domain; break; case ADDRESS_USER: if (a->mailbox) { char *p = strchr(a->mailbox, '+'); int len = p ? p - a->mailbox : (int)strlen(a->mailbox); am->freeme = (char *) xmalloc(len + 1); strncpy(am->freeme, a->mailbox, len); am->freeme[len] = '\0'; ret = am->freeme; } else { ret = NULL; } break; case ADDRESS_DETAIL: if (a->mailbox) { char *p = strchr(a->mailbox, '+'); ret = (p ? p + 1 : NULL); } else { ret = NULL; } break; } a = a->next; am->where = a; } *marker = am; return ret; } int free_address(void **data, void **marker) { struct addr_marker *am = (struct addr_marker *) *marker; if (*data) parseaddr_free((struct address *) *data); *data = NULL; if (am->freeme) free(am->freeme); free(am); *marker = NULL; return SIEVE_OK; } notify_list_t *new_notify_list(void) { notify_list_t *ret = xmalloc(sizeof(notify_list_t)); if (ret != NULL) { ret->isactive = 0; ret->id = NULL; ret->method = NULL; ret->options = NULL; ret->priority = NULL; ret->message = NULL; ret->next = NULL; } return ret; } void free_notify_list(notify_list_t *n) { while (n) { notify_list_t *b = n->next; free(n->options); /* strings live in bytecode, only free the array */ free(n); n = b; } } action_list_t *new_action_list(void) { action_list_t *ret = xmalloc(sizeof(action_list_t)); if (ret != NULL) { ret->a = ACTION_NONE; ret->param = NULL; ret->next = NULL; ret->cancel_keep = 0; } return ret; } void free_action_list(action_list_t *a) { while (a) { action_list_t *b = a->next; if(a->a == ACTION_VACATION) { if(a->u.vac.send.subj) free(a->u.vac.send.subj); if(a->u.vac.send.addr) free(a->u.vac.send.addr); if(a->u.vac.send.fromaddr) free(a->u.vac.send.fromaddr); } free(a); a = b; } } cyrus-imapd-2.4.18/sieve/tree.c0000644000175000017500000001230012546374065015237 0ustar ellieellie/* tree.c -- abstract syntax tree handling * Larry Greenfield * * Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The name "Carnegie Mellon University" must not be used to * endorse or promote products derived from this software without * prior written permission. For permission or any legal * details, please contact * Carnegie Mellon University * Center for Technology Transfer and Enterprise Creation * 4615 Forbes Avenue * Suite 302 * Pittsburgh, PA 15213 * (412) 268-7393, fax: (412) 268-7395 * innovation@andrew.cmu.edu * * 4. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by Computing Services * at Carnegie Mellon University (http://www.cmu.edu/computing/)." * * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * $Id: tree.c,v 1.16 2010/01/06 17:02:00 murch Exp $ */ #ifdef HAVE_CONFIG_H #include #endif #include #include "xmalloc.h" #include "tree.h" #include "sieve.h" tag_t *new_tag(int type, char *s) { tag_t *p = (tag_t *) xmalloc(sizeof(tag_t)); p->type = type; p->arg = s; return p; } taglist_t *new_taglist(tag_t *t, taglist_t *n) { taglist_t *p = (taglist_t *) xmalloc(sizeof(taglist_t)); p->t = t; p->next = n; return p; } test_t *new_test(int type) { test_t *p = (test_t *) xmalloc(sizeof(test_t)); p->type = type; return p; } testlist_t *new_testlist(test_t *t, testlist_t *n) { testlist_t *p = (testlist_t *) xmalloc(sizeof(testlist_t)); p->t = t; p->next = n; return p; } commandlist_t *new_command(int type) { commandlist_t *p = (commandlist_t *) xmalloc(sizeof(commandlist_t)); p->type = type; p->next = NULL; return p; } commandlist_t *new_if(test_t *t, commandlist_t *y, commandlist_t *n) { commandlist_t *p = (commandlist_t *) xmalloc(sizeof(commandlist_t)); p->type = IF; p->u.i.t = t; p->u.i.do_then = y; p->u.i.do_else = n; p->next = NULL; return p; } void free_test(test_t *t); static void free_tl(testlist_t *tl) { testlist_t *tl2; while (tl) { tl2 = tl->next; if (tl->t) free_test(tl->t); free(tl); tl = tl2; } } void free_test(test_t *t) { if (t == NULL) return; switch (t->type) { case ANYOF: case ALLOF: free_tl(t->u.tl); break; case EXISTS: strarray_free(t->u.sl); break; case SIZE: case SFALSE: case STRUE: break; case HASFLAG: case HEADER: strarray_free(t->u.h.sl); strarray_free(t->u.h.pl); break; case ADDRESS: strarray_free(t->u.ae.sl); strarray_free(t->u.ae.pl); break; case BODY: strarray_free(t->u.b.content_types); strarray_free(t->u.b.pl); break; case NOT: free_test(t->u.t); break; } free(t); } void free_tree(commandlist_t *cl) { commandlist_t *cl2; while (cl != NULL) { cl2 = cl->next; switch (cl->type) { case IF: free_test(cl->u.i.t); free_tree(cl->u.i.do_then); free_tree(cl->u.i.do_else); break; case INCLUDE: if (cl->u.inc.script) free(cl->u.inc.script); break; case FILEINTO: if (cl->u.f.folder) free(cl->u.f.folder); if (cl->u.f.flags) strarray_free(cl->u.f.flags); break; case REDIRECT: if (cl->u.r.address) free(cl->u.r.address); break; case REJCT: if (cl->u.str) free(cl->u.str); break; case VACATION: if (cl->u.v.subject) free(cl->u.v.subject); if (cl->u.v.addresses) strarray_free(cl->u.v.addresses); if (cl->u.v.message) free(cl->u.v.message); break; case SETFLAG: case ADDFLAG: case REMOVEFLAG: strarray_free(cl->u.sl); break; case KEEP: if (cl->u.k.flags) strarray_free(cl->u.k.flags); break; case STOP: case DISCARD: case RETURN: break; case NOTIFY: if (cl->u.n.method) free(cl->u.n.method); if (cl->u.n.id) free(cl->u.n.id); if (cl->u.n.options) strarray_free(cl->u.n.options); if (cl->u.n.message) free(cl->u.n.message); break; case DENOTIFY: if (cl->u.d.pattern) { #ifdef ENABLE_REGEX if (cl->u.d.comptag == REGEX) { regfree((regex_t *) cl->u.d.pattern); } #endif free(cl->u.d.pattern); } break; } free(cl); cl = cl2; } } cyrus-imapd-2.4.18/sieve/sievec.c0000644000175000017500000002013312546374065015561 0ustar ellieellie/* sievec.c -- compile a sieve script to bytecode manually * Rob Siemborski * * Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The name "Carnegie Mellon University" must not be used to * endorse or promote products derived from this software without * prior written permission. For permission or any legal * details, please contact * Carnegie Mellon University * Center for Technology Transfer and Enterprise Creation * 4615 Forbes Avenue * Suite 302 * Pittsburgh, PA 15213 * (412) 268-7393, fax: (412) 268-7395 * innovation@andrew.cmu.edu * * 4. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by Computing Services * at Carnegie Mellon University (http://www.cmu.edu/computing/)." * * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * $Id: sievec.c,v 1.10 2010/01/06 17:01:59 murch Exp $ */ #ifdef HAVE_CONFIG_H #include #endif #include "sieve_interface.h" #include #include "libconfig.h" #include "xmalloc.h" #include "script.h" #include #include #include #include #include #include #include #include /* config.c stuff */ const int config_need_data = 0; int is_script_parsable(FILE *stream, char **errstr, sieve_script_t **ret); #define TIMSIEVE_FAIL -1 #define TIMSIEVE_OK 0 int main(int argc, char **argv) { FILE *instream; char *err = NULL; sieve_script_t *s; bytecode_info_t *bc; int c, fd, usage_error = 0; char *alt_config = NULL; while ((c = getopt(argc, argv, "C:")) != EOF) switch (c) { case 'C': /* alt config file */ alt_config = optarg; break; default: usage_error = 1; break; } if (usage_error || (argc - optind) < 2) { fprintf(stderr, "Syntax: %s [-C ] \n", argv[0]); exit(1); } instream = fopen(argv[optind++],"r"); if(instream == NULL) { fprintf(stderr, "Unable to open %s for reading\n", argv[1]); exit(1); } /* Load configuration file. */ config_read(alt_config); if(is_script_parsable(instream, &err, &s) == TIMSIEVE_FAIL) { if(err) { fprintf(stderr, "Unable to parse script: %s\n", err); } else { fprintf(stderr, "Unable to parse script.\n"); } exit(1); } /* Now, generate the bytecode */ if(sieve_generate_bytecode(&bc, s) == -1) { fprintf(stderr, "bytecode generate failed\n"); exit(1); } /* Now, open the new file */ fd = open(argv[optind], O_CREAT | O_TRUNC | O_WRONLY, 0644); if(fd < 0) { fprintf(stderr, "couldn't open bytecode output file\n"); exit(1); } /* Now, emit the bytecode */ if(sieve_emit_bytecode(fd, bc) == -1) { fprintf(stderr, "bytecode emit failed\n"); exit(1); } close(fd); sieve_free_bytecode(&bc); sieve_script_free(&s); return 0; } /* to make larry's stupid functions happy :) */ static void foo(void) { fatal("stub function called", 0); } sieve_vacation_t vacation = { 0, /* min response */ 0, /* max response */ (sieve_callback *) &foo, /* autorespond() */ (sieve_callback *) &foo /* send_response() */ }; static int sieve_notify(void *ac __attribute__((unused)), void *interp_context __attribute__((unused)), void *script_context __attribute__((unused)), void *message_context __attribute__((unused)), const char **errmsg __attribute__((unused))) { fatal("stub function called", 0); return SIEVE_FAIL; } static int mysieve_error(int lineno, const char *msg, void *i __attribute__((unused)), void *s) { char buf[1024]; char **errstr = (char **) s; snprintf(buf, 80, "line %d: %s\r\n", lineno, msg); *errstr = xrealloc(*errstr, strlen(*errstr) + strlen(buf) + 30); syslog(LOG_DEBUG, "%s", buf); strcat(*errstr, buf); return SIEVE_OK; } void fatal(const char *s, int code) { fprintf(stderr, "Fatal error: %s (%d)\r\n", s, code); exit(1); } /* end the boilerplate */ /* returns TRUE or FALSE */ int is_script_parsable(FILE *stream, char **errstr, sieve_script_t **ret) { sieve_interp_t *i; sieve_script_t *s; int res; res = sieve_interp_alloc(&i, NULL); if (res != SIEVE_OK) { syslog(LOG_ERR, "sieve_interp_alloc() returns %d\n", res); return TIMSIEVE_FAIL; } res = sieve_register_redirect(i, (sieve_callback *) &foo); if (res != SIEVE_OK) { syslog(LOG_ERR, "sieve_register_redirect() returns %d\n", res); goto done; } res = sieve_register_discard(i, (sieve_callback *) &foo); if (res != SIEVE_OK) { syslog(LOG_ERR, "sieve_register_discard() returns %d\n", res); goto done; } res = sieve_register_reject(i, (sieve_callback *) &foo); if (res != SIEVE_OK) { syslog(LOG_ERR, "sieve_register_reject() returns %d\n", res); goto done; } res = sieve_register_fileinto(i, (sieve_callback *) &foo); if (res != SIEVE_OK) { syslog(LOG_ERR, "sieve_register_fileinto() returns %d\n", res); goto done; } res = sieve_register_keep(i, (sieve_callback *) &foo); if (res != SIEVE_OK) { syslog(LOG_ERR, "sieve_register_keep() returns %d\n", res); goto done; } res = sieve_register_imapflags(i, NULL); if (res != SIEVE_OK) { syslog(LOG_ERR, "sieve_register_imapflags() returns %d\n", res); goto done; } res = sieve_register_size(i, (sieve_get_size *) &foo); if (res != SIEVE_OK) { syslog(LOG_ERR, "sieve_register_size() returns %d\n", res); goto done; } res = sieve_register_header(i, (sieve_get_header *) &foo); if (res != SIEVE_OK) { syslog(LOG_ERR, "sieve_register_header() returns %d\n", res); goto done; } res = sieve_register_envelope(i, (sieve_get_envelope *) &foo); if (res != SIEVE_OK) { syslog(LOG_ERR, "sieve_register_envelope() returns %d\n", res); goto done; } res = sieve_register_body(i, (sieve_get_body *) &foo); if (res != SIEVE_OK) { syslog(LOG_ERR, "sieve_register_body() returns %d\n", res); goto done; } res = sieve_register_include(i, (sieve_get_include *) &foo); if (res != SIEVE_OK) { syslog(LOG_ERR, "sieve_register_include() returns %d\n", res); goto done; } res = sieve_register_vacation(i, &vacation); if (res != SIEVE_OK) { syslog(LOG_ERR, "sieve_register_vacation() returns %d\n", res); goto done; } res = sieve_register_notify(i, &sieve_notify); if (res != SIEVE_OK) { syslog(LOG_ERR, "sieve_register_notify() returns %d\n", res); goto done; } res = sieve_register_parse_error(i, &mysieve_error); if (res != SIEVE_OK) { syslog(LOG_ERR, "sieve_register_parse_error() returns %d\n", res); goto done; } rewind(stream); *errstr = (char *) xmalloc(20 * sizeof(char)); strcpy(*errstr, "script errors:\r\n"); res = sieve_script_parse(i, stream, errstr, &s); if (res == SIEVE_OK) { if(ret) { *ret = s; } else { sieve_script_free(&s); } free(*errstr); *errstr = NULL; } done: /* free interpreter */ sieve_interp_free(&i); return (res == SIEVE_OK) ? TIMSIEVE_OK : TIMSIEVE_FAIL; } cyrus-imapd-2.4.18/sieve/test.c0000644000175000017500000006413312546374065015272 0ustar ellieellie/*NEW * test.c -- tester for libsieve * Larry Greenfield * * usage: "test message script" */ /* * Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The name "Carnegie Mellon University" must not be used to * endorse or promote products derived from this software without * prior written permission. For permission or any legal * details, please contact * Carnegie Mellon University * Center for Technology Transfer and Enterprise Creation * 4615 Forbes Avenue * Suite 302 * Pittsburgh, PA 15213 * (412) 268-7393, fax: (412) 268-7395 * innovation@andrew.cmu.edu * * 4. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by Computing Services * at Carnegie Mellon University (http://www.cmu.edu/computing/)." * * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * $Id: test.c,v 1.31 2010/01/06 17:02:00 murch Exp $ */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include #include "sieve_interface.h" #include "bytecode.h" #include "comparator.h" #include "tree.h" #include "sieve.h" #include "imap/message.h" #include "util.h" #include "xstrlcat.h" #include "xstrlcpy.h" /* XXX so we can link against imap/message.o */ unsigned mailbox_cached_header_inline(const char *text __attribute__((unused))) { return BIT32_MAX; } void message_guid_generate(struct message_guid *guid __attribute__((unused)), const char *msg_base __attribute__((unused)), unsigned long msg_len __attribute__((unused))) { return; } void message_guid_copy(struct message_guid *dst __attribute__((unused)), struct message_guid *src __attribute__((unused))) { return; } int message_guid_isnull(struct message_guid *guid __attribute__((unused))) { return 0; } #define HEADERCACHESIZE 1019 typedef struct Header { char *name; int ncontents; char *contents[1]; } header_t; typedef struct message_data { char *name; FILE *data; int size; struct message_content content; int cache_full; header_t *cache[HEADERCACHESIZE]; } message_data_t; int hashheader(char *header) { int x = 0; /* any CHAR except ' ', :, or a ctrl char */ for (; !Uiscntrl(*header) && (*header != ' ') && (*header != ':'); header++) { x *= 256; x += *header; x %= HEADERCACHESIZE; } return x; } /* take a list of headers, pull the first one out and return it in name and contents. returns 0 on success, negative on failure */ typedef enum { HDR_NAME_START, HDR_NAME, COLON, HDR_CONTENT_START, HDR_CONTENT } state; int parseheader(FILE *f, char **headname, char **contents) { char c; char name[80], body[1024]; int off = 0; state s = HDR_NAME_START; /* there are two ways out of this loop, both via gotos: either we successfully read a character (got_header) or we hit an error (ph_error) */ while ((c = getc(f))) { /* examine each character */ switch (s) { case HDR_NAME_START: if (c == '\r' || c == '\n') { /* no header here! */ goto ph_error; } if (!isalpha(c)) goto ph_error; name[0] = tolower(c); off = 1; s = HDR_NAME; break; case HDR_NAME: if (c == ' ' || c == '\t' || c == ':') { name[off] = '\0'; s = (c == ':' ? HDR_CONTENT_START : COLON); break; } if (iscntrl(c)) { goto ph_error; } name[off++] = tolower(c); break; case COLON: if (c == ':') { s = HDR_CONTENT_START; } else if (c != ' ' && c != '\t') { goto ph_error; } break; case HDR_CONTENT_START: if (c == ' ' || c == '\t') /* eat the whitespace */ break; off = 0; s = HDR_CONTENT; /* falls through! */ case HDR_CONTENT: if (c == '\r' || c == '\n') { int peek = getc(f); /* we should peek ahead to see if it's folded whitespace */ if (c == '\r' && peek == '\n') { c = getc(f); } else { c = peek; /* single newline seperator */ } if (c != ' ' && c != '\t') { /* this is the end of the header */ body[off] = '\0'; ungetc(c, f); goto got_header; } /* http://www.faqs.org/rfcs/rfc2822.html * * > Unfolding is accomplished by simply removing any CRLF * > that is immediately followed by WSP * * So keep the actual WSP character */ } /* just an ordinary character */ body[off++] = c; break; } } /* if we fall off the end of the loop, we hit some sort of error condition */ ph_error: if (headname != NULL) *headname = NULL; if (contents != NULL) *contents = NULL; return -1; got_header: if (headname != NULL) *headname = strdup(name); if (contents != NULL) *contents = strdup(body); return 0; } void fill_cache(message_data_t *m) { rewind(m->data); /* let's fill that header cache */ for (;;) { char *name, *body; int cl, clinit; if (parseheader(m->data, &name, &body) < 0) { break; } /* put it in the hash table */ clinit = cl = hashheader(name); while (m->cache[cl] != NULL && strcmp(name, m->cache[cl]->name)) { cl++; /* resolve collisions linearly */ cl %= HEADERCACHESIZE; if (cl == clinit) break; /* gone all the way around, so bail */ } /* found where to put it, so insert it into a list */ if (m->cache[cl]) { /* add this body on */ m->cache[cl]->contents[m->cache[cl]->ncontents++] = body; /* whoops, won't have room for the null at the end! */ if (!(m->cache[cl]->ncontents % 8)) { /* increase the size */ m->cache[cl] = (header_t *) realloc(m->cache[cl],sizeof(header_t) + ((8 + m->cache[cl]->ncontents) * sizeof(char *))); if (m->cache[cl] == NULL) { fprintf(stderr, "realloc() returned NULL\n"); exit(1); } } } else { /* create a new entry in the hash table */ m->cache[cl] = (header_t *) malloc(sizeof(header_t) + 8 * sizeof(char*)); if (m->cache[cl] == NULL) { fprintf(stderr, "malloc() returned NULL\n"); exit(1); } m->cache[cl]->name = name; m->cache[cl]->contents[0] = body; m->cache[cl]->ncontents = 1; } /* we always want a NULL at the end */ m->cache[cl]->contents[m->cache[cl]->ncontents] = NULL; } m->cache_full = 1; } /* gets the header "head" from msg. */ int getheader(void *v, const char *phead, const char ***body) { message_data_t *m = (message_data_t *) v; int cl, clinit; char *h; char *head; *body = NULL; if (!m->cache_full) { fill_cache(m); } /* copy header parameter so we can mangle it */ head = malloc(strlen(phead)+1); if (!head) return SIEVE_FAIL; strcpy(head, phead); h = head; while (*h != '\0') { *h = tolower(*h); h++; } /* check the cache */ clinit = cl = hashheader(head); while (m->cache[cl] != NULL) { if (!strcmp(head, m->cache[cl]->name)) { *body = (const char **) m->cache[cl]->contents; break; } cl++; /* try next hash bin */ cl %= HEADERCACHESIZE; if (cl == clinit) break; /* gone all the way around */ } free(head); if (*body) { return SIEVE_OK; } else { return SIEVE_FAIL; } } message_data_t *new_msg(FILE *msg, int size, char *name) { int i; message_data_t *m; m = (message_data_t *) malloc(sizeof(message_data_t)); if (m == NULL) { fprintf(stderr, "malloc() returned NULL\n"); exit(1); } m->data = msg; m->size = size; m->name = name; m->content.base = NULL; m->content.len = 0; m->content.body = NULL; for (i = 0; i < HEADERCACHESIZE; i++) { m->cache[i] = NULL; } m->cache_full = 0; return m; } int getsize(void *mc, int *size) { message_data_t *m = (message_data_t *) mc; *size = m->size; return SIEVE_OK; } int getenvelope(void *v __attribute__((unused)), const char *head, const char ***body) { static const char *buf[2]; if (buf[0] == NULL) { buf[0] = malloc(sizeof(char) * 256); buf[1] = NULL; } printf("Envelope body of '%s'? ", head); scanf("%s", (char*) buf[0]); *body = buf; return SIEVE_OK; } int getbody(void *mc, const char **content_types, sieve_bodypart_t ***parts) { message_data_t *m = (message_data_t *) mc; int r = 0; if (!m->content.body) { /* parse the message body if we haven't already */ r = message_parse_file(m->data, &m->content.base, &m->content.len, &m->content.body); } /* XXX currently struct bodypart as defined in message.h is the same as sieve_bodypart_t as defined in sieve_interface.h, so we can typecast */ if (!r) message_fetch_part(&m->content, content_types, (struct bodypart ***) parts); return (!r ? SIEVE_OK : SIEVE_FAIL); } int getinclude(void *sc __attribute__((unused)), const char *script, int isglobal __attribute__((unused)), char *fpath, size_t size) { strlcpy(fpath, script, size); strlcat(fpath, ".bc", size); return SIEVE_OK; } int redirect(void *ac, void *ic, void *sc __attribute__((unused)), void *mc, const char **errmsg __attribute__((unused))) { sieve_redirect_context_t *rc = (sieve_redirect_context_t *) ac; message_data_t *m = (message_data_t *) mc; int *force_fail = (int*) ic; printf("redirecting message '%s' to '%s'\n", m->name, rc->addr); return (*force_fail ? SIEVE_FAIL : SIEVE_OK); } int discard(void *ac __attribute__((unused)), void *ic, void *sc __attribute__((unused)), void *mc, const char **errmsg __attribute__((unused))) { message_data_t *m = (message_data_t *) mc; int *force_fail = (int*) ic; printf("discarding message '%s'\n", m->name); return (*force_fail ? SIEVE_FAIL : SIEVE_OK); } int reject(void *ac, void *ic, void *sc __attribute__((unused)), void *mc, const char **errmsg __attribute__((unused))) { sieve_reject_context_t *rc = (sieve_reject_context_t *) ac; message_data_t *m = (message_data_t *) mc; int *force_fail = (int*) ic; printf("rejecting message '%s' with '%s'\n", m->name, rc->msg); return (*force_fail ? SIEVE_FAIL : SIEVE_OK); } int fileinto(void *ac, void *ic, void *sc __attribute__((unused)), void *mc, const char **errmsg __attribute__((unused))) { sieve_fileinto_context_t *fc = (sieve_fileinto_context_t *) ac; message_data_t *m = (message_data_t *) mc; int *force_fail = (int*) ic; printf("filing message '%s' into '%s'\n", m->name, fc->mailbox); if (fc->imapflags->count) { char *s = strarray_join(fc->imapflags, "' '"); if (s) { printf("\twith flags '%s'\n", s); free(s); } } return (*force_fail ? SIEVE_FAIL : SIEVE_OK); } int keep(void *ac, void *ic, void *sc __attribute__((unused)), void *mc, const char **errmsg __attribute__((unused))) { sieve_keep_context_t *kc = (sieve_keep_context_t *) ac; message_data_t *m = (message_data_t *) mc; int *force_fail = (int*) ic; printf("keeping message '%s'\n", m->name); if (kc->imapflags->count) { char *s = strarray_join(kc->imapflags, "' '"); if (s) { printf("\twith flags '%s'\n", s); free(s); } } return (*force_fail ? SIEVE_FAIL : SIEVE_OK); } int notify(void *ac, void *ic, void *sc __attribute__((unused)), void *mc __attribute__((unused)), const char **errmsg __attribute__((unused))) { sieve_notify_context_t *nc = (sieve_notify_context_t *) ac; int *force_fail = (int*) ic; int flag = 0; printf("notify "); if (nc->method) { const char **opts = nc->options; printf("%s(", nc->method); while (opts && *opts) { if (flag) printf(", "); printf("%s", *opts); opts++; flag = 1; } printf("), "); } printf("msg = '%s' with priority = %s\n",nc->message, nc->priority); return (*force_fail ? SIEVE_FAIL : SIEVE_OK); } int mysieve_error(int lineno, const char *msg, void *i __attribute__((unused)), void *s __attribute__((unused))) { fprintf(stderr, "line %d: %s\r\n", lineno, msg); return SIEVE_OK; } int mysieve_execute_error(const char *msg, void *i __attribute__((unused)), void *s __attribute__((unused)), void *m __attribute__((unused))) { fprintf(stderr, "%s\r\n", msg); return SIEVE_OK; } int autorespond(void *ac, void *ic __attribute__((unused)), void *sc __attribute__((unused)), void *mc __attribute__((unused)), const char **errmsg __attribute__((unused))) { sieve_autorespond_context_t *arc = (sieve_autorespond_context_t *) ac; char yn; int i; printf("Have I already responded to '"); for (i = 0; i < SIEVE_HASHLEN; i++) { printf("%x", arc->hash[i]); } printf("' in %d days? ", arc->days); scanf(" %c", &yn); if (tolower(yn) == 'y') return SIEVE_DONE; if (tolower(yn) == 'n') return SIEVE_OK; return SIEVE_FAIL; } int send_response(void *ac, void *ic, void *sc __attribute__((unused)), void *mc, const char **errmsg __attribute__((unused))) { sieve_send_response_context_t *src = (sieve_send_response_context_t *) ac; message_data_t *m = (message_data_t *) mc; int *force_fail = (int*) ic; printf("echo '%s' | mail -s '%s' '%s' for message '%s' (from: %s)\n", src->msg, src->subj, src->addr, m->name, src->fromaddr); return (*force_fail ? SIEVE_FAIL : SIEVE_OK); } sieve_vacation_t vacation = { 0, /* min response */ 0, /* max response */ &autorespond, /* autorespond() */ &send_response /* send_response() */ }; struct testcase { int comp; int mode; const char *pat; const char *text; int result; }; struct testcase tc[] = { { B_OCTET, B_IS, "", "", 1 }, { B_OCTET, B_IS, "a", "", 0 }, { B_OCTET, B_IS, "", "a", 0 }, { B_OCTET, B_IS, "a", "a", 1 }, { B_OCTET, B_IS, "a", "A", 0 }, { B_ASCIICASEMAP, B_IS, "", "", 1 }, { B_ASCIICASEMAP, B_IS, "a", "", 0 }, { B_ASCIICASEMAP, B_IS, "", "a", 0 }, { B_ASCIICASEMAP, B_IS, "a", "a", 1 }, { B_ASCIICASEMAP, B_IS, "a", "A", 1 }, { B_ASCIINUMERIC, B_IS, "123", "123", 1 }, { B_ASCIINUMERIC, B_IS, "123", "-123", 0 }, { B_ASCIINUMERIC, B_IS, "abc", "123", 0 }, { B_ASCIINUMERIC, B_IS, "abc", "abc", 1 }, { B_ASCIINUMERIC, B_IS, "12345678900", "3755744308", 0 }, /* test for 32bit overflow */ { B_ASCIINUMERIC, B_IS, "1567", "1567pounds", 1 }, { B_ASCIINUMERIC, B_IS, "", "", 1 }, { B_ASCIINUMERIC, B_IS, "123456789", "567", 0 }, { B_ASCIINUMERIC, B_IS, "567", "123456789", 0 }, { B_ASCIINUMERIC, B_IS, "123456789", "00000123456789", 1 }, { B_ASCIINUMERIC, B_IS, "102", "1024", 0 }, { B_ASCIINUMERIC, B_IS, "1567M", "1567 arg", 1 }, { B_OCTET, B_CONTAINS, "", "", 1 }, { B_OCTET, B_CONTAINS, "", "a", 1 }, { B_OCTET, B_CONTAINS, "a", "", 0 }, { B_OCTET, B_CONTAINS, "a", "a", 1 }, { B_OCTET, B_CONTAINS, "a", "ab", 1 }, { B_OCTET, B_CONTAINS, "a", "ba", 1 }, { B_OCTET, B_CONTAINS, "a", "aba", 1 }, { B_OCTET, B_CONTAINS, "a", "bab", 1 }, { B_OCTET, B_CONTAINS, "a", "bb", 0 }, { B_OCTET, B_CONTAINS, "a", "bbb", 0 }, { B_OCTET, B_MATCHES, "", "", 1 }, { B_OCTET, B_MATCHES, "", "a", 0 }, { B_OCTET, B_MATCHES, "a", "", 0 }, { B_OCTET, B_MATCHES, "a", "a", 1 }, { B_OCTET, B_MATCHES, "a", "ab", 0 }, { B_OCTET, B_MATCHES, "a", "ba", 0 }, { B_OCTET, B_MATCHES, "a", "aba", 0 }, { B_OCTET, B_MATCHES, "a", "bab", 0 }, { B_OCTET, B_MATCHES, "a", "bb", 0 }, { B_OCTET, B_MATCHES, "a", "bbb", 0 }, { B_OCTET, B_MATCHES, "*", "", 1 }, { B_OCTET, B_MATCHES, "*", "a", 1 }, { B_OCTET, B_MATCHES, "*a*", "", 0 }, { B_OCTET, B_MATCHES, "*a*", "a", 1 }, { B_OCTET, B_MATCHES, "*a*", "ab", 1 }, { B_OCTET, B_MATCHES, "*a*", "ba", 1 }, { B_OCTET, B_MATCHES, "*a*", "aba", 1 }, { B_OCTET, B_MATCHES, "*a*", "bab", 1 }, { B_OCTET, B_MATCHES, "*a*", "bb", 0 }, { B_OCTET, B_MATCHES, "*a*", "bbb", 0 }, { B_OCTET, B_MATCHES, "*a", "", 0 }, { B_OCTET, B_MATCHES, "*a", "a", 1 }, { B_OCTET, B_MATCHES, "*a", "ab", 0 }, { B_OCTET, B_MATCHES, "*a", "ba", 1 }, { B_OCTET, B_MATCHES, "*a", "aba", 1 }, { B_OCTET, B_MATCHES, "*a", "bab", 0 }, { B_OCTET, B_MATCHES, "*a", "bb", 0 }, { B_OCTET, B_MATCHES, "*a", "bbb", 0 }, { B_OCTET, B_MATCHES, "a*", "", 0 }, { B_OCTET, B_MATCHES, "a*", "a", 1 }, { B_OCTET, B_MATCHES, "a*", "ab", 1 }, { B_OCTET, B_MATCHES, "a*", "ba", 0 }, { B_OCTET, B_MATCHES, "a*", "aba", 1 }, { B_OCTET, B_MATCHES, "a*", "bab", 0 }, { B_OCTET, B_MATCHES, "a*", "bb", 0 }, { B_OCTET, B_MATCHES, "a*", "bbb", 0 }, { B_OCTET, B_MATCHES, "a*b", "", 0 }, { B_OCTET, B_MATCHES, "a*b", "a", 0 }, { B_OCTET, B_MATCHES, "a*b", "ab", 1 }, { B_OCTET, B_MATCHES, "a*b", "ba", 0 }, { B_OCTET, B_MATCHES, "a*b", "aba", 0 }, { B_OCTET, B_MATCHES, "a*b", "bab", 0 }, { B_OCTET, B_MATCHES, "a*b", "bb", 0 }, { B_OCTET, B_MATCHES, "a*b", "bbb", 0 }, { B_OCTET, B_MATCHES, "a*b", "abbb", 1 }, { B_OCTET, B_MATCHES, "a*b", "acb", 1 }, { B_OCTET, B_MATCHES, "a*b", "acbc", 0 }, { B_OCTET, B_MATCHES, "a?b", "", 0 }, { B_OCTET, B_MATCHES, "a?b", "a", 0 }, { B_OCTET, B_MATCHES, "a?b", "ab", 0 }, { B_OCTET, B_MATCHES, "a?b", "ba", 0 }, { B_OCTET, B_MATCHES, "a?b", "aba", 0 }, { B_OCTET, B_MATCHES, "a?b", "bab", 0 }, { B_OCTET, B_MATCHES, "a?b", "bb", 0 }, { B_OCTET, B_MATCHES, "a?b", "bbb", 0 }, { B_OCTET, B_MATCHES, "a?b", "abbb", 0 }, { B_OCTET, B_MATCHES, "a?b", "acb", 1 }, { B_OCTET, B_MATCHES, "a?b", "acbc", 0 }, { B_OCTET, B_MATCHES, "a*?b", "", 0 }, { B_OCTET, B_MATCHES, "a*?b", "a", 0 }, { B_OCTET, B_MATCHES, "a*?b", "ab", 0 }, { B_OCTET, B_MATCHES, "a*?b", "ba", 0 }, { B_OCTET, B_MATCHES, "a*?b", "aba", 0 }, { B_OCTET, B_MATCHES, "a*?b", "bab", 0 }, { B_OCTET, B_MATCHES, "a*?b", "bb", 0 }, { B_OCTET, B_MATCHES, "a*?b", "bbb", 0 }, { B_OCTET, B_MATCHES, "a*?b", "abbb", 1 }, { B_OCTET, B_MATCHES, "a*?b", "acb", 1 }, { B_OCTET, B_MATCHES, "a*?b", "acbc", 0 }, { B_OCTET, B_MATCHES, "a?*b", "", 0 }, { B_OCTET, B_MATCHES, "a?*b", "a", 0 }, { B_OCTET, B_MATCHES, "a?*b", "ab", 0 }, { B_OCTET, B_MATCHES, "a?*b", "ba", 0 }, { B_OCTET, B_MATCHES, "a?*b", "aba", 0 }, { B_OCTET, B_MATCHES, "a?*b", "bab", 0 }, { B_OCTET, B_MATCHES, "a?*b", "bb", 0 }, { B_OCTET, B_MATCHES, "a?*b", "bbb", 0 }, { B_OCTET, B_MATCHES, "a?*b", "abbb", 1 }, { B_OCTET, B_MATCHES, "a?*b", "acb", 1 }, { B_OCTET, B_MATCHES, "a?*b", "acbc", 0 }, { B_OCTET, B_MATCHES, "a*?*b", "", 0 }, { B_OCTET, B_MATCHES, "a*?*b", "a", 0 }, { B_OCTET, B_MATCHES, "a*?*b", "ab", 0 }, { B_OCTET, B_MATCHES, "a*?*b", "ba", 0 }, { B_OCTET, B_MATCHES, "a*?*b", "aba", 0 }, { B_OCTET, B_MATCHES, "a*?*b", "bab", 0 }, { B_OCTET, B_MATCHES, "a*?*b", "bb", 0 }, { B_OCTET, B_MATCHES, "a*?*b", "bbb", 0 }, { B_OCTET, B_MATCHES, "a*?*b", "abbb", 1 }, { B_OCTET, B_MATCHES, "a*?*b", "acb", 1 }, { B_OCTET, B_MATCHES, "a*?*b?", "acbc", 1 }, { B_ASCIICASEMAP, B_MATCHES, "a*b", "", 0 }, { B_ASCIICASEMAP, B_MATCHES, "a*b", "a", 0 }, { B_ASCIICASEMAP, B_MATCHES, "a*b", "ab", 1 }, { B_ASCIICASEMAP, B_MATCHES, "a*b", "ba", 0 }, { B_ASCIICASEMAP, B_MATCHES, "a*b", "aba", 0 }, { B_ASCIICASEMAP, B_MATCHES, "a*b", "bab", 0 }, { B_ASCIICASEMAP, B_MATCHES, "a*b", "bb", 0 }, { B_ASCIICASEMAP, B_MATCHES, "a*b", "bbb", 0 }, { B_ASCIICASEMAP, B_MATCHES, "a*b", "abbb", 1 }, { B_ASCIICASEMAP, B_MATCHES, "a*b", "acb", 1 }, { B_ASCIICASEMAP, B_MATCHES, "a*b", "acbc", 0 }, { B_ASCIICASEMAP, B_MATCHES, "a*b", "", 0 }, { B_ASCIICASEMAP, B_MATCHES, "a*b", "A", 0 }, { B_ASCIICASEMAP, B_MATCHES, "a*b", "Ab", 1 }, { B_ASCIICASEMAP, B_MATCHES, "a*b", "BA", 0 }, { B_ASCIICASEMAP, B_MATCHES, "a*b", "ABA", 0 }, { B_ASCIICASEMAP, B_MATCHES, "a*b", "BAb", 0 }, { B_ASCIICASEMAP, B_MATCHES, "a*b", "BB", 0 }, { B_ASCIICASEMAP, B_MATCHES, "a*b", "BBB", 0 }, { B_ASCIICASEMAP, B_MATCHES, "a*b", "aBBB", 1 }, { B_ASCIICASEMAP, B_MATCHES, "a*b", "ACB", 1 }, { B_ASCIICASEMAP, B_MATCHES, "a*b", "ACBC", 0 }, { 0, 0, NULL, NULL, 0 } }; static int test_comparator(void) { struct testcase *t; int didfail = 0; for (t = tc; t->comp != 0; t++) { void *comprock = NULL; comparator_t *c = lookup_comp(t->comp, t->mode, -1, &comprock); int res; char *comp, *mode; if (t->comp == B_OCTET) comp = "i;octet"; else if (t->comp == B_ASCIICASEMAP) comp = "i;ascii-casemap"; else if (t->comp == B_ASCIINUMERIC) comp = "i;ascii-numeric"; else comp = ""; if (t->mode == B_IS) mode = "IS"; else if (t->mode == B_CONTAINS) mode = "CONTAINS"; else if (t->mode == B_MATCHES) mode = "MATCHES"; else if (t->mode == B_REGEX) mode = "REGEX"; else mode = ""; if (!c) { printf("FAIL: can't find a comparator %s/%s\n", comp, mode); didfail++; continue; } res = c(t->text, strlen(t->text), t->pat, comprock); if (res != t->result) { printf("FAIL: %s/%s(%s, %s) = %d, not %d\n", comp, mode, t->pat, t->text, res, t->result); didfail++; } } if (didfail) { fprintf(stderr, "failed %d tests\n", didfail); exit(1); } else { exit(0); } } int config_need_data = 0; int main(int argc, char *argv[]) { sieve_interp_t *i; sieve_execute_t *exe = NULL; message_data_t *m; char *script = NULL, *message = NULL; int c, force_fail = 0, usage_error = 0; /* (crom cvs update) FILE *f; */ int fd, res; struct stat sbuf; static strarray_t mark = STRARRAY_INITIALIZER; while ((c = getopt(argc, argv, "v:cf")) != EOF) switch (c) { case 'v': script = optarg; break; case 'c': test_comparator(); /* test_comparator exits for us */ break; case 'f': force_fail = 1; break; default: usage_error = 1; break; } if (!script) { if ((argc - optind) < 2) usage_error = 1; else { message = argv[optind]; script = argv[optind+1]; } } if (usage_error) { fprintf(stderr, "usage:\n"); fprintf(stderr, "%s message script\n", argv[0]); fprintf(stderr, "%s -v script\n", argv[0]); exit(1); } res = sieve_interp_alloc(&i, &force_fail); if (res != SIEVE_OK) { printf("sieve_interp_alloc() returns %d\n", res); exit(1); } res = sieve_register_redirect(i, &redirect); if (res != SIEVE_OK) { printf("sieve_register_redirect() returns %d\n", res); exit(1); } res = sieve_register_discard(i, &discard); if (res != SIEVE_OK) { printf("sieve_register_discard() returns %d\n", res); exit(1); } res = sieve_register_reject(i, &reject); if (res != SIEVE_OK) { printf("sieve_register_reject() returns %d\n", res); exit(1); } res = sieve_register_fileinto(i, &fileinto); if (res != SIEVE_OK) { printf("sieve_register_fileinto() returns %d\n", res); exit(1); } res = sieve_register_keep(i, &keep); if (res != SIEVE_OK) { printf("sieve_register_keep() returns %d\n", res); exit(1); } res = sieve_register_size(i, &getsize); if (res != SIEVE_OK) { printf("sieve_register_size() returns %d\n", res); exit(1); } res = sieve_register_header(i, &getheader); if (res != SIEVE_OK) { printf("sieve_register_header() returns %d\n", res); exit(1); } res = sieve_register_envelope(i, &getenvelope); if (res != SIEVE_OK) { printf("sieve_register_envelope() returns %d\n", res); exit(1); } res = sieve_register_body(i, &getbody); if (res != SIEVE_OK) { printf("sieve_register_body() returns %d\n", res); exit(1); } res = sieve_register_include(i, &getinclude); if (res != SIEVE_OK) { printf("sieve_register_include() returns %d\n", res); exit(1); } res = sieve_register_vacation(i, &vacation); if (res != SIEVE_OK) { printf("sieve_register_vacation() returns %d\n", res); exit(1); } strarray_append(&mark, "\\flagged"); res = sieve_register_imapflags(i, &mark); if (res != SIEVE_OK) { printf("sieve_register_imapflags() returns %d\n", res); exit(1); } res = sieve_register_notify(i, ¬ify); if (res != SIEVE_OK) { printf("sieve_register_notify() returns %d\n", res); exit(1); } res = sieve_register_parse_error(i, &mysieve_error); if (res != SIEVE_OK) { printf("sieve_register_parse_error() returns %d\n", res); exit(1); } res = sieve_register_execute_error(i, &mysieve_execute_error); if (res != SIEVE_OK) { printf("sieve_register_execute_error() returns %d\n", res); exit(1); } res = sieve_script_load(script, &exe); if (res != SIEVE_OK) { printf("sieve_script_load() returns %d\n", res); exit(1); } if (message) { FILE *f; fd = open(message, O_RDONLY); res = fstat(fd, &sbuf); if (res != 0) { perror("fstat"); } f = fdopen(fd, "r"); if (f) m = new_msg(f, sbuf.st_size, message); if (!f || !m) { printf("can not open message '%s'\n", message); exit(1); } res = sieve_execute_bytecode(exe, i, NULL, m); if (res != SIEVE_OK) { printf("sieve_execute_bytecode() returns %d\n", res); exit(1); } fclose(f); close(fd); } /*used to be sieve_script_free*/ res = sieve_script_unload(&exe); if (res != SIEVE_OK) { printf("sieve_script_unload() returns %d\n", res); exit(1); } res = sieve_interp_free(&i); if (res != SIEVE_OK) { printf("sieve_interp_free() returns %d\n", res); exit(1); } return 0; } void fatal(char* message, int rc) { fprintf(stderr, "fatal error: %s\n", message); exit(rc); } cyrus-imapd-2.4.18/sieve/sieve-lex.l0000644000175000017500000001427612546374065016230 0ustar ellieellie%{ /* sieve.l -- sieve lexer * Larry Greenfield * * Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The name "Carnegie Mellon University" must not be used to * endorse or promote products derived from this software without * prior written permission. For permission or any legal * details, please contact * Carnegie Mellon University * Center for Technology Transfer and Enterprise Creation * 4615 Forbes Avenue * Suite 302 * Pittsburgh, PA 15213 * (412) 268-7393, fax: (412) 268-7395 * innovation@andrew.cmu.edu * * 4. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by Computing Services * at Carnegie Mellon University (http://www.cmu.edu/computing/)." * * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * $Id: sieve-lex.l,v 1.24 2010/01/06 17:01:59 murch Exp $ */ #ifdef HAVE_CONFIG_H #include #endif #include /* for strdup */ #include "xmalloc.h" #include "tree.h" #include "sieve.h" #define YY_NO_INPUT static int tonum(char *c); static char *chkstr(char *); static char *mlbuf; static int mlbufsz, mlcur; extern int yyerror(char *); %} %option yylineno %option noyywrap %option nounput ws [ \t]+ ident [a-zA-Z_][a-zA-Z_0-9]* CRLF (\r\n|\r|\n) %state MULTILINE %state QSTRING %% ^\.{CRLF} { BEGIN INITIAL; if (mlbuf) mlbuf[mlcur] = '\0'; yylval.sval = chkstr(mlbuf); return STRING; } ^\.\. { /* dot stuffing! we want one . */ yyless(1); } (.|\n) { if (mlcur == mlbufsz) mlbuf = xrealloc(mlbuf, 1 + (mlbufsz+=1024)); mlbuf[mlcur++] = yytext[0]; } <> { yyerror("unexpected end of file in string"); BEGIN INITIAL; if (mlbuf) free(mlbuf); yyterminate(); } \" { BEGIN INITIAL; if (mlbuf) mlbuf[mlcur] = '\0'; yylval.sval = chkstr(mlbuf); return STRING; } \\. { if (mlcur == mlbufsz) mlbuf = xrealloc(mlbuf, 1 + (mlbufsz+=1024)); mlbuf[mlcur++] = yytext[1]; } (.|\n) { if (mlcur == mlbufsz) mlbuf = xrealloc(mlbuf, 1 + (mlbufsz+=1024)); mlbuf[mlcur++] = yytext[0]; } <> { yyerror("unexpected end of file in string"); BEGIN INITIAL; if (mlbuf) free(mlbuf); yyterminate(); } text:{ws}?(#.*)?{CRLF} { BEGIN MULTILINE; mlcur = 0; mlbufsz = 0; mlbuf = NULL; } \" { BEGIN QSTRING; mlcur = 0; mlbufsz = 0; mlbuf = NULL; } [0-9]+[KMGkmg]? { yylval.nval = tonum(yytext); return NUMBER; } if return IF; elsif return ELSIF; else return ELSE; anyof return ANYOF; allof return ALLOF; exists return EXISTS; false return SFALSE; true return STRUE; address return ADDRESS; envelope return ENVELOPE; header return HEADER; body return BODY; not return NOT; size return SIZE; hasflag return HASFLAG; reject return REJCT; fileinto return FILEINTO; redirect return REDIRECT; keep return KEEP; require return REQUIRE; stop return STOP; discard return DISCARD; setflag return SETFLAG; addflag return ADDFLAG; removeflag return REMOVEFLAG; mark return MARK; unmark return UNMARK; notify return NOTIFY; denotify return DENOTIFY; :id return ID; :method return METHOD; :options return OPTIONS; :low return LOW; :normal return NORMAL; :high return HIGH; :message return MESSAGE; vacation return VACATION; :days return DAYS; :addresses return ADDRESSES; :subject return SUBJECT; :from return FROM; :handle return HANDLE; :mime return MIME; :comparator return COMPARATOR; :is return IS; :contains return CONTAINS; :matches return MATCHES; :regex return REGEX; :count return COUNT; :value return VALUE; :over return OVER; :under return UNDER; :all return ALL; :localpart return LOCALPART; :domain return DOMAIN; :user return USER; :detail return DETAIL; :raw return RAW; :text return TEXT; :content return CONTENT; include return INCLUDE; :personal return PERSONAL; :global return GLOBAL; return return RETURN; :copy return COPY; :flags return FLAGS; [ \t\n\r] ; /* ignore whitespace */ #.* ; /* ignore hash comments */ "/*"([^\*]|\*[^\/])*\*?"*/" ; /* ignore bracket comments */ . return yytext[0]; %% /* */ static int tonum(char *c) { int val = atoi(c); switch (c[strlen(c)-1]) { case 'K': case 'k': val *= (1 << 10); break; case 'M': case 'm': val *= (1 << 20); break; case 'G': case 'g': val *= (1 << 30); break; default: break; } return val; } /* convert NULL strings to "" */ static char *chkstr(char *str) { if (!str) return xstrdup(""); else return str; } cyrus-imapd-2.4.18/sieve/bc_eval.c0000644000175000017500000011111012546374065015672 0ustar ellieellie/* bc_eval.c - evaluate the bytecode * * Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The name "Carnegie Mellon University" must not be used to * endorse or promote products derived from this software without * prior written permission. For permission or any legal * details, please contact * Carnegie Mellon University * Center for Technology Transfer and Enterprise Creation * 4615 Forbes Avenue * Suite 302 * Pittsburgh, PA 15213 * (412) 268-7393, fax: (412) 268-7395 * innovation@andrew.cmu.edu * * 4. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by Computing Services * at Carnegie Mellon University (http://www.cmu.edu/computing/)." * * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * $Id: bc_eval.c,v 1.19.2.2 2010/02/12 03:41:11 brong Exp $ */ #ifdef HAVE_CONFIG_H #include #endif #include "sieve_interface.h" #include "interp.h" #include "message.h" #include "script.h" #include "bytecode.h" #include "charset.h" #include "hash.h" #include "xmalloc.h" #include "xstrlcpy.h" #include "xstrlcat.h" #include "util.h" #include #include #define SCOUNT_SIZE 20 char scount[SCOUNT_SIZE]; /**************************************************************************/ /**************************************************************************/ /**************************************************************************/ /**************************EXECUTING BYTECODE******************************/ /**************************************************************************/ /**************************************************************************/ /**************************************************************************/ /**************************************************************************/ /* Given a bytecode_input_t at the beginning of a string (the len block), * return the string, the length, and the bytecode index of the NEXT * item */ int unwrap_string(bytecode_input_t *bc, int pos, const char **str, int *len) { int local_len = ntohl(bc[pos].value); pos++; if(local_len == -1) { /* -1 length indicates NULL */ *str = NULL; } else { /* This cast is ugly, but necessary */ *str = (const char *)&bc[pos].str; /* Compute the next index */ pos += ((ROUNDUP(local_len+1))/sizeof(bytecode_input_t)); } if(len) *len = local_len; return pos; } /* this is used by notify to pass the options list to do_notify * do_notify needs null-terminated (char *)[], * we have a stringlist, the beginning of which is pointed at by pos */ static const char ** bc_makeArray(bytecode_input_t *bc, int *pos) { int i; const char** array; int len = ntohl(bc[*pos].value); (*pos)+=2; /* Skip # Values and Total Byte Length */ array=(const char **)xmalloc((len+1) * sizeof(char *)); for (i=0; igetheader(m, buf, &body) == SIEVE_OK) { l = SIEVE_DONE; break; } } /* Implementations SHOULD NOT respond to any message that has an "Auto-submitted" header field with a value other than "no". This header field is described in [RFC3834]. */ strcpy(buf, "auto-submitted"); if (interp->getheader(m, buf, &body) == SIEVE_OK) { /* we don't deal with comments, etc. here */ /* skip leading white-space */ while (*body[0] && Uisspace(*body[0])) body[0]++; if (strcasecmp(body[0], "no")) l = SIEVE_DONE; } /* is there a Precedence keyword of "junk | bulk | list"? */ /* XXX non-standard header, but worth checking */ strcpy(buf, "precedence"); if (interp->getheader(m, buf, &body) == SIEVE_OK) { /* we don't deal with comments, etc. here */ /* skip leading white-space */ while (*body[0] && Uisspace(*body[0])) body[0]++; if (!strcasecmp(body[0], "junk") || !strcasecmp(body[0], "bulk") || !strcasecmp(body[0], "list")) l = SIEVE_DONE; } /* Note: the domain-part of all addresses are canonicalized */ /* grab my address from the envelope */ if (l == SIEVE_OK) { strcpy(buf, "to"); l = interp->getenvelope(m, buf, &body); if (body[0]) { parse_address(body[0], &data, &marker); tmp = get_address(ADDRESS_ALL, &data, &marker, 1); myaddr = (tmp != NULL) ? xstrdup(tmp) : NULL; free_address(&data, &marker); } } if (l == SIEVE_OK) { strcpy(buf, "from"); l = interp->getenvelope(m, buf, &body); } if (l == SIEVE_OK && body[0]) { /* we have to parse this address & decide whether we want to respond to it */ parse_address(body[0], &data, &marker); tmp = get_address(ADDRESS_ALL, &data, &marker, 1); reply_to = (tmp != NULL) ? xstrdup(tmp) : NULL; free_address(&data, &marker); /* first, is there a reply-to address? */ if (reply_to == NULL) { l = SIEVE_DONE; } /* first, is it from me? */ if (l == SIEVE_OK && myaddr && !strcmp(myaddr, reply_to)) { l = SIEVE_DONE; } /* ok, is it any of the other addresses i've specified? */ if (l == SIEVE_OK) { curra=i; for(x=0; xgetheader(m, buf, &body) == SIEVE_OK) found = look_for_me(myaddr, numaddresses ,bc, i, body); if (!found && (strcpy(buf, "cc"), (interp->getheader(m, buf, &body) == SIEVE_OK))) found = look_for_me(myaddr, numaddresses, bc, i, body); if (!found && (strcpy(buf, "bcc"), (interp->getheader(m, buf, &body) == SIEVE_OK))) found = look_for_me(myaddr, numaddresses, bc, i, body); if (!found && (strcpy(buf, "resent-to"), (interp->getheader(m, buf, &body) == SIEVE_OK))) found = look_for_me(myaddr, numaddresses ,bc, i, body); if (!found && (strcpy(buf, "resent-cc"), (interp->getheader(m, buf, &body) == SIEVE_OK))) found = look_for_me(myaddr, numaddresses, bc, i, body); if (!found && (strcpy(buf, "resent-bcc"), (interp->getheader(m, buf, &body) == SIEVE_OK))) found = look_for_me(myaddr, numaddresses, bc, i, body); if (!found) l = SIEVE_DONE; } /* ok, ok, if we got here maybe we should reply */ if (myaddr) free(myaddr); *from = found; *to = reply_to; return l; } /* Evaluate a bytecode test */ static int eval_bc_test(sieve_interp_t *interp, void* m, bytecode_input_t * bc, int * ip, strarray_t *workingflags) { int res=0; int i=*ip; int x,y,z;/* loop variable */ int list_len; /* for allof/anyof/exists */ int list_end; /* for allof/anyof/exists */ int address=0;/*to differentiate between address and envelope*/ comparator_t * comp=NULL; void * comprock=NULL; int op= ntohl(bc[i].op); switch(op) { case BC_FALSE: res=0; i++; break; case BC_TRUE: res=1; i++; break; case BC_NOT:/*2*/ i+=1; res = eval_bc_test(interp, m, bc, &i, workingflags); if(res >= 0) res = !res; /* Only invert in non-error case */ break; case BC_EXISTS:/*3*/ { int headersi=i+1; const char** val; int currh; res=1; list_len=ntohl(bc[headersi].len); list_end=ntohl(bc[headersi+1].value)/4; currh=headersi+2; for(x=0; xgetheader(m,str, &val) != SIEVE_OK) res = 0; } i=list_end; /* adjust for short-circuit */ break; } case BC_SIZE:/*4*/ { int s; int sizevar=ntohl(bc[i+1].value); int x=ntohl(bc[i+2].value); if (interp->getsize(m, &s) != SIEVE_OK) break; if (sizevar ==B_OVER) { /* over */ res= s > x; } else { /* under */ res= s < x; } i+=3; break; } case BC_ANYOF:/*5*/ res = 0; list_len=ntohl(bc[i+1].len); list_end=ntohl(bc[i+2].len)/4; i+=3; /* need to process all of them, to ensure our instruction pointer stays * in the right place */ for (x=0; xgetheader(m, this_header, &val) != SIEVE_OK) continue; #if VERBOSE printf(" [%d] header %s is %s\n", x, this_header, val[0]); #endif } else { /* Envelope */ if(interp->getenvelope(m, this_header, &val) != SIEVE_OK) continue; } /*header exists, now to test it*/ /*search through all the headers that match*/ for (y=0; val[y]!=NULL && !res; y++) { #if VERBOSE printf("about to parse %s\n", val[y]); #endif if (parse_address(val[y], &data, &marker)!=SIEVE_OK) return 0; while (!res && (addr = get_address(addrpart, &data, &marker, 0))) { #if VERBOSE printf("working addr %s\n", (addr ? addr : "[nil]")); #endif if (match == B_COUNT) { count++; } else { /*search through all the data*/ currd=datai+2; for (z=0; zgetheader(m, this_header, &val) != SIEVE_OK) { continue; /*this header does not exist, search the next*/ } #if VERBOSE printf ("val %s %s %s\n", val[0], val[1], val[2]); #endif /* search through all the headers that match */ for (y = 0; val[y] && !res; y++) { if (match == B_COUNT) { count++; } else { decoded_header = charset_parse_mimeheader(val[y]); /*search through all the data*/ currd=datai+2; for (z=0; zcount; snprintf(scount, SCOUNT_SIZE, "%u", count); /*search through all the data*/ currneedle=needlesi+2; for (z=0; zcount && !res; y++) { const char *active_flag; active_flag = workingflags->data[y]; if (isReg) { reg= bc_compile_regex(this_needle, ctag, errbuf, sizeof(errbuf)); if (!reg) { /* Oops */ res=-1; goto alldone; } res |= comp(active_flag, strlen(active_flag), (const char *)reg, comprock); free(reg); } else { res |= comp(active_flag, strlen(active_flag), this_needle, comprock); } } } } /* Update IP */ i=(ntohl(bc[needlesi+1].value)/4); break; } case BC_BODY:/*10*/ { sieve_bodypart_t ** val; const char **content_types = NULL; int typesi=i+6;/* the i value for the begining of the content-types */ int datai=(ntohl(bc[typesi+1].value)/4); int numdata=ntohl(bc[datai].len); int currd; /* current data */ int match=ntohl(bc[i+1].value); int relation=ntohl(bc[i+2].value); int comparator=ntohl(bc[i+3].value); int transform=ntohl(bc[i+4].value); /* ntohl(bc[i+5].value) is the now unused 'offset' */ int count=0; int isReg = (match==B_REGEX); int ctag = 0; regex_t *reg; char errbuf[100]; /* Basically unused, as regexps are tested at compile */ /* set up variables needed for compiling regex */ if (isReg) { if (comparator== B_ASCIICASEMAP) { ctag = REG_EXTENDED | REG_NOSUB | REG_ICASE; } else { ctag = REG_EXTENDED | REG_NOSUB; } } /*find the correct comparator fcn*/ comp = lookup_comp(comparator, match, relation, &comprock); if(!comp) { res = SIEVE_RUN_ERROR; break; } if (transform == B_RAW) { /* XXX - we never handled this properly, it has to search the * RAW message body, totally un-decoded, as a single string * * ignore - or just search in the UTF-8. I think the UTF-8 makes more sense */ /* break; */ } /*find the part(s) of the body that we want*/ content_types = bc_makeArray(bc, &typesi); if(interp->getbody(m, content_types, &val) != SIEVE_OK) { res = SIEVE_RUN_ERROR; break; } free(content_types); /* bodypart(s) exist, now to test them */ for (y = 0; val && val[y] && !res; y++) { if (match == B_COUNT) { count++; } else if (val[y]->decoded_body) { const char *content = val[y]->decoded_body; /* search through all the data */ currd=datai+2; for (z=0; zbc_cur; bytecode_input_t *bc = (bytecode_input_t *) bc_cur->data; int ip = 0, ip_max = (bc_cur->len/sizeof(bytecode_input_t)); if (bc_cur->is_executing) { *errmsg = "Recursive Include"; return SIEVE_RUN_ERROR; } bc_cur->is_executing = 1; /* Check that we * a) have bytecode * b) it is atleast long enough for the magic number, the version * and one opcode */ if(!bc) return SIEVE_FAIL; if(bc_cur->len < (BYTECODE_MAGIC_LEN + 2*sizeof(bytecode_input_t))) return SIEVE_FAIL; if(memcmp(bc, BYTECODE_MAGIC, BYTECODE_MAGIC_LEN)) { *errmsg = "Not a bytecode file"; return SIEVE_FAIL; } ip = BYTECODE_MAGIC_LEN / sizeof(bytecode_input_t); version= ntohl(bc[ip].op); /* this is because there was a time where integers were not network byte order. all the scripts written then would have version 0x01 written in host byte order.*/ if(version == (int)ntohl(1)) { if(errmsg) { *errmsg = "Incorrect Bytecode Version, please recompile (use sievec)"; } return SIEVE_FAIL; } if((version < BYTECODE_MIN_VERSION) || (version > BYTECODE_VERSION)) { if(errmsg) { *errmsg = "Incorrect Bytecode Version, please recompile (use sievec)"; } return SIEVE_FAIL; } #if VERBOSE printf("version number %d\n",version); #endif for(ip++; ipvar; } for (x=0; xvar); if (res == SIEVE_RUN_ERROR) *errmsg = "Keep can not be used with Reject"; actionflags = NULL; break; case B_DISCARD:/*2*/ res=do_discard(actions); break; case B_REJECT:/*3*/ ip = unwrap_string(bc, ip, &data, NULL); res = do_reject(actions, data); if (res == SIEVE_RUN_ERROR) *errmsg = "Reject can not be used with any other action"; break; case B_FILEINTO:/*23*/ { int x; int list_len=ntohl(bc[ip].len); ip+=2; /* skip opcode, list_len, and list data len */ if (list_len) { actionflags = (varlist_extend(flagvars))->var; } for (x=0; xvar); if (res == SIEVE_RUN_ERROR) *errmsg = "Fileinto can not be used with Reject"; actionflags = NULL; break; } case B_REDIRECT:/*20*/ copy = ntohl(bc[ip].value); ip+=1; /* fall through */ case B_REDIRECT_ORIG:/*5*/ { ip = unwrap_string(bc, ip, &data, NULL); res = do_redirect(actions, data, !copy); if (res == SIEVE_RUN_ERROR) *errmsg = "Redirect can not be used with Reject"; break; } case B_IF:/*6*/ { int testend=ntohl(bc[ip].value); int result; ip+=1; result=eval_bc_test(i, m, bc, &ip, workingvars->var); if (result<0) { *errmsg = "Invalid test"; return SIEVE_FAIL; } else if (result) { /*skip over jump instruction*/ testend+=2; } ip=testend; break; } case B_MARK:/*8*/ res = do_mark(actions); { int n = i->markflags->count; while (n) { strarray_add_case(workingvars->var, i->markflags->data[--n]); } } break; case B_UNMARK:/*9*/ res = do_unmark(actions); { int n = i->markflags->count; while (n) { strarray_remove_all_case(workingvars->var, i->markflags->data[--n]); } } break; case B_ADDFLAG:/*10*/ { int x; int list_len=ntohl(bc[ip].len); ip+=2; /* skip opcode, list_len, and list data len */ for (x=0; xvar, data); if (res == SIEVE_RUN_ERROR) *errmsg = "addflag can not be used with Reject"; } break; } case B_SETFLAG: { int x; int list_len=ntohl(bc[ip].len); ip+=2; /* skip opcode, list_len, and list data len */ res = do_setflag(actions); strarray_truncate(workingvars->var, 0); if (res == SIEVE_RUN_ERROR) { *errmsg = "setflag can not be used with Reject"; } else { for (x=0; xvar, data); } if (res == SIEVE_RUN_ERROR) *errmsg = "setflag can not be used with Reject"; } } break; } case B_REMOVEFLAG: { int x; int list_len=ntohl(bc[ip].len); ip+=2; /* skip opcode, list_len, and list data len */ for (x=0; xvar, data); if (res == SIEVE_RUN_ERROR) *errmsg = "removeflag can not be used with Reject"; } break; } case B_NOTIFY: { const char * id; const char * method; const char **options = NULL; const char *priority = NULL; const char * message; int pri; /* method */ ip = unwrap_string(bc, ip, &method, NULL); /* id */ ip = unwrap_string(bc, ip, &id, NULL); /*options*/ options=bc_makeArray(bc, &ip); /* priority */ pri=ntohl(bc[ip].value); ip++; switch (pri) { case B_LOW: priority="low"; break; case B_NORMAL: priority="normal"; break; case B_HIGH: priority="high"; break; case B_ANY: priority="any"; break; default: res=SIEVE_RUN_ERROR; } /* message */ ip = unwrap_string(bc, ip, &message, NULL); res = do_notify(notify_list, id, method, options, priority, message); break; } case B_DENOTIFY: { /* * i really have no idea what the count matchtype should do here. * the sanest thing would be to use 1. * however that would require passing on the match type to do_notify. * -jsmith2 */ comparator_t *comp = NULL; const char *pattern; regex_t *reg; const char *priority = NULL; void *comprock = NULL; int comparator; int pri; pri=ntohl(bc[ip].value); ip++; switch (pri) { case B_LOW: priority="low"; break; case B_NORMAL: priority="normal"; break; case B_HIGH: priority="high"; break; case B_ANY: priority="any"; break; default: res=SIEVE_RUN_ERROR; } if(res == SIEVE_RUN_ERROR) break; comparator =ntohl( bc[ip].value); ip++; if (comparator == B_ANY) { ip++;/* skip placeholder this has no comparator function */ comp=NULL; } else { int x= ntohl(bc[ip].value); ip++; comp=lookup_comp(B_ASCIICASEMAP,comparator, x, &comprock); } ip = unwrap_string(bc, ip, &pattern, NULL); if (comparator == B_REGEX) { char errmsg[1024]; /* Basically unused */ reg=bc_compile_regex(pattern, REG_EXTENDED | REG_NOSUB | REG_ICASE, errmsg, sizeof(errmsg)); if (!reg) { res = SIEVE_RUN_ERROR; } else { res = do_denotify(notify_list, comp, reg, comprock, priority); free(reg); } } else { res = do_denotify(notify_list, comp, pattern, comprock, priority); } break; } case B_VACATION: { int respond; char *fromaddr = NULL; /* relative to message we send */ char *toaddr = NULL; /* relative to message we send */ const char *handle = NULL; const char *message = NULL; int days, mime; char buf[128]; char subject[1024]; int x; x = ntohl(bc[ip].len); respond = shouldRespond(m, i, x, bc, ip+2, &fromaddr, &toaddr); ip = ntohl(bc[ip+1].value) / 4; if (respond==SIEVE_OK) { ip = unwrap_string(bc, ip, &data, NULL); if (!data) { /* we have to generate a subject */ const char **s; strlcpy(buf, "subject", sizeof(buf)); if (i->getheader(m, buf, &s) != SIEVE_OK || s[0] == NULL) { strlcpy(subject, "Automated reply", sizeof(subject)); } else { /* s[0] contains the original subject */ const char *origsubj = s[0]; snprintf(subject, sizeof(subject), "Auto: %s", origsubj); } } else { /* user specified subject */ strlcpy(subject, data, sizeof(subject)); } ip = unwrap_string(bc, ip, &message, NULL); days = ntohl(bc[ip].value); mime = ntohl(bc[ip+1].value); ip+=2; if (version >= 0x05) { ip = unwrap_string(bc, ip, &data, NULL); if (data) { /* user specified from address */ free(fromaddr); fromaddr = xstrdup(data); } ip = unwrap_string(bc, ip, &data, NULL); if (data) { /* user specified handle */ handle = data; } } res = do_vacation(actions, toaddr, fromaddr, xstrdup(subject), message, days, mime, handle); if (res == SIEVE_RUN_ERROR) *errmsg = "Vacation can not be used with Reject or Vacation"; } else if (respond == SIEVE_DONE) { /* skip subject and message */ ip = unwrap_string(bc, ip, &data, NULL); ip = unwrap_string(bc, ip, &data, NULL); ip+=2;/*skip days and mime flag*/ if (version >= 0x05) { /* skip from and handle */ ip = unwrap_string(bc, ip, &data, NULL); ip = unwrap_string(bc, ip, &data, NULL); } } else { res = SIEVE_RUN_ERROR; /* something is bad */ } break; } case B_NULL:/*15*/ break; case B_JUMP:/*16*/ ip= ntohl(bc[ip].jump); break; case B_INCLUDE:/*17*/ { int isglobal = (ntohl(bc[ip].value) == B_GLOBAL); char fpath[4096]; ip = unwrap_string(bc, ip+1, &data, NULL); res = i->getinclude(sc, data, isglobal, fpath, sizeof(fpath)); if (res != SIEVE_OK) *errmsg = "Include can not find script"; if (!res) { res = sieve_script_load(fpath, &exe); if (res != SIEVE_OK) *errmsg = "Include can not load script"; } if (!res) res = sieve_eval_bc(exe, 1, i, sc, m, flagvars, actions, notify_list, errmsg, workingvars); break; } case B_RETURN:/*18*/ if (is_incl) goto done; else res=1; break; default: if(errmsg) *errmsg = "Invalid sieve bytecode"; return SIEVE_FAIL; } if (res) /* we've either encountered an error or a stop */ break; } done: bc_cur->is_executing = 0; return res; } cyrus-imapd-2.4.18/sieve/interp.h0000644000175000017500000000511312546374065015612 0ustar ellieellie/* interp.h -- interpretor definition * Larry Greenfield * * Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The name "Carnegie Mellon University" must not be used to * endorse or promote products derived from this software without * prior written permission. For permission or any legal * details, please contact * Carnegie Mellon University * Center for Technology Transfer and Enterprise Creation * 4615 Forbes Avenue * Suite 302 * Pittsburgh, PA 15213 * (412) 268-7393, fax: (412) 268-7395 * innovation@andrew.cmu.edu * * 4. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by Computing Services * at Carnegie Mellon University (http://www.cmu.edu/computing/)." * * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * $Id: interp.h,v 1.10 2010/01/06 17:01:59 murch Exp $ */ #ifndef SIEVE_INTERP_H #define SIEVE_INTERP_H #include "sieve_interface.h" struct sieve_interp { /* standard callbacks for actions */ sieve_callback *redirect, *discard, *reject, *fileinto, *keep; sieve_callback *notify; sieve_vacation_t *vacation; sieve_get_size *getsize; sieve_get_header *getheader; sieve_get_envelope *getenvelope; sieve_get_body *getbody; sieve_get_include *getinclude; sieve_parse_error *err; /* site-specific imapflags for mark/unmark */ const strarray_t *markflags; sieve_execute_error *execute_err; /* context to pass along */ void *interp_context; }; int interp_verify(sieve_interp_t *interp); #endif cyrus-imapd-2.4.18/sieve/addr.c0000644000175000017500000013641612546375260015227 0ustar ellieellie/* A Bison parser, made by GNU Bison 2.5. */ /* Bison implementation for Yacc-like parsers in C Copyright (C) 1984, 1989-1990, 2000-2011 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ /* As a special exception, you may create a larger work that contains part or all of the Bison parser skeleton and distribute that work under terms of your choice, so long as that work isn't itself a parser generator using the skeleton or a modified version thereof as a parser skeleton. Alternatively, if you modify or redistribute the parser skeleton itself, you may (at your option) remove this special exception, which will cause the skeleton and the resulting Bison output files to be licensed under the GNU General Public License without this special exception. This special exception was added by the Free Software Foundation in version 2.2 of Bison. */ /* C LALR(1) parser skeleton written by Richard Stallman, by simplifying the original so-called "semantic" parser. */ /* All symbols defined below should begin with yy or YY, to avoid infringing on user name space. This should be done even for local variables, as they might otherwise be expanded by user macros. There are some unavoidable exceptions within include files to define necessary library symbols; they are noted "INFRINGES ON USER NAME SPACE" below. */ /* Identify Bison output. */ #define YYBISON 1 /* Bison version. */ #define YYBISON_VERSION "2.5" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" /* Pure parsers. */ #define YYPURE 0 /* Push parsers. */ #define YYPUSH 0 /* Pull parsers. */ #define YYPULL 1 /* Using locations. */ #define YYLSP_NEEDED 0 /* Substitute the variable and function names. */ #define yyparse addrparse #define yylex addrlex #define yyerror addrerror #define yylval addrlval #define yychar addrchar #define yydebug addrdebug #define yynerrs addrnerrs /* Copy the first part of user declarations. */ /* Line 268 of yacc.c */ #line 1 "addr.y" /* * addr.y -- RFC 822 address parser * Ken Murchison * * Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The name "Carnegie Mellon University" must not be used to * endorse or promote products derived from this software without * prior written permission. For permission or any legal * details, please contact * Carnegie Mellon University * Center for Technology Transfer and Enterprise Creation * 4615 Forbes Avenue * Suite 302 * Pittsburgh, PA 15213 * (412) 268-7393, fax: (412) 268-7395 * innovation@andrew.cmu.edu * * 4. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by Computing Services * at Carnegie Mellon University (http://www.cmu.edu/computing/)." * * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * $Id: addr.y,v 1.15 2010/01/06 17:01:58 murch Exp $ */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include "addr.h" #include "script.h" #include "xmalloc.h" #include "xstrlcpy.h" #define ADDRERR_SIZE 500 int yyerror(const char *msg); extern int yylex(void); #define YYERROR_VERBOSE /* i want better error messages! */ /* byacc default is 500, bison default is 10000 - go with the larger to support big sieve scripts (see Bug #3461) */ #define YYSTACKSIZE 10000 /* Line 268 of yacc.c */ #line 151 "y.tab.c" /* Enabling traces. */ #ifndef YYDEBUG # define YYDEBUG 0 #endif /* Enabling verbose error messages. */ #ifdef YYERROR_VERBOSE # undef YYERROR_VERBOSE # define YYERROR_VERBOSE 1 #else # define YYERROR_VERBOSE 0 #endif /* Enabling the token table. */ #ifndef YYTOKEN_TABLE # define YYTOKEN_TABLE 0 #endif /* Tokens. */ #ifndef YYTOKENTYPE # define YYTOKENTYPE /* Put the tokens into the symbol table, so that GDB and other debuggers know about them. */ enum yytokentype { ATOM = 258, QTEXT = 259, DTEXT = 260 }; #endif /* Tokens. */ #define ATOM 258 #define QTEXT 259 #define DTEXT 260 #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED typedef int YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define yystype YYSTYPE /* obsolescent; will be withdrawn */ # define YYSTYPE_IS_DECLARED 1 #endif /* Copy the second part of user declarations. */ /* Line 343 of yacc.c */ #line 203 "y.tab.c" #ifdef short # undef short #endif #ifdef YYTYPE_UINT8 typedef YYTYPE_UINT8 yytype_uint8; #else typedef unsigned char yytype_uint8; #endif #ifdef YYTYPE_INT8 typedef YYTYPE_INT8 yytype_int8; #elif (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) typedef signed char yytype_int8; #else typedef short int yytype_int8; #endif #ifdef YYTYPE_UINT16 typedef YYTYPE_UINT16 yytype_uint16; #else typedef unsigned short int yytype_uint16; #endif #ifdef YYTYPE_INT16 typedef YYTYPE_INT16 yytype_int16; #else typedef short int yytype_int16; #endif #ifndef YYSIZE_T # ifdef __SIZE_TYPE__ # define YYSIZE_T __SIZE_TYPE__ # elif defined size_t # define YYSIZE_T size_t # elif ! defined YYSIZE_T && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ # define YYSIZE_T size_t # else # define YYSIZE_T unsigned int # endif #endif #define YYSIZE_MAXIMUM ((YYSIZE_T) -1) #ifndef YY_ # if defined YYENABLE_NLS && YYENABLE_NLS # if ENABLE_NLS # include /* INFRINGES ON USER NAME SPACE */ # define YY_(msgid) dgettext ("bison-runtime", msgid) # endif # endif # ifndef YY_ # define YY_(msgid) msgid # endif #endif /* Suppress unused-variable warnings by "using" E. */ #if ! defined lint || defined __GNUC__ # define YYUSE(e) ((void) (e)) #else # define YYUSE(e) /* empty */ #endif /* Identity function, used to suppress warnings about constant conditions. */ #ifndef lint # define YYID(n) (n) #else #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static int YYID (int yyi) #else static int YYID (yyi) int yyi; #endif { return yyi; } #endif #if ! defined yyoverflow || YYERROR_VERBOSE /* The parser invokes alloca or malloc; define the necessary symbols. */ # ifdef YYSTACK_USE_ALLOCA # if YYSTACK_USE_ALLOCA # ifdef __GNUC__ # define YYSTACK_ALLOC __builtin_alloca # elif defined __BUILTIN_VA_ARG_INCR # include /* INFRINGES ON USER NAME SPACE */ # elif defined _AIX # define YYSTACK_ALLOC __alloca # elif defined _MSC_VER # include /* INFRINGES ON USER NAME SPACE */ # define alloca _alloca # else # define YYSTACK_ALLOC alloca # if ! defined _ALLOCA_H && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # endif # endif # endif # ifdef YYSTACK_ALLOC /* Pacify GCC's `empty if-body' warning. */ # define YYSTACK_FREE(Ptr) do { /* empty */; } while (YYID (0)) # ifndef YYSTACK_ALLOC_MAXIMUM /* The OS might guarantee only one guard page at the bottom of the stack, and a page size can be as small as 4096 bytes. So we cannot safely invoke alloca (N) if N exceeds 4096. Use a slightly smaller number to allow for a few compiler-allocated temporary stack slots. */ # define YYSTACK_ALLOC_MAXIMUM 4032 /* reasonable circa 2006 */ # endif # else # define YYSTACK_ALLOC YYMALLOC # define YYSTACK_FREE YYFREE # ifndef YYSTACK_ALLOC_MAXIMUM # define YYSTACK_ALLOC_MAXIMUM YYSIZE_MAXIMUM # endif # if (defined __cplusplus && ! defined EXIT_SUCCESS \ && ! ((defined YYMALLOC || defined malloc) \ && (defined YYFREE || defined free))) # include /* INFRINGES ON USER NAME SPACE */ # ifndef EXIT_SUCCESS # define EXIT_SUCCESS 0 # endif # endif # ifndef YYMALLOC # define YYMALLOC malloc # if ! defined malloc && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void *malloc (YYSIZE_T); /* INFRINGES ON USER NAME SPACE */ # endif # endif # ifndef YYFREE # define YYFREE free # if ! defined free && ! defined EXIT_SUCCESS && (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) void free (void *); /* INFRINGES ON USER NAME SPACE */ # endif # endif # endif #endif /* ! defined yyoverflow || YYERROR_VERBOSE */ #if (! defined yyoverflow \ && (! defined __cplusplus \ || (defined YYSTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL))) /* A type that is properly aligned for any stack member. */ union yyalloc { yytype_int16 yyss_alloc; YYSTYPE yyvs_alloc; }; /* The size of the maximum gap between one aligned stack and the next. */ # define YYSTACK_GAP_MAXIMUM (sizeof (union yyalloc) - 1) /* The size of an array large to enough to hold all stacks, each with N elements. */ # define YYSTACK_BYTES(N) \ ((N) * (sizeof (yytype_int16) + sizeof (YYSTYPE)) \ + YYSTACK_GAP_MAXIMUM) # define YYCOPY_NEEDED 1 /* Relocate STACK from its old location to the new one. The local variables YYSIZE and YYSTACKSIZE give the old and new number of elements in the stack, and YYPTR gives the new location of the stack. Advance YYPTR to a properly aligned location for the next stack. */ # define YYSTACK_RELOCATE(Stack_alloc, Stack) \ do \ { \ YYSIZE_T yynewbytes; \ YYCOPY (&yyptr->Stack_alloc, Stack, yysize); \ Stack = &yyptr->Stack_alloc; \ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAXIMUM; \ yyptr += yynewbytes / sizeof (*yyptr); \ } \ while (YYID (0)) #endif #if defined YYCOPY_NEEDED && YYCOPY_NEEDED /* Copy COUNT objects from FROM to TO. The source and destination do not overlap. */ # ifndef YYCOPY # if defined __GNUC__ && 1 < __GNUC__ # define YYCOPY(To, From, Count) \ __builtin_memcpy (To, From, (Count) * sizeof (*(From))) # else # define YYCOPY(To, From, Count) \ do \ { \ YYSIZE_T yyi; \ for (yyi = 0; yyi < (Count); yyi++) \ (To)[yyi] = (From)[yyi]; \ } \ while (YYID (0)) # endif # endif #endif /* !YYCOPY_NEEDED */ /* YYFINAL -- State number of the termination state. */ #define YYFINAL 10 /* YYLAST -- Last index in YYTABLE. */ #define YYLAST 26 /* YYNTOKENS -- Number of terminals. */ #define YYNTOKENS 13 /* YYNNTS -- Number of nonterminals. */ #define YYNNTS 11 /* YYNRULES -- Number of rules. */ #define YYNRULES 17 /* YYNRULES -- Number of states. */ #define YYNSTATES 31 /* YYTRANSLATE(YYLEX) -- Bison symbol number corresponding to YYLEX. */ #define YYUNDEFTOK 2 #define YYMAXUTOK 260 #define YYTRANSLATE(YYX) \ ((unsigned int) (YYX) <= YYMAXUTOK ? yytranslate[YYX] : YYUNDEFTOK) /* YYTRANSLATE[YYLEX] -- Bison symbol number corresponding to YYLEX. */ static const yytype_uint8 yytranslate[] = { 0, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 12, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 9, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 6, 2, 7, 2, 8, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 10, 2, 11, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 3, 4, 5 }; #if YYDEBUG /* YYPRHS[YYN] -- Index of the first RHS symbol of rule number YYN in YYRHS. */ static const yytype_uint8 yyprhs[] = { 0, 0, 3, 5, 10, 14, 16, 20, 22, 26, 28, 30, 32, 36, 38, 41, 43, 45 }; /* YYRHS -- A `-1'-separated list of the rules' RHS. */ static const yytype_int8 yyrhs[] = { 14, 0, -1, 15, -1, 21, 6, 15, 7, -1, 16, 8, 17, -1, 22, -1, 22, 9, 16, -1, 18, -1, 18, 9, 17, -1, 19, -1, 20, -1, 3, -1, 10, 5, 11, -1, 22, -1, 22, 21, -1, 3, -1, 23, -1, 12, 4, 12, -1 }; /* YYRLINE[YYN] -- source line where rule number YYN was defined. */ static const yytype_uint8 yyrline[] = { 0, 75, 75, 76, 79, 82, 83, 86, 87, 90, 91, 94, 97, 100, 101, 104, 105, 108 }; #endif #if YYDEBUG || YYERROR_VERBOSE || YYTOKEN_TABLE /* YYTNAME[SYMBOL-NUM] -- String name of the symbol SYMBOL-NUM. First, the terminals, then, starting at YYNTOKENS, nonterminals. */ static const char *const yytname[] = { "$end", "error", "$undefined", "ATOM", "QTEXT", "DTEXT", "'<'", "'>'", "'@'", "'.'", "'['", "']'", "'\"'", "$accept", "sieve_address", "addrspec", "localpart", "domain", "subdomain", "domainref", "domainlit", "phrase", "word", "qstring", 0 }; #endif # ifdef YYPRINT /* YYTOKNUM[YYLEX-NUM] -- Internal token number corresponding to token YYLEX-NUM. */ static const yytype_uint16 yytoknum[] = { 0, 256, 257, 258, 259, 260, 60, 62, 64, 46, 91, 93, 34 }; # endif /* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */ static const yytype_uint8 yyr1[] = { 0, 13, 14, 14, 15, 16, 16, 17, 17, 18, 18, 19, 20, 21, 21, 22, 22, 23 }; /* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */ static const yytype_uint8 yyr2[] = { 0, 2, 1, 4, 3, 1, 3, 1, 3, 1, 1, 1, 3, 1, 2, 1, 1, 3 }; /* YYDEFACT[STATE-NAME] -- Default reduction number in state STATE-NUM. Performed when YYTABLE doesn't specify something else to do. Zero means the default is an error. */ static const yytype_uint8 yydefact[] = { 0, 15, 0, 0, 2, 0, 0, 5, 16, 0, 1, 0, 0, 0, 14, 13, 17, 11, 0, 4, 7, 9, 10, 0, 5, 6, 0, 0, 3, 12, 8 }; /* YYDEFGOTO[NTERM-NUM]. */ static const yytype_int8 yydefgoto[] = { -1, 3, 4, 5, 19, 20, 21, 22, 14, 15, 8 }; /* YYPACT[STATE-NUM] -- Index in YYTABLE of the portion describing STATE-NUM. */ #define YYPACT_NINF -7 static const yytype_int8 yypact[] = { -1, -7, 1, 3, -7, 6, 10, -2, -7, -6, -7, 5, -1, -1, -7, -1, -7, -7, 4, -7, 8, -7, -7, 11, 12, -7, 9, 5, -7, -7, -7 }; /* YYPGOTO[NTERM-NUM]. */ static const yytype_int8 yypgoto[] = { -7, -7, 7, 13, -5, -7, -7, -7, 23, 0, -7 }; /* YYTABLE[YYPACT[STATE-NUM]]. What to do in state STATE-NUM. If positive, shift that token. If negative, reduce the rule which number is the opposite. If YYTABLE_NINF, syntax error. */ #define YYTABLE_NINF -14 static const yytype_int8 yytable[] = { 7, 1, 1, 10, -13, 9, 16, 13, 17, 26, 2, 2, 24, 24, 11, 18, 12, 27, 28, 23, 29, 13, 30, 6, 0, 0, 25 }; #define yypact_value_is_default(yystate) \ ((yystate) == (-7)) #define yytable_value_is_error(yytable_value) \ YYID (0) static const yytype_int8 yycheck[] = { 0, 3, 3, 0, 6, 4, 12, 9, 3, 5, 12, 12, 12, 13, 8, 10, 6, 9, 7, 12, 11, 9, 27, 0, -1, -1, 13 }; /* YYSTOS[STATE-NUM] -- The (internal number of the) accessing symbol of state STATE-NUM. */ static const yytype_uint8 yystos[] = { 0, 3, 12, 14, 15, 16, 21, 22, 23, 4, 0, 8, 6, 9, 21, 22, 12, 3, 10, 17, 18, 19, 20, 15, 22, 16, 5, 9, 7, 11, 17 }; #define yyerrok (yyerrstatus = 0) #define yyclearin (yychar = YYEMPTY) #define YYEMPTY (-2) #define YYEOF 0 #define YYACCEPT goto yyacceptlab #define YYABORT goto yyabortlab #define YYERROR goto yyerrorlab /* Like YYERROR except do call yyerror. This remains here temporarily to ease the transition to the new meaning of YYERROR, for GCC. Once GCC version 2 has supplanted version 1, this can go. However, YYFAIL appears to be in use. Nevertheless, it is formally deprecated in Bison 2.4.2's NEWS entry, where a plan to phase it out is discussed. */ #define YYFAIL goto yyerrlab #if defined YYFAIL /* This is here to suppress warnings from the GCC cpp's -Wunused-macros. Normally we don't worry about that warning, but some users do, and we want to make it easy for users to remove YYFAIL uses, which will produce warnings from Bison 2.5. */ #endif #define YYRECOVERING() (!!yyerrstatus) #define YYBACKUP(Token, Value) \ do \ if (yychar == YYEMPTY && yylen == 1) \ { \ yychar = (Token); \ yylval = (Value); \ YYPOPSTACK (1); \ goto yybackup; \ } \ else \ { \ yyerror (YY_("syntax error: cannot back up")); \ YYERROR; \ } \ while (YYID (0)) #define YYTERROR 1 #define YYERRCODE 256 /* YYLLOC_DEFAULT -- Set CURRENT to span from RHS[1] to RHS[N]. If N is 0, then set CURRENT to the empty location which ends the previous symbol: RHS[0] (always defined). */ #define YYRHSLOC(Rhs, K) ((Rhs)[K]) #ifndef YYLLOC_DEFAULT # define YYLLOC_DEFAULT(Current, Rhs, N) \ do \ if (YYID (N)) \ { \ (Current).first_line = YYRHSLOC (Rhs, 1).first_line; \ (Current).first_column = YYRHSLOC (Rhs, 1).first_column; \ (Current).last_line = YYRHSLOC (Rhs, N).last_line; \ (Current).last_column = YYRHSLOC (Rhs, N).last_column; \ } \ else \ { \ (Current).first_line = (Current).last_line = \ YYRHSLOC (Rhs, 0).last_line; \ (Current).first_column = (Current).last_column = \ YYRHSLOC (Rhs, 0).last_column; \ } \ while (YYID (0)) #endif /* This macro is provided for backward compatibility. */ #ifndef YY_LOCATION_PRINT # define YY_LOCATION_PRINT(File, Loc) ((void) 0) #endif /* YYLEX -- calling `yylex' with the right arguments. */ #ifdef YYLEX_PARAM # define YYLEX yylex (YYLEX_PARAM) #else # define YYLEX yylex () #endif /* Enable debugging if requested. */ #if YYDEBUG # ifndef YYFPRINTF # include /* INFRINGES ON USER NAME SPACE */ # define YYFPRINTF fprintf # endif # define YYDPRINTF(Args) \ do { \ if (yydebug) \ YYFPRINTF Args; \ } while (YYID (0)) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) \ do { \ if (yydebug) \ { \ YYFPRINTF (stderr, "%s ", Title); \ yy_symbol_print (stderr, \ Type, Value); \ YYFPRINTF (stderr, "\n"); \ } \ } while (YYID (0)) /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_value_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) #else static void yy_symbol_value_print (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; #endif { if (!yyvaluep) return; # ifdef YYPRINT if (yytype < YYNTOKENS) YYPRINT (yyoutput, yytoknum[yytype], *yyvaluep); # else YYUSE (yyoutput); # endif switch (yytype) { default: break; } } /*--------------------------------. | Print this symbol on YYOUTPUT. | `--------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_symbol_print (FILE *yyoutput, int yytype, YYSTYPE const * const yyvaluep) #else static void yy_symbol_print (yyoutput, yytype, yyvaluep) FILE *yyoutput; int yytype; YYSTYPE const * const yyvaluep; #endif { if (yytype < YYNTOKENS) YYFPRINTF (yyoutput, "token %s (", yytname[yytype]); else YYFPRINTF (yyoutput, "nterm %s (", yytname[yytype]); yy_symbol_value_print (yyoutput, yytype, yyvaluep); YYFPRINTF (yyoutput, ")"); } /*------------------------------------------------------------------. | yy_stack_print -- Print the state stack from its BOTTOM up to its | | TOP (included). | `------------------------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_stack_print (yytype_int16 *yybottom, yytype_int16 *yytop) #else static void yy_stack_print (yybottom, yytop) yytype_int16 *yybottom; yytype_int16 *yytop; #endif { YYFPRINTF (stderr, "Stack now"); for (; yybottom <= yytop; yybottom++) { int yybot = *yybottom; YYFPRINTF (stderr, " %d", yybot); } YYFPRINTF (stderr, "\n"); } # define YY_STACK_PRINT(Bottom, Top) \ do { \ if (yydebug) \ yy_stack_print ((Bottom), (Top)); \ } while (YYID (0)) /*------------------------------------------------. | Report that the YYRULE is going to be reduced. | `------------------------------------------------*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yy_reduce_print (YYSTYPE *yyvsp, int yyrule) #else static void yy_reduce_print (yyvsp, yyrule) YYSTYPE *yyvsp; int yyrule; #endif { int yynrhs = yyr2[yyrule]; int yyi; unsigned long int yylno = yyrline[yyrule]; YYFPRINTF (stderr, "Reducing stack by rule %d (line %lu):\n", yyrule - 1, yylno); /* The symbols being reduced. */ for (yyi = 0; yyi < yynrhs; yyi++) { YYFPRINTF (stderr, " $%d = ", yyi + 1); yy_symbol_print (stderr, yyrhs[yyprhs[yyrule] + yyi], &(yyvsp[(yyi + 1) - (yynrhs)]) ); YYFPRINTF (stderr, "\n"); } } # define YY_REDUCE_PRINT(Rule) \ do { \ if (yydebug) \ yy_reduce_print (yyvsp, Rule); \ } while (YYID (0)) /* Nonzero means print parse trace. It is left uninitialized so that multiple parsers can coexist. */ int yydebug; #else /* !YYDEBUG */ # define YYDPRINTF(Args) # define YY_SYMBOL_PRINT(Title, Type, Value, Location) # define YY_STACK_PRINT(Bottom, Top) # define YY_REDUCE_PRINT(Rule) #endif /* !YYDEBUG */ /* YYINITDEPTH -- initial size of the parser's stacks. */ #ifndef YYINITDEPTH # define YYINITDEPTH 200 #endif /* YYMAXDEPTH -- maximum size the stacks can grow to (effective only if the built-in stack extension method is used). Do not make this value too large; the results are undefined if YYSTACK_ALLOC_MAXIMUM < YYSTACK_BYTES (YYMAXDEPTH) evaluated with infinite-precision integer arithmetic. */ #ifndef YYMAXDEPTH # define YYMAXDEPTH 10000 #endif #if YYERROR_VERBOSE # ifndef yystrlen # if defined __GLIBC__ && defined _STRING_H # define yystrlen strlen # else /* Return the length of YYSTR. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static YYSIZE_T yystrlen (const char *yystr) #else static YYSIZE_T yystrlen (yystr) const char *yystr; #endif { YYSIZE_T yylen; for (yylen = 0; yystr[yylen]; yylen++) continue; return yylen; } # endif # endif # ifndef yystpcpy # if defined __GLIBC__ && defined _STRING_H && defined _GNU_SOURCE # define yystpcpy stpcpy # else /* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in YYDEST. */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static char * yystpcpy (char *yydest, const char *yysrc) #else static char * yystpcpy (yydest, yysrc) char *yydest; const char *yysrc; #endif { char *yyd = yydest; const char *yys = yysrc; while ((*yyd++ = *yys++) != '\0') continue; return yyd - 1; } # endif # endif # ifndef yytnamerr /* Copy to YYRES the contents of YYSTR after stripping away unnecessary quotes and backslashes, so that it's suitable for yyerror. The heuristic is that double-quoting is unnecessary unless the string contains an apostrophe, a comma, or backslash (other than backslash-backslash). YYSTR is taken from yytname. If YYRES is null, do not copy; instead, return the length of what the result would have been. */ static YYSIZE_T yytnamerr (char *yyres, const char *yystr) { if (*yystr == '"') { YYSIZE_T yyn = 0; char const *yyp = yystr; for (;;) switch (*++yyp) { case '\'': case ',': goto do_not_strip_quotes; case '\\': if (*++yyp != '\\') goto do_not_strip_quotes; /* Fall through. */ default: if (yyres) yyres[yyn] = *yyp; yyn++; break; case '"': if (yyres) yyres[yyn] = '\0'; return yyn; } do_not_strip_quotes: ; } if (! yyres) return yystrlen (yystr); return yystpcpy (yyres, yystr) - yyres; } # endif /* Copy into *YYMSG, which is of size *YYMSG_ALLOC, an error message about the unexpected token YYTOKEN for the state stack whose top is YYSSP. Return 0 if *YYMSG was successfully written. Return 1 if *YYMSG is not large enough to hold the message. In that case, also set *YYMSG_ALLOC to the required number of bytes. Return 2 if the required number of bytes is too large to store. */ static int yysyntax_error (YYSIZE_T *yymsg_alloc, char **yymsg, yytype_int16 *yyssp, int yytoken) { YYSIZE_T yysize0 = yytnamerr (0, yytname[yytoken]); YYSIZE_T yysize = yysize0; YYSIZE_T yysize1; enum { YYERROR_VERBOSE_ARGS_MAXIMUM = 5 }; /* Internationalized format string. */ const char *yyformat = 0; /* Arguments of yyformat. */ char const *yyarg[YYERROR_VERBOSE_ARGS_MAXIMUM]; /* Number of reported tokens (one for the "unexpected", one per "expected"). */ int yycount = 0; /* There are many possibilities here to consider: - Assume YYFAIL is not used. It's too flawed to consider. See for details. YYERROR is fine as it does not invoke this function. - If this state is a consistent state with a default action, then the only way this function was invoked is if the default action is an error action. In that case, don't check for expected tokens because there are none. - The only way there can be no lookahead present (in yychar) is if this state is a consistent state with a default action. Thus, detecting the absence of a lookahead is sufficient to determine that there is no unexpected or expected token to report. In that case, just report a simple "syntax error". - Don't assume there isn't a lookahead just because this state is a consistent state with a default action. There might have been a previous inconsistent state, consistent state with a non-default action, or user semantic action that manipulated yychar. - Of course, the expected token list depends on states to have correct lookahead information, and it depends on the parser not to perform extra reductions after fetching a lookahead from the scanner and before detecting a syntax error. Thus, state merging (from LALR or IELR) and default reductions corrupt the expected token list. However, the list is correct for canonical LR with one exception: it will still contain any token that will not be accepted due to an error action in a later state. */ if (yytoken != YYEMPTY) { int yyn = yypact[*yyssp]; yyarg[yycount++] = yytname[yytoken]; if (!yypact_value_is_default (yyn)) { /* Start YYX at -YYN if negative to avoid negative indexes in YYCHECK. In other words, skip the first -YYN actions for this state because they are default actions. */ int yyxbegin = yyn < 0 ? -yyn : 0; /* Stay within bounds of both yycheck and yytname. */ int yychecklim = YYLAST - yyn + 1; int yyxend = yychecklim < YYNTOKENS ? yychecklim : YYNTOKENS; int yyx; for (yyx = yyxbegin; yyx < yyxend; ++yyx) if (yycheck[yyx + yyn] == yyx && yyx != YYTERROR && !yytable_value_is_error (yytable[yyx + yyn])) { if (yycount == YYERROR_VERBOSE_ARGS_MAXIMUM) { yycount = 1; yysize = yysize0; break; } yyarg[yycount++] = yytname[yyx]; yysize1 = yysize + yytnamerr (0, yytname[yyx]); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; yysize = yysize1; } } } switch (yycount) { # define YYCASE_(N, S) \ case N: \ yyformat = S; \ break YYCASE_(0, YY_("syntax error")); YYCASE_(1, YY_("syntax error, unexpected %s")); YYCASE_(2, YY_("syntax error, unexpected %s, expecting %s")); YYCASE_(3, YY_("syntax error, unexpected %s, expecting %s or %s")); YYCASE_(4, YY_("syntax error, unexpected %s, expecting %s or %s or %s")); YYCASE_(5, YY_("syntax error, unexpected %s, expecting %s or %s or %s or %s")); # undef YYCASE_ } yysize1 = yysize + yystrlen (yyformat); if (! (yysize <= yysize1 && yysize1 <= YYSTACK_ALLOC_MAXIMUM)) return 2; yysize = yysize1; if (*yymsg_alloc < yysize) { *yymsg_alloc = 2 * yysize; if (! (yysize <= *yymsg_alloc && *yymsg_alloc <= YYSTACK_ALLOC_MAXIMUM)) *yymsg_alloc = YYSTACK_ALLOC_MAXIMUM; return 1; } /* Avoid sprintf, as that infringes on the user's name space. Don't have undefined behavior even if the translation produced a string with the wrong number of "%s"s. */ { char *yyp = *yymsg; int yyi = 0; while ((*yyp = *yyformat) != '\0') if (*yyp == '%' && yyformat[1] == 's' && yyi < yycount) { yyp += yytnamerr (yyp, yyarg[yyi++]); yyformat += 2; } else { yyp++; yyformat++; } } return 0; } #endif /* YYERROR_VERBOSE */ /*-----------------------------------------------. | Release the memory associated to this symbol. | `-----------------------------------------------*/ /*ARGSUSED*/ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) static void yydestruct (const char *yymsg, int yytype, YYSTYPE *yyvaluep) #else static void yydestruct (yymsg, yytype, yyvaluep) const char *yymsg; int yytype; YYSTYPE *yyvaluep; #endif { YYUSE (yyvaluep); if (!yymsg) yymsg = "Deleting"; YY_SYMBOL_PRINT (yymsg, yytype, yyvaluep, yylocationp); switch (yytype) { default: break; } } /* Prevent warnings from -Wmissing-prototypes. */ #ifdef YYPARSE_PARAM #if defined __STDC__ || defined __cplusplus int yyparse (void *YYPARSE_PARAM); #else int yyparse (); #endif #else /* ! YYPARSE_PARAM */ #if defined __STDC__ || defined __cplusplus int yyparse (void); #else int yyparse (); #endif #endif /* ! YYPARSE_PARAM */ /* The lookahead symbol. */ int yychar; /* The semantic value of the lookahead symbol. */ YYSTYPE yylval; /* Number of syntax errors so far. */ int yynerrs; /*----------. | yyparse. | `----------*/ #ifdef YYPARSE_PARAM #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void *YYPARSE_PARAM) #else int yyparse (YYPARSE_PARAM) void *YYPARSE_PARAM; #endif #else /* ! YYPARSE_PARAM */ #if (defined __STDC__ || defined __C99__FUNC__ \ || defined __cplusplus || defined _MSC_VER) int yyparse (void) #else int yyparse () #endif #endif { int yystate; /* Number of tokens to shift before error messages enabled. */ int yyerrstatus; /* The stacks and their tools: `yyss': related to states. `yyvs': related to semantic values. Refer to the stacks thru separate pointers, to allow yyoverflow to reallocate them elsewhere. */ /* The state stack. */ yytype_int16 yyssa[YYINITDEPTH]; yytype_int16 *yyss; yytype_int16 *yyssp; /* The semantic value stack. */ YYSTYPE yyvsa[YYINITDEPTH]; YYSTYPE *yyvs; YYSTYPE *yyvsp; YYSIZE_T yystacksize; int yyn; int yyresult; /* Lookahead token as an internal (translated) token number. */ int yytoken; /* The variables used to return semantic value and location from the action routines. */ YYSTYPE yyval; #if YYERROR_VERBOSE /* Buffer for error messages, and its allocated size. */ char yymsgbuf[128]; char *yymsg = yymsgbuf; YYSIZE_T yymsg_alloc = sizeof yymsgbuf; #endif #define YYPOPSTACK(N) (yyvsp -= (N), yyssp -= (N)) /* The number of symbols on the RHS of the reduced rule. Keep to zero when no symbol should be popped. */ int yylen = 0; yytoken = 0; yyss = yyssa; yyvs = yyvsa; yystacksize = YYINITDEPTH; YYDPRINTF ((stderr, "Starting parse\n")); yystate = 0; yyerrstatus = 0; yynerrs = 0; yychar = YYEMPTY; /* Cause a token to be read. */ /* Initialize stack pointers. Waste one element of value and location stack so that they stay on the same level as the state stack. The wasted elements are never initialized. */ yyssp = yyss; yyvsp = yyvs; goto yysetstate; /*------------------------------------------------------------. | yynewstate -- Push a new state, which is found in yystate. | `------------------------------------------------------------*/ yynewstate: /* In all cases, when you get here, the value and location stacks have just been pushed. So pushing a state here evens the stacks. */ yyssp++; yysetstate: *yyssp = yystate; if (yyss + yystacksize - 1 <= yyssp) { /* Get the current used size of the three stacks, in elements. */ YYSIZE_T yysize = yyssp - yyss + 1; #ifdef yyoverflow { /* Give user a chance to reallocate the stack. Use copies of these so that the &'s don't force the real ones into memory. */ YYSTYPE *yyvs1 = yyvs; yytype_int16 *yyss1 = yyss; /* Each stack pointer address is followed by the size of the data in use in that stack, in bytes. This used to be a conditional around just the two extra args, but that might be undefined if yyoverflow is a macro. */ yyoverflow (YY_("memory exhausted"), &yyss1, yysize * sizeof (*yyssp), &yyvs1, yysize * sizeof (*yyvsp), &yystacksize); yyss = yyss1; yyvs = yyvs1; } #else /* no yyoverflow */ # ifndef YYSTACK_RELOCATE goto yyexhaustedlab; # else /* Extend the stack our own way. */ if (YYMAXDEPTH <= yystacksize) goto yyexhaustedlab; yystacksize *= 2; if (YYMAXDEPTH < yystacksize) yystacksize = YYMAXDEPTH; { yytype_int16 *yyss1 = yyss; union yyalloc *yyptr = (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize)); if (! yyptr) goto yyexhaustedlab; YYSTACK_RELOCATE (yyss_alloc, yyss); YYSTACK_RELOCATE (yyvs_alloc, yyvs); # undef YYSTACK_RELOCATE if (yyss1 != yyssa) YYSTACK_FREE (yyss1); } # endif #endif /* no yyoverflow */ yyssp = yyss + yysize - 1; yyvsp = yyvs + yysize - 1; YYDPRINTF ((stderr, "Stack size increased to %lu\n", (unsigned long int) yystacksize)); if (yyss + yystacksize - 1 <= yyssp) YYABORT; } YYDPRINTF ((stderr, "Entering state %d\n", yystate)); if (yystate == YYFINAL) YYACCEPT; goto yybackup; /*-----------. | yybackup. | `-----------*/ yybackup: /* Do appropriate processing given the current state. Read a lookahead token if we need one and don't already have one. */ /* First try to decide what to do without reference to lookahead token. */ yyn = yypact[yystate]; if (yypact_value_is_default (yyn)) goto yydefault; /* Not known => get a lookahead token if don't already have one. */ /* YYCHAR is either YYEMPTY or YYEOF or a valid lookahead symbol. */ if (yychar == YYEMPTY) { YYDPRINTF ((stderr, "Reading a token: ")); yychar = YYLEX; } if (yychar <= YYEOF) { yychar = yytoken = YYEOF; YYDPRINTF ((stderr, "Now at end of input.\n")); } else { yytoken = YYTRANSLATE (yychar); YY_SYMBOL_PRINT ("Next token is", yytoken, &yylval, &yylloc); } /* If the proper action on seeing token YYTOKEN is to reduce or to detect an error, take that action. */ yyn += yytoken; if (yyn < 0 || YYLAST < yyn || yycheck[yyn] != yytoken) goto yydefault; yyn = yytable[yyn]; if (yyn <= 0) { if (yytable_value_is_error (yyn)) goto yyerrlab; yyn = -yyn; goto yyreduce; } /* Count tokens shifted since error; after three, turn off error status. */ if (yyerrstatus) yyerrstatus--; /* Shift the lookahead token. */ YY_SYMBOL_PRINT ("Shifting", yytoken, &yylval, &yylloc); /* Discard the shifted token. */ yychar = YYEMPTY; yystate = yyn; *++yyvsp = yylval; goto yynewstate; /*-----------------------------------------------------------. | yydefault -- do the default action for the current state. | `-----------------------------------------------------------*/ yydefault: yyn = yydefact[yystate]; if (yyn == 0) goto yyerrlab; goto yyreduce; /*-----------------------------. | yyreduce -- Do a reduction. | `-----------------------------*/ yyreduce: /* yyn is the number of a rule to reduce with. */ yylen = yyr2[yyn]; /* If YYLEN is nonzero, implement the default value of the action: `$$ = $1'. Otherwise, the following line sets YYVAL to garbage. This behavior is undocumented and Bison users should not rely upon it. Assigning to YYVAL unconditionally makes the parser a bit smaller, and it avoids a GCC warning that YYVAL may be used uninitialized. */ yyval = yyvsp[1-yylen]; YY_REDUCE_PRINT (yyn); switch (yyn) { /* Line 1806 of yacc.c */ #line 1439 "y.tab.c" default: break; } /* User semantic actions sometimes alter yychar, and that requires that yytoken be updated with the new translation. We take the approach of translating immediately before every use of yytoken. One alternative is translating here after every semantic action, but that translation would be missed if the semantic action invokes YYABORT, YYACCEPT, or YYERROR immediately after altering yychar or if it invokes YYBACKUP. In the case of YYABORT or YYACCEPT, an incorrect destructor might then be invoked immediately. In the case of YYERROR or YYBACKUP, subsequent parser actions might lead to an incorrect destructor call or verbose syntax error message before the lookahead is translated. */ YY_SYMBOL_PRINT ("-> $$ =", yyr1[yyn], &yyval, &yyloc); YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); *++yyvsp = yyval; /* Now `shift' the result of the reduction. Determine what state that goes to, based on the state we popped back to and the rule number reduced by. */ yyn = yyr1[yyn]; yystate = yypgoto[yyn - YYNTOKENS] + *yyssp; if (0 <= yystate && yystate <= YYLAST && yycheck[yystate] == *yyssp) yystate = yytable[yystate]; else yystate = yydefgoto[yyn - YYNTOKENS]; goto yynewstate; /*------------------------------------. | yyerrlab -- here on detecting error | `------------------------------------*/ yyerrlab: /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = yychar == YYEMPTY ? YYEMPTY : YYTRANSLATE (yychar); /* If not already recovering from an error, report this error. */ if (!yyerrstatus) { ++yynerrs; #if ! YYERROR_VERBOSE yyerror (YY_("syntax error")); #else # define YYSYNTAX_ERROR yysyntax_error (&yymsg_alloc, &yymsg, \ yyssp, yytoken) { char const *yymsgp = YY_("syntax error"); int yysyntax_error_status; yysyntax_error_status = YYSYNTAX_ERROR; if (yysyntax_error_status == 0) yymsgp = yymsg; else if (yysyntax_error_status == 1) { if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); yymsg = (char *) YYSTACK_ALLOC (yymsg_alloc); if (!yymsg) { yymsg = yymsgbuf; yymsg_alloc = sizeof yymsgbuf; yysyntax_error_status = 2; } else { yysyntax_error_status = YYSYNTAX_ERROR; yymsgp = yymsg; } } yyerror (yymsgp); if (yysyntax_error_status == 2) goto yyexhaustedlab; } # undef YYSYNTAX_ERROR #endif } if (yyerrstatus == 3) { /* If just tried and failed to reuse lookahead token after an error, discard it. */ if (yychar <= YYEOF) { /* Return failure if at end of input. */ if (yychar == YYEOF) YYABORT; } else { yydestruct ("Error: discarding", yytoken, &yylval); yychar = YYEMPTY; } } /* Else will try to reuse lookahead token after shifting the error token. */ goto yyerrlab1; /*---------------------------------------------------. | yyerrorlab -- error raised explicitly by YYERROR. | `---------------------------------------------------*/ yyerrorlab: /* Pacify compilers like GCC when the user code never invokes YYERROR and the label yyerrorlab therefore never appears in user code. */ if (/*CONSTCOND*/ 0) goto yyerrorlab; /* Do not reclaim the symbols of the rule which action triggered this YYERROR. */ YYPOPSTACK (yylen); yylen = 0; YY_STACK_PRINT (yyss, yyssp); yystate = *yyssp; goto yyerrlab1; /*-------------------------------------------------------------. | yyerrlab1 -- common code for both syntax error and YYERROR. | `-------------------------------------------------------------*/ yyerrlab1: yyerrstatus = 3; /* Each real token shifted decrements this. */ for (;;) { yyn = yypact[yystate]; if (!yypact_value_is_default (yyn)) { yyn += YYTERROR; if (0 <= yyn && yyn <= YYLAST && yycheck[yyn] == YYTERROR) { yyn = yytable[yyn]; if (0 < yyn) break; } } /* Pop the current state because it cannot handle the error token. */ if (yyssp == yyss) YYABORT; yydestruct ("Error: popping", yystos[yystate], yyvsp); YYPOPSTACK (1); yystate = *yyssp; YY_STACK_PRINT (yyss, yyssp); } *++yyvsp = yylval; /* Shift the error token. */ YY_SYMBOL_PRINT ("Shifting", yystos[yyn], yyvsp, yylsp); yystate = yyn; goto yynewstate; /*-------------------------------------. | yyacceptlab -- YYACCEPT comes here. | `-------------------------------------*/ yyacceptlab: yyresult = 0; goto yyreturn; /*-----------------------------------. | yyabortlab -- YYABORT comes here. | `-----------------------------------*/ yyabortlab: yyresult = 1; goto yyreturn; #if !defined(yyoverflow) || YYERROR_VERBOSE /*-------------------------------------------------. | yyexhaustedlab -- memory exhaustion comes here. | `-------------------------------------------------*/ yyexhaustedlab: yyerror (YY_("memory exhausted")); yyresult = 2; /* Fall through. */ #endif yyreturn: if (yychar != YYEMPTY) { /* Make sure we have latest lookahead translation. See comments at user semantic actions for why this is necessary. */ yytoken = YYTRANSLATE (yychar); yydestruct ("Cleanup: discarding lookahead", yytoken, &yylval); } /* Do not reclaim the symbols of the rule which action triggered this YYABORT or YYACCEPT. */ YYPOPSTACK (yylen); YY_STACK_PRINT (yyss, yyssp); while (yyssp != yyss) { yydestruct ("Cleanup: popping", yystos[*yyssp], yyvsp); YYPOPSTACK (1); } #ifndef yyoverflow if (yyss != yyssa) YYSTACK_FREE (yyss); #endif #if YYERROR_VERBOSE if (yymsg != yymsgbuf) YYSTACK_FREE (yymsg); #endif /* Make sure YYID is used. */ return YYID (yyresult); } /* Line 2067 of yacc.c */ #line 111 "addr.y" /* copy address error message into buffer provided by sieve parser */ int yyerror(const char *s) { extern char addrerr[ADDRERR_SIZE]; strlcpy(addrerr, s, ADDRERR_SIZE); return 0; } cyrus-imapd-2.4.18/sieve/tests/0000755000175000017500000000000012546374065015302 5ustar ellieelliecyrus-imapd-2.4.18/sieve/tests/testExtension/0000755000175000017500000000000012546374065020156 5ustar ellieelliecyrus-imapd-2.4.18/sieve/tests/testExtension/uberExtensionTestScript.key0000644000175000017500000000355112546374065025553 0ustar ellieellie uetest-value should be redirected to 'me+numberover10@blah.com' uetest-value2 should just be kept uetest-count should be redirected to 'me+X@blah.com' uetest-count2 should just be kept uetest-hreg should be redirected to 'me+goodheaderregex@blah.com' uetest-areg should be redirected to 'me+goodaallregex@blah.com' 'me+goodadomainregex@blah.com' 'me+goodalocalpartregex@blah.com' 'me+goodauserregex@blah.com' 'me+goodadetailregex@blah.com' uetest-asub should be redirected to 'me+goodauseris@blah.com' 'me+goodausercontains@blah.com' 'me+goodausermatches@blah.com' 'me+goodadetailis@blah.com' 'me+goodadetailcontains@blah.com' 'me+goodadetailmatches@blah.com' utest-envelope with an envelope body of from= "WERT+erk@true.com" should be redirected to: 'me+eallis@blah.com' 'me+eallcontains@blah.com' 'me+eallmatches@blah.com' 'me+edomainis@blah.com' 'me+edomaincontains@blah.com' 'me+edomainmatches@blah.com' 'me+elocalpartis@blah.com' 'me+elocalpartcontains@blah.com' 'me+elocalpartmatches@blah.com' 'me+goodeallregex@blah.com' 'me+goodedomainregex@blah.com' 'me+goodelocalpartregex@blah.com' 'me+goodeuserregex@blah.com' 'me+goodedetailregex@blah.com' 'me+goodeuseris@blah.com' 'me+goodeusercontains@blah.com' 'me+goodeusermatches@blah.com' 'me+goodedetailis@blah.com' 'me+goodedetailcontains@blah.com' 'me+goodedetailmatches@blah.com' uetest-hasflag should be redirected to: 'me+good.hasflag.count.lt.1.pos@blah.com' 'me+good.hasflag.count.le.0.pos@blah.com' 'me+good.hasflag.count.le.2.pos@blah.com' 'me+good.hasflag.count.lt.0.neg@blah.com' 'me+good.hasflag.count.ge.1.neg@blah.com' 'me+good.hasflag.count.lt.2.neg@blah.com' 'me+good.hasflag.contains.pos@blah.com' 'me+good.hasflag.contains.null.pos@blah.com' 'me+good.hasflag.null.neg@blah.com' 'me+good.hasflag.contains.neg@blah.com' 'me+good.hasflag.neg@blah.com' cyrus-imapd-2.4.18/sieve/tests/testExtension/uberExtensionTestScript.s0000644000175000017500000001313612546374065025225 0ustar ellieellierequire ["regex", "relational", "comparator-i;ascii-numeric", "subaddress", "envelope", "imap4flags"]; #this is for the extra thigns we have added to sieve #test extensions #envelope regex relational comparators subaddress(user and detail) #need better relational and comparator tests... if header :value "gt" :comparator "i;ascii-numeric" ["number"] ["10"] {redirect "me+numberover10@blah.com";} if header :count "gt" :comparator "i;ascii-numeric" ["X"] ["3"] {redirect "me+X@blah.com";} #header regex if header :regex "Date" "Tue,(.*)Feb(.*)" {redirect "me+goodheaderregex@blah.com";} #address Regex if address :all :regex "from" "cook(.)Monster(\\+.*)@cookie\\...." {redirect "me+goodaallregex@blah.com";} if address :domain :regex "from" "c..kie\\.com" {redirect "me+goodadomainregex@blah.com";} if address :localpart :regex "from" "c.{2,4}Monster(\\+.*)" {redirect "me+goodalocalpartregex@blah.com";} if address :user :regex "from" "cookyM.....r" {redirect "me+goodauserregex@blah.com";} if address :detail :regex "from" "whe*" {redirect "me+goodadetailregex@blah.com";} #address user if address :user :is "from" "mymonster" {redirect "me+goodauseris@blah.com";} if address :user :contains "from" "mym" {redirect "me+goodausercontains@blah.com";} if address :user :matches "from" "my*r" {redirect "me+goodausermatches@blah.com";} #address detail if address :detail :is "from" "underbed" {redirect "me+goodadetailis@blah.com";} if address :detail :contains "from" "bed" {redirect "me+goodadetailcontains@blah.com";} if address :detail :matches "from" "under*" {redirect "me+goodadetailmatches@blah.com";} ###################################################################### #ENVELOPE ###################################################################### #envelope all if envelope :all :is "from" "WERT+erk@true.com" {redirect "me+eallis@blah.com";} if envelope :all :contains "from" "true.com" {redirect "me+eallcontains@blah.com";} if envelope :all :matches "from" "WERT*.com" {redirect "me+eallmatches@blah.com";} #envelope domain if envelope :domain :is "from" "true.com" {redirect "me+edomainis@blah.com";} if envelope :domain :contains "from" "true" {redirect "me+edomaincontains@blah.com";} if envelope :domain :matches "from" "*true.com" {redirect "me+edomainmatches@blah.com";} #envelope localpart if envelope :localpart :is "from" "WERT+erk" {redirect "me+elocalpartis@blah.com";} if envelope :localpart :contains "from" "WE" {redirect "me+elocalpartcontains@blah.com";} if envelope :localpart :matches "from" "WE?T*" {redirect "me+elocalpartmatches@blah.com";} #envelope regex if envelope :all :regex "from" "true.com" {redirect "me+goodeallregex@blah.com";} if envelope :domain :regex "from" "true.com" {redirect "me+goodedomainregex@blah.com";} if envelope :localpart :regex "from" "true.com" {redirect "me+goodelocalpartregex@blah.com";} if envelope :user :regex "from" "true.com" {redirect "me+goodeuserregex@blah.com";} if envelope :detail :regex "from" "true.com" {redirect "me+goodedetailregex@blah.com";} #envelope user if envelope :user :is "from" "WERT" {redirect "me+goodeuseris@blah.com";} if envelope :user :contains "from" "WE" {redirect "me+goodeusercontains@blah.com";} if envelope :user :matches "from" "*RT" {redirect "me+goodeusermatches@blah.com";} #envelope detail if envelope :detail :is "from" "erk" {redirect "me+goodedetailis@blah.com";} if envelope :detail :contains "from" "k" {redirect "me+goodedetailcontains@blah.com";} if envelope :detail :matches "from" "e*k" {redirect "me+goodedetailmatches@blah.com";} ###################################################################### #HASFLAG ###################################################################### if header :contains "subject" "imap4flags" { # # Positive :count tests # setflag ""; if hasflag :count "lt" :comparator "i;ascii-numeric" ["1"] {redirect "me+good.hasflag.count.lt.1.pos@blah.com";} else {redirect "me+bad.hasflag.count.lt.1.pos@blah.com";} if hasflag :count "le" :comparator "i;ascii-numeric" ["0"] {redirect "me+good.hasflag.count.le.0.pos@blah.com";} else {redirect "me+bad.hasflag.count.le.0.pos@blah.com";} setflag "flag1 flag2"; if hasflag :count "le" :comparator "i;ascii-numeric" ["2"] {redirect "me+good.hasflag.count.le.2.pos@blah.com";} else {redirect "me+bad.hasflag.count.le.2.pos@blah.com";} # # Negative :count tests # setflag ""; if hasflag :count "lt" :comparator "i;ascii-numeric" ["0"] {redirect "me+bad.hasflag.count.lt.0.neg@blah.com";} else {redirect "me+good.hasflag.count.lt.0.neg@blah.com";} if hasflag :count "ge" :comparator "i;ascii-numeric" ["1"] {redirect "me+bad.hasflag.count.ge.1.neg@blah.com";} else {redirect "me+good.hasflag.count.ge.1.neg@blah.com";} setflag "flag1 flag2"; if hasflag :count "lt" :comparator "i;ascii-numeric" ["2"] {redirect "me+bad.hasflag.count.lt.2.neg@blah.com";} else {redirect "me+good.hasflag.count.lt.2.neg@blah.com";} # # Positive tests # setflag "there"; if hasflag :contains ["myflag", "here"] {redirect "me+good.hasflag.contains.pos@blah.com";} else {redirect "me+bad.hasflag.contains.pos@blah.com";} if hasflag :contains "" {redirect "me+good.hasflag.contains.null.pos@blah.com";} else {redirect "me+bad.hasflag.contains.null.pos@blah.com";} # # Negative tests # setflag "flag"; if hasflag "" {redirect "me+bad.hasflag.null.neg@blah.com";} else {redirect "me+good.hasflag.null.neg@blah.com";} if hasflag :contains "flags" {redirect "me+bad.hasflag.contains.neg@blah.com";} else {redirect "me+good.hasflag.contains.neg@blah.com";} if hasflag "lag" {redirect "me+bad.hasflag.neg@blah.com";} else {redirect "me+good.hasflag.neg@blah.com";} } cyrus-imapd-2.4.18/sieve/tests/testExtension/testm/0000755000175000017500000000000012546374065021312 5ustar ellieelliecyrus-imapd-2.4.18/sieve/tests/testExtension/testm/uetest-value0000644000175000017500000000015712546374065023663 0ustar ellieellieDate: Mon, 25 Feb 2002 08:51:06 -0500 From: me To: you Number:11 Subject: a simple relational value test blah cyrus-imapd-2.4.18/sieve/tests/testExtension/testm/uetest-asub0000644000175000017500000000017212546374065023476 0ustar ellieellieDate: Mon, 25 Feb 2002 08:51:06 -0500 From: mymonster+underbed@x.com To: you Subject: a simple address subaddress test cyrus-imapd-2.4.18/sieve/tests/testExtension/testm/uetest-hreg0000644000175000017500000000013612546374065023471 0ustar ellieellieDate: Tue, 25 Feb 2002 08:51:06 -0500 From: me To: you Subject: a simple header regex test cyrus-imapd-2.4.18/sieve/tests/testExtension/testm/uetest-hasflag0000644000175000017500000000013212546374065024145 0ustar ellieellieDate: Mon, 25 Feb 2002 08:51:06 -0500 From: me To: you Subject: imap4flags hasflag test cyrus-imapd-2.4.18/sieve/tests/testExtension/testm/uetest-areg0000644000175000017500000000017212546374065023462 0ustar ellieellieDate: Mon, 25 Feb 2002 08:51:06 -0500 From: cookyMonster+wheee@cookie.com To: you Subject: a simple address regex test cyrus-imapd-2.4.18/sieve/tests/testExtension/testm/uetest-envelope0000644000175000017500000000013312546374065024356 0ustar ellieellieDate: Mon, 25 Jan 2003 08:51:06 -0500 From: it To: you Subject: simple envelope test blah cyrus-imapd-2.4.18/sieve/tests/testExtension/testm/uetest-count0000644000175000017500000000017112546374065023673 0ustar ellieellieDate: Mon, 25 Feb 2002 08:51:06 -0500 From: me To: you X:1 X:2 X:3 X:4 X:5 Subject: a simple relational count test blah cyrus-imapd-2.4.18/sieve/tests/testExtension/serverm/0000755000175000017500000000000012546374065021641 5ustar ellieelliecyrus-imapd-2.4.18/sieve/tests/testExtension/serverm/uetmail-value0000644000175000017500000000026312546374065024337 0ustar ellieellieMAIL FROM: RCPT TO: DATA Date: Mon, 25 Feb 2002 08:51:06 -0500 From: me To: you Number:11 Subject: a simple relational value test blah . cyrus-imapd-2.4.18/sieve/tests/testExtension/serverm/uetmail-envelope0000644000175000017500000000022212546374065025033 0ustar ellieellieMAIL FROM: RCPT TO: DATA Date: Mon, 25 Jan 2003 08:51:06 -0500 From: it To: you Subject: simple envelope test blah . cyrus-imapd-2.4.18/sieve/tests/testExtension/serverm/uetmail-hasflag0000644000175000017500000000023612546374065024630 0ustar ellieellieMAIL FROM: RCPT TO: DATA Date: Mon, 25 Feb 2002 08:51:06 -0500 From: me To: you Subject: imap4flags hasflag test . cyrus-imapd-2.4.18/sieve/tests/testExtension/serverm/uetmail-areg0000644000175000017500000000030112546374065024132 0ustar ellieellieMAIL FROM: RCPT TO: DATA Date: Mon, 25 Feb 2002 08:51:06 -0500 From: cookyMonster+wheee@cookie.com To: you Subject: a simple address regex test blah . cyrus-imapd-2.4.18/sieve/tests/testExtension/serverm/uetmail-value20000644000175000017500000000026212546374065024420 0ustar ellieellieMAIL FROM: RCPT TO: DATA Date: Mon, 25 Feb 2002 08:51:06 -0500 From: me To: you Number:8 Subject: a simple relational value test blah . cyrus-imapd-2.4.18/sieve/tests/testExtension/serverm/uetmail-asub0000644000175000017500000000030112546374065024146 0ustar ellieellieMAIL FROM: RCPT TO: DATA Date: Mon, 25 Feb 2002 08:51:06 -0500 From: mymonster+underbed@x.com To: you Subject: a simple address subaddress test blah . cyrus-imapd-2.4.18/sieve/tests/testExtension/serverm/uetmail-hreg0000644000175000017500000000024512546374065024150 0ustar ellieellieMAIL FROM: RCPT TO: DATA Date: Tue, 25 Feb 2002 08:51:06 -0500 From: me To: you Subject: a simple header regex test blah . cyrus-imapd-2.4.18/sieve/tests/testExtension/serverm/uetmail-count20000644000175000017500000000026112546374065024433 0ustar ellieellieMAIL FROM: RCPT TO: DATA Date: Mon, 25 Feb 2002 08:51:06 -0500 From: me To: you X:4 X:5 Subject: a simple relational count test blah . cyrus-imapd-2.4.18/sieve/tests/testExtension/serverm/uetmail-count0000644000175000017500000000027512546374065024356 0ustar ellieellieMAIL FROM: RCPT TO: DATA Date: Mon, 25 Feb 2002 08:51:06 -0500 From: me To: you X:1 X:2 X:3 X:4 X:5 Subject: a simple relational count test blah . cyrus-imapd-2.4.18/sieve/tests/test/0000755000175000017500000000000012546374065016261 5ustar ellieelliecyrus-imapd-2.4.18/sieve/tests/test/uberTestScript.key0000644000175000017500000000165012546374065021757 0ustar ellieellieutest-address should be redirected to: 'me+aallis@blah.com' 'me+aallcontains@blah.com' 'me+aallmatches@blah.com' 'me+adomainis@blah.com' 'me+adomaincontains@blah.com' 'me+adomainmatches@blah.com' 'me+alocalpartis@blah.com' 'me+alocalpartcontains@blah.com' 'me+alocalpartmatches@blah.com' utest-header should be redirected to: 'me+headercontains@blah.com' 'me+headeris@blah.com' 'me+headermatches@blah.com' both of those messages should also be redirected to 'me+exists@blah.com' 'me+under1k@blah.com' any message at all should be redirected to 'me+goodtrue@blah.com' 'me+goodnot@good.com' 'me+goodif@good.com' 'me+goodelseif@good.com' 'me+goodelse@good.com' 'me+goodnull@good.com' 'me+goodnesting@good.com' 'me+goodallof@blah.com' 'me+goodallof@blah.com' 'me+goodallof@blah.com' 'me+goodallof@blah.com' 'me+goodanyof@blah.com' 'me+goodanyof@blah.com' 'me+goodanyof@blah.com' 'me+goodanyof@blah.com' cyrus-imapd-2.4.18/sieve/tests/test/testm/0000755000175000017500000000000012546374065017415 5ustar ellieelliecyrus-imapd-2.4.18/sieve/tests/test/testm/utest-header0000644000175000017500000000013012546374065021724 0ustar ellieellieDate: Mon, 25 Feb 2002 08:51:06 -0500 From: it To: me Subject: simple header test blah cyrus-imapd-2.4.18/sieve/tests/test/testm/utest-address0000644000175000017500000000014412546374065022126 0ustar ellieellieDate: Mon, 25 Jan 2003 08:51:06 -0500 From: zme@true.com To: you Subject: simple address test blah cyrus-imapd-2.4.18/sieve/tests/test/uberTestScript.s0000644000175000017500000000704512546374065021435 0ustar ellieellie/*using redirect to test if, elsif, and else, along with all of the tests that can be inside this is still being added to, there are almost certaintly conditions not being tested */ #address all if address :all :is "from" "zme@true.com" {redirect "me+aallis@blah.com";} if address :all :contains "from" "true.com" {redirect "me+aallcontains@blah.com";} if address :all :matches "from" "*true.com" {redirect "me+aallmatches@blah.com";} #address domain if address :domain :is "from" "true.com" {redirect "me+adomainis@blah.com";} if address :domain :contains "from" "true.com" {redirect "me+adomaincontains@blah.com";} if address :domain :matches "from" "*true*" {redirect "me+adomainmatches@blah.com";} #address localpart if address :localpart :is "from" "zme" {redirect "me+alocalpartis@blah.com";} if address :localpart :contains "from" "z" {redirect "me+alocalpartcontains@blah.com";} if address :localpart :matches "from" "z*" {redirect "me+alocalpartmatches@blah.com";} #add tests/messages that differentiate between header/address. #need to write messages and to tweak tests to make sure everyhting works #as expected if header :contains "Date" "Feb" {redirect "me+headercontains@blah.com";} if header :is "Date" "Mon, 25 Feb 2002 08:51:06 -0500" {redirect "me+headeris@blah.com";} if header :matches "Date" "Mon, 25 Feb *" {redirect "me+headermatches@blah.com";} ########################################################################## #this stuff will be true for a lot of messages # ########################################################################## #stop if exists "To" {redirect "me+toexists@blah.com";} if exists "flooglewart" {redirect "me+badexists@blah.com";} if size :over 10K {redirect "me+over10k@blah.com";} if size :over 1M {redirect "me+over1m@blah.com";} if size :under 1K {redirect "me+under1k@blah.com";} ######################################################################### #this stuff will work for any message. # ######################################################################### #stop if true {redirect "me+goodtrue@blah.com";} if false {redirect "me+badfalse@blah.com";} if not false {redirect "me+goodnot@blah.com";} if true {redirect "me+goodif@blah.com";} else {redirect "me+badif@blah.com";} if false {redirect "me+badelseif@blah.com";} elsif true {redirect "me+goodelseif@blah.com";} else {redirect "me+badelseif@blah.com";} if false {redirect "me+badelse@blah.com";} elsif false {redirect "me+badelse@blah.com";} else {redirect "me+goodelse@blah.com";} if false {} else {redirect "me+goodnull@blah.com";} if true {if true {if true {redirect "me+goodnesting@blah.com";} } } #ALLOF(and) if allof(false, false) {redirect "me+badallof(ff)@blah.com";} else {redirect "me+goodallof@blah.com";} if allof(false, true) {redirect "me+badallof(ft)@blah.com";} else {redirect "me+goodallof@blah.com";} if allof(true, false) {redirect "me+badallof(tf)@blah.com";} else {redirect "me+goodallof@blah.com";} if allof(true, true) {redirect "me+goodallof@blah.com";} else {redirect "me+badallof(tt)@blah.com";} #ANYOF(or) if anyof(false, false) {redirect "me+badanyof(ff)@blah.com";} else {redirect "me+goodanyof@blah.com";} if anyof(false,true) {redirect "me+goodanyof@blah.com";} else {redirect "me+badanyof(ft)@blah.com";} if anyof(true, false) {redirect "me+goodanyof@blah.com";} else {redirect "me+badanyof(tf)@blah.com";} if anyof(true, true) {redirect "me+goodanyof@blah.com";} else {redirect "me+badanyof(tt)@blah.com";} cyrus-imapd-2.4.18/sieve/tests/test/serverm/0000755000175000017500000000000012546374065017744 5ustar ellieelliecyrus-imapd-2.4.18/sieve/tests/test/serverm/utmail-address0000644000175000017500000000025012546374065022602 0ustar ellieellieMAIL FROM: RCPT TO: DATA Date: Mon, 25 Jan 2003 08:51:06 -0500 From: zme@true.com To: you Subject: simple address test blah . cyrus-imapd-2.4.18/sieve/tests/test/serverm/utmail-header0000644000175000017500000000023412546374065022407 0ustar ellieellieMAIL FROM: RCPT TO: DATA Date: Mon, 25 Feb 2002 08:51:06 -0500 From: it To: me Subject: simple header test blah . cyrus-imapd-2.4.18/sieve/tests/README0000644000175000017500000000106212546374065016161 0ustar ellieelliethere are four directories action (sieve actions) test (the test cases for if) action extension (extensons to sieve that are actions) testExtension (extensions to sieve that are tests) inside these directories is: XXXXX.s (sieve script) XXXXX.key (what this script should do with thest messages serverm (dir of messages- for testing the script using lmtp server) testm (dir of messages- for testing the script using sieve test program) the redirected messages are all being sent to me@blah.com. when using a lmpt server, change this to a real address firstcyrus-imapd-2.4.18/sieve/tests/actionExtensions/0000755000175000017500000000000012546374065020637 5ustar ellieelliecyrus-imapd-2.4.18/sieve/tests/actionExtensions/uberExtensionActionScript.s0000644000175000017500000000374312546374065026207 0ustar ellieellierequire ["reject", "fileinto", "imapflags", "vacation", "notify", "imap4flags"]; #this is for the extra thigns we have added to sieve #action extensions #reject fileinto imapflags vacation notify #REJECT ############################################## if header :contains "subject" "reject" {reject "rejected";} #FILEINTO ############################################## if header :contains "subject" "fileinto" {fileinto "INBOX.good";} #IMAPFLAGS ############################################## #mark if header :contains "subject" "zmark" {mark;} #unmark if header :contains "subject" "unmark" {unmark;} #addflag if header :contains "subject" "aflag1" {addflag "\\seen";} #addflag if header :contains "subject" "aflag2" {addflag ["\\draft", "\\answered", "\\flagged"];} #setflag if header :contains "subject" "sflag1" {setflag "\\deleted";} #setflag if header :contains "subject" "sflag2" {setflag "\\draft";} #removeflag if header :contains "subject" "rflag" {removeflag "\\answered";} #IMAP4FLAGS# ############################################## if header :contains "subject" "imap4flags" { setflag "existing"; keep :flags "keepflag"; fileinto :flags ["fileinto f2"] "INBOX.fileinto.flags"; addflag ["flag0", "flag1"]; addflag ["my flag is here"]; removeflag ["is my"]; fileinto "INBOX.fileinto.internalflags"; fileinto :flags "" "INBOX.fileinto.nullflags"; } #VACATION ############################################# if header :contains "subject" "vacation" { vacation :days 5 :addresses ["me@blah.com" , "me@somewhereelse.com"] :subject "i'm at the beach" "I'll respond in a week or two, when i get back"; } #NOTIFY and DENOTIFY ############################################# if header :contains "subject" "notify" {notify :high :id "foobar" :message "whee: $subject$";} if header :contains "subject" "not" {denotify :is "foobar" :high; } if header :contains "subject" "n2" {notify :id "foobar" :message "whee: $subject$";} if header :contains "subject" "denotify" {denotify;} cyrus-imapd-2.4.18/sieve/tests/actionExtensions/uberExtensionActionScript.key0000644000175000017500000000237612546374065026536 0ustar ellieellie'ueatest-denotify' keep message 'ueatest-denotify2' notify default(), msg = 'whee: denotify notify n2 Action(s) taken: ' with priority = normal keep message 'ueatest-fileinto' file message into 'INBOX.good' 'ueatest-flag1' keep message with flags '\seen' 'ueatest-flag2' keep message with flags '\deleted 'ueatest-flag3' keep message with flags '\draft' 'ueatest-flag4' keep message with flags '\draft' '\flagged' 'ueatest-flag5' keep message with flags '\seen' '\draft' '\answered' '\flagged 'ueatest-mark' keep message with flags '\flagged' 'ueatest-unmark' keep message 'ueatest-vacation' Envelope body of 'to'? you Envelope body of 'from'? me Have I already responded to '373d72afbd3cbfcb7a7922d70d5dd6e' in 5 days? no echo 'I'll respond in a week or two, when i get back' | mail -s 'i'm at the beach' 'me@unspecified-domain' for message '/afs/andrew/system/src/local/cyrus/046/sieve/tests/actionExtensions/testm/ueatest-vacation' keep message 'ueatest-imap4flags' keeping message with flags 'keepflag' filing message into 'INBOX.fileinto.flags' with flags 'fileinto' 'f2' filing message into 'INBOX.fileinto.internalflags' with flags 'existing' 'flag0' 'flag1' 'flag' 'here' filing message into 'INBOX.fileinto.nullflags' cyrus-imapd-2.4.18/sieve/tests/actionExtensions/testm/0000755000175000017500000000000012546374065021773 5ustar ellieelliecyrus-imapd-2.4.18/sieve/tests/actionExtensions/testm/ueatest-denotify20000644000175000017500000000013212546374065025265 0ustar ellieellieDate: Mon, 25 Feb 2002 08:51:06 -0500 From: them To: you Subject: denotify notify n2 blah cyrus-imapd-2.4.18/sieve/tests/actionExtensions/testm/ueatest-fileinto0000644000175000017500000000012112546374065025171 0ustar ellieellieDate: Mon, 25 Feb 2002 08:51:06 -0500 From: them To: you Subject: fileinto blah cyrus-imapd-2.4.18/sieve/tests/actionExtensions/testm/ueatest-denotify0000644000175000017500000000012212546374065025202 0ustar ellieellieDate: Mon, 25 Feb 2002 08:51:06 -0500 From: them To: you Subject: not notify blah cyrus-imapd-2.4.18/sieve/tests/actionExtensions/testm/ueatest-vacation0000644000175000017500000000013312546374065025167 0ustar ellieellieDate: Mon, 25 Feb 2002 08:51:06 -0500 From: them To: me@blah.com Subject: vacation blah . cyrus-imapd-2.4.18/sieve/tests/actionExtensions/testm/ueatest-mark0000644000175000017500000000011712546374065024317 0ustar ellieellieDate: Mon, 25 Feb 2002 08:51:06 -0500 From: them To: you Subject: zmark blah cyrus-imapd-2.4.18/sieve/tests/actionExtensions/testm/ueatest-flag50000644000175000017500000000017712546374065024371 0ustar ellieellieDate: Mon, 25 Feb 2002 08:51:06 -0500 From: them To: you Subject: aflag1 aflag2 should be seen, flagged, draft, and answered cyrus-imapd-2.4.18/sieve/tests/actionExtensions/testm/ueatest-flag10000644000175000017500000000013212546374065024354 0ustar ellieellieDate: Mon, 25 Feb 2002 08:51:06 -0500 From: them To: you Subject: aflag1 should be seen cyrus-imapd-2.4.18/sieve/tests/actionExtensions/testm/ueatest-flag40000644000175000017500000000015512546374065024364 0ustar ellieellieDate: Mon, 25 Feb 2002 08:51:06 -0500 From: them To: you Subject: aflag2 rflag should be draft and flagged cyrus-imapd-2.4.18/sieve/tests/actionExtensions/testm/ueatest-imap4flags0000644000175000017500000000014712546374065025417 0ustar ellieellieDate: Mon, 25 Feb 2002 08:51:06 -0500 From: them To: you Subject: imap4flags imap4flags test message cyrus-imapd-2.4.18/sieve/tests/actionExtensions/testm/ueatest-unmark0000644000175000017500000000012612546374065024662 0ustar ellieellieDate: Mon, 25 Feb 2002 08:51:06 -0500 From: them To: you Subject: zmark unmark blah cyrus-imapd-2.4.18/sieve/tests/actionExtensions/testm/ueatest-flag20000644000175000017500000000014412546374065024360 0ustar ellieellieDate: Mon, 25 Feb 2002 08:51:06 -0500 From: them To: you Subject: aflag2 sflag1 should be deleted cyrus-imapd-2.4.18/sieve/tests/actionExtensions/testm/ueatest-notify0000644000175000017500000000011612546374065024674 0ustar ellieellieDate: Mon, 25 Feb 2002 08:51:06 -0500 From: them To: you Subject: notify blah cyrus-imapd-2.4.18/sieve/tests/actionExtensions/testm/ueatest-notify20000644000175000017500000000012512546374065024756 0ustar ellieellieDate: Mon, 25 Feb 2002 08:51:06 -0500 From: them To: you Subject: not notify n2 blah cyrus-imapd-2.4.18/sieve/tests/actionExtensions/testm/ueatest-flag30000644000175000017500000000014212546374065024357 0ustar ellieellieDate: Mon, 25 Feb 2002 08:51:06 -0500 From: them To: you Subject: sflag1 sflag2 should be draft cyrus-imapd-2.4.18/sieve/tests/actionExtensions/testm/ueatest-reject0000644000175000017500000000011712546374065024641 0ustar ellieellieDate: Mon, 25 Feb 2002 08:51:06 -0500 From: them To: you Subject: reject blah cyrus-imapd-2.4.18/sieve/tests/actionExtensions/serverm/0000755000175000017500000000000012546374065022322 5ustar ellieelliecyrus-imapd-2.4.18/sieve/tests/actionExtensions/serverm/ueamail-flag20000644000175000017500000000025012546374065024650 0ustar ellieellieMAIL FROM: RCPT TO: DATA Date: Mon, 25 Feb 2002 08:51:06 -0500 From: them To: you Subject: aflag2 sflag1 should be deleted . cyrus-imapd-2.4.18/sieve/tests/actionExtensions/serverm/ueamail-flag40000644000175000017500000000026112546374065024654 0ustar ellieellieMAIL FROM: RCPT TO: DATA Date: Mon, 25 Feb 2002 08:51:06 -0500 From: them To: you Subject: aflag2 rflag should be draft and flagged . cyrus-imapd-2.4.18/sieve/tests/actionExtensions/serverm/ueamail-denotify0000644000175000017500000000022712546374065025502 0ustar ellieellieMAIL FROM: RCPT TO: DATA Date: Mon, 25 Feb 2002 08:51:06 -0500 From: them To: you Subject: not notify blah . cyrus-imapd-2.4.18/sieve/tests/actionExtensions/serverm/ueamail-flag30000644000175000017500000000024612546374065024656 0ustar ellieellieMAIL FROM: RCPT TO: DATA Date: Mon, 25 Feb 2002 08:51:06 -0500 From: them To: you Subject: sflag1 sflag2 should be draft . cyrus-imapd-2.4.18/sieve/tests/actionExtensions/serverm/ueamail-vacation0000644000175000017500000000023512546374065025464 0ustar ellieellieMAIL FROM: RCPT TO: DATA Date: Mon, 25 Feb 2002 08:51:06 -0500 From: them To: me@blah.com Subject: vacation blah . cyrus-imapd-2.4.18/sieve/tests/actionExtensions/serverm/ueamail-reject0000644000175000017500000000022312546374065025131 0ustar ellieellieMAIL FROM: RCPT TO: DATA Date: Mon, 25 Feb 2002 08:51:06 -0500 From: them To: you Subject: reject blah . cyrus-imapd-2.4.18/sieve/tests/actionExtensions/serverm/ueamail-imap4flags0000644000175000017500000000023612546374065025710 0ustar ellieellieMAIL FROM: RCPT TO: DATA Date: Mon, 25 Feb 2002 08:51:06 -0500 From: me To: you Subject: imap4flags hasflag test . cyrus-imapd-2.4.18/sieve/tests/actionExtensions/serverm/ueamail-mark0000644000175000017500000000022312546374065024607 0ustar ellieellieMAIL FROM: RCPT TO: DATA Date: Mon, 25 Feb 2002 08:51:06 -0500 From: them To: you Subject: zmark blah . cyrus-imapd-2.4.18/sieve/tests/actionExtensions/serverm/ueamail-flag50000644000175000017500000000030312546374065024652 0ustar ellieellieMAIL FROM: RCPT TO: DATA Date: Mon, 25 Feb 2002 08:51:06 -0500 From: them To: you Subject: aflag1 aflag2 should be seen, flagged, draft, and answered . cyrus-imapd-2.4.18/sieve/tests/actionExtensions/serverm/ueamail-flag10000644000175000017500000000023612546374065024653 0ustar ellieellieMAIL FROM: RCPT TO: DATA Date: Mon, 25 Feb 2002 08:51:06 -0500 From: them To: you Subject: aflag1 should be seen . cyrus-imapd-2.4.18/sieve/tests/actionExtensions/serverm/ueamail-unmark0000644000175000017500000000023212546374065025152 0ustar ellieellieMAIL FROM: RCPT TO: DATA Date: Mon, 25 Feb 2002 08:51:06 -0500 From: them To: you Subject: zmark unmark blah . cyrus-imapd-2.4.18/sieve/tests/actionExtensions/serverm/ueamail-notify20000644000175000017500000000023212546374065025247 0ustar ellieellieMAIL FROM: RCPT TO: DATA Date: Mon, 25 Feb 2002 08:51:06 -0500 From: them To: you Subject: not notify n2 blah . cyrus-imapd-2.4.18/sieve/tests/actionExtensions/serverm/ueamail-notify0000644000175000017500000000022312546374065025165 0ustar ellieellieMAIL FROM: RCPT TO: DATA Date: Mon, 25 Feb 2002 08:51:06 -0500 From: them To: you Subject: notify blah . cyrus-imapd-2.4.18/sieve/tests/actionExtensions/serverm/ueamail-denotify20000644000175000017500000000023712546374065025565 0ustar ellieellieMAIL FROM: RCPT TO: DATA Date: Mon, 25 Feb 2002 08:51:06 -0500 From: them To: you Subject: denotify notify n2 blah . cyrus-imapd-2.4.18/sieve/tests/actionExtensions/serverm/ueamail-fileinto0000644000175000017500000000022512546374065025470 0ustar ellieellieMAIL FROM: RCPT TO: DATA Date: Mon, 25 Feb 2002 08:51:06 -0500 From: them To: you Subject: fileinto blah . cyrus-imapd-2.4.18/sieve/tests/action/0000755000175000017500000000000012546374065016557 5ustar ellieelliecyrus-imapd-2.4.18/sieve/tests/action/uberActionScript.s0000644000175000017500000000060012546374065022217 0ustar ellieellie#this test should be run after ubertestscript. #this depends on ifs and testing to be working properly if header :contains "subject" "stop" {stop;} if header :contains "subject" "keep" {keep;} if header :contains "subject" "discard" {discard;} #this one is already tested by the ubertest script... if header :contains "subject" "redirect" {redirect "me+goodredirect@blah.com";} cyrus-imapd-2.4.18/sieve/tests/action/testm/0000755000175000017500000000000012546374065017713 5ustar ellieelliecyrus-imapd-2.4.18/sieve/tests/action/testm/uatest-stop20000644000175000017500000000012512546374065022206 0ustar ellieellieDate: Mon, 25 Feb 2003 08:51:06 -0500 From: them To: you Subject: stop discard blah cyrus-imapd-2.4.18/sieve/tests/action/testm/uatest-discard0000644000175000017500000000012012546374065022543 0ustar ellieellieDate: Mon, 25 Feb 2003 08:51:06 -0500 From: them To: you Subject: discard blah cyrus-imapd-2.4.18/sieve/tests/action/testm/uatest-redirect0000644000175000017500000000012112546374065022734 0ustar ellieellieDate: Mon, 25 Feb 2003 08:51:06 -0500 From: them To: you Subject: redirect blah cyrus-imapd-2.4.18/sieve/tests/action/testm/uatest-stop0000644000175000017500000000011512546374065022123 0ustar ellieellieDate: Mon, 25 Feb 2003 08:51:06 -0500 From: them To: you Subject: stop blah cyrus-imapd-2.4.18/sieve/tests/action/testm/uatest-keep0000644000175000017500000000011512546374065022062 0ustar ellieellieDate: Mon, 25 Feb 2003 08:51:06 -0500 From: them To: you Subject: keep blah cyrus-imapd-2.4.18/sieve/tests/action/uberActionScript.key0000644000175000017500000000021112546374065022543 0ustar ellieellie discarding message 'uatest-discard' keeping messages 'uatest-keep' 'uatest-stop' 'uatest-stop2' redirecting message 'uatest-redirect'cyrus-imapd-2.4.18/sieve/tests/action/serverm/0000755000175000017500000000000012546374065020242 5ustar ellieelliecyrus-imapd-2.4.18/sieve/tests/action/serverm/uamail-stop0000644000175000017500000000022112546374065022413 0ustar ellieellieMAIL FROM: RCPT TO: DATA Date: Mon, 25 Feb 2003 08:51:06 -0500 From: them To: you Subject: stop blah . cyrus-imapd-2.4.18/sieve/tests/action/serverm/uamail-redirect0000644000175000017500000000022512546374065023233 0ustar ellieellieMAIL FROM: RCPT TO: DATA Date: Mon, 25 Feb 2003 08:51:06 -0500 From: them To: you Subject: redirect blah . cyrus-imapd-2.4.18/sieve/tests/action/serverm/uamail-stop20000644000175000017500000000023112546374065022476 0ustar ellieellieMAIL FROM: RCPT TO: DATA Date: Mon, 25 Feb 2003 08:51:06 -0500 From: them To: you Subject: stop discard blah . cyrus-imapd-2.4.18/sieve/tests/action/serverm/uamail-discard0000644000175000017500000000022412546374065023042 0ustar ellieellieMAIL FROM: RCPT TO: DATA Date: Mon, 25 Feb 2003 08:51:06 -0500 From: them To: you Subject: discard blah . cyrus-imapd-2.4.18/sieve/tests/action/serverm/uamail-keep0000644000175000017500000000022112546374065022352 0ustar ellieellieMAIL FROM: RCPT TO: DATA Date: Mon, 25 Feb 2003 08:51:06 -0500 From: them To: you Subject: keep blah . cyrus-imapd-2.4.18/sieve/comparator.h0000644000175000017500000000515012546374065016461 0ustar ellieellie/* comparator.h * Larry Greenfield * * Copyright (c) 1994-2008 Carnegie Mellon University. All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The name "Carnegie Mellon University" must not be used to * endorse or promote products derived from this software without * prior written permission. For permission or any legal * details, please contact * Carnegie Mellon University * Center for Technology Transfer and Enterprise Creation * 4615 Forbes Avenue * Suite 302 * Pittsburgh, PA 15213 * (412) 268-7393, fax: (412) 268-7395 * innovation@andrew.cmu.edu * * 4. Redistributions of any form whatsoever must retain the following * acknowledgment: * "This product includes software developed by Computing Services * at Carnegie Mellon University (http://www.cmu.edu/computing/)." * * CARNEGIE MELLON UNIVERSITY DISCLAIMS ALL WARRANTIES WITH REGARD TO * THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY * AND FITNESS, IN NO EVENT SHALL CARNEGIE MELLON UNIVERSITY BE LIABLE * FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN * AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING * OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. * * $Id: comparator.h,v 1.17 2010/01/06 17:01:59 murch Exp $ */ #ifndef COMPARATOR_H #define COMPARATOR_H #ifdef ENABLE_REGEX # ifdef HAVE_PCREPOSIX_H # include # include # else /* !HAVE_PCREPOSIX_H */ # ifdef HAVE_RXPOSIX_H # include # else /* !HAVE_RXPOSIX_H */ # include # include # endif /* HAVE_RXPOSIX_H */ # endif /* HAVE_PCREPOSIX_H */ #endif /* ENABLE_REGEX */ /* compares pat to text; returns 1 if it's true, 0 otherwise first arg is text, second arg is pat, third arg is rock */ typedef int comparator_t(const char *, size_t, const char *, void *); /* returns a pointer to a comparator function given it's name */ comparator_t *lookup_comp(int comp, int mode, int relation, void **rock); #endif /* COMPARATOR_H */ cyrus-imapd-2.4.18/sieve/README0000644000175000017500000000373512546374065015030 0ustar ellieellie$Id: README,v 1.6 2006/11/30 17:11:24 murch Exp $ CMU Sieve 2.1 ------------- This code is typically distributed as part of Cyrus imapd 1.6 and higher. This code will be configured and compiled from the cyrus-imapd directory. Notes on implementation ----------------------- This is an implementation of a simple Sieve API. This API is well-suited for incorporating in other programs, but is not extensible. (If there is interest, we may implement an extensible API in the future.) If you wish to compile Sieve without compiling all of imapd, you'll have to create a Makefile for it. I recommend you use Makefile.in as a guide. It should compile without libcyrus, but then it does not implement the "address" test. That's just too much work to do when I have a neato library to do it for me. There's a simple "test" application included, which is not built by default (type "make test" to build it). It expects: test