wmbiff-0.4.36/0000755000207400020740000000000013646607023010066 500000000000000wmbiff-0.4.36/configure.ac0000644000207400020740000001452513646363662012313 00000000000000dnl Autoconf is here to detect: dnl gnutls, libgcrypt dnl default ssh-askpass dnl and the basics X11, Xext, Xpm dnl and configure: dnl installation prefix dnl version AC_INIT(WMBiff, 0.4.36, wmaker-dev@googlegroups.com, wmbiff) AM_INIT_AUTOMAKE AC_CONFIG_HEADER([config.h]) dnl make sure autoheader finds version, implicitly defined above. AH_TEMPLATE([VERSION], [wmbiff's release version]) AC_SUBST(VERSION) AC_PROG_INSTALL AC_PROG_CC AC_PROG_RANLIB if test -n "$GCC"; then CFLAGS="$CFLAGS -D_GNU_SOURCE -W -Wall -Wshadow -Wpointer-arith -Wwrite-strings" AC_MSG_RESULT(adding -Wall and friends to CFLAGS.) fi case `(uname -s) 2>/dev/null` in "Darwin") CFLAGS="$CFLAGS -no-cpp-precomp" AC_MSG_RESULT(adding cpp precompiler workaround for Mac OS X) LDFLAGS="$LDFLAGS -framework Security" AC_MSG_RESULT(adding -framework Security for Mac OS X) ;; esac dnl a no-op to force autoconf to seek out the preprocessor now. AC_CHECK_HEADERS(stdio.h) dnl for IPv6 support AC_CHECK_FUNCS(getaddrinfo) dnl see if we can cheaply "encrypt" passwords in memory AC_CHECK_FUNCS(memfrob) dnl AC_CHECK_FUNC(asprintf, , VASPRINTF="vasprintf.c") dnl replacing the old USE_POLL define AC_CHECK_FUNCS(poll) dnl for gnutls-common.h, which defines this if missing. AC_CHECK_FUNCS(inet_ntop) dnl declare RETSIGTYPE AC_TYPE_SIGNAL dnl solaris AC_CHECK_LIB(nsl, gethostbyname) AC_CHECK_LIB(socket, connect) AC_CHECK_LIB(resolv, herror) dnl Pre-gnutls. gnutls="ok" gcrypt="ok" AC_CHECK_LIB(z, gzopen, [], [gnutls="nope"]) dnl GNUTLS seems to need libz; fail here if it's missing. dnl perhaps not required anymore: dnl AC_CHECK_LIB(gdbm, dbminit, [], [gnutls="nope"]) dnl GNUTLS seems to need libgdbm; fail here if it's missing. dnl Parameter is minimum version dnl TODO: fix so that GCRYPT is tested only if GNUTLS fails; the dependence dnl between them makes this turn redundant AC_ARG_ENABLE(crypto, AC_HELP_STRING([ --disable-crypto ], [ disable gnutls/gcrypt ]), [ if test $enableval != yes; then gnutls="disabled" gcrypt="disabled" fi ]) GNUTLS_MAN_STATUS="This copy of WMBiff was not compiled with GNUTLS." if test "$gnutls" = "ok"; then PKG_CHECK_MODULES([LIBGNUTLS], [gnutls > 2.2.0], [LIBS="$LIBS $LIBGNUTLS_LIBS" CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS" CPPFLAGS="$CPPFLAGS $LIBGNUTLS_CFLAGS" GNUTLS_COMMON_O="gnutls-common.o" GNUTLS_MAN_STATUS="This copy of WMBiff was compiled with GNUTLS." AC_CHECK_HEADERS(gnutls/gnutls.h) ], [ echo GNUTLS can be found at ftp://gnutls.hellug.gr/pub/gnutls ]) else AC_MSG_RESULT(GNUTLS support requires libz.a and libgdbm.a, so will be disabled) fi GCRYPT_MAN_STATUS="This copy of WMBiff was not compiled with gcrypt." if test "$gcrypt" = "ok"; then AM_PATH_LIBGCRYPT(1.1.90, [CFLAGS="$CFLAGS $LIBGCRYPT_CFLAGS" CPPFLAGS="$CPPFLAGS $LIBGCRYPT_CFLAGS" GCRYPT_MAN_STATUS="This copy of WMBiff was compiled with gcrypt." AC_CHECK_HEADERS(gcrypt.h) ], [ echo libgcrypt can be found at ftp://ftp.gnupg.org/pub/gcrypt/alpha/libgcrypt/ ] ) else AC_MSG_RESULT(GCRYPT disabled.) fi; AC_SUBST(LIBGCRYPT_LIBS) AC_SUBST(GNUTLS_MAN_STATUS) AC_SUBST(GCRYPT_MAN_STATUS) AC_SUBST(GNUTLS_COMMON_O) dnl regex stuff. AC_CHECK_HEADERS(regex.h) dnl gnuregex.h dnl no longer needed AC_CHECK_LIB(gnuregex, re_search) dnl BSD. dnl X11 stuff. AC_PATH_XTRA if test "$no_x" = yes; then AC_MSG_ERROR("Really need a working X. Check config.log to see why configure couldn't find it") fi LIBS="$X_LIBS $LIBS" dnl want to get the -I flags so that later tests for include files work. dnl the preprocessor is used for check_headers, which doesn't use cflags. CPPFLAGS="$X_CFLAGS $CPPFLAGS" AC_CHECK_LIB(X11, XrmParseCommand) AC_CHECK_LIB(Xext, XShapeCombineMask, , AC_MSG_ERROR(libXext not found or does not include XShape)) AC_CHECK_LIB(Xpm, XpmCreateImageFromXpmImage) AC_CHECK_HEADERS(X11/xpm.h, [], [AC_CHECK_HEADERS(xpm.h, [], AC_MSG_ERROR([xpm.h is needed]))]) dnl AM_PATH_GTK(1.2.10, , AC_MSG_WARN(Cannot find GTK: Is gtk-config in path?)) dnl AM_PATH_GDK_PIXBUF(0.15.0, [CFLAGS="$CFLAGS $GDK_PIXBUF_CFLAGS"], dnl AC_MSG_ERROR(Cannot find gdk-pixbuf)) dnl GNOME_INIT_HOOK([ ], failure) dnl GNOME_ORBIT_HOOK([GNOME_LIBS="$GNOME_LIBS $ORBIT_LIBS" dnl GNOME_CFLAGS="$GNOME_CFLAGS $ORBIT_CFLAGS"], failure) dnl GNOME_GNORBA_HOOK([GNOME_LIBS="$GNOME_LIBS $GNORBA_LIBS" dnl GNOME_CFLAGS="$GNOME_CFLAGS $GNORBA_CFLAGS"], failure) dnl AC_SUBST(GNOME_LIBS) dnl AC_SUBST(GNOME_CFLAGS) dnl see if __attribute__ is supported. modified from AC_C_INLINE dnl in the autoconf distribution. AC_DEFUN([WM_C_ATTRIBUTE], [AC_CACHE_CHECK([for __attribute__ support], wm_cv_c_attribute, [wm_cv_c_attribute=no AC_COMPILE_IFELSE([AC_LANG_SOURCE( [#ifndef __cplusplus typedef int foo_t; foo_t foo () __attribute__((unused)); foo_t foo () {return 0; } #endif ])], [wm_cv_c_attribute=yes]) ]) case $wm_cv_c_attribute in yes)AC_DEFINE(HAVE___ATTRIBUTE__, , [Define if '__attribute__' is supported by the compiler]) ;; esac ])# WM_C_ATTRIBUTE WM_C_ATTRIBUTE dnl Password prompting stuff. AC_PATH_PROGS(DEFAULT_ASKPASS, ssh-askpass x11-ssh-askpass ssh-askpass-gnome, /usr/bin/ssh-askpass) AC_PATH_PROG(CVS2CL, cvs2cl) AC_DEFINE_UNQUOTED(DEFAULT_ASKPASS, "$DEFAULT_ASKPASS", [Program to use for querying the user for a password: redefine if not on a debian system]) AC_CHECK_HEADERS(CoreServices/CoreServices.h Security/Security.h) dnl Skin files; note - this is duplicated in wmbiff/Makefile.am dnl haven't thought of a way around it. if test "x$prefix" != xNONE; then SKINDIR="$prefix/share/wmbiff/skins" else SKINDIR="$ac_default_prefix/share/wmbiff/skins" fi dnl where to install em AC_SUBST(SKINDIR) dnl where to find em AC_DEFINE_UNQUOTED(DEFAULT_SKIN_PATH, "$SKINDIR:/usr/share/wmbiff/skins:/usr/local/share/wmbiff/skins:.", [Path to use when finding skins (modified pixmaps)] ) dnl We're done. AC_CONFIG_FILES(Makefile wmbiff/Makefile wmgeneral/Makefile wmbiff/wmbiffrc.5 scripts/Makefile) AC_OUTPUT dnl remind not to write the file. chmod 0444 wmbiff/wmbiffrc.5 wmbiff-0.4.36/Makefile.in0000644000207400020740000006406713646607003012066 00000000000000# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir distdir-am dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) \ config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/config.h.in AUTHORS \ COPYING ChangeLog INSTALL NEWS README TODO compile \ config.guess config.sub install-sh missing DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CVS2CL = @CVS2CL@ CYGPATH_W = @CYGPATH_W@ DEFAULT_ASKPASS = @DEFAULT_ASKPASS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GCRYPT_MAN_STATUS = @GCRYPT_MAN_STATUS@ GNUTLS_COMMON_O = @GNUTLS_COMMON_O@ GNUTLS_MAN_STATUS = @GNUTLS_MAN_STATUS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SKINDIR = @SKINDIR@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = wmgeneral wmbiff scripts EXTRA_DIST = ChangeLog FAQ TODO # make maintainer-clean is all about returning to CVS. # aclocal.m4 is generated by aclocal # config.h.in is generated by autoheader # stamp-h.in appears somewhere # Makefile.in and configure are obviously generated. MAINTAINERCLEANFILES = aclocal.m4 config.h.in stamp-h.in \ Makefile.in configure Changelog.bak stamp-h1 # conf.libgnutlstest seems to outstay its welcome. # I don't know why the -stamp s linger. DISTCLEANFILES = conf.libgnutlstest build-stamp install-stamp all: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @test -f $@ || rm -f stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-zstd: distdir tardir=$(distdir) && $(am__tar) | zstd -c $${ZSTD_CLEVEL-$${ZSTD_OPT--19}} >$(distdir).tar.zst $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | eval GZIP= gzip $(GZIP_ENV) -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ eval GZIP= gzip $(GZIP_ENV) -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ *.tar.zst*) \ zstd -dc $(distdir).tar.zst | $(am__untar) ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile config.h installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-recursive clean-am: clean-generic mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic \ maintainer-clean-local mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) all install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ cscope cscopelist-am ctags ctags-am dist dist-all dist-bzip2 \ dist-gzip dist-lzip dist-shar dist-tarZ dist-xz dist-zip \ dist-zstd distcheck distclean distclean-generic distclean-hdr \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs installdirs-am \ maintainer-clean maintainer-clean-generic \ maintainer-clean-local mostlyclean mostlyclean-generic pdf \ pdf-am ps ps-am tags tags-am uninstall uninstall-am .PRECIOUS: Makefile maintainer-clean-local: rm -f *~ dist-hook-local: ChangeLog chmod -R g-s . indent: cd wmbiff && make indent cd wmgeneral && make indent # manually increment version in configure.ac, which should be enough. ChangeLog: Makefile configure.ac @if test "x$(CVS2CL)" != "x" && test -e maint/changelog.sed; then \ echo "Running $(CVS2CL)..."; \ $(CVS2CL) --stdout --utc --day-of-week -I TODO -I NEWS -I .cvsignore | \ sed -f maint/changelog.sed > $@; \ else \ echo "Unable to build ChangeLog for distribution"; \ exit 0; \ fi # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: wmbiff-0.4.36/wmbiff/0000755000207400020740000000000013646607022011337 500000000000000wmbiff-0.4.36/wmbiff/Client.h0000644000207400020740000001341713515611242012646 00000000000000/* $Id: Client.h,v 1.42 2005/05/08 21:31:22 bluehal Exp $ */ /* Author : Scott Holden ( scotth@thezone.net ) Modified : Yong-iL Joh ( tolkien@mizi.com ) Modified : Jorge García ( Jorge.Garcia@uv.es ) * * Email Checker Pop3/Imap4/Gicu/mbox/maildir/finger * * Last Updated : $Date: 2005/05/08 21:31:22 $ * */ #ifndef CLIENT #define CLIENT #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #ifdef HAVE_GCRYPT_H #include #endif #ifdef __LCLINT__ typedef unsigned int off_t; #endif #define BUF_BIG 256 #define BUF_SMALL 32 #define BUF_SIZE 1024 struct msglst; typedef struct Pop3_ { char label[BUF_SMALL]; /* Printed at left; max 5 chars */ char path[BUF_BIG]; /* Path to mailbox */ char notify[BUF_BIG]; /* Program to notify mail arrivation */ char action[BUF_BIG]; /* Action to execute on mouse click, reduces to * what happens on button1. this is executed after * either actionnew or actionnonew (if they are * defined in the config file) */ char actionnew[BUF_BIG]; /* Action to execute on mouse click when new mail */ char actionnonew[BUF_BIG]; /* Action to execute on mouse click when no new mail */ char actiondc[BUF_BIG]; /* Action to execute when icq is disconnected */ char button2[BUF_BIG]; /* What to run on button2. (middle) */ char fetchcmd[BUF_BIG]; /* Action for mail fetching for pop3/imap, reduces to what happens on button3 */ int fetchinterval; int TotalMsgs; /* Total messages in mailbox */ int UnreadMsgs; /* New (unread) messages in mailbox */ int OldMsgs; int OldUnreadMsgs; char TextStatus[10]; /* if set to a string, toupper() and blit * that string. instead of a message count */ int blink_stat; /* blink digits flag-counter */ int debug; /* debugging status */ struct msglst *headerCache; union { struct { time_t mtime; off_t size; } mbox; struct { char *detail; } shell; struct { time_t mtime_new; off_t size_new; time_t mtime_cur; off_t size_cur; unsigned int dircache_flush:1; /* hack to flush directory caches */ } maildir; struct { char password[BUF_SMALL]; char userName[BUF_BIG]; char serverName[BUF_BIG]; uint16_t serverPort; uint16_t localPort; char authList[100]; unsigned int dossl:1; /* use tls. */ /* prompt the user if we can't login / password is empty */ unsigned int interactive_password:1; /* using the msglst feature, fetch the headers to have them on hand */ unsigned int wantCacheHeaders:1; size_t password_len; /* memfrob may shorten passwords */ } pop_imap; } u; int (*checkMail) ( /*@notnull@ */ struct Pop3_ *); /* collect the headers to show in a pop up */ struct msglst *(*getHeaders) ( /*@notnull@ */ struct Pop3_ *); /* allow the client to free the headers, or keep them cached */ void (*releaseHeaders) ( /*@notnull@ */ struct Pop3_ *, struct msglst * ml); time_t prevtime; time_t prevfetch_time; int loopinterval; /* loop interval for this mailbox */ /* command to execute to get a password, if needed */ const char *askpass; } Pop3; /* creation calls must have this prototype */ int pop3Create( /*@notnull@ */ Pop3 *pc, const char *str); int imap4Create( /*@notnull@ */ Pop3 *pc, const char *str); int shellCreate( /*@notnull@ */ Pop3 *pc, const char *str); int mboxCreate( /*@notnull@ */ Pop3 *pc, const char *str); int maildirCreate( /*@notnull@ */ Pop3 *pc, const char *str); int sock_connect(const char *hostname, uint16_t port); FILE *openMailbox(Pop3 *pc, const char *mbox_filename); /* backtickExpand returns null on failure */ /*@null@ */ char *backtickExpand(Pop3 *pc, const char *path); int fileHasChanged(const char *mbox_filename, time_t * atime, time_t * mtime, off_t * size); int grabCommandOutput(Pop3 *pc, const char *command, /*@out@ */ char **output, /*@out@ *//*@null@ */ char **details); int exists(const char *filename); /* test -f */ /* _NONE is for silent operation. _ERROR is for things that should be printed assuming that the user might possibly see them. _INFO is for reasonably useless but possibly interesting messages. _ALL is for everything. Restated, _ERROR will always be printed, _INFO only if debugging messages were requested. */ #define DEBUG_NONE 0 #define DEBUG_ERROR 1 #define DEBUG_INFO 2 #define DEBUG_ALL 2 /* inspired by ksymoops-2.3.4/ksymoops.h */ #define DM(mbox, msglevel, X...) \ do { \ if (mbox == NULL || (mbox)->debug >= msglevel) { \ printf("wmbiff/%s ", (mbox != NULL) ? (mbox)->label : "NULL"); \ printf(X); \ (void)fflush(NULL); \ } \ } while(0) extern int debug_default; #define DMA(msglevel, X...) \ do { \ if (debug_default >= msglevel) { \ printf("wmbiff: " X); \ (void)fflush(NULL); \ } \ } while(0) /* technique used in apache to allow GCC's attribute tags, without requiring gcc as the compiler */ #if !defined(__GNUC__) || __GNUC__ < 2 || \ (__GNUC__ == 2 && __GNUC_MINOR__ < 7) #ifndef __attribute__ #define __attribute__(__x) #endif #endif /* gnuc */ #endif /* client.h */ #ifndef FALSE #define FALSE (0) #define TRUE (!FALSE) #endif #ifdef __LCLINT__ /* lclint doesn't do typeof */ #define min(x,y) ((x > y) ? x : y) #define max(x,y) ((x > y) ? x : y) #else /* from linux/kernel.h */ #define min(x,y) ({ \ const typeof(x) _xi = (x); \ const typeof(y) _yi = (y); \ (void) (&_xi == &_yi); \ _xi < _yi ? _xi : _yi; }) #define max(x,y) ({ \ const typeof(x) _xa = (x); \ const typeof(y) _ya = (y); \ (void) (&_xa == &_ya); \ _xa > _ya ? _xa : _ya; }) #endif /* vim:set ts=4: */ /* * Local Variables: * tab-width: 4 * c-indent-level: 4 * c-basic-offset: 4 * End: */ wmbiff-0.4.36/wmbiff/Pop3Client.c0000644000207400020740000003506613556541661013423 00000000000000/* $Id: Pop3Client.c,v 1.23 2004/12/12 00:01:53 bluehal Exp $ */ /* Author : Scott Holden ( scotth@thezone.net ) Modified : Yong-iL Joh ( tolkien@mizi.com ) Modified : Jorge García ( Jorge.Garcia@uv.es ) Modified ; Mark Hurley ( debian4tux@telocity.com ) Modified : Neil Spring ( nspring@cs.washington.edu ) * * Pop3 Email checker. * * Last Updated : Tue Nov 13 13:45:23 PST 2001 * */ #ifdef HAVE_CONFIG_H #include #endif #include "Client.h" #include "charutil.h" #include "regulo.h" #include "MessageList.h" #include #include "tlsComm.h" #include "passwordMgr.h" #ifdef USE_DMALLOC #include #endif extern int Relax; /* temp */ static void ask_user_for_password( /*@notnull@ */ Pop3 *pc, int bFlushCache); #define PCU (pc->u).pop_imap #define POP_DM(pc, lvl, args...) DM(pc, lvl, "pop3: " args) #ifdef HAVE_GCRYPT_H static struct connection_state *authenticate_md5( /*@notnull@ */ Pop3 *pc, struct connection_state *scs, char *unused); static struct connection_state *authenticate_apop( /*@notnull@ */ Pop3 *pc, struct connection_state *scs, char *apop_str); #endif static struct connection_state *authenticate_plaintext( /*@notnull@ */ Pop3 *pc, struct connection_state *scs, char *unused); void pop3_cacheHeaders( /*@notnull@ */ Pop3 *pc); extern void imap_releaseHeaders(Pop3 *pc __attribute__((unused)), struct msglst *h); extern struct connection_state *state_for_pcu(Pop3 *pc); static struct authentication_method { const char *name; /* callback returns the connection state pointer if successful, NULL if failed */ struct connection_state *(*auth_callback) (Pop3 *pc, struct connection_state *scs, char *apop_str); } auth_methods[] = { { #ifdef HAVE_GCRYPT_H "cram-md5", authenticate_md5}, { "apop", authenticate_apop}, { #endif "plaintext", authenticate_plaintext}, { NULL, NULL} }; /*@null@*/ struct connection_state *pop3Login(Pop3 *pc) { int fd; char buf[BUF_SIZE]; char apop_str[BUF_SIZE] = ""; char *ptr1, *ptr2; struct authentication_method *a; struct connection_state *scs; char *connection_name; if ((fd = sock_connect(PCU.serverName, PCU.serverPort)) == -1) { POP_DM(pc, DEBUG_ERROR, "Not Connected To Server '%s:%d'\n", PCU.serverName, PCU.serverPort); return NULL; } connection_name = malloc(strlen(PCU.serverName) + 20); sprintf(connection_name, "%s:%d", PCU.serverName, PCU.serverPort); if (PCU.dossl != 0) { scs = initialize_gnutls(fd, connection_name, pc, PCU.serverName); if (scs == NULL) { POP_DM(pc, DEBUG_ERROR, "Failed to initialize TLS\n"); return NULL; } } else { scs = initialize_unencrypted(fd, connection_name, pc); } tlscomm_gets(buf, BUF_SIZE, scs); POP_DM(pc, DEBUG_INFO, "%s", buf); /* Detect APOP, copy challenge into apop_str */ for (ptr1 = buf + strlen(buf), ptr2 = NULL; ptr1 > buf; --ptr1) { if (*ptr1 == '>') { ptr2 = ptr1; } else if (*ptr1 == '<') { if (ptr2) { memcpy(apop_str, ptr1, 1 + ptr2 - ptr1); } break; } } /* try each authentication method in turn. */ for (a = auth_methods; a->name != NULL; a++) { /* was it specified or did the user leave it up to us? */ if (PCU.authList[0] == '\0' || strstr(PCU.authList, a->name)) /* did it work? */ if ((a->auth_callback(pc, scs, apop_str)) != NULL) return (scs); } /* if authentication worked, we won't get here */ POP_DM(pc, DEBUG_ERROR, "All Pop3 authentication methods failed for '%s@%s:%d'\n", PCU.userName, PCU.serverName, PCU.serverPort); tlscomm_printf(scs, "QUIT\r\n"); tlscomm_close(scs); return NULL; } int pop3CheckMail( /*@notnull@ */ Pop3 *pc) { struct connection_state *scs; int read; char buf[BUF_SIZE]; scs = pop3Login(pc); if (scs == NULL) return -1; tlscomm_printf(scs, "STAT\r\n"); if( ! tlscomm_expect(scs, "+", buf, BUF_SIZE) ) { POP_DM(pc, DEBUG_ERROR, "Error Receiving Stats '%s@%s:%d'\n", PCU.userName, PCU.serverName, PCU.serverPort); POP_DM(pc, DEBUG_INFO, "It said: %s\n", buf); return -1; } else { sscanf(buf, "+OK %d", &(pc->TotalMsgs)); } /* - Updated - Mark Hurley - debian4tux@telocity.com * In compliance with RFC 1725 * which removed the LAST command, any servers * which follow this spec will return: * -ERR unimplimented * We will leave it here for those servers which haven't * caught up with the spec. */ tlscomm_printf(scs, "LAST\r\n"); tlscomm_gets(buf, BUF_SIZE, scs); if (buf[0] != '+') { /* it is not an error to receive this according to RFC 1725 */ /* no error should be returned */ pc->UnreadMsgs = pc->TotalMsgs; // there's also a LIST command... not sure how to make use of it. */ } else { sscanf(buf, "+OK %d", &read); pc->UnreadMsgs = pc->TotalMsgs - read; } tlscomm_printf(scs, "QUIT\r\n"); tlscomm_close(scs); return 0; } struct msglst *pop_getHeaders( /*@notnull@ */ Pop3 *pc) { if (pc->headerCache == NULL) pop3_cacheHeaders(pc); if (pc->headerCache != NULL) pc->headerCache->in_use = 1; return pc->headerCache; } int pop3Create(Pop3 *pc, const char *str) { /* POP3 format: pop3:user:password@server[:port] */ /* new POP3 format: pop3:user password server [port] */ /* If 'str' line is badly formatted, wmbiff won't display the mailbox. */ int i; int matchedchars; /* ([^: ]+) user ([^@]+) or ([^ ]+) password ([^: ]+) server ([: ][0-9]+)? optional port ' *' gobbles trailing whitespace before authentication types. use separate regexes for old and new types to permit use of '@' in passwords */ const char *regexes[] = { "pop3s?:([^: ]{1,32}):([^@]{0,32})@([A-Za-z1-9][-A-Za-z0-9_.]+)(:[0-9]+)?( *([CcAaPp][-A-Za-z5 ]*))?$", "pop3s?:([^: ]{1,32}) ([^ ]{1,32}) ([A-Za-z1-9][-A-Za-z0-9_.]+)( [0-9]+)?( *([CcAaPp][-A-Za-z5 ]*))?$", // "pop3:([^: ]{1,32}) ([^ ]{1,32}) ([^: ]+)( [0-9]+)? *", // "pop3:([^: ]{1,32}):([^@]{0,32})@([^: ]+)(:[0-9]+)? *", NULL }; struct regulo regulos[] = { {1, PCU.userName, regulo_strcpy}, {2, PCU.password, regulo_strcpy}, {3, PCU.serverName, regulo_strcpy}, {4, &PCU.serverPort, regulo_atoi}, {6, PCU.authList, regulo_strcpy_tolower}, {0, NULL, NULL} }; if (Relax) { regexes[0] = "pop3:([^: ]{1,32}):([^@]{0,32})@([^/: ]+)(:[0-9]+)?( *(.*))?$"; regexes[1] = "pop3:([^: ]{1,32}) ([^ ]{1,32}) ([^/: ]+)( [0-9]+)?( *(.*))?$"; } if (strncmp("pop3s:", str, 6) == 0) { #ifdef HAVE_GNUTLS_GNUTLS_H PCU.dossl = 1; #else printf("This copy of wmbiff was not compiled with gnutls;\n" "imaps is unavailable. Exiting to protect your\n" "passwords and privacy.\n"); exit(EXIT_FAILURE); #endif } else { PCU.dossl = 0; } /* defaults */ PCU.serverPort = (PCU.dossl != 0) ? 995 : 110; PCU.authList[0] = '\0'; for (matchedchars = 0, i = 0; regexes[i] != NULL && matchedchars <= 0; i++) { matchedchars = regulo_match(regexes[i], str, regulos); } /* failed to match either regex */ if (matchedchars <= 0) { pc->label[0] = '\0'; POP_DM(pc, DEBUG_ERROR, "Couldn't parse line %s (%d)\n" " If this used to work, run wmbiff with the -relax option, and\n " " send mail to "PACKAGE_BUGREPORT" with the hostname\n" " of your mail server.\n", str, matchedchars); return -1; } // grab_authList(str + matchedchars, PCU.authList); PCU.password_len = strlen(PCU.password); if (PCU.password[0] == '\0') { PCU.interactive_password = 1; } else { // ENFROB(PCU.password); } POP_DM(pc, DEBUG_INFO, "userName= '%s'\n", PCU.userName); POP_DM(pc, DEBUG_INFO, "password is %ld chars long\n", strlen(PCU.password)); POP_DM(pc, DEBUG_INFO, "serverName= '%s'\n", PCU.serverName); POP_DM(pc, DEBUG_INFO, "serverPort= '%d'\n", PCU.serverPort); POP_DM(pc, DEBUG_INFO, "authList= '%s'\n", PCU.authList); pc->checkMail = pop3CheckMail; pc->getHeaders = pop_getHeaders; pc->TotalMsgs = 0; pc->UnreadMsgs = 0; pc->OldMsgs = -1; pc->OldUnreadMsgs = -1; return 0; } #ifdef HAVE_GCRYPT_H static struct connection_state *authenticate_md5(Pop3 *pc, struct connection_state *scs, char *apop_str __attribute__((unused))) { char buf[BUF_SIZE]; char buf2[BUF_SIZE]; unsigned char *md5; gcry_md_hd_t gmh; gcry_error_t rc; /* See if MD5 is supported */ tlscomm_printf(scs, "AUTH CRAM-MD5\r\n"); tlscomm_gets(buf, BUF_SIZE, scs); POP_DM(pc, DEBUG_INFO, "%s", buf); if (buf[0] != '+' || buf[1] != ' ') { /* nope, not supported. */ return NULL; } Decode_Base64(buf + 2, buf2); POP_DM(pc, DEBUG_INFO, "CRAM-MD5 challenge: %s\n", buf2); strcpy(buf, PCU.userName); strcat(buf, " "); rc = gcry_md_open(&gmh, GCRY_MD_MD5, GCRY_MD_FLAG_HMAC); if (rc != 0) { POP_DM(pc, DEBUG_ERROR, "unable to initialize gcrypt md5.\n"); return NULL; } gcry_md_setkey(gmh, PCU.password, strlen(PCU.password)); gcry_md_write(gmh, (unsigned char *) buf2, strlen(buf2)); gcry_md_final(gmh); md5 = gcry_md_read(gmh, 0); /* hmac_md5(buf2, strlen(buf2), PCU.password, strlen(PCU.password), md5); */ Bin2Hex(md5, 16, buf2); gcry_md_close(gmh); strcat(buf, buf2); POP_DM(pc, DEBUG_INFO, "CRAM-MD5 response: %s\n", buf); Encode_Base64(buf, buf2); tlscomm_printf(scs, "%s\r\n", buf2); tlscomm_gets(buf, BUF_SIZE, scs); if (!strncmp(buf, "+OK", 3)) return scs; /* AUTH successful */ else { POP_DM(pc, DEBUG_ERROR, "CRAM-MD5 AUTH failed for user '%s@%s:%d'\n", PCU.userName, PCU.serverName, PCU.serverPort); fprintf(stderr, "It said %s", buf); return NULL; } } static struct connection_state *authenticate_apop(Pop3 *pc, struct connection_state *scs, char *apop_str) { gcry_md_hd_t gmh; gcry_error_t rc; char buf[BUF_SIZE]; unsigned char *md5; if (apop_str[0] == '\0') { /* server doesn't support apop. */ return (NULL); } POP_DM(pc, DEBUG_INFO, "APOP challenge: %s\n", apop_str); strcat(apop_str, PCU.password); rc = gcry_md_open(&gmh, GCRY_MD_MD5, 0); if (rc != 0) { POP_DM(pc, DEBUG_ERROR, "unable to initialize gcrypt md5.\n"); return NULL; } gcry_md_write(gmh, (unsigned char *) apop_str, strlen(apop_str)); gcry_md_final(gmh); md5 = gcry_md_read(gmh, 0); Bin2Hex(md5, 16, buf); gcry_md_close(gmh); POP_DM(pc, DEBUG_INFO, "APOP response: %s %s\n", PCU.userName, buf); tlscomm_printf(scs, "APOP %s %s\r\n", PCU.userName, buf); tlscomm_gets(buf, BUF_SIZE, scs); if (!strncmp(buf, "+OK", 3)) return scs; /* AUTH successful */ else { POP_DM(pc, DEBUG_ERROR, "APOP AUTH failed for user '%s@%s:%d'\n", PCU.userName, PCU.serverName, PCU.serverPort); POP_DM(pc, DEBUG_INFO, "It said %s", buf); return NULL; } } #endif /* HAVE_GCRYPT_H */ /*@null@*/ static struct connection_state *authenticate_plaintext( /*@notnull@ */ Pop3 *pc, struct connection_state *scs, char *apop_str __attribute__((unused))) { char buf[BUF_SIZE]; tlscomm_printf(scs, "USER %s\r\n", PCU.userName); if (tlscomm_gets(buf, BUF_SIZE, scs) == 0) { POP_DM(pc, DEBUG_ERROR, "Error reading from server authenticating '%s@%s:%d'\n", PCU.userName, PCU.serverName, PCU.serverPort); return NULL; } if (buf[0] != '+') { POP_DM(pc, DEBUG_ERROR, "Failed user name when authenticating '%s@%s:%d'\n", PCU.userName, PCU.serverName, PCU.serverPort); /* deb #128863 might be easier if we printed: */ POP_DM(pc, DEBUG_ERROR, "The server's error message was: %s\n", buf); return NULL; }; tlscomm_printf(scs, "PASS %s\r\n", PCU.password); if (tlscomm_gets(buf, BUF_SIZE, scs) == 0) { POP_DM(pc, DEBUG_ERROR, "Error reading from server (2) authenticating '%s@%s:%d'\n", PCU.userName, PCU.serverName, PCU.serverPort); return NULL; } if (strncmp(buf, "-ERR [AUTH] Password required", 20) == 0) { if (PCU.interactive_password) { PCU.password[0] = '\0'; ask_user_for_password(pc, 1); /* 1=overwrite the cache */ tlscomm_printf(scs, "PASS %s\r\n", PCU.password); if (tlscomm_gets(buf, BUF_SIZE, scs) == 0) { POP_DM(pc, DEBUG_ERROR, "Error reading from server (2) authenticating '%s@%s:%d'\n", PCU.userName, PCU.serverName, PCU.serverPort); return NULL; } } } if (buf[0] != '+') { POP_DM(pc, DEBUG_ERROR, "Failed password when authenticating '%s@%s:%d'\n", PCU.userName, PCU.serverName, PCU.serverPort); POP_DM(pc, DEBUG_ERROR, "The server's error message was: %s\n", buf); return NULL; }; return scs; } void pop3_cacheHeaders( /*@notnull@ */ Pop3 *pc) { char buf[BUF_SIZE]; struct connection_state *scs; int i; if (pc->headerCache != NULL) { /* decrement the reference count, and free our version */ imap_releaseHeaders(pc, pc->headerCache); pc->headerCache = NULL; } POP_DM(pc, DEBUG_INFO, "working headers\n"); /* login the server */ scs = pop3Login(pc); if (scs == NULL) return; /* pc->UnreadMsgs = pc->TotalMsgs - read; */ pc->headerCache = NULL; for (i = pc->TotalMsgs - pc->UnreadMsgs + 1; i <= pc->TotalMsgs; ++i) { struct msglst *m; m = malloc(sizeof(struct msglst)); m->subj[0] = '\0'; m->from[0] = '\0'; POP_DM(pc, DEBUG_INFO, "search: %s", buf); tlscomm_printf(scs, "TOP %i 0\r\n", i); while (tlscomm_gets(buf, 256, scs) && buf[0] != '.') { if (!strncasecmp(buf, "From: ", 6)) { /* manage the from in heads */ strncpy(m->from, buf + 6, FROM_LEN - 1); m->from[FROM_LEN - 1] = '\0'; } else if (!strncasecmp(buf, "Subject: ", 9)) { /* manage subject */ strncpy(m->subj, buf + 9, SUBJ_LEN - 1); m->subj[SUBJ_LEN - 1] = '\0'; } if (!m->subj[0]) { strncpy(m->subj, "[NO SUBJECT]", 14); } if (!m->from[0]) { strncpy(m->from, "[ANONYMOUS]", 14); } } m->next = pc->headerCache; pc->headerCache = m; pc->headerCache->in_use = 0; } tlscomm_printf(scs, "QUIT\r\n"); tlscomm_close(scs); } /* vim:set ts=4: */ static void ask_user_for_password( /*@notnull@ */ Pop3 *pc, int bFlushCache) { /* see if we already have a password, as provided in the config file, or already requested from the user. */ if (PCU.interactive_password) { if (strlen(PCU.password) == 0) { /* we need to grab the password from the user. */ char *password; POP_DM(pc, DEBUG_INFO, "asking for password %d\n", bFlushCache); password = passwordFor(PCU.userName, PCU.serverName, pc, bFlushCache); if (password != NULL) { if (strlen(password) + 1 > BUF_SMALL) { DMA(DEBUG_ERROR, "Password is too long.\n"); memset(PCU.password, 0, BUF_SMALL - 1); } else { strncpy(PCU.password, password, BUF_SMALL - 1); PCU.password_len = strlen(PCU.password); } free(password); // ENFROB(PCU.password); } } } } wmbiff-0.4.36/wmbiff/Makefile.in0000644000207400020740000012665113646607004013337 00000000000000# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ TESTS = test_wmbiff$(EXEEXT) test_tlscomm$(EXEEXT) noinst_PROGRAMS = test_wmbiff$(EXEEXT) test_tlscomm$(EXEEXT) bin_PROGRAMS = wmbiff$(EXEEXT) subdir = wmbiff ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = wmbiffrc.5 CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" \ "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(skindir)" PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) am_test_tlscomm_OBJECTS = test_tlscomm.$(OBJEXT) tlsComm.$(OBJEXT) test_tlscomm_OBJECTS = $(am_test_tlscomm_OBJECTS) test_tlscomm_LDADD = $(LDADD) am_test_wmbiff_OBJECTS = ShellClient.$(OBJEXT) charutil.$(OBJEXT) \ test_wmbiff.$(OBJEXT) passwordMgr.$(OBJEXT) \ Imap4Client.$(OBJEXT) regulo.$(OBJEXT) Pop3Client.$(OBJEXT) \ tlsComm.$(OBJEXT) socket.$(OBJEXT) test_wmbiff_OBJECTS = $(am_test_wmbiff_OBJECTS) test_wmbiff_DEPENDENCIES = am_wmbiff_OBJECTS = wmbiff.$(OBJEXT) socket.$(OBJEXT) \ Pop3Client.$(OBJEXT) mboxClient.$(OBJEXT) \ maildirClient.$(OBJEXT) Imap4Client.$(OBJEXT) \ tlsComm.$(OBJEXT) ShellClient.$(OBJEXT) passwordMgr.$(OBJEXT) \ charutil.$(OBJEXT) regulo.$(OBJEXT) MessageList.$(OBJEXT) wmbiff_OBJECTS = $(am_wmbiff_OBJECTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/Imap4Client.Po \ ./$(DEPDIR)/MessageList.Po ./$(DEPDIR)/Pop3Client.Po \ ./$(DEPDIR)/ShellClient.Po ./$(DEPDIR)/charutil.Po \ ./$(DEPDIR)/gnutls-common.Po ./$(DEPDIR)/maildirClient.Po \ ./$(DEPDIR)/mboxClient.Po ./$(DEPDIR)/passwordMgr.Po \ ./$(DEPDIR)/regulo.Po ./$(DEPDIR)/socket.Po \ ./$(DEPDIR)/test_tlscomm.Po ./$(DEPDIR)/test_wmbiff.Po \ ./$(DEPDIR)/tlsComm.Po ./$(DEPDIR)/wmbiff.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(test_tlscomm_SOURCES) $(test_wmbiff_SOURCES) \ $(EXTRA_test_wmbiff_SOURCES) $(wmbiff_SOURCES) \ $(EXTRA_wmbiff_SOURCES) DIST_SOURCES = $(test_tlscomm_SOURCES) $(test_wmbiff_SOURCES) \ $(EXTRA_test_wmbiff_SOURCES) $(wmbiff_SOURCES) \ $(EXTRA_wmbiff_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } man1dir = $(mandir)/man1 man5dir = $(mandir)/man5 NROFF = nroff MANS = $(man_MANS) DATA = $(skin_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no am__tty_colors = { \ $(am__tty_colors_dummy); \ if test "X$(AM_COLOR_TESTS)" = Xno; then \ am__color_tests=no; \ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ am__color_tests=yes; \ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ am__color_tests=yes; \ fi; \ if test $$am__color_tests = yes; then \ red=''; \ grn=''; \ lgn=''; \ blu=''; \ mgn=''; \ brg=''; \ std=''; \ fi; \ } am__recheck_rx = ^[ ]*:recheck:[ ]* am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* # A command that, given a newline-separated list of test names on the # standard input, print the name of the tests that are to be re-run # upon "make recheck". am__list_recheck_tests = $(AWK) '{ \ recheck = 1; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ { \ if ((getline line2 < ($$0 ".log")) < 0) \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ { \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ { \ break; \ } \ }; \ if (recheck) \ print $$0; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # A command that, given a newline-separated list of test names on the # standard input, create the global log from their .trs and .log files. am__create_global_log = $(AWK) ' \ function fatal(msg) \ { \ print "fatal: making $@: " msg | "cat >&2"; \ exit 1; \ } \ function rst_section(header) \ { \ print header; \ len = length(header); \ for (i = 1; i <= len; i = i + 1) \ printf "="; \ printf "\n\n"; \ } \ { \ copy_in_global_log = 1; \ global_test_result = "RUN"; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".trs"); \ if (line ~ /$(am__global_test_result_rx)/) \ { \ sub("$(am__global_test_result_rx)", "", line); \ sub("[ ]*$$", "", line); \ global_test_result = line; \ } \ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ copy_in_global_log = 0; \ }; \ if (copy_in_global_log) \ { \ rst_section(global_test_result ": " $$0); \ while ((rc = (getline line < ($$0 ".log"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".log"); \ print line; \ }; \ printf "\n"; \ }; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # Restructured Text title. am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } # Solaris 10 'make', and several other traditional 'make' implementations, # pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it # by disabling -e (using the XSI extension "set +e") if it's set. am__sh_e_setup = case $$- in *e*) set +e;; esac # Default flags passed to test drivers. am__common_driver_flags = \ --color-tests "$$am__color_tests" \ --enable-hard-errors "$$am__enable_hard_errors" \ --expect-failure "$$am__expect_failure" # To be inserted before the command running the test. Creates the # directory for the log if needed. Stores in $dir the directory # containing $f, in $tst the test, in $log the log. Executes the # developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and # passes TESTS_ENVIRONMENT. Set up options for the wrapper that # will run the test scripts (or their associated LOG_COMPILER, if # thy have one). am__check_pre = \ $(am__sh_e_setup); \ $(am__vpath_adj_setup) $(am__vpath_adj) \ $(am__tty_colors); \ srcdir=$(srcdir); export srcdir; \ case "$@" in \ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ *) am__odir=.;; \ esac; \ test "x$$am__odir" = x"." || test -d "$$am__odir" \ || $(MKDIR_P) "$$am__odir" || exit $$?; \ if test -f "./$$f"; then dir=./; \ elif test -f "$$f"; then dir=; \ else dir="$(srcdir)/"; fi; \ tst=$$dir$$f; log='$@'; \ if test -n '$(DISABLE_HARD_ERRORS)'; then \ am__enable_hard_errors=no; \ else \ am__enable_hard_errors=yes; \ fi; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ am__expect_failure=yes;; \ *) \ am__expect_failure=no;; \ esac; \ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) # A shell command to get the names of the tests scripts with any registered # extension removed (i.e., equivalently, the names of the test logs, with # the '.log' extension removed). The result is saved in the shell variable # '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", # since that might cause problem with VPATH rewrites for suffix-less tests. # See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` RECHECK_LOGS = $(TEST_LOGS) AM_RECURSIVE_TARGETS = check recheck TEST_SUITE_LOG = test-suite.log TEST_EXTENSIONS = @EXEEXT@ .test LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) am__set_b = \ case '$@' in \ */*) \ case '$*' in \ */*) b='$*';; \ *) b=`echo '$@' | sed 's/\.log$$//'`; \ esac;; \ *) \ b='$*';; \ esac am__test_logs1 = $(TESTS:=.log) am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) TEST_LOGS = $(am__test_logs2:.test.log=.log) TEST_LOG_DRIVER = $(SHELL) $(top_srcdir)/test-driver TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \ $(TEST_LOG_FLAGS) am__DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/wmbiffrc.5.in \ $(top_srcdir)/depcomp $(top_srcdir)/test-driver DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CVS2CL = @CVS2CL@ CYGPATH_W = @CYGPATH_W@ DEFAULT_ASKPASS = @DEFAULT_ASKPASS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GCRYPT_MAN_STATUS = @GCRYPT_MAN_STATUS@ GNUTLS_COMMON_O = @GNUTLS_COMMON_O@ GNUTLS_MAN_STATUS = @GNUTLS_MAN_STATUS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SKINDIR = @SKINDIR@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ wmbiff_SOURCES = wmbiff.c socket.c Pop3Client.c mboxClient.c \ maildirClient.c Imap4Client.c tlsComm.c tlsComm.h ShellClient.c \ passwordMgr.c passwordMgr.h charutil.c charutil.h Client.h \ regulo.c regulo.h MessageList.c MessageList.h EXTRA_wmbiff_SOURCES = gnutls-common.c gnutls-common.h wmbiff_LDADD = -L../wmgeneral -lwmgeneral @LIBGCRYPT_LIBS@ @GNUTLS_COMMON_O@ wmbiff_DEPENDENCIES = ../wmgeneral/libwmgeneral.a Makefile @GNUTLS_COMMON_O@ test_wmbiff_SOURCES = ShellClient.c charutil.c charutil.h Client.h \ test_wmbiff.c passwordMgr.c Imap4Client.c regulo.c Pop3Client.c \ tlsComm.c tlsComm.h socket.c test_tlscomm_SOURCES = test_tlscomm.c \ tlsComm.c tlsComm.h EXTRA_test_wmbiff_SOURCES = gnutls-common.c gnutls-common.h test_wmbiff_LDADD = @LIBGCRYPT_LIBS@ man_MANS = wmbiff.1 wmbiffrc.5 skindir = $(datadir)/wmbiff/skins skin_DATA = wmbiff-master-led.xpm wmbiff-master-contrast.xpm \ wmbiff-classic-master-led.xpm wmbiff-classic-master-contrast.xpm EXTRA_DIST = $(man_MANS) sample.wmbiffrc wmbiff-master-led.xpm \ wmbiff-classic-master-led.xpm MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .indent .log .o .obj .test .test$(EXEEXT) .trs $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu wmbiff/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu wmbiff/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): wmbiffrc.5: $(top_builddir)/config.status $(srcdir)/wmbiffrc.5.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: -test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS) clean-noinstPROGRAMS: -test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS) test_tlscomm$(EXEEXT): $(test_tlscomm_OBJECTS) $(test_tlscomm_DEPENDENCIES) $(EXTRA_test_tlscomm_DEPENDENCIES) @rm -f test_tlscomm$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_tlscomm_OBJECTS) $(test_tlscomm_LDADD) $(LIBS) test_wmbiff$(EXEEXT): $(test_wmbiff_OBJECTS) $(test_wmbiff_DEPENDENCIES) $(EXTRA_test_wmbiff_DEPENDENCIES) @rm -f test_wmbiff$(EXEEXT) $(AM_V_CCLD)$(LINK) $(test_wmbiff_OBJECTS) $(test_wmbiff_LDADD) $(LIBS) wmbiff$(EXEEXT): $(wmbiff_OBJECTS) $(wmbiff_DEPENDENCIES) $(EXTRA_wmbiff_DEPENDENCIES) @rm -f wmbiff$(EXEEXT) $(AM_V_CCLD)$(LINK) $(wmbiff_OBJECTS) $(wmbiff_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Imap4Client.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/MessageList.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/Pop3Client.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ShellClient.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/charutil.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gnutls-common.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/maildirClient.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mboxClient.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/passwordMgr.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/regulo.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/socket.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_tlscomm.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/test_wmbiff.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/tlsComm.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wmbiff.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` install-man1: $(man_MANS) @$(NORMAL_INSTALL) @list1=''; \ list2='$(man_MANS)'; \ test -n "$(man1dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.1[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) install-man5: $(man_MANS) @$(NORMAL_INSTALL) @list1=''; \ list2='$(man_MANS)'; \ test -n "$(man5dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man5dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man5dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.5[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man5dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man5dir)" || exit $$?; }; \ done; } uninstall-man5: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man5dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.5[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man5dir)'; $(am__uninstall_files_from_dir) install-skinDATA: $(skin_DATA) @$(NORMAL_INSTALL) @list='$(skin_DATA)'; test -n "$(skindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(skindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(skindir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(skindir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(skindir)" || exit $$?; \ done uninstall-skinDATA: @$(NORMAL_UNINSTALL) @list='$(skin_DATA)'; test -n "$(skindir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(skindir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags # Recover from deleted '.trs' file; this should ensure that # "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create # both 'foo.log' and 'foo.trs'. Break the recipe in two subshells # to avoid problems with "make -n". .log.trs: rm -f $< $@ $(MAKE) $(AM_MAKEFLAGS) $< # Leading 'am--fnord' is there to ensure the list of targets does not # expand to empty, as could happen e.g. with make check TESTS=''. am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) am--force-recheck: @: $(TEST_SUITE_LOG): $(TEST_LOGS) @$(am__set_TESTS_bases); \ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ redo_bases=`for i in $$bases; do \ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ done`; \ if test -n "$$redo_bases"; then \ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ if $(am__make_dryrun); then :; else \ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ fi; \ fi; \ if test -n "$$am__remaking_logs"; then \ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ "recursion detected" >&2; \ elif test -n "$$redo_logs"; then \ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ fi; \ if $(am__make_dryrun); then :; else \ st=0; \ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ for i in $$redo_bases; do \ test -f $$i.trs && test -r $$i.trs \ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ test -f $$i.log && test -r $$i.log \ || { echo "$$errmsg $$i.log" >&2; st=1; }; \ done; \ test $$st -eq 0 || exit 1; \ fi @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ ws='[ ]'; \ results=`for b in $$bases; do echo $$b.trs; done`; \ test -n "$$results" || results=/dev/null; \ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ if test `expr $$fail + $$xpass + $$error` -eq 0; then \ success=true; \ else \ success=false; \ fi; \ br='==================='; br=$$br$$br$$br$$br; \ result_count () \ { \ if test x"$$1" = x"--maybe-color"; then \ maybe_colorize=yes; \ elif test x"$$1" = x"--no-color"; then \ maybe_colorize=no; \ else \ echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ shift; \ desc=$$1 count=$$2; \ if test $$maybe_colorize = yes && test $$count -gt 0; then \ color_start=$$3 color_end=$$std; \ else \ color_start= color_end=; \ fi; \ echo "$${color_start}# $$desc $$count$${color_end}"; \ }; \ create_testsuite_report () \ { \ result_count $$1 "TOTAL:" $$all "$$brg"; \ result_count $$1 "PASS: " $$pass "$$grn"; \ result_count $$1 "SKIP: " $$skip "$$blu"; \ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ result_count $$1 "FAIL: " $$fail "$$red"; \ result_count $$1 "XPASS:" $$xpass "$$red"; \ result_count $$1 "ERROR:" $$error "$$mgn"; \ }; \ { \ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ $(am__rst_title); \ create_testsuite_report --no-color; \ echo; \ echo ".. contents:: :depth: 2"; \ echo; \ for b in $$bases; do echo $$b; done \ | $(am__create_global_log); \ } >$(TEST_SUITE_LOG).tmp || exit 1; \ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ if $$success; then \ col="$$grn"; \ else \ col="$$red"; \ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ if $$success; then :; else \ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ if test -n "$(PACKAGE_BUGREPORT)"; then \ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ fi; \ echo "$$col$$br$$std"; \ fi; \ $$success || exit 1 check-TESTS: @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ log_list=`for i in $$bases; do echo $$i.log; done`; \ trs_list=`for i in $$bases; do echo $$i.trs; done`; \ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ exit $$?; recheck: all @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ bases=`for i in $$bases; do echo $$i; done \ | $(am__list_recheck_tests)` || exit 1; \ log_list=`for i in $$bases; do echo $$i.log; done`; \ log_list=`echo $$log_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ am__force_recheck=am--force-recheck \ TEST_LOGS="$$log_list"; \ exit $$? test_wmbiff.log: test_wmbiff$(EXEEXT) @p='test_wmbiff$(EXEEXT)'; \ b='test_wmbiff'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) test_tlscomm.log: test_tlscomm$(EXEEXT) @p='test_tlscomm$(EXEEXT)'; \ b='test_tlscomm'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) .test.log: @p='$<'; \ $(am__set_b); \ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) @am__EXEEXT_TRUE@.test$(EXEEXT).log: @am__EXEEXT_TRUE@ @p='$<'; \ @am__EXEEXT_TRUE@ $(am__set_b); \ @am__EXEEXT_TRUE@ $(am__check_pre) $(TEST_LOG_DRIVER) --test-name "$$f" \ @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_TEST_LOG_DRIVER_FLAGS) $(TEST_LOG_DRIVER_FLAGS) -- $(TEST_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: check-am all-am: Makefile $(PROGRAMS) $(MANS) $(DATA) installdirs: for dir in "$(DESTDIR)$(bindir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(skindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-binPROGRAMS clean-generic clean-noinstPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/Imap4Client.Po -rm -f ./$(DEPDIR)/MessageList.Po -rm -f ./$(DEPDIR)/Pop3Client.Po -rm -f ./$(DEPDIR)/ShellClient.Po -rm -f ./$(DEPDIR)/charutil.Po -rm -f ./$(DEPDIR)/gnutls-common.Po -rm -f ./$(DEPDIR)/maildirClient.Po -rm -f ./$(DEPDIR)/mboxClient.Po -rm -f ./$(DEPDIR)/passwordMgr.Po -rm -f ./$(DEPDIR)/regulo.Po -rm -f ./$(DEPDIR)/socket.Po -rm -f ./$(DEPDIR)/test_tlscomm.Po -rm -f ./$(DEPDIR)/test_wmbiff.Po -rm -f ./$(DEPDIR)/tlsComm.Po -rm -f ./$(DEPDIR)/wmbiff.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-local distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-man install-skinDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-binPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man1 install-man5 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/Imap4Client.Po -rm -f ./$(DEPDIR)/MessageList.Po -rm -f ./$(DEPDIR)/Pop3Client.Po -rm -f ./$(DEPDIR)/ShellClient.Po -rm -f ./$(DEPDIR)/charutil.Po -rm -f ./$(DEPDIR)/gnutls-common.Po -rm -f ./$(DEPDIR)/maildirClient.Po -rm -f ./$(DEPDIR)/mboxClient.Po -rm -f ./$(DEPDIR)/passwordMgr.Po -rm -f ./$(DEPDIR)/regulo.Po -rm -f ./$(DEPDIR)/socket.Po -rm -f ./$(DEPDIR)/test_tlscomm.Po -rm -f ./$(DEPDIR)/test_wmbiff.Po -rm -f ./$(DEPDIR)/tlsComm.Po -rm -f ./$(DEPDIR)/wmbiff.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-man uninstall-skinDATA uninstall-man: uninstall-man1 uninstall-man5 .MAKE: check-am install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-TESTS \ check-am clean clean-binPROGRAMS clean-generic \ clean-noinstPROGRAMS cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-local \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-binPROGRAMS install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-man1 install-man5 \ install-pdf install-pdf-am install-ps install-ps-am \ install-skinDATA install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic pdf pdf-am \ ps ps-am recheck tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-man uninstall-man1 \ uninstall-man5 uninstall-skinDATA .PRECIOUS: Makefile # CODING STYLE AND INDENTATION [2001-Mar-12]: # # There have been some problems with coding style in the past. Many people # contributed to wmbiff (thank you!), and the code got really messy. To help # resolve this, I used GNU indent with what I believe to be the most # widely-accepted coding style options (K&R style) with 4-space TAB indents # (because some of the code is highly nested) to clean up the code. Not # everyone may be happy with this, but has been determined to be necessary for # consistency and legibility. # # In other words, make sure you run "make clean" and "make indent", and do not # change the options on the indent command, before you submit patches against # wmbiff. This will make everyone's life easier. # # -- Dwayne C. Litzenberger indent: indent -npro -kr -i4 -ts4 $(wmbiff_SOURCES) test_*.c || true # to perform surgery on a few changed files. .c.indent: indent -npro -kr -i4 -ts4 $< || true dist-hook-local: indent config-h-check distclean-local: -rm -f wmbiff-master-contrast.xpm wmbiff-master.xpm \ wmbiff-classic-master-contrast.xpm # remove colors, then substitute old colors, then repalletize # for some reason $< doesn't always work. wmbiff-master-contrast.xpm: wmbiff-master-led.xpm Makefile egrep -v '^"[:%][[:space:]]c #' < wmbiff-master-led.xpm | \ sed -e 's/:/./g' -e 's/%/$$/g' -e 's/ 15 / 13 /' | \ sed -e 's/#\([0-9A-F]\{2\}\)[0-9A-F]\{2\}\([0-9A-F]\{2\}\)[0-9A-F]\{2\}\([0-9A-F]\{2\}\)[0-9A-F]\{2\}/#\1\2\3/'\ > $@ || rm $@ wmbiff-classic-master-contrast.xpm: wmbiff-classic-master-led.xpm Makefile egrep -v '^"[:%][[:space:]]c #' < wmbiff-classic-master-led.xpm | \ sed -e 's/:/./g' -e 's/%/$$/g' -e 's/ 15 / 13 /' | \ sed -e 's/#\([0-9A-F]\{2\}\)[0-9A-F]\{2\}\([0-9A-F]\{2\}\)[0-9A-F]\{2\}\([0-9A-F]\{2\}\)[0-9A-F]\{2\}/#\1\2\3/'\ > $@ || rm $@ # fail if there's a .c file that doesn't include config.h config-h-check: ls *.c | sort > cfiles grep -l config.h *.c | sort | diff - cfiles rm cfiles # just a reminder of how to run valgrind to get decent output. valgrind: valgrind --leak-check=yes ./wmbiff -exit # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: wmbiff-0.4.36/wmbiff/passwordMgr.h0000644000207400020740000000037213515611242013734 00000000000000#include "Client.h" /*@mustfree@*/ char *passwordFor(const char *username, const char *servername, Pop3 *pc, int bFlushCache); /* tested by test_wmbiff; don't use this for anything. */ int permissions_ok(Pop3 *pc, const char *askpass_fname); wmbiff-0.4.36/wmbiff/wmbiff-classic-master-led.xpm0000644000207400020740000004400213465246305016733 00000000000000/* XPM */ static const char * wmbiff_classic_master_xpm[] = { "160 109 15 1", " c #00000000FFFF", ". c #208120812081", "X c #FFFFFFFF0000", "o c #492441030000", "O c #79E779E70820", "+ c #000000000000", "@ c #C71BC30BC71B", ": c #000049244103", "$ c #2081B2CAAEBA", "% c #00007DF771C6", "& c #B6DA04101861", "* c #0000EBAD0000", "= c #28A23CF338E3", "- c #F7DEF3CEFFFF", "; c #71C6E38D71C6", " ................................................................................ ", " ...XXX...oooO.OXXXO.OXXXO.OoooO.OXXXO.OXXXO.OXXXO.OXXXO.OXXXO................... ", " ..X...X.o...X.o...X.o...X.X...X.X...o.X...o.o...X.X...X.X...X............X...... ", " ..X...X.o...X.o...X.o...X.X...X.X...o.X...o.o...X.X...X.X...X..X....X....X...... ", " ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ..OoooO..oooO.OXXXO..XXXO.OXXXO.OXXXO.OXXXO..oooO.oXXXo.OXXXO..O....O...X....... ", " +......................................................@ ..X...X.o...X.X...o.o...X.o...X.o...X.X...X.o...X.X...X.o...X...........X....... ", " +..:::...:::...:::...:::...:::.......:::...:::...:::...@ ..X...X.o...X.X...o.o...X.o...X.o...X.X...X.o...X.X...X.o...X..X....X..X........ ", " +.:...:.:...:.:...:.:...:.:...:.....:...:.:...:.:...:..@ ...XXX...oooX.OXXXO.OXXXO..oooO.OXXXO.OXXXO..oooO.OXXXO.OXXXO..O....O..X........ ", " +.:...:.:...:.:...:.:...:.:...:..:..:...:.:...:.:...:..@ ................................................................................ ", " +..:::...:::...:::...:::...:::...:...:::...:::...:::...@ . ", " +.:...:.:...:.:...:.:...:.:...:.....:...:.:...:.:...:..@ . ", " +.:...:.:...:.:...:.:...:.:...:..:..:...:.:...:.:...:..@ . ", " +..:::...:::...:::...:::...:::...:...:::...:::...:::...@ . ", " +......................................................@ . ", " +......................................................@ . ", " +......................................................@ . ", " +......................................................@ . ", " +..:::...:::...:::...:::...:::.......:::...:::...:::...@ . ", " +.:...:.:...:.:...:.:...:.:...:.....:...:.:...:.:...:..@ . ", " +.:...:.:...:.:...:.:...:.:...:..:..:...:.:...:.:...:..@ . ", " +..:::...:::...:::...:::...:::...:...:::...:::...:::...@ . ", " +.:...:.:...:.:...:.:...:.:...:.....:...:.:...:.:...:..@ . ", " +.:...:.:...:.:...:.:...:.:...:..:..:...:.:...:.:...:..@ . ", " +..:::...:::...:::...:::...:::...:...:::...:::...:::...@ . ", " +......................................................@ . ", " +......................................................@ . ", " +......................................................@ . ", " +......................................................@ . ", " +..:::...:::...:::...:::...:::.......:::...:::...:::...@ . ", " +.:...:.:...:.:...:.:...:.:...:.....:...:.:...:.:...:..@ . ", " +.:...:.:...:.:...:.:...:.:...:..:..:...:.:...:.:...:..@ . ", " +..:::...:::...:::...:::...:::...:...:::...:::...:::...@ . ", " +.:...:.:...:.:...:.:...:.:...:.....:...:.:...:.:...:..@ . ", " +.:...:.:...:.:...:.:...:.:...:..:..:...:.:...:.:...:..@ . ", " +..:::...:::...:::...:::...:::...:...:::...:::...:::...@ . ", " +......................................................@ . ", " +......................................................@ . ", " +......................................................@ . ", " +......................................................@ . ", " +..:::...:::...:::...:::...:::.......:::...:::...:::...@ . ", " +.:...:.:...:.:...:.:...:.:...:.....:...:.:...:.:...:..@ . ", " +.:...:.:...:.:...:.:...:.:...:..:..:...:.:...:.:...:..@ . ", " +..:::...:::...:::...:::...:::...:...:::...:::...:::...@ . ", " +.:...:.:...:.:...:.:...:.:...:.....:...:.:...:.:...:..@ . ", " +.:...:.:...:.:...:.:...:.:...:..:..:...:.:...:.:...:..@ . ", " +..:::...:::...:::...:::...:::...:...:::...:::...:::...@ . ", " +......................................................@ . ", " +......................................................@ . ", " +......................................................@ . ", " +......................................................@ . ", " +..:::...:::...:::...:::...:::.......:::...:::...:::...@ . ", " +.:...:.:...:.:...:.:...:.:...:.....:...:.:...:.:...:..@ . ", " +.:...:.:...:.:...:.:...:.:...:..:..:...:.:...:.:...:..@ . ", " +..:::...:::...:::...:::...:::...:...:::...:::...:::...@ . ", " +.:...:.:...:.:...:.:...:.:...:.....:...:.:...:.:...:..@ . ", " +.:...:.:...:.:...:.:...:.:...:..:..:...:.:...:.:...:..@ . ", " +..:::...:::...:::...:::...:::...:...:::...:::...:::...@ . ", " +......................................................@ . ", " +......................................................@ . ", " @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ . ", " . ", " . ", " . ", " . ", "............................................................................... ", "..$$$...:::%.%$$$%.%$$$%.%:::%.%$$$%.%$$$%.%$$$%.:$$$%.%$$$%................... ", ".$...$.:...$.:...$.:...$.$...$.$...:.$...:.:...$.$...$.$...$............$...... .&&. .**. .==. ", ".$...$.:...$.:...$.:...$.$...$.$...:.$...:.:...$.$...$.$...$..$....$....$...... &-&& *-** ==== ", ".%:::%..:::%.%$$$%..$$$%.%$$$%.%$$$%.%$$$%..:::%.:$$$:.%$$$%..%....%...$....... &&&& **** ==== .$:; ", ".$...$.:...$.$...:.:...$.:...$.:...$.$...$.:...$.$...$.:...$...........$....... .&&. .**. .==. ", ".$...$.:...$.$...:.:...$.:...$.:...$.$...$.:...$.$...$.:...$..$....$..$........ ", "..$$$...:::$.%$$$%.%$$$%..:::%.%$$$%.%$$$%..:::%.%$$$:.%$$$%..%....%..$........ ", "............................................................................... ", " ", "................................................................................................................................................................", ".:$$$:.%$$$..%$$$%.%$$$..%$$$%.%$$$%.%$$$%.%:::%..:::%..:::%.%:::%.%:::..$:::$.%$$$..%$$$%.%$$$%.%$$$%.%$$$%.%$$$%.%$$$%.%:::%.%:::%.%:::%.%:::%.%:::%.%$$$%....", ".$...$.$...$.$...:.$...$.$...:.$...:.$...:.$...$.:...$.:...$.$...$.$...:.$$.$$.$...$.$...$.$...$.$...$.$...$.$...:.:.$.:.$...$.$...$.$...$.$...$.$...$.:...$....", ".$...$.$...$.$...:.$...$.$...:.$...:.$...:.$...$.:...$.:...$.$..$:.$...:.$.$.$.$...$.$...$.$...$.$...$.$...$.$...:.:.$.:.$...$.$...$.$...$.:$.$:.$...$.:..$:....", ".%$$$%.%$$$..%:::..%:::%.%$$$..%$$$..%:$$%.%$$$%..:::%..:::%.%$$:..%:::..%:::%.%:::%.%:::%.%$$$%.%$::%.%$$$..%$$$%..:%:..%:::%.%:::%.%:::%..:$:..%$$$%..:$:.....", ".$...$.$...$.$...:.$...$.$...:.$...:.$...$.$...$.:...$.:...$.$..$:.$...:.$...$.$...$.$...$.$...:.$.$.$.$...$.:...$.:.$.:.$...$.$...$.$.$.$.:$.$:.:...$.:$..:....", ".$...$.$...$.$...:.$...$.$...:.$...:.$...$.$...$.:...$.:...$.$...$.$...:.$...$.$...$.$...$.$...:.$..$$.$...$.:...$.:.$.:.$...$.$...$.$$.$$.$...$.:...$.$...:....", ".%:::%.%$$$..%$$$%.$$$$..%$$$%.$:::..%$$$%.%:::%..:::$.:$$$%.%:::%.%$$$:.%:::%.$:::$.%$$$%.%:::..%$$$%.%:::%.%$$$%..:%:..:$$$$..$$$..$:::$.%:::$.:$$$%.%$$$%....", "................................................................................................................................................................", " ", " +......................................................@ . ", " ..:::...:::...:::...:::...:::.......:::...:::...:::... ", " .:...:.:...:.:...:.:...:.:...:.....:...:.:...:.:...:.. ", " .:...:.:...:.:...:.:...:.:...:..:..:...:.:...:.:...:.. ", " ..:::...:::...:::...:::...:::...:...:::...:::...:::... ", " .:...:.:...:.:...:.:...:.:...:.....:...:.:...:.:...:.. ", " .:...:.:...:.:...:.:...:.:...:..:..:...:.:...:.:...:.. ", " ..:::...:::...:::...:::...:::...:...:::...:::...:::... ", " ...................................................... ", " ...................................................... ", " ", "................................................................................................................................................................", ".oXXXo.OXXX..OXXXO.OXXX..OXXXO.OXXXO.OXXXO.OoooO..oooO..oooO.OoooO.Oooo..XoooX.OXXX..OXXXO.OXXXO.OXXXO.OXXXO.OXXXO.OXXXO.OoooO.OoooO.OoooO.OoooO.OoooO.OXXXO....", ".X...X.X...X.X...o.X...X.X...o.X...o.X...o.X...X.o...X.o...X.X...X.X...o.XX.XX.X...X.X...X.X...X.X...X.X...X.X...o.o.X.o.X...X.X...X.X...X.X...X.X...X.o...X....", ".X...X.X...X.X...o.X...X.X...o.X...o.X...o.X...X.o...X.o...X.X..Xo.X...o.X.X.X.X...X.X...X.X...X.X...X.X...X.X...o.o.X.o.X...X.X...X.X...X.oX.Xo.X...X.o..Xo....", ".OXXXO.OXXX..Oooo..OoooO.OXXX..OXXX..OoXXO.OXXXO..oooO..oooO.OXXo..Oooo..OoooO.OoooO.OoooO.OXXXO.OXooO.OXXX..OXXXO..oOo..OoooO.OoooO.OoooO..oXo..OXXXO..oXo.....", ".X...X.X...X.X...o.X...X.X...o.X...o.X...X.X...X.o...X.o...X.X..Xo.X...o.X...X.X...X.X...X.X...o.X.X.X.X...X.o...X.o.X.o.X...X.X...X.X.X.X.oX.Xo.o...X.oX..o....", ".X...X.X...X.X...o.X...X.X...o.X...o.X...X.X...X.o...X.o...X.X...X.X...o.X...X.X...X.X...X.X...o.X..XX.X...X.o...X.o.X.o.X...X.X...X.XX.XX.X...X.o...X.X...o....", ".OoooO.OXXX..OXXXO.XXXX..OXXXO.Xooo..OXXXO.OoooO..oooX.OXXXO.OoooO.OXXXo.OoooO.XoooX.OXXXO.Oooo..OXXXO.OoooO.OXXXO..oOo..oXXXX..XXX..XoooX.OoooX.oXXXO.OXXXO....", "................................................................................................................................................................", " ", " ", " ", " ", " ", " "}; wmbiff-0.4.36/wmbiff/Makefile.am0000644000207400020740000000636013465246305013322 00000000000000TESTS = test_wmbiff test_tlscomm noinst_PROGRAMS = test_wmbiff test_tlscomm bin_PROGRAMS = wmbiff wmbiff_SOURCES = wmbiff.c socket.c Pop3Client.c mboxClient.c \ maildirClient.c Imap4Client.c tlsComm.c tlsComm.h ShellClient.c \ passwordMgr.c passwordMgr.h charutil.c charutil.h Client.h \ regulo.c regulo.h MessageList.c MessageList.h EXTRA_wmbiff_SOURCES = gnutls-common.c gnutls-common.h wmbiff_LDADD = -L../wmgeneral -lwmgeneral @LIBGCRYPT_LIBS@ @GNUTLS_COMMON_O@ wmbiff_DEPENDENCIES = ../wmgeneral/libwmgeneral.a Makefile @GNUTLS_COMMON_O@ test_wmbiff_SOURCES = ShellClient.c charutil.c charutil.h Client.h \ test_wmbiff.c passwordMgr.c Imap4Client.c regulo.c Pop3Client.c \ tlsComm.c tlsComm.h socket.c test_tlscomm_SOURCES = test_tlscomm.c \ tlsComm.c tlsComm.h EXTRA_test_wmbiff_SOURCES = gnutls-common.c gnutls-common.h test_wmbiff_LDADD = @LIBGCRYPT_LIBS@ man_MANS = wmbiff.1 wmbiffrc.5 skindir = $(datadir)/wmbiff/skins skin_DATA = wmbiff-master-led.xpm wmbiff-master-contrast.xpm \ wmbiff-classic-master-led.xpm wmbiff-classic-master-contrast.xpm EXTRA_DIST = $(man_MANS) sample.wmbiffrc wmbiff-master-led.xpm \ wmbiff-classic-master-led.xpm MAINTAINERCLEANFILES = Makefile.in # CODING STYLE AND INDENTATION [2001-Mar-12]: # # There have been some problems with coding style in the past. Many people # contributed to wmbiff (thank you!), and the code got really messy. To help # resolve this, I used GNU indent with what I believe to be the most # widely-accepted coding style options (K&R style) with 4-space TAB indents # (because some of the code is highly nested) to clean up the code. Not # everyone may be happy with this, but has been determined to be necessary for # consistency and legibility. # # In other words, make sure you run "make clean" and "make indent", and do not # change the options on the indent command, before you submit patches against # wmbiff. This will make everyone's life easier. # # -- Dwayne C. Litzenberger indent: indent -npro -kr -i4 -ts4 $(wmbiff_SOURCES) test_*.c || true # to perform surgery on a few changed files. .c.indent: indent -npro -kr -i4 -ts4 $< || true dist-hook-local: indent config-h-check distclean-local: -rm -f wmbiff-master-contrast.xpm wmbiff-master.xpm \ wmbiff-classic-master-contrast.xpm # remove colors, then substitute old colors, then repalletize # for some reason $< doesn't always work. wmbiff-master-contrast.xpm: wmbiff-master-led.xpm Makefile egrep -v '^"[:%][[:space:]]c #' < wmbiff-master-led.xpm | \ sed -e 's/:/./g' -e 's/%/$$/g' -e 's/ 15 / 13 /' | \ sed -e 's/#\([0-9A-F]\{2\}\)[0-9A-F]\{2\}\([0-9A-F]\{2\}\)[0-9A-F]\{2\}\([0-9A-F]\{2\}\)[0-9A-F]\{2\}/#\1\2\3/'\ > $@ || rm $@ wmbiff-classic-master-contrast.xpm: wmbiff-classic-master-led.xpm Makefile egrep -v '^"[:%][[:space:]]c #' < wmbiff-classic-master-led.xpm | \ sed -e 's/:/./g' -e 's/%/$$/g' -e 's/ 15 / 13 /' | \ sed -e 's/#\([0-9A-F]\{2\}\)[0-9A-F]\{2\}\([0-9A-F]\{2\}\)[0-9A-F]\{2\}\([0-9A-F]\{2\}\)[0-9A-F]\{2\}/#\1\2\3/'\ > $@ || rm $@ # fail if there's a .c file that doesn't include config.h config-h-check: ls *.c | sort > cfiles grep -l config.h *.c | sort | diff - cfiles rm cfiles # just a reminder of how to run valgrind to get decent output. valgrind: valgrind --leak-check=yes ./wmbiff -exit wmbiff-0.4.36/wmbiff/gnutls-common.h0000644000207400020740000000226113465246305014235 00000000000000#define PORT 5556 #define SERVER "127.0.0.1" #include #include #ifdef _WIN32 # include # include # include # define socklen_t int # define close closesocket #else # include # include # include # include # include # include #endif /* the number of elements in the priority structures. */ #define PRI_MAX 16 extern const char str_unknown[]; int print_info( gnutls_session_t state, const char* hostname); void print_cert_info( gnutls_session_t state, const char* hostname); void print_list(void); void parse_comp( char** comp, int ncomp, int* comp_priority); void parse_kx( char** kx, int nkx, int* kx_priority); void parse_ctypes( char** ctype, int nctype, int * cert_type_priority); void parse_macs( char** macs, int nmacs, int *mac_priority); void parse_ciphers( char** ciphers, int nciphers, int* cipher_priority); void parse_protocols( char** protocols, int protocols_size, int* protocol_priority); void sockets_init( void); #ifndef HAVE_INET_NTOP const char *inet_ntop(int af, const void *src, char *dst, size_t cnt); #endif wmbiff-0.4.36/wmbiff/charutil.c0000644000207400020740000001237713556541661013256 00000000000000/* $Id: charutil.c,v 1.19 2004/04/28 00:19:03 bluehal Exp $ */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #ifdef USE_DMALLOC #include #endif #include "charutil.h" static __inline__ void LeftTrim(char *psValue) { char *psTmp = psValue; while (*psTmp == ' ' || *psTmp == '\t') psTmp++; /* can't use strcpy here, as the strings must not overlap, at least according to spec. */ if (psTmp > psValue) { while (*psTmp != '\0') { *(psValue++) = *(psTmp++); } *(psValue) = '\0'; } } static __inline__ void RightTrim(char *psValue) { long lLength = strlen(psValue) - 1; while ((psValue[lLength] == ' ' || psValue[lLength] == '\t') && *psValue) { lLength--; } psValue[++lLength] = '\000'; } void FullTrim(char *psValue) { RightTrim(psValue); LeftTrim(psValue); } void Bin2Hex(unsigned char *src, int length, char *dst) { static char hex_tbl[] = "0123456789abcdef"; int i = 0; char *ptr = dst; if (src && ptr) { for (i = 0; i < length; i++) { *ptr++ = hex_tbl[*src >> 4]; *ptr++ = hex_tbl[*src++ & 0xf]; } *ptr = 0; } } #define PAD '=' char ALPHABET[65] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/\000"; /* find char in in alphabet, return offset, -1 otherwise */ int find_char(char c) { char *a = ALPHABET; while (*a) if (*(a++) == c) return a - ALPHABET - 1; return -1; } void Encode_Base64(char *src, char *dst) { int g = 0; int c = 0; if (!src || !dst) return; while (*src) { g = (g << 8) | *src++; if (c == 2) { *dst++ = ALPHABET[0x3f & (g >> 18)]; *dst++ = ALPHABET[0x3f & (g >> 12)]; *dst++ = ALPHABET[0x3f & (g >> 6)]; *dst++ = ALPHABET[0x3f & g]; } c = (c + 1) % 3; } if (c) { if (c == 1) { *dst++ = ALPHABET[0x3f & (g >> 2)]; *dst++ = ALPHABET[0x3f & (g << 4)]; *dst++ = PAD; *dst++ = PAD; } else { *dst++ = ALPHABET[0x3f & (g >> 10)]; *dst++ = ALPHABET[0x3f & (g >> 4)]; *dst++ = ALPHABET[0x3f & (g << 2)]; *dst++ = PAD; } } *dst = 0; } void Decode_Base64(char *src, char *dst) { int g = 0; int c = 0; int n = 0; if (!src || !dst) return; while (*src) { n = find_char(*src++); if (n < 0) continue; g <<= 6; g |= n; if (c == 3) { *dst++ = g >> 16; *dst++ = g >> 8; *dst++ = g; g = 0; } c = (c + 1) % 4; } if (c) { if (c == 1) { /* shouldn't happen, but do something anyway */ *dst++ = g << 2; } else if (c == 2) { *dst++ = g >> 4; } else { *dst++ = g >> 10; *dst++ = g >> 2; } } *dst = 0; } /* helper function for the configuration line parser */ void copy_substring(char *destination, int startidx, int endidx, const char *source) { if (startidx > -1) { strncpy(destination, source + startidx, endidx - startidx); destination[endidx - startidx] = '\0'; } } /* common to Pop3 and Imap4 authentication list grabber. */ void grab_authList(const char *source, char *destination) { int i; /* regex isn't all that helpful for lists of things. */ /* but does leave the end of the matched region in regs.end[0] */ /* what remains is a list of legal authentication schemes. */ if (isalnum(source[0])) { /* copy, while turning caps into lower case */ for (i = 0; i < 99 && source[i] != '\0'; i++) { destination[i] = tolower(source[i]); } destination[i] = '\0'; } else { destination[0] = '\0'; } } #ifdef USE_GNU_REGEX int compile_and_match_regex(const char *regex, const char *str, /*@out@ */ struct re_registers *regs) { const char *errstr; int matchedchars; struct re_pattern_buffer rpbuf; /* compile the regex pattern */ memset(&rpbuf, 0, sizeof(struct re_pattern_buffer)); /* posix egrep interprets intervals (eg. {1,32}) nicely */ re_syntax_options = RE_SYNTAX_POSIX_EGREP; errstr = re_compile_pattern(regex, strlen(regex), &rpbuf); if (errstr != NULL) { fprintf(stderr, "error in compiling regular expression: %s\n", errstr); return -1; } /* match the regex */ regs->num_regs = REGS_UNALLOCATED; matchedchars = re_match(&rpbuf, str, strlen(str), 0, regs); /* this can fail (return -1 or 0) without being an error, if we're trying to apply a regex just to see if it matched. */ #ifdef undef printf("--\n"); for (i = 1; i < 6; i++) { printf("%d %d, (%.*s)\n", regs.start[i], regs.end[i], (regs.end[i] - regs.start[i]), (regs.start[i] >= 0) ? &str[regs.start[i]] : ""); } #endif regfree(&rpbuf); // added 3 jul 02, appeasing valgrind return matchedchars; } #endif /* like perl chomp(); useful for dealing with input from popen */ void chomp(char *s) { int l = strlen(s) - 1; if (l >= 0 && s[l] == '\n') s[l] = '\0'; } char *strdup_ordie(const char *c) { char *ret = strdup(c); if (ret == NULL) { fprintf(stderr, "ran out of memory\n"); exit(EXIT_FAILURE); } return (ret); } void StripComment(char *buf) { char *p; /* Strip comments at beginning of line, or after whitespace. a kludgy way of avoiding problems with #'s in passwords. */ if (buf[0] == '#') buf[0] = '\0'; for (p = (char *) buf + 1; *p && !(*p == '#' && isspace(*(p - 1))); p++); if (*p) { *p = '\0'; } } /* vim:set ts=4: */ /* * Local Variables: * tab-width: 4 * c-indent-level: 4 * c-basic-offset: 4 * End: */ wmbiff-0.4.36/wmbiff/ShellClient.c0000644000207400020740000001751413556541661013647 00000000000000/* Author: Benoît Rouits ( brouits@free.fr ) thanks to Neil Spring. from LicqClient by Yong-iL Joh ( tolkien@mizi.com ) and Jorge García ( Jorge.Garcia@uv.es ) * * generic Shell command support * * Last Updated : Tue Mar 5 15:23:35 CET 2002 * */ #ifdef HAVE_CONFIG_H #include #endif #include "Client.h" #include #include #include #include #include #include #include #include "charutil.h" #include "MessageList.h" #ifdef USE_DMALLOC #include #endif #define SH_DM(pc, lvl, args...) DM(pc, lvl, "shell: " args) /* kind_popen bumps off the sigchld handler - we care whether a checking program fails. */ #ifdef __LCLINT__ void (*old_signal_handler) (int); #else RETSIGTYPE(*old_signal_handler) (int); #endif /*@null@*/ FILE *kind_popen(const char *command, const char *type) { FILE *ret; assert(strcmp(type, "r") == 0); assert(old_signal_handler == NULL); old_signal_handler = signal(SIGCHLD, SIG_DFL); ret = popen(command, type); if (ret == NULL) { DMA(DEBUG_ERROR, "popen: error while reading '%s': %s\n", command, strerror(errno)); (void) signal(SIGCHLD, old_signal_handler); old_signal_handler = NULL; } return (ret); } /* kind_pclose checks the return value from pclose and prints some nice error messages about it. ordinarily, this would be a good idea, but wmbiff has a sigchld handler that reaps children immediately (needed when spawning other child processes), so no error checking can be done here until that's disabled */ /* returns as a mailcheck function does: -1 on fail, 0 on success */ static int kind_pclose( /*@only@ */ FILE * F, const char *command, /*@null@ */ Pop3 *pc) { int exit_status = pclose(F); if (old_signal_handler != NULL) { (void) signal(SIGCHLD, old_signal_handler); old_signal_handler = NULL; } if (exit_status != 0) { if (exit_status == -1) { /* wmbiff has a sigchld handler already, so wait is likely to fail */ SH_DM(pc, DEBUG_ERROR, "pclose '%s' failed: %s\n", command, strerror(errno)); } else { SH_DM(pc, DEBUG_ERROR, "'%s' exited with non-zero status %d\n", command, exit_status); } } return (exit_status); } int grabCommandOutput(Pop3 *pc, const char *command, /*@out@ */ char **output, /*@out@ *//*@null@ */ char **details) { FILE *F; char linebuf[512]; SH_DM(pc, DEBUG_INFO, "Executing '%s'\n", command); *output = NULL; if ((F = kind_popen(command, "r")) == NULL) { return -1; } if (fgets(linebuf, 512, F) == NULL) { SH_DM(pc, DEBUG_ERROR, "fgets: unable to read the output of '%s': %s\n", command, strerror(errno)); } else { chomp(linebuf); /* remove trailing newline */ *output = strdup_ordie(linebuf); } if (details) { static char allbuf[4096]; allbuf[0] = '\0'; if (fread(allbuf, 1, 4095, F) == 0 && !feof(F)) { SH_DM(pc, DEBUG_ERROR, "fread: unable to read the detailed output of '%s': %s\n", command, strerror(errno)); } allbuf[4095] = '\0'; *details = strdup_ordie(allbuf); } return (kind_pclose(F, command, pc)); } /* returns null on failure */ /*@null@*/ char *backtickExpand(Pop3 *pc, const char *path) { char bigbuffer[1024]; const char *tickstart; const char *tickend; bigbuffer[0] = '\0'; while ((tickstart = strchr(path, '`')) != NULL) { char *command; char *commandoutput; tickend = strchr(tickstart + 1, '`'); if (tickend == NULL) { SH_DM(pc, DEBUG_ERROR, "unbalanced \' in %s\n", path); return NULL; } strncat(bigbuffer, path, tickstart - path); command = strdup_ordie(tickstart + 1); command[tickend - tickstart - 1] = '\0'; (void) grabCommandOutput(pc, command, &commandoutput, NULL); free(command); if (commandoutput != NULL) { strcat(bigbuffer, commandoutput); free(commandoutput); } path = tickend + 1; } /* grab the rest */ strcat(bigbuffer, path); SH_DM(pc, DEBUG_INFO, "expanded to %s\n", bigbuffer); return (strdup_ordie(bigbuffer)); } int shellCmdCheck(Pop3 *pc) { int count_status = 0; char *commandOutput; if (pc == NULL) return -1; SH_DM(pc, DEBUG_INFO, ">Mailbox: '%s'\n", pc->path); /* fetch the first line of input */ pc->TextStatus[0] = '\0'; if (pc->u.shell.detail != NULL) { free(pc->u.shell.detail); pc->u.shell.detail = NULL; } (void) grabCommandOutput(pc, pc->path, &commandOutput, &pc->u.shell.detail); if (commandOutput == NULL) { return -1; } SH_DM(pc, DEBUG_INFO, "'%s' returned '%s'\n", pc->path, commandOutput); /* see if it's numeric; the numeric check is somewhat useful, as wmbiff renders 4-digit numbers, but not 4-character strings. */ if (sscanf(commandOutput, "%d", &(count_status)) == 1) { if (strstr(commandOutput, "new")) { pc->UnreadMsgs = count_status; pc->TotalMsgs = 0; } else if (strstr(commandOutput, "old")) { pc->UnreadMsgs = 0; pc->TotalMsgs = count_status; } else { /* this default should be configurable. */ pc->UnreadMsgs = 0; pc->TotalMsgs = count_status; } } else if (strcasestr(commandOutput, "unable")) { return -1; } else if (sscanf(commandOutput, "%9s\n", pc->TextStatus) == 1) { /* validate the string input */ int i; for (i = 0; pc->TextStatus[i] != '\0' && isalnum(pc->TextStatus[i]) && i < 10; i++); if (pc->TextStatus[i] != '\0') { SH_DM(pc, DEBUG_ERROR, "wmbiff only supports alphanumeric (isalnum) strings:\n" " '%s' is not ok\n", pc->TextStatus); /* null terminate it at the first bad char: */ pc->TextStatus[i] = '\0'; } /* see if we should print as new or not */ pc->UnreadMsgs = (strstr(commandOutput, "new")) ? 1 : 0; pc->TotalMsgs = -1; /* we might alternat numeric /string */ } else { SH_DM(pc, DEBUG_ERROR, "'%s' returned something other than an integer message count" " or short string.\n", pc->path); free(commandOutput); return -1; } SH_DM(pc, DEBUG_INFO, "from: %s status: %s %d %d\n", pc->path, pc->TextStatus, pc->TotalMsgs, pc->UnreadMsgs); free(commandOutput); return (0); } struct msglst *shell_getHeaders( /*@notnull@ */ Pop3 *pc) { struct msglst *message_list = NULL; char *ln = pc->u.shell.detail; int i, j; if (ln == NULL) return NULL; for (j = 0; ln[j] != '\0';) { struct msglst *m = malloc(sizeof(struct msglst)); m->next = message_list; m->subj[0] = '\0'; m->from[0] = '\0'; for (i = 0; i < SUBJ_LEN - 1 && ln[j + i] != '\n'; i++) { m->subj[i] = ln[j + i]; } m->subj[i] = '\0'; j += i + 1; message_list = m; } return message_list; } void shell_releaseHeaders(Pop3 *pc __attribute__((unused)), struct msglst *h) { for (; h != NULL;) { struct msglst *n = h->next; free(h); h = n; } } int shellCreate( /*@notnull@ */ Pop3 *pc, const char *str) { /* SHELL format: shell:::/path/to/script */ const char *reserved1, *reserved2, *commandline; pc->TotalMsgs = 0; pc->UnreadMsgs = 0; pc->OldMsgs = -1; pc->OldUnreadMsgs = -1; pc->checkMail = shellCmdCheck; pc->getHeaders = shell_getHeaders; reserved1 = str + 6; /* shell:>:: */ assert(strncasecmp("shell:", str, 6) == 0); reserved2 = index(reserved1, ':'); if (reserved2 == NULL) { SH_DM(pc, DEBUG_ERROR, "unable to parse '%s', expecting ':'", str); return 0; } reserved2++; /* shell::>: */ commandline = index(reserved2, ':'); if (commandline == NULL) { SH_DM(pc, DEBUG_ERROR, "unable to parse '%s', expecting another ':'", str); return 0; } commandline++; /* shell:::> */ /* strcpy is not specified to handle overlapping regions */ SH_DM(pc, DEBUG_INFO, "path= '%s'\n", commandline); { char *tmp = strdup(commandline); if (strlen(tmp) + 1 > BUF_BIG) { SH_DM(pc, DEBUG_ERROR, "commandline '%s' is too long.\n", commandline); memset(pc->path, 0, BUF_BIG); } else { strcpy(pc->path, tmp); } free(tmp); } return 0; } /* vim:set ts=4: */ /* * Local Variables: * tab-width: 4 * c-indent-level: 4 * c-basic-offset: 4 * End: */ wmbiff-0.4.36/wmbiff/wmbiffrc.5.in0000644000207400020740000002334313465246305013560 00000000000000.\" Hey, Emacs! This is an -*- nroff -*- source file. .\" $Id: wmbiffrc.5.in,v 1.18 2004/12/12 00:01:53 bluehal Exp $ .\" .\" @configure_input@ .\" .\" wmbiff.1 and wmbiffrc.5 are copyright 1999-2002 by .\" Jordi Mallach .\" .\" This is free documentation, see the latest version of the GNU .\" General Public License for copying conditions. There is NO warranty. .TH WMBIFFRC 5 "November 11, 2002" "wmbiff" .SH NAME wmbiffrc \- configuration file for .BR wmbiff (1) .SH DESCRIPTION \fBWMbiff\fP is a mail notification tool for the WindowMaker and AfterStep window managers. It can handle up to 5 mailboxes, more when run using other window managers. You can define actions on mouse clicks for the different mailboxes. This manpage explains the different options which can be specified in a user's wmbiffrc. .SH OPTIONS Each option takes the form .IR option[.mbox] " = " value . Comments must be preceded by pound signs (#). The supported configuration options are: .TP 3 \fBcertfile\fP File that holds TLS (SSL) certificates. If specified, wmbiff will check certificates and exit on a failure, so your password is secure. If not present, wmbiff will trust all certificates and may be vulnerable to a man-in-the-middle attack. WMbiff's will not prompt if you want to accept new certificates. Instead, wmbiff expects your mail client to keep certificates in a file. For example, if mutt is your mailreader, you may add: .RS certfile=/home//.muttsslcerts .RE .TP \fBtls\fP Specify cipher suite preferences on a TLS session. Can be a predefined value from gnults or a custom value. Default value is: \fINORMAL\fP. gnutls predefined values: .sp .RS 8 \fIPERFORMANCE\fP (gnutls >= 2.2.0) .RE .RS 8 \fINORMAL\fP (gnutls >= 2.2.0) .RE .RS 8 \fISECURE128\fP (gnutls >= 2.2.0) .RE .RS 8 \fISECURE192\fP (gnutls >= 3.0.0) .RE .RS 8 \fISECURE256\fP (gnutls >= 2.2.0) .RE .RS 8 \fISUITEB128\fP (gnutls >= 3.0.0) .RE .RS 8 \fISUITEB192\fP (gnutls >= 3.0.0) .RE .RS 8 \fIEXPORT\fP (gnutls >= 2.2.0) .RE .RS 8 \fINONE\fP (gnutls >= 2.2.0) .RE .RS .TP See \fBhttp://gnutls.org/manual/gnutls.html#Priority-Strings\fR for more details. .RE .TP \fBinterval\fP Global interval between mailbox checking. Value is the number of seconds, 5 is the default. .TP \fBaskpass\fP Program run to ask for IMAP passwords, if left empty in the configuration file. The default is @DEFAULT_ASKPASS@. Can be specified on a per-mailbox basis. .TP \fBskinfile\fP XPM pixmap file to load for the background. If not a full path, wmbiff will search @SKINDIR@, /usr/share/wmbiff, /usr/local/share/wmbiff, and the current directory for the pixmap file. .TP \fBglobalnotify\fP Command to be executed when new mail is received in any mailbox. Set notify.n to override this option for mailbox n. .TP \fBlabel.n\fP Specifies the displayed label for a mailbox. It can be up to five characters long. .TP \fBpath.n\fP Path to the mailbox, local or remote one. Path lines start with a prefix, which specifies the type of wmbiff box you're setting up. The following types are supported: .RS .TP .I mbox This is a local mbox mailbox. After the prefix, you only need to put the path to the mailbox wmbiff needs to read. Local mboxes may be specified using shell commands enclosed in back-ticks. (`s.) .\"This is also the default. .RS mbox:/path/to/mail/debian-devel .RE .\" let's stop making this available. .\" .RS .\" - or - .\" .RE .\" /path/to/mail/debian-devel .\" .RS .TP .I maildir This works just like \fImbox\fP above. .RS maildir:[:\fIflags\fP:]/path/to/mail/bugtraq/ .TP \fIflags\fP can one or more of: .TP .I F Flush directory caches by creating (then deleting) a temporary file in each maildir prior to checking. This hack speeds up checking network-mounted maildirs in cases where directory caching can cause unwanted delays (eg. SFS-mounted maildirs). .RE .TP .I pop3 Using this type, WMBiff will check for mail on a pop3 server using the specified username, password, host and an optional port number (defaulting to 110). If your password contains a special character, eg. '@' or ':', use the second path format. See Authentication below for a description of the auth field. .RS pop3:user:passwd@server[:port] [auth] .RE .RS pop3:user passwd server[ port] [auth] .RE .TP .I pop3s Exactly like pop3, only uses TLS (SSL) when built with gnutls and defaults to port 995. @GNUTLS_MAN_STATUS@ .TP .I imap These are IMAP4 boxes. As with pop3, WMBiff will report the status of an IMAP4 mbox using the given values. This type accepts user, optional password, host and optional path to mailbox and port number. See Authentication below for a description of the auth field. The password may be left empty: see askpass above for information on password prompting. If your password includes a @, use the space delimited form. If it contains a space or #, use the askpass option instead. The mailbox field may be quoted, e.g., server/"Mail/Eggs and Spam". Mailboxes in subfolders may be described as /INBOX.subfolder by some servers and /Mail/subfolder by others. .RS imap:user:passwd@server[/mailbox][:port] [auth] .RE .RS imap:user:@server[/mailbox][:port] [auth] .RE .RS imap:user passwd server[/mailbox][ port] [auth] .RE .RS imap:user:passwd@server[/"mail box"][:port] [auth] .RE .TP .I imaps These are IMAP4 boxes wrapped in a TLS (SSL) connection. @GNUTLS_MAN_STATUS@ Parameters are the same as those for ordinary IMAP4 boxes. Port defaults to 993. If 143 is specified, WMBiff will attempt to connect unencrypted but negotiate TLS using IMAP's STARTTLS command. TLS support uses GNUTLS, which is under development and may be insecure. See the imap format above for additional detail about specifying your password. .RS imaps:user:passwd@server[/mailbox][:port] [auth] .RE .RS imaps:user:@server[/mailbox][:port] [auth] .RE .RS imaps:user passwd server[/mailbox][ port] [auth] .RE .TP .I shell With this keyword, wmbiff will launch the specified shell command and read its output (STDOUT) expecting an integer message count or a three-character string. If "new" is in the first line, the string or number will be displayed in yellow. The behavior of this experimental keyword is likely to change in future revisions. .RS shell:::/path/to/command shell:::lpq | grep Queue | awk '{print $2}' .RE .RE .TP \fBnotify.n\fP Command to be executed on new mail arrival in the given mailbox. Accepts the special keyword "beep" to use the pc speaker. .TP \fBaction.n\fP Command to be executed on left mouse click on a mailbox label. Accepts the special keyword "msglst" to pop up a window of recent message headers from IMAP or POP3 mailboxes when the left mouse button is held. .TP \fBbuttontwo.n\fP Command to be executed on middle mouse click on a mailbox level. Accepts the special keyword "msglst" to pop up a window of recent message headers from IMAP or POP3 mailboxes when the middle mouse button is held. .TP \fBinterval.n\fP Per mailbox check interval. Value is the amount of seconds between checkings, default is the global interval. .TP \fBfetchinterval.n\fP Interval between mail auto-fetching. Values accept 0 to disable, \-1 for autofetching on new mail arrival, and positive values for a given interval in seconds. .TP \fBfetchcmd.n\fP Command to be executed to fetch mail. If not specified, fetching through wmbiff is disabled completely. Accepts the special keyword "msglst" to pop up a window of recent message headers from IMAP and POP3 mailboxes when the right mouse button is held down, though not when fetchinterval is nonzero. .TP \fBdebug.n\fP Show debugging messages from this mailbox. Currently supported values are "all" and "none". The \-debug option to wmbiff overrides this setting. Since IMAP uses a single connection per server, per-mailbox debugging may not .SH SIZING WMBiff will automatically size its window to the number of configured mailboxes. While WindowMaker's Dock and AfterStep's Wharf expect square, 64x64 applets, other window managers, such as Blackbox or Openbox do not have this limitation. This uncharacteristic "dockapp" behavior is intended to help those users who don't have exactly five mailboxes to watch. To preserve the old-style five-mailbox window even when you have only two, add .IR path.4= to configure a blank 5th mailbox. To use the new-style sizing, just configure as many mailboxes as you want. .SH AUTHENTICATION Authentication methods include "cram-md5", "apop" (for Pop3), and "plaintext". "cram-md5" and "apop" are only available when wmbiff is compiled with libgcrypt. @GCRYPT_MAN_STATUS@ Authentication methods are tried in the following order: cram-md5, apop, plaintext. Each authentication method will be tried unless a list is included in the [auth] field. For example, append "cram-md5 apop" if you don't want your password to be sent in cleartext over the network. Conversely, append "plaintext" if you don't want wmbiff to bother with other authentication methods. Leaving authentication methods unspecified should be reasonably safe. The order of entries in the [auth] list is not currently considered. .SH TROUBLESHOOTING For problems authenticating to servers, try specifying the authentication method explicitly as described above: sometimes a failed attempt to authenticate can cause later failures. Some servers claim to support cram-md5 but fail: telling wmbiff not to try can help. For other problems, run wmbiff with the \-debug option. See wmbiff(1) for details. While editing .wmbiffrc, you may find it useful to restart wmbiff using either control-shift mouse button 1, or killall \-USR1 wmbiff. .SH FILES .TP .I ~/.wmbiffrc per-user wmbiff configuration file. .SH AUTHOR This manual page was written by Jordi Mallach , originally for the Debian system (but may be used by others). .SH SEE ALSO .PD 0 .TP \fBwmbiff\fP(1) .PP \fI/usr/share/doc/wmbiff/examples/sample.wmbiffrc\fP (or equivalent on your system) wmbiff-0.4.36/wmbiff/passwordMgr.c0000644000207400020740000002037713556541661013752 00000000000000/* passwordMgr.c * Author: Neil Spring */ /* this module implements a password cache: the goal is to allow multiple wmbiff mailboxes that are otherwise independent get all their passwords while only asking the user for an account's password once. */ /* NOTE: it will fail if a user has different passwords for pop vs. imap on the same server; this seems too far fetched to be worth complexity */ /* NOTE: it verifies that the askpass program, which, if given with a full path, must be owned either by the user or by root. There may be decent reasons not to do this. */ /* Intended properties: 1) exit()s if the user presses cancel from askpass - this is detected by no output from askpass. 2) allows the caller to remove a cached entry if it turns out to be wrong, and prompt the user again. This might be poor if the askpass program is replaced with something non-interactive. */ #ifdef HAVE_CONFIG_H #include #endif #include "passwordMgr.h" #include "Client.h" #include "charutil.h" /* chomp */ #include #include #include #include #include #include /* index */ #include #include "assert.h" #ifdef HAVE_MEMFROB #define DEFROB(x) memfrob(x, x ## _len) #define ENFROB(x) memfrob(x, x ## _len) #else #define DEFROB(x) #define ENFROB(x) #endif typedef struct password_binding_ { struct password_binding_ *next; char user[BUF_SMALL]; char server[BUF_BIG]; char password[BUF_SMALL]; /* may be frobnicated */ size_t password_len; /* frobnicated *'s are nulls */ } password_binding; static password_binding *pass_list; /* verifies that askpass_fname, if it has no spaces, exists as a file, is owned by the user or by root, and is not world writeable. This is just a sanity check, and is not intended to ensure the integrity of the password-asking program. */ /* would be static, but used in test_wmbiff */ int permissions_ok(Pop3 *pc, const char *askpass_fname) { struct stat st; if (index(askpass_fname, ' ')) { DM(pc, DEBUG_INFO, "askpass has a space in it; not verifying ownership/permissions on '%s'\n", askpass_fname); return (1); } if (stat(askpass_fname, &st)) { DM(pc, DEBUG_ERROR, "Can't stat askpass program: '%s'\n", askpass_fname); if (askpass_fname[0] != '/') { DM(pc, DEBUG_ERROR, "For your own good, use a full pathname.\n"); } return (0); } if (st.st_uid != 0 && st.st_uid != getuid()) { DM(pc, DEBUG_ERROR, "askpass program isn't owned by you or root: '%s'\n", askpass_fname); return (0); } if (st.st_mode & S_IWOTH) { DM(pc, DEBUG_ERROR, "askpass program is world writable: '%s'\n", askpass_fname); return (0); } return (1); } #ifdef HAVE_CORESERVICES_CORESERVICES_H #ifdef HAVE_SECURITY_SECURITY_H #define HAVE_APPLE_KEYCHAIN #endif #endif #ifdef HAVE_APPLE_KEYCHAIN /* routines to use apple's keychain to get a password without a user having to type. this avoids some damage where although ssh-askpass can grab focus within X, it may not have a particularly secure keyboard. */ #include #include static void get_password_from_keychain(Pop3 *pc, const char *username, const char *servername, /*@out@ */ char *password, /*@out@ */ size_t *password_len) { SecKeychainRef kc; OSStatus rc; char *secpwd; UInt32 pwdlen; rc = SecKeychainCopyDefault(&kc); if (rc != noErr) { DM(pc, DEBUG_ERROR, "passmgr: unable to open keychain, exiting\n"); exit(EXIT_FAILURE); } rc = SecKeychainFindInternetPassword(kc, strlen(servername), servername, 0, NULL, strlen(username), username, 0, NULL, 0, NULL, kSecAuthenticationTypeDefault, &pwdlen, (void **) &secpwd, NULL); if (rc != noErr) { DM(pc, DEBUG_ERROR, "passmgr: keychain password grab for %s at %s failed, exiting\n", username, servername); DM(pc, DEBUG_ERROR, "passmgr: (perhaps you pressed 'deny')\n"); /* this seems like the sanest thing to do, for now */ exit(EXIT_FAILURE); } if (pwdlen < *password_len) { strncpy(password, secpwd, pwdlen); password[pwdlen] = '\0'; *password_len = pwdlen; } else { DM(pc, DEBUG_ERROR, "passmgr: warning: your password appears longer (%zu) than expected (%zu)\n", strlen(secpwd), *password_len - 1); } rc = SecKeychainItemFreeContent(NULL, secpwd); return; } #endif /* apple keychain */ static void get_password_from_command(Pop3 *pc, const char *username, const char *servername, /*@out@ */ char *password, /*@out@ */ size_t *password_len) { password[*password_len - 1] = '\0'; password[0] = '\0'; /* check that the executed file is a good one. */ if (permissions_ok(pc, pc->askpass)) { char *command; char *password_ptr; int len = strlen(pc->askpass) + strlen(username) + strlen(servername) + 40; command = malloc(len); snprintf(command, len, "%s 'password for wmbiff: %s@%s'", pc->askpass, username, servername); (void) grabCommandOutput(pc, command, &password_ptr, NULL); /* it's not clear what to do with the exit status, though we can get it from grabCommandOutput if needed to deal with some programs that will print a message but exit non-zero on error */ free(command); if (password_ptr == NULL) { /* this likely means that the user cancelled, and doesn't want us to keep asking about the password. */ DM(pc, DEBUG_ERROR, "passmgr: fgets password failed, exiting\n"); DM(pc, DEBUG_ERROR, "passmgr: (it looks like you pressed 'cancel')\n"); /* this seems like the sanest thing to do, for now */ exit(EXIT_FAILURE); } strncpy(password, password_ptr, *password_len); if (password[*password_len - 1] != '\0') { DM(pc, DEBUG_ERROR, "passmgr: warning: your password appears longer (%zu) than expected (%zu)\n", strlen(password_ptr), *password_len - 1); } free(password_ptr); password[*password_len - 1] = '\0'; *password_len = strlen(password); } else { /* consider this error to be particularly troublesome */ DM(pc, DEBUG_ERROR, "passmgr: permissions check of '%s' failed.", pc->askpass); exit(EXIT_FAILURE); } } char *passwordFor(const char *username, const char *servername, Pop3 *pc, int bFlushCache) { password_binding *p; int p_allocked = 0; assert(username != NULL); assert(username[0] != '\0'); /* find the binding */ for (p = pass_list; p != NULL && (strcmp(username, p->user) != 0 || strcmp(servername, p->server) != 0); p = p->next); /* if so, return the password */ if (p != NULL) { if (p->password[0] != '\0') { if (bFlushCache == 0) { char *ret = strdup(p->password); #ifdef HAVE_MEMFROB size_t ret_len = p->password_len; DEFROB(ret); #endif return (ret); } /* else fall through, overwrite */ } else { if (pc) { /* if we've asked, but received nothing, disable this box */ pc->checkMail = NULL; } return (NULL); } } else { p = malloc(sizeof *p); p_allocked = 1; } /* else, try to get it. */ if (pc->askpass != NULL) { char *retval; p->password_len = 32; #ifdef HAVE_APPLE_KEYCHAIN if (strcmp(pc->askpass, "internal:apple:keychain") == 0) { get_password_from_keychain(pc, username, servername, p->password, &p->password_len); } else { DM(pc, DEBUG_ERROR, "you could change your askpass line to:\n" " askpass = internal:apple:keychain\n" "to use the OS X keychain instead of running a command\n"); #endif get_password_from_command(pc, username, servername, p->password, &p->password_len); #ifdef HAVE_APPLE_KEYCHAIN } #endif retval = strdup(p->password); if (strlen(username) + 1 > BUF_SMALL) { DM(pc, DEBUG_ERROR, "username is too long.\n"); memset(p->user, 0, BUF_SMALL); } else { strncpy(p->user, username, BUF_SMALL - 1); } if (strlen(servername) + 1 > BUF_BIG) { DM(pc, DEBUG_ERROR, "servername is too long.\n"); memset(p->server, 0, BUF_BIG); } else { strncpy(p->server, servername, BUF_BIG - 1); } ENFROB(p->password); p->next = pass_list; pass_list = p; return (retval); } if (p_allocked) { free(p); } return (NULL); } /* vim:set ts=4: */ /* * Local Variables: * tab-width: 4 * c-indent-level: 4 * c-basic-offset: 4 * End: */ wmbiff-0.4.36/wmbiff/charutil.h0000644000207400020740000000211413515611145013235 00000000000000/* $Id: charutil.h,v 1.12 2004/04/20 04:55:55 bluehal Exp $ */ /* Author: Mark Hurley (debian4tux@telocity.com) * * Character / string manipulation utilities. * */ #ifndef CHARUTIL #define CHARUTIL #ifdef HAVE_CONFIG_H #include #endif #ifdef HAVE_REGEX_H #include #endif void FullTrim(char *psValue); void Bin2Hex(unsigned char *src, int length, char *dst); void Encode_Base64(char *src, char *dst); void Decode_Base64(char *src, char *dst); /* helper function for the configuration line parser */ void copy_substring(char *destination, int startidx, int endidx, const char *source); /* common to Pop3 and Imap4 authentication list grabber. */ void grab_authList(const char *source, char *destination); #ifdef USE_GNU_REGEX /* handles main regex work */ int compile_and_match_regex(const char *regex, const char *str, /*@out@ */ struct re_registers *regs); #endif /* acts like perl's function of the same name */ void chomp(char *s); /* same as xstrdup, just better named ;) */ char *strdup_ordie(const char *c); void StripComment(char *buf); #endif wmbiff-0.4.36/wmbiff/wmbiffrc.50000444000207400020740000002356513646607012013154 00000000000000.\" Hey, Emacs! This is an -*- nroff -*- source file. .\" $Id: wmbiffrc.5.in,v 1.18 2004/12/12 00:01:53 bluehal Exp $ .\" .\" wmbiff/wmbiffrc.5. Generated from wmbiffrc.5.in by configure. .\" .\" wmbiff.1 and wmbiffrc.5 are copyright 1999-2002 by .\" Jordi Mallach .\" .\" This is free documentation, see the latest version of the GNU .\" General Public License for copying conditions. There is NO warranty. .TH WMBIFFRC 5 "November 11, 2002" "wmbiff" .SH NAME wmbiffrc \- configuration file for .BR wmbiff (1) .SH DESCRIPTION \fBWMbiff\fP is a mail notification tool for the WindowMaker and AfterStep window managers. It can handle up to 5 mailboxes, more when run using other window managers. You can define actions on mouse clicks for the different mailboxes. This manpage explains the different options which can be specified in a user's wmbiffrc. .SH OPTIONS Each option takes the form .IR option[.mbox] " = " value . Comments must be preceded by pound signs (#). The supported configuration options are: .TP 3 \fBcertfile\fP File that holds TLS (SSL) certificates. If specified, wmbiff will check certificates and exit on a failure, so your password is secure. If not present, wmbiff will trust all certificates and may be vulnerable to a man-in-the-middle attack. WMbiff's will not prompt if you want to accept new certificates. Instead, wmbiff expects your mail client to keep certificates in a file. For example, if mutt is your mailreader, you may add: .RS certfile=/home//.muttsslcerts .RE .TP \fBtls\fP Specify cipher suite preferences on a TLS session. Can be a predefined value from gnults or a custom value. Default value is: \fINORMAL\fP. gnutls predefined values: .sp .RS 8 \fIPERFORMANCE\fP (gnutls >= 2.2.0) .RE .RS 8 \fINORMAL\fP (gnutls >= 2.2.0) .RE .RS 8 \fISECURE128\fP (gnutls >= 2.2.0) .RE .RS 8 \fISECURE192\fP (gnutls >= 3.0.0) .RE .RS 8 \fISECURE256\fP (gnutls >= 2.2.0) .RE .RS 8 \fISUITEB128\fP (gnutls >= 3.0.0) .RE .RS 8 \fISUITEB192\fP (gnutls >= 3.0.0) .RE .RS 8 \fIEXPORT\fP (gnutls >= 2.2.0) .RE .RS 8 \fINONE\fP (gnutls >= 2.2.0) .RE .RS .TP See \fBhttp://gnutls.org/manual/gnutls.html#Priority-Strings\fR for more details. .RE .TP \fBinterval\fP Global interval between mailbox checking. Value is the number of seconds, 5 is the default. .TP \fBaskpass\fP Program run to ask for IMAP passwords, if left empty in the configuration file. The default is /usr/bin/ssh-askpass. Can be specified on a per-mailbox basis. .TP \fBskinfile\fP XPM pixmap file to load for the background. If not a full path, wmbiff will search /usr/local/share/wmbiff/skins, /usr/share/wmbiff, /usr/local/share/wmbiff, and the current directory for the pixmap file. .TP \fBglobalnotify\fP Command to be executed when new mail is received in any mailbox. Set notify.n to override this option for mailbox n. .TP \fBlabel.n\fP Specifies the displayed label for a mailbox. It can be up to five characters long. .TP \fBpath.n\fP Path to the mailbox, local or remote one. Path lines start with a prefix, which specifies the type of wmbiff box you're setting up. The following types are supported: .RS .TP .I mbox This is a local mbox mailbox. After the prefix, you only need to put the path to the mailbox wmbiff needs to read. Local mboxes may be specified using shell commands enclosed in back-ticks. (`s.) .\"This is also the default. .RS mbox:/path/to/mail/debian-devel .RE .\" let's stop making this available. .\" .RS .\" - or - .\" .RE .\" /path/to/mail/debian-devel .\" .RS .TP .I maildir This works just like \fImbox\fP above. .RS maildir:[:\fIflags\fP:]/path/to/mail/bugtraq/ .TP \fIflags\fP can one or more of: .TP .I F Flush directory caches by creating (then deleting) a temporary file in each maildir prior to checking. This hack speeds up checking network-mounted maildirs in cases where directory caching can cause unwanted delays (eg. SFS-mounted maildirs). .RE .TP .I pop3 Using this type, WMBiff will check for mail on a pop3 server using the specified username, password, host and an optional port number (defaulting to 110). If your password contains a special character, eg. '@' or ':', use the second path format. See Authentication below for a description of the auth field. .RS pop3:user:passwd@server[:port] [auth] .RE .RS pop3:user passwd server[ port] [auth] .RE .TP .I pop3s Exactly like pop3, only uses TLS (SSL) when built with gnutls and defaults to port 995. This copy of WMBiff was compiled with GNUTLS. .TP .I imap These are IMAP4 boxes. As with pop3, WMBiff will report the status of an IMAP4 mbox using the given values. This type accepts user, optional password, host and optional path to mailbox and port number. See Authentication below for a description of the auth field. The password may be left empty: see askpass above for information on password prompting. If your password includes a @, use the space delimited form. If it contains a space or #, use the askpass option instead. The mailbox field may be quoted, e.g., server/"Mail/Eggs and Spam". Mailboxes in subfolders may be described as /INBOX.subfolder by some servers and /Mail/subfolder by others. .RS imap:user:passwd@server[/mailbox][:port] [auth] .RE .RS imap:user:@server[/mailbox][:port] [auth] .RE .RS imap:user passwd server[/mailbox][ port] [auth] .RE .RS imap:user:passwd@server[/"mail box"][:port] [auth] .RE .TP .I imaps These are IMAP4 boxes wrapped in a TLS (SSL) connection. This copy of WMBiff was compiled with GNUTLS. Parameters are the same as those for ordinary IMAP4 boxes. Port defaults to 993. If 143 is specified, WMBiff will attempt to connect unencrypted but negotiate TLS using IMAP's STARTTLS command. TLS support uses GNUTLS, which is under development and may be insecure. See the imap format above for additional detail about specifying your password. .RS imaps:user:passwd@server[/mailbox][:port] [auth] .RE .RS imaps:user:@server[/mailbox][:port] [auth] .RE .RS imaps:user passwd server[/mailbox][ port] [auth] .RE .TP .I shell With this keyword, wmbiff will launch the specified shell command and read its output (STDOUT) expecting an integer message count or a three-character string. If "new" is in the first line, the string or number will be displayed in yellow. The behavior of this experimental keyword is likely to change in future revisions. .RS shell:::/path/to/command shell:::lpq | grep Queue | awk '{print $2}' .RE .RE .TP \fBnotify.n\fP Command to be executed on new mail arrival in the given mailbox. Accepts the special keyword "beep" to use the pc speaker. .TP \fBaction.n\fP Command to be executed on left mouse click on a mailbox label. Accepts the special keyword "msglst" to pop up a window of recent message headers from IMAP or POP3 mailboxes when the left mouse button is held. .TP \fBbuttontwo.n\fP Command to be executed on middle mouse click on a mailbox level. Accepts the special keyword "msglst" to pop up a window of recent message headers from IMAP or POP3 mailboxes when the middle mouse button is held. .TP \fBinterval.n\fP Per mailbox check interval. Value is the amount of seconds between checkings, default is the global interval. .TP \fBfetchinterval.n\fP Interval between mail auto-fetching. Values accept 0 to disable, \-1 for autofetching on new mail arrival, and positive values for a given interval in seconds. .TP \fBfetchcmd.n\fP Command to be executed to fetch mail. If not specified, fetching through wmbiff is disabled completely. Accepts the special keyword "msglst" to pop up a window of recent message headers from IMAP and POP3 mailboxes when the right mouse button is held down, though not when fetchinterval is nonzero. .TP \fBdebug.n\fP Show debugging messages from this mailbox. Currently supported values are "all" and "none". The \-debug option to wmbiff overrides this setting. Since IMAP uses a single connection per server, per-mailbox debugging may not .SH SIZING WMBiff will automatically size its window to the number of configured mailboxes. While WindowMaker's Dock and AfterStep's Wharf expect square, 64x64 applets, other window managers, such as Blackbox or Openbox do not have this limitation. This uncharacteristic "dockapp" behavior is intended to help those users who don't have exactly five mailboxes to watch. To preserve the old-style five-mailbox window even when you have only two, add .IR path.4= to configure a blank 5th mailbox. To use the new-style sizing, just configure as many mailboxes as you want. .SH AUTHENTICATION Authentication methods include "cram-md5", "apop" (for Pop3), and "plaintext". "cram-md5" and "apop" are only available when wmbiff is compiled with libgcrypt. This copy of WMBiff was compiled with gcrypt. Authentication methods are tried in the following order: cram-md5, apop, plaintext. Each authentication method will be tried unless a list is included in the [auth] field. For example, append "cram-md5 apop" if you don't want your password to be sent in cleartext over the network. Conversely, append "plaintext" if you don't want wmbiff to bother with other authentication methods. Leaving authentication methods unspecified should be reasonably safe. The order of entries in the [auth] list is not currently considered. .SH TROUBLESHOOTING For problems authenticating to servers, try specifying the authentication method explicitly as described above: sometimes a failed attempt to authenticate can cause later failures. Some servers claim to support cram-md5 but fail: telling wmbiff not to try can help. For other problems, run wmbiff with the \-debug option. See wmbiff(1) for details. While editing .wmbiffrc, you may find it useful to restart wmbiff using either control-shift mouse button 1, or killall \-USR1 wmbiff. .SH FILES .TP .I ~/.wmbiffrc per-user wmbiff configuration file. .SH AUTHOR This manual page was written by Jordi Mallach , originally for the Debian system (but may be used by others). .SH SEE ALSO .PD 0 .TP \fBwmbiff\fP(1) .PP \fI/usr/share/doc/wmbiff/examples/sample.wmbiffrc\fP (or equivalent on your system) wmbiff-0.4.36/wmbiff/test_wmbiff.c0000644000207400020740000002530513556541661013747 00000000000000#ifdef HAVE_CONFIG_H #include #endif #ifdef HAVE___ATTRIBUTE__ #define UNUSED(x) /*@unused@*/ x __attribute__((unused)) #else #define UNUSED(x) x #endif #ifdef HAVE_MEMFROB #define DEFROB(x) memfrob(x, x ## _len) #define ENFROB(x) memfrob(x, x ## _len) #else #define DEFROB(x) #define ENFROB(x) #endif #include #include "Client.h" #include "passwordMgr.h" #include "tlsComm.h" #include "charutil.h" void ProcessPendingEvents(void) { return; } int x_socket(void) { return (0); } int debug_default = DEBUG_INFO; int Relax = 1; /* return 1 if fail, 0 if success */ int test_backtickExpand(void) { const char *tests[] = { "prefix`echo 1`suffix", "prefix`echo 1`", "`echo 1`", "`echo a b` c", "`false`", NULL }; const char *solns[] = { "prefix1suffix", "prefix1", "1", "a b c", "", NULL }; int i; int retval = 0; for (i = 0; tests[i] != NULL; i++) { char *x = backtickExpand(NULL, tests[i]); if (strcmp(x, solns[i]) != 0) { printf("test failed: [%s] != [%s]\n", tests[i], solns[i]); retval = 1; } free(x); } printf("backtick tests complete\n"); return (retval); } #define CKSTRING(x,shouldbe) if(strcmp(x,shouldbe)) { \ printf("FAILED: expected '" #shouldbe "' but got '%s'\n", x); \ return 1; } else { printf("good: '" shouldbe "' == '%s'\n", x); } /* return 1 if fail, 0 if success */ int test_passwordMgr(void) { const char *b; Pop3 m; strcpy(m.label, "x"); /* sh is almost certainly conforming; owned by root, etc. */ if (!permissions_ok(NULL, "/bin/sh")) { printf("FAILURE: permission checker failed on /bin/sh."); return (1); } /* tmp is definitely bad; and better be og+w */ if (permissions_ok(NULL, "/tmp")) { printf("FAILURE: permission checker failed on /tmp."); return (1); } /* TODO: also find some user-owned binary that shouldn't be g+w */ printf("SUCCESS: permission checker sanity check went well.\n"); /* *** */ m.askpass = "echo xlnt; #"; b = passwordFor("bill", "ted", &m, 0); if (strcmp(b, "xlnt") != 0) { printf("FAILURE: expected 'xlnt' got '%s'\n", b); return (1); } printf("SUCCESS: expected 'xlnt' got '%s'\n", b); /* *** */ m.askpass = "should be cached"; b = passwordFor("bill", "ted", &m, 0); if (strcmp(b, "xlnt") != 0) { printf("FAILURE: expected 'xlnt' got '%s'\n", b); return (1); } printf("SUCCESS: cached 'xlnt' correctly\n"); /* *** */ m.askpass = "echo abcdefghi1abcdefghi2abcdefghi3a; #"; b = passwordFor("abbot", "costello", &m, 0); if (strcmp(b, "abcdefghi1abcdefghi2abcdefghi3a") != 0) { printf ("FAILURE: expected 'abcdefghi1abcdefghi2abcdefghi3a' got '%s'\n", b); return (1); } printf ("SUCCESS: expected 'abcdefghi1abcdefghi2abcdefghi3a' got '%s'\n", b); /* try overflowing the buffer */ m.askpass = "echo abcdefghi1abcdefghi2abcdefghi3ab; #"; b = passwordFor("laverne", "shirley", &m, 0); /* should come back truncated to fill the buffer */ if (strcmp(b, "abcdefghi1abcdefghi2abcdefghi3a") != 0) { printf ("FAILURE: expected 'abcdefghi1abcdefghi2abcdefghi3a' got '%s'\n", b); return (1); } printf ("SUCCESS: expected 'abcdefghi1abcdefghi2abcdefghi3a' got '%s'\n", b); /* make sure we still have the old one */ b = passwordFor("bill", "ted", &m, 0); if (strcmp(b, "xlnt") != 0) { printf("FAILURE: expected 'xlnt' got '%s'\n", b); return (1); } printf("SUCCESS: expected 'xlnt' got '%s'\n", b); /* what it's like if ssh-askpass is cancelled - should drop the mailbox */ #if 0 /* will exit on our behalf; not so good for continued testing. */ m.askpass = "echo -n ; #"; b = passwordFor("abort", "me", &m, 0); if (strcmp(b, "") != 0) { printf("FAILURE: expected '' got '%s'\n", b); return (1); } printf("SUCCESS: expected '' got '%s'\n", b); #endif /* what it's like if ssh-askpass is ok'd with an empty password. */ m.askpass = "echo ; #"; b = passwordFor("try", "again", &m, 0); if (b == NULL || strcmp(b, "") != 0) { printf("FAILURE: expected '' got '%s'\n", b ? b : "(null)"); return (1); } printf("SUCCESS: expected '' got '%s'\n", b); m.askpass = "echo \"rt*m\"; #"; b = passwordFor("faq", "faq", &m, 0); if (strcmp(b, "rt*m") != 0) { printf("FAILURE: expected '' got '%s'\n", b); return (1); } printf("SUCCESS: expected 'rt*m' got '%s'\n", b); return (0); } #define CKINT(x,shouldbe) if(x != shouldbe) { \ printf("Failed: expected '" #shouldbe "' but got '%d'\n", x); \ return 1; } int test_imap4creator(void) { Pop3 m; if (imap4Create(&m, "imap:foo:@bar/mybox")) { return 1; } CKSTRING(m.path, "mybox"); CKSTRING(m.u.pop_imap.serverName, "bar"); CKINT(m.u.pop_imap.serverPort, 143); if (imap4Create(&m, "imap:foo:@bar/\"mybox\"")) { return 1; } CKSTRING(m.path, "\"mybox\""); CKSTRING(m.u.pop_imap.serverName, "bar"); CKINT(m.u.pop_imap.serverPort, 143); if (imap4Create(&m, "imap:foo:@192.168.1.1/\"mybox\"")) { printf ("FAILED: to create IMAP box with IP address for servername\n"); return 1; } CKSTRING(m.path, "\"mybox\""); CKSTRING(m.u.pop_imap.serverName, "192.168.1.1"); CKINT(m.u.pop_imap.serverPort, 143); if (imap4Create(&m, "imap:foo:@bar/\"space box\"")) { return 1; } CKSTRING(m.path, "\"space box\""); CKSTRING(m.u.pop_imap.serverName, "bar"); CKINT(m.u.pop_imap.serverPort, 143); if (imap4Create(&m, "imap:user pass bar/\"space box\"")) { return 1; } CKSTRING(m.path, "\"space box\""); CKSTRING(m.u.pop_imap.serverName, "bar"); CKINT(m.u.pop_imap.serverPort, 143); if (imap4Create(&m, "imap:star *as* star/\"space box\"")) { return 1; } printf("mmm %s", (m.u.pop_imap.password)); DEFROB(m.u.pop_imap.password); CKSTRING(m.u.pop_imap.password, "*as*"); CKINT(m.u.pop_imap.serverPort, 143); if (imap4Create(&m, "imap:user:*as*@bar/blah")) { return 1; } DEFROB(m.u.pop_imap.password); CKSTRING(m.u.pop_imap.password, "*as*"); CKINT(m.u.pop_imap.serverPort, 143); if (imap4Create(&m, "imap:user pass bar/\"space box\" 12")) { return 1; } CKSTRING(m.path, "\"space box\""); CKSTRING(m.u.pop_imap.serverName, "bar"); CKINT(m.u.pop_imap.serverPort, 12); if (imap4Create(&m, "imap:foo:@bar/\"mybox\":12")) { return 1; } CKSTRING(m.path, "\"mybox\""); CKSTRING(m.u.pop_imap.serverName, "bar"); CKINT(m.u.pop_imap.serverPort, 12); if (imap4Create(&m, "imap:foo:@bar/\"mybox\":12 auth")) { return 1; } CKSTRING(m.path, "\"mybox\""); CKSTRING(m.u.pop_imap.serverName, "bar"); CKINT(m.u.pop_imap.serverPort, 12); CKSTRING(m.u.pop_imap.authList, "auth"); if (imap4Create(&m, "imap:foo:@bar/\"mybox\":12 cram-md5 plaintext")) { return 1; } CKSTRING(m.u.pop_imap.authList, "cram-md5 plaintext"); if (imap4Create(&m, "imap:foo:@bar/\"mybox\":12 CRAm-md5 plainTEXt")) { return 1; } CKSTRING(m.u.pop_imap.authList, "cram-md5 plaintext"); /* doesn't really matter, as the # is gobbled by the parser as a comment. */ if (imap4Create (&m, "imap:harry:has#pass@bar/\"mybox\":12 CRAm-md5 plainTEXt")) { return 1; } CKSTRING(m.u.pop_imap.userName, "harry"); DEFROB(m.u.pop_imap.password); CKSTRING(m.u.pop_imap.password, "has#pass"); if (pop3Create(&m, "pop3:foo:@bar:12 cram-md5 plaintext")) { return 1; } CKSTRING(m.u.pop_imap.authList, "cram-md5 plaintext"); /* should not parse this; it is ambiguous. */ if (!imap4Create(&m, "imap:foo:mi@ta@bar/mybox") && !Relax) { return 1; } /* should not parse this; it is ambiguous. */ if (!imap4Create(&m, "imap:user pa ss bar/\"space box\" 12") && !Relax) { return 1; } /* should not parse this; it is ambiguous. */ if (!pop3Create(&m, "pop3:user pa ss bar 12") && !Relax) { return 1; } return 0; } int test_getline_from_buffer(void) { #define LINE_BUF_LEN 256 char linebuf[LINE_BUF_LEN]; char scratchbuf[LINE_BUF_LEN]; /* try to ensure that even an endless loop terminates */ alarm(100); strcpy(scratchbuf, "\r\n"); getline_from_buffer(scratchbuf, linebuf, LINE_BUF_LEN); if (strlen(scratchbuf) != 0) { printf("FAILURE: scratchbuf not snarfed\n"); return (1); } if (strlen(linebuf) != 2) { printf("FAILURE: linebuf not populated\n"); return (1); } strcpy(scratchbuf, "\n"); getline_from_buffer(scratchbuf, linebuf, LINE_BUF_LEN); if (strlen(scratchbuf) != 0) { printf("FAILURE: scratchbuf not snarfed\n"); return (1); } if (strlen(linebuf) != 1) { printf("FAILURE: linebuf not populated\n"); return (1); } alarm(0); return (0); } int test_charutil(void) { char *v = strdup("abc#def"); StripComment(v); if (strcmp(v, "abc#def") != 0) { printf("FAILURE: comment stripper stripped when it shouldn't\n"); return 1; } v = strdup("abc #def"); StripComment(v); if (strcmp(v, "abc ") != 0) { printf("FAILURE: comment stripper should've stripped\n"); return 1; } return 0; } #include #include #include int test_sock_connect(void) { struct sockaddr_in addr = { .sin_family = AF_INET }; struct sockaddr *addrp = (struct sockaddr *) &addr; socklen_t addrlen = sizeof addr; int s; s = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); if (s < 0) { perror("socket"); return 1; } if (bind(s, addrp, addrlen) < 0) { perror("bind"); return 1; } getsockname(s, addrp, &addrlen); if (listen(s, 5) < 0) { perror("listen"); return 1; } if (sock_connect("127.0.0.1", ntohs(addr.sin_port)) < 0) { return 1; } if (sock_connect("localhost", ntohs(addr.sin_port)) < 0) { return 1; } return 0; } int print_info(UNUSED(void *state)) { return (0); } const char *certificate_filename = NULL; const char *tls = "NORMAL"; int SkipCertificateCheck = 0; int exists(UNUSED(const char *filename)) { return (0); } // void initialize_blacklist(void) { } // void tlscomm_printf(UNUSED(int x), UNUSED(const char *f), ...) { } // void tlscomm_expect(void) { } // void tlscomm_close() { } // int tlscomm_is_blacklisted(UNUSED(const char *x)) { return 1; } // void initialize_gnutls(void) { } // int sock_connect(UNUSED(const char *n), UNUSED(int p)) { return 1; } /* stdout */ // void initialize_unencrypted(void) { } int main(UNUSED(int argc), UNUSED(char *argv[])) { if (test_backtickExpand() || test_passwordMgr()) { printf("SOME TESTS FAILED!\n"); exit(EXIT_FAILURE); } Relax = 0; if (test_imap4creator()) { printf("SOME TESTS FAILED!\n"); exit(EXIT_FAILURE); } if (test_sock_connect()) { printf("SOME TESTS FAILED!\n"); exit(EXIT_FAILURE); } Relax = 1; if (test_imap4creator()) { printf("SOME TESTS FAILED!\n"); exit(EXIT_FAILURE); } if (test_getline_from_buffer()) { printf("SOME TESTS FAILED!\n"); exit(EXIT_FAILURE); } if (test_charutil()) { printf("SOME TESTS FAILED!\n"); exit(EXIT_FAILURE); } if (test_sock_connect()) { printf("SOME TESTS FAILED!\n"); exit(EXIT_FAILURE); } printf("Success! on all tests.\n"); exit(EXIT_SUCCESS); } /* vim:set ts=4: */ /* * Local Variables: * tab-width: 4 * c-indent-level: 4 * c-basic-offset: 4 * End: */ wmbiff-0.4.36/wmbiff/regulo.c0000644000207400020740000000573113556541661012734 00000000000000#ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include "regulo.h" #include "charutil.h" #define min(a,b) ((a)<(b) ? (a) : (b)) /* callbacks specified by the calling function to extract substrings to values. */ void regulo_atoi(void *dest, const char *source) { int *dest_int = dest; /* skip any leading non-digit */ while (*source != '\0' && !isdigit(*source)) source++; *dest_int = atoi(source); } void regulo_strcpy(void *dest, const char *source) { strcpy((char *) dest, source); } void regulo_strcpy_tolower(void *dest, const char *source) { char *dest_str = dest; size_t i; for (i = 0; i < strlen(source); i++) { dest_str[i] = tolower(source[i]); } dest_str[i] = '\0'; } void regulo_strcpy_skip1(void *dest, const char *source) { strcpy(dest, source + 1); } #ifdef USE_GNU_REGEX /* deprecated as unportable */ int regulo_match(const char *regex, const char *string, struct regulo *instructions) { struct re_registers regs; int ret; int matchedchars; int i; memset(®s, 0, sizeof(struct re_registers)); matchedchars = compile_and_match_regex(regex, string, ®s); if (matchedchars <= 0) return 0; if (instructions == NULL) return 1; for (i = 0; instructions[i].match_handler != NULL; i++) { char buf[255]; int j = instructions[i].match_index; int len = min(254, regs.end[j] - regs.start[j]); if (regs.start[j] >= 0) { strncpy(buf, string + regs.start[j], len); buf[len] = '\0'; instructions[i].match_handler(instructions[i].destination, buf); } } ret = regs.end[0]; free(regs.end); // added 3 jul 02, appeasing valgrind free(regs.start); // added 3 jul 02, appeasing valgrind return ret; } #else /* favored */ int compile_and_match_regex_posix(const char *regex, const char *str, /*@out@ */ regmatch_t * regs, size_t regs_len) { regex_t reg; int errcode; if ((errcode = regcomp(®, regex, REG_EXTENDED)) != 0) { char errbuf[256]; regerror(errcode, ®, errbuf, 256); fprintf(stderr, "error in compiling regular expression: %s\n", errbuf); return -1; } errcode = regexec(®, str, regs_len, regs, 0); regfree(®); if (errcode == 0) return 1; else return 0; } int regulo_match(const char *regex, const char *string, struct regulo *instructions) { regmatch_t regs[20]; int ret; int matchedchars; int i; matchedchars = compile_and_match_regex_posix(regex, string, regs, 20); if (matchedchars <= 0) return 0; if (instructions == NULL) return 1; for (i = 0; instructions[i].match_handler != NULL; i++) { char buf[255]; int j = instructions[i].match_index; int len = min(254, regs[j].rm_eo - regs[j].rm_so); if (regs[j].rm_so >= 0) { strncpy(buf, string + regs[j].rm_so, len); buf[len] = '\0'; instructions[i].match_handler(instructions[i].destination, buf); } } ret = regs[0].rm_eo; return ret; } #endif wmbiff-0.4.36/wmbiff/MessageList.h0000644000207400020740000000036313515611242013644 00000000000000 #define SUBJ_LEN 50 #define FROM_LEN 22 struct msglst { struct msglst *next; char subj[SUBJ_LEN]; char from[FROM_LEN]; unsigned int in_use:1; }; void msglst_show(Pop3 *pc, int x, int y); void msglst_hide(void); void msglst_redraw(void); wmbiff-0.4.36/wmbiff/socket.c0000644000207400020740000001207513556541661012726 00000000000000/* $Id: socket.c,v 1.14 2004/10/01 21:05:36 bluehal Exp $ */ /* Copyright (C) 1998 Trent Piepho * (C) 1999 Trent Piepho * * 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; version 2 of the License. * * This program is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include "regulo.h" #ifdef USE_DMALLOC #include #endif /* be paranoid about leaking passwords as hostnames, enough that we'll avoid attempting lookups on things that aren't host names */ extern int Relax; static int sanity_check_hostname(const char *hostname) { struct in_addr dummy; return (Relax || regulo_match("^[A-Za-z][-_A-Za-z0-9.]+$", hostname, NULL) || inet_aton(hostname, &dummy)); } static int ipv4_sock_connect(struct in_addr *address, uint16_t port) { struct sockaddr_in addr = { .sin_family = AF_INET, .sin_addr = *address, .sin_port = htons(port) }; struct sockaddr *addrp = (struct sockaddr *) &addr; socklen_t addrlen = sizeof addr; int fd, i; fd = socket(PF_INET, SOCK_STREAM, IPPROTO_TCP); if (fd == -1) { perror("Error opening socket"); printf("socket() failed.\n"); return (-1); }; if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) perror("fcntl(FD_CLOEXEC)"); i = connect(fd, addrp, addrlen); if (i == -1) { int saved_errno = errno; perror("Error connecting"); printf("connect(%s:%d) failed: %s\n", inet_ntoa(addr.sin_addr), port, strerror(saved_errno)); close(fd); return (-1); }; return (fd); } /* nspring/blueHal, 10 Apr 2002; added some extra error printing, in line with the debug-messages-to-stdout philosophy of the rest of the wmbiff code */ /* 1 June 2002; incorporated IPv6 support by Jun-ichiro itojun Hagino , thanks! */ int sock_connect(const char *hostname, uint16_t port) { #ifdef HAVE_GETADDRINFO struct addrinfo hints, *res, *res0; struct sockaddr_in addr; int fd; char pbuf[NI_MAXSERV]; int error; if (!sanity_check_hostname(hostname)) { printf ("socket/connect to '%s' aborted: it does not appear to be a valid hostname\n", hostname); printf("if you really want this, use wmbiff's -relax option.\n"); return -1; } /* we were given an IP address, no need to try getaddrinfo on it */ if (inet_aton(hostname, &addr.sin_addr)) { return ipv4_sock_connect(&addr.sin_addr, port); } memset(&hints, 0, sizeof(hints)); hints.ai_socktype = SOCK_STREAM; snprintf(pbuf, sizeof(pbuf), "%d", port); error = getaddrinfo(hostname, pbuf, &hints, &res0); if (error) { static int last_error; if (last_error != error) { /* only report a problem if it's new. this is an approximation that minimizes kept state. */ printf("%s: %s\n", hostname, gai_strerror(error)); last_error = error; } return -1; } fd = -1; for (res = res0; res; res = res->ai_next) { fd = socket(res->ai_family, res->ai_socktype, res->ai_protocol); if (fd < 0) continue; if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1) perror("fcntl(FD_CLOEXEC)"); if (connect(fd, res->ai_addr, res->ai_addrlen) < 0) { close(fd); fd = -1; continue; } break; } freeaddrinfo(res0); if (fd < 0) { static int last_connecterr; if (errno != last_connecterr) { /* only report a problem if it's new. EHOSTUNREACH is common when the net is down, for example; again, this is an approximation to minimize kept state. */ last_connecterr = errno; fprintf(stderr, "Error connecting to %s:%d: %s\n", hostname, port, strerror(errno)); printf("socket/connect to %s failed: %s (%d)\n", hostname, strerror(errno), errno); } return -1; } return fd; #else #warning "This build will not support IPv6" struct hostent *host; if (!sanity_check_hostname(hostname)) { printf ("socket/connect to '%s' aborted: it does not appear to be a valid hostname\n", hostname); printf("if you really want this, use wmbiff's -relax option.\n"); return -1; } host = gethostbyname(hostname); if (host == NULL) { herror("gethostbyname"); printf("gethostbyname(%s) failed.\n", hostname); return (-1); }; return ipv4_sock_connect(host->h_addr_list[0], port); #endif } /* vim:set ts=4: */ /* * Local Variables: * tab-width: 4 * c-indent-level: 4 * c-basic-offset: 4 * End: */ wmbiff-0.4.36/wmbiff/Imap4Client.c0000644000207400020740000005216513556541661013553 00000000000000/* rewrite of the IMAP code by Neil Spring * (nspring@cs.washington.edu) to support gnutls and * persistent connections to servers. */ /* Originally written by Yong-iL Joh (tolkien@mizi.com), * modified by Jorge Garcia (Jorge.Garcia@uv.es), and * modified by Jay Francis (jtf@u880.org) to support * CRAM-MD5 */ #ifdef HAVE_CONFIG_H #include #endif #include "Client.h" #include "charutil.h" #include "tlsComm.h" #include "passwordMgr.h" #include "regulo.h" #include "MessageList.h" #include #include #include #include #include #include #include #include #ifdef USE_DMALLOC #include #endif #define PCU (pc->u).pop_imap extern int Relax; #define IMAP_DM(pc, lvl, args...) DM(pc, lvl, "imap4: " args) #ifdef HAVE_MEMFROB #define DEFROB(x) memfrob(x, x ## _len) #define ENFROB(x) memfrob(x, x ## _len) #else #define DEFROB(x) #define ENFROB(x) #endif /* this array maps server:port pairs to file descriptors, so that when more than one mailbox is queried from a server, we only use one socket. It's limited in size by the number of different mailboxes displayed. */ #define FDMAP_SIZE 5 static struct fdmap_struct { char *user_server_port; /* tuple, in string form */ /*@owned@ */ struct connection_state *cs; } fdmap[FDMAP_SIZE]; static void ask_user_for_password( /*@notnull@ */ Pop3 *pc, int bFlushCache); /* authentication callbacks */ #ifdef HAVE_GCRYPT_H static int authenticate_md5( /*@notnull@ */ Pop3 *pc, struct connection_state *scs, const char *capabilities); #endif static int authenticate_plaintext( /*@notnull@ */ Pop3 *pc, struct connection_state *scs, const char *capabilities); /* the auth_methods array maps authentication identifiers to the callback that will attempt to authenticate */ static struct imap_authentication_method { const char *name; /* callback returns 1 if successful, 0 if failed */ int (*auth_callback) ( /*@notnull@ */ Pop3 *pc, struct connection_state * scs, const char *capabilities); } auth_methods[] = { { #ifdef HAVE_GCRYPT_H "cram-md5", authenticate_md5}, { #endif "plaintext", authenticate_plaintext}, { NULL, NULL} }; /* recover a socket from the connection cache */ /*@null@*/ /*@dependent@*/ static struct connection_state *state_for_pcu(Pop3 *pc) { char *connection_id; struct connection_state *retval = NULL; int i; connection_id = malloc(strlen(PCU.userName) + strlen(PCU.serverName) + 22); sprintf(connection_id, "%s|%s|%d", PCU.userName, PCU.serverName, PCU.serverPort); for (i = 0; i < FDMAP_SIZE; i++) if (fdmap[i].user_server_port != NULL && (strcmp(connection_id, fdmap[i].user_server_port) == 0)) { retval = fdmap[i].cs; } free(connection_id); return (retval); } /* bind to the connection cache */ static void bind_state_to_pcu(Pop3 *pc, /*@owned@ */ struct connection_state *scs) { char *connection_id; int i; if (scs == NULL) { abort(); } connection_id = malloc(strlen(PCU.userName) + strlen(PCU.serverName) + 22); sprintf(connection_id, "%s|%s|%d", PCU.userName, PCU.serverName, PCU.serverPort); for (i = 0; i < FDMAP_SIZE && fdmap[i].cs != NULL; i++); if (i == FDMAP_SIZE) { /* should never happen */ IMAP_DM(pc, DEBUG_ERROR, "Tried to open too many IMAP connections. Sorry!\n"); exit(EXIT_FAILURE); } fdmap[i].user_server_port = connection_id; fdmap[i].cs = scs; } /* remove from the connection cache */ static /*@owned@*/ /*@null@*/ struct connection_state *unbind( /*@returned@*/ struct connection_state *scs) { int i; struct connection_state *retval = NULL; assert(scs != NULL); for (i = 0; i < FDMAP_SIZE && fdmap[i].cs != scs; i++); if (i < FDMAP_SIZE) { free(fdmap[i].user_server_port); fdmap[i].user_server_port = NULL; retval = fdmap[i].cs; fdmap[i].cs = NULL; } return (retval); } /* creates a connection to the server, if a matching one doesn't exist. */ /* *always* returns null, just declared this wasy to match other protocols. */ /*@null@*/ FILE *imap_open(Pop3 *pc) { static int complained_already; /* we have to succeed once before complaining again about failure */ struct connection_state *scs; struct imap_authentication_method *a; char *connection_name; int sd; char capabilities[BUF_SIZE]; char buf[BUF_SIZE]; if (state_for_pcu(pc) != NULL) { /* don't need to open. */ return NULL; } /* got this far; we're going to create a connection_state structure, although it might be a blacklist entry */ connection_name = malloc(strlen(PCU.serverName) + 20); sprintf(connection_name, "%s:%d", PCU.serverName, PCU.serverPort); assert(pc != NULL); /* no cached connection */ sd = sock_connect((const char *) PCU.serverName, PCU.serverPort); if (sd == -1) { if (complained_already == 0) { IMAP_DM(pc, DEBUG_ERROR, "Couldn't connect to %s:%d: %s\n", PCU.serverName, PCU.serverPort, errno ? strerror(errno) : ""); complained_already = 1; } if (errno == ETIMEDOUT) { /* temporarily bump the interval, in a crude way: fast forward time so that the mailbox isn't checked for a while. */ pc->prevtime = time(0) + 60 * 5; /* now + 60 seconds per min * 5 minutes */ /* TCP's retry (how much time has elapsed while the connect times out) is around 3 minutes; here we just try to allow checking local mailboxes more often while remote things are unavailable or disconnected. */ } free(connection_name); return NULL; } /* build the connection using STARTTLS */ if (PCU.dossl != 0 && (PCU.serverPort == 143)) { /* setup an unencrypted binding long enough to invoke STARTTLS */ scs = initialize_unencrypted(sd, connection_name, pc); /* can we? */ tlscomm_printf(scs, "a000 CAPABILITY\r\n"); if (tlscomm_expect(scs, "* CAPABILITY", capabilities, BUF_SIZE) == 0) goto communication_failure; if (!strstr(capabilities, "STARTTLS")) { IMAP_DM(pc, DEBUG_ERROR, "server doesn't support ssl imap on port 143."); goto communication_failure; } /* we sure can! */ IMAP_DM(pc, DEBUG_INFO, "Negotiating TLS within IMAP"); tlscomm_printf(scs, "a001 STARTTLS\r\n"); if (tlscomm_expect(scs, "a001 ", buf, BUF_SIZE) == 0) goto communication_failure; if (strstr(buf, "a001 OK") == 0) { /* we didn't see the success message in the response */ IMAP_DM(pc, DEBUG_ERROR, "couldn't negotiate tls. :(\n"); goto communication_failure; } /* we don't need the unencrypted state anymore */ /* note that communication_failure will close the socket and free via tls_close() */ free(scs); /* fall through will scs = initialize_gnutls(sd); */ } /* either we've negotiated ssl from starttls, or we're starting an encrypted connection now */ if (PCU.dossl != 0) { scs = initialize_gnutls(sd, connection_name, pc, PCU.serverName); if (scs == NULL) { IMAP_DM(pc, DEBUG_ERROR, "Failed to initialize TLS\n"); return NULL; } } else { scs = initialize_unencrypted(sd, connection_name, pc); } /* authenticate; first find out how */ /* note that capabilities may have changed since last time we may have asked, if we called STARTTLS, my server will allow plain password login within an encrypted session. */ tlscomm_printf(scs, "a000 CAPABILITY\r\n"); if (tlscomm_expect(scs, "* CAPABILITY", capabilities, BUF_SIZE) == 0) { IMAP_DM(pc, DEBUG_ERROR, "unable to query capability string\n"); goto communication_failure; } /* try each authentication method in turn. */ for (a = auth_methods; a->name != NULL; a++) { /* was it specified or did the user leave it up to us? */ if (PCU.authList[0] == '\0' || strstr(PCU.authList, a->name) != NULL) /* try the authentication method */ if ((a->auth_callback(pc, scs, capabilities)) != 0) { /* store this well setup connection in the cache */ bind_state_to_pcu(pc, scs); complained_already = 0; return NULL; } } /* if authentication worked, we won't get here */ IMAP_DM(pc, DEBUG_ERROR, "All authentication methods failed for '%s@%s:%d'\n", PCU.userName, PCU.serverName, PCU.serverPort); communication_failure: tlscomm_printf(scs, "a002 LOGOUT\r\n"); tlscomm_close(scs); return NULL; } void imap_cacheHeaders( /*@notnull@ */ Pop3 *pc); int imap_checkmail( /*@notnull@ */ Pop3 *pc) { /* recover connection state from the cache */ struct connection_state *scs = state_for_pcu(pc); char buf[BUF_SIZE]; char examine_expect[BUF_SIZE]; static int command_id; /* if it's not in the cache, try to open */ if (scs == NULL) { IMAP_DM(pc, DEBUG_INFO, "Need new connection to %s@%s\n", PCU.userName, PCU.serverName); (void) imap_open(pc); scs = state_for_pcu(pc); } if (scs == NULL) { return -1; } if (tlscomm_is_blacklisted(scs) != 0) { /* unresponsive server, don't bother. */ return -1; } command_id++; tlscomm_printf(scs, "a%03d EXAMINE %s\r\n", command_id, pc->path); snprintf(examine_expect, BUF_SIZE, "a%03d OK", command_id); if (tlscomm_expect(scs, examine_expect, buf, 127) == 0) { tlscomm_close(unbind(scs)); return -1; } command_id++; tlscomm_printf(scs, "a%03d CLOSE\r\n", command_id); snprintf(examine_expect, BUF_SIZE, "a%03d OK", command_id); if (tlscomm_expect(scs, examine_expect, buf, 127) == 0) { tlscomm_close(unbind(scs)); return -1; } /* if we've got it by now, try the status query */ command_id++; tlscomm_printf(scs, "a%03d STATUS %s (MESSAGES UNSEEN)\r\n", command_id % 1000, pc->path); if (tlscomm_expect(scs, "* STATUS", buf, 127) != 0) { /* a valid response? */ // doesn't support spaces: (void) sscanf(buf, "* STATUS %*s (MESSAGES %d UNSEEN %d)", const char *msg; msg = strstr(buf, "(MESSAGES"); if (msg != NULL) (void) sscanf(msg, "(MESSAGES %d UNSEEN %d)", &(pc->TotalMsgs), &(pc->UnreadMsgs)); /* update the cached headers if evidence that change has occurred; not necessarily complete. */ if (pc->UnreadMsgs != pc->OldUnreadMsgs || pc->TotalMsgs != pc->OldMsgs) { if (PCU.wantCacheHeaders) { imap_cacheHeaders(pc); } } } else { /* something went wrong. bail. */ tlscomm_close(unbind(scs)); return -1; } return 0; } void imap_releaseHeaders(Pop3 *pc __attribute__((unused)), struct msglst *h) { assert(h != NULL); /* allow the list to be released next time around */ if (h->in_use <= 0) { /* free the old one */ while (h != NULL) { struct msglst *n = h->next; free(h); h = n; } } else { h->in_use--; } } void imap_cacheHeaders( /*@notnull@ */ Pop3 *pc) { struct connection_state *scs = state_for_pcu(pc); char *msgid; char buf[BUF_SIZE]; if (scs == NULL) { (void) imap_open(pc); scs = state_for_pcu(pc); } if (scs == NULL) { return; } if (tlscomm_is_blacklisted(scs) != 0) { return; } if (pc->headerCache != NULL) { /* decrement the reference count, and free our version */ imap_releaseHeaders(pc, pc->headerCache); pc->headerCache = NULL; } IMAP_DM(pc, DEBUG_INFO, "working headers\n"); tlscomm_printf(scs, "a004 EXAMINE %s\r\n", pc->path); if (tlscomm_expect(scs, "a004 OK", buf, 127) == 0) { tlscomm_close(unbind(scs)); return; } IMAP_DM(pc, DEBUG_INFO, "examine ok\n"); /* if we've got it by now, try the status query */ tlscomm_printf(scs, "a005 SEARCH UNSEEN\r\n"); if (tlscomm_expect(scs, "* SEARCH", buf, 127) == 0) { tlscomm_close(unbind(scs)); return; } IMAP_DM(pc, DEBUG_INFO, "search: %s", buf); if (strlen(buf) < 9) return; /* search turned up nothing */ msgid = strtok(buf + 9, " \r\n"); pc->headerCache = NULL; /* the isdigit cruft is to deal with EOL */ if (msgid != NULL && isdigit(msgid[0])) do { struct msglst *m = malloc(sizeof(struct msglst)); char hdrbuf[128]; int fetch_command_done = FALSE; tlscomm_printf(scs, "a04 FETCH %s (FLAGS " "BODY[HEADER.FIELDS (FROM SUBJECT)])\r\n", msgid); if (tlscomm_expect(scs, "* ", hdrbuf, 127)) { m->subj[0] = '\0'; m->from[0] = '\0'; while (m->subj[0] == '\0' || m->from[0] == '\0') { if (tlscomm_expect(scs, "", hdrbuf, 127)) { if (strncasecmp(hdrbuf, "Subject:", 8) == 0) { strncpy(m->subj, hdrbuf + 9, SUBJ_LEN - 1); m->subj[SUBJ_LEN - 1] = '\0'; } else if (strncasecmp(hdrbuf, "From: ", 5) == 0) { strncpy(m->from, hdrbuf + 6, FROM_LEN - 1); m->from[FROM_LEN - 1] = '\0'; } else if (strncasecmp (hdrbuf, "a04 OK FETCH", 5) == 0) { /* server says we're done getting this header, which may occur if the message has no subject */ if (m->from[0] == '\0') { strcpy(m->from, " "); } if (m->subj[0] == '\0') { strcpy(m->subj, "(no subject)"); } fetch_command_done = TRUE; } } else { IMAP_DM(pc, DEBUG_ERROR, "timedout looking for headers.: %s", hdrbuf); strcpy(m->from, "wmbiff"); strcpy(m->subj, "failure"); } } IMAP_DM(pc, DEBUG_INFO, "From: '%s' Subj: '%s'\n", m->from, m->subj); m->next = pc->headerCache; pc->headerCache = m; pc->headerCache->in_use = 0; /* initialize that it isn't locked */ } else { free(m); IMAP_DM(pc, DEBUG_ERROR, "error fetching: %s", hdrbuf); } if (!fetch_command_done) { tlscomm_expect(scs, "a04 OK", hdrbuf, 127); } } while ((msgid = strtok(NULL, " \r\n")) != NULL && isdigit(msgid[0])); tlscomm_printf(scs, "a06 CLOSE\r\n"); /* return to polling state */ /* may be unneeded tlscomm_expect(scs, "a06 OK CLOSE\r\n" ); see if it worked? */ IMAP_DM(pc, DEBUG_INFO, "worked headers\n"); } /* a client is asking for the headers, hand em a reference, increase the one-bit reference counter */ struct msglst *imap_getHeaders( /*@notnull@ */ Pop3 *pc) { if (pc->headerCache == NULL) imap_cacheHeaders(pc); if (pc->headerCache != NULL) pc->headerCache->in_use = 1; return pc->headerCache; } /* parse the config line to setup the Pop3 structure */ int imap4Create( /*@notnull@ */ Pop3 *pc, const char *const str) { int i; int matchedchars; /* special characters aren't allowed in hostnames, rfc 1034 */ const char *regexes[] = { // type : username : password @ hostname (/ name)?(:port)? ".*imaps?:([^: ]{1,256}):([^@]{0,32})@([A-Za-z1-9][-A-Za-z0-9_.]+)(/(\"[^\"]+\")|([^:@ ]+))?(:[0-9]+)?( *([CcAaPp][-A-Za-z5 ]*))?$", ".*imaps?:([^: ]{1,256}) ([^ ]{1,32}) ([A-Za-z1-9][-A-Za-z0-9_.]+)(/(\"[^\"]+\")|([^: ]+))?( [0-9]+)?( *([CcAaPp][-A-Za-z5 ]*))?$", NULL }; char *unaliased_str; /* * regulo_atoi expects a pointer-to-int and pop_imap.serverPort is a * uint16_t, so &pop_imap.serverPort is not compatible and we need to use an * int temporary variable to avoid endianness problems. */ int serverPort; struct regulo regulos[] = { {1, PCU.userName, regulo_strcpy}, {2, PCU.password, regulo_strcpy}, {3, PCU.serverName, regulo_strcpy}, {4, pc->path, regulo_strcpy_skip1}, {7, &serverPort, regulo_atoi}, {9, PCU.authList, regulo_strcpy_tolower}, {0, NULL, NULL} }; if (Relax) { regexes[0] = ".*imaps?:([^: ]{1,256}):([^@]{0,32})@([^/: ]+)(/(\"[^\"]+\")|([^:@ ]+))?(:[0-9]+)?( *(.*))?$"; regexes[1] = ".*imaps?:([^: ]{1,256}) ([^ ]{1,32}) ([^/: ]+)(/(\"[^\"]+\")|([^: ]+))?( [0-9]+)?( *(.*))?$"; } /* IMAP4 format: imap:user:password@server/mailbox[:port] */ /* If 'str' line is badly formatted, wmbiff won't display the mailbox. */ if (strncmp("sslimap:", str, 8) == 0 || strncmp("imaps:", str, 6) == 0) { #ifdef HAVE_GNUTLS_GNUTLS_H PCU.dossl = 1; #else printf("This copy of wmbiff was not compiled with gnutls;\n" "imaps is unavailable. Exiting to protect your\n" "passwords and privacy.\n"); exit(EXIT_FAILURE); #endif } else { PCU.dossl = 0; } /* defaults */ serverPort = (PCU.dossl != 0) ? 993 : 143; PCU.authList[0] = '\0'; /* argh, str and pc->path are aliases, so we can't just write the default value into the string we're about to parse. */ unaliased_str = strdup(str); strcpy(pc->path, "INBOX"); for (matchedchars = 0, i = 0; regexes[i] != NULL && matchedchars <= 0; i++) { matchedchars = regulo_match(regexes[i], unaliased_str, regulos); } /* failed to match either regex */ if (matchedchars <= 0) { pc->label[0] = '\0'; IMAP_DM(pc, DEBUG_ERROR, "Couldn't parse line %s (%d)\n" " If this used to work, run wmbiff with the -relax option, and\n" " send mail to "PACKAGE_BUGREPORT" with the hostname\n" " of your mail server.\n", unaliased_str, matchedchars); return -1; } PCU.serverPort = serverPort; PCU.password_len = strlen(PCU.password); if (PCU.password[0] == '\0') { PCU.interactive_password = 1; } else { ENFROB(PCU.password); } // grab_authList(unaliased_str + matchedchars, PCU.authList); free(unaliased_str); IMAP_DM(pc, DEBUG_INFO, "userName= '%s'\n", PCU.userName); IMAP_DM(pc, DEBUG_INFO, "password is %zu characters long\n", PCU.password_len); IMAP_DM(pc, DEBUG_INFO, "serverName= '%s'\n", PCU.serverName); IMAP_DM(pc, DEBUG_INFO, "serverPath= '%s'\n", pc->path); IMAP_DM(pc, DEBUG_INFO, "serverPort= '%d'\n", PCU.serverPort); IMAP_DM(pc, DEBUG_INFO, "authList= '%s'\n", PCU.authList); if (strcmp(pc->action, "msglst") == 0 || strcmp(pc->fetchcmd, "msglst") == 0 || strcmp(pc->button2, "msglst") == 0) { PCU.wantCacheHeaders = 1; } else { PCU.wantCacheHeaders = 0; } pc->checkMail = imap_checkmail; pc->getHeaders = imap_getHeaders; pc->releaseHeaders = imap_releaseHeaders; pc->TotalMsgs = 0; pc->UnreadMsgs = 0; pc->OldMsgs = -1; pc->OldUnreadMsgs = -1; return 0; } static int authenticate_plaintext( /*@notnull@ */ Pop3 *pc, struct connection_state *scs, const char *capabilities) { char buf[BUF_SIZE]; /* is login prohibited? */ /* "An IMAP client which complies with [rfc2525, section 3.2] * MUST NOT issue the LOGIN command if this capability is present. */ if (strstr(capabilities, "LOGINDISABLED")) { IMAP_DM(pc, DEBUG_ERROR, "Plaintext auth prohibited by server: (LOGINDISABLED).\n"); goto plaintext_failed; } ask_user_for_password(pc, 0); do { /* login */ DEFROB(PCU.password); tlscomm_printf(scs, "a001 LOGIN %s \"%s\"\r\n", PCU.userName, PCU.password); ENFROB(PCU.password); if (tlscomm_expect(scs, "a001 ", buf, BUF_SIZE) == 0) { IMAP_DM(pc, DEBUG_ERROR, "Did not get a response to the LOGIN command.\n"); goto plaintext_failed; } if (buf[5] != 'O') { IMAP_DM(pc, DEBUG_ERROR, "IMAP Login failed: %s\n", buf); /* if we're prompting the user, ask again, else fail */ if (PCU.interactive_password) { PCU.password[0] = '\0'; ask_user_for_password(pc, 1); /* 1=overwrite the cache */ } else { goto plaintext_failed; } } else { return (1); } } while (1); plaintext_failed: return (0); } #ifdef HAVE_GCRYPT_H static int authenticate_md5(Pop3 *pc, struct connection_state *scs, const char *capabilities) { char buf[BUF_SIZE]; char buf2[BUF_SIZE]; unsigned char *md5; gcry_md_hd_t gmh; gcry_error_t rc; if (!strstr(capabilities, "AUTH=CRAM-MD5")) { /* server doesn't support cram-md5. */ return 0; } tlscomm_printf(scs, "a007 AUTHENTICATE CRAM-MD5\r\n"); if (tlscomm_expect(scs, "+ ", buf, BUF_SIZE) == 0) goto expect_failure; Decode_Base64(buf + 2, buf2); IMAP_DM(pc, DEBUG_INFO, "CRAM-MD5 challenge: %s\n", buf2); strcpy(buf, PCU.userName); strcat(buf, " "); ask_user_for_password(pc, 0); rc = gcry_md_open(&gmh, GCRY_MD_MD5, GCRY_MD_FLAG_HMAC); if (rc != 0) { IMAP_DM(pc, DEBUG_INFO, "unable to initialize gcrypt md5\n"); return 0; } DEFROB(PCU.password); gcry_md_setkey(gmh, PCU.password, strlen(PCU.password)); ENFROB(PCU.password); gcry_md_write(gmh, (unsigned char *) buf2, strlen(buf2)); gcry_md_final(gmh); md5 = gcry_md_read(gmh, 0); Bin2Hex(md5, 16, buf2); gcry_md_close(gmh); strcat(buf, buf2); IMAP_DM(pc, DEBUG_INFO, "CRAM-MD5 response: %s\n", buf); Encode_Base64(buf, buf2); tlscomm_printf(scs, "%s\r\n", buf2); if (tlscomm_expect(scs, "a007 ", buf, BUF_SIZE) == 0) goto expect_failure; if (!strncmp(buf, "a007 OK", 7)) return 1; /* AUTH successful */ IMAP_DM(pc, DEBUG_ERROR, "CRAM-MD5 AUTH failed for user '%s@%s:%d'\n", PCU.userName, PCU.serverName, PCU.serverPort); IMAP_DM(pc, DEBUG_INFO, "It said %s", buf); return 0; expect_failure: IMAP_DM(pc, DEBUG_ERROR, "tlscomm_expect failed during cram-md5 auth: %s", buf); IMAP_DM(pc, DEBUG_ERROR, "failed to authenticate using cram-md5."); return 0; } #endif static void ask_user_for_password( /*@notnull@ */ Pop3 *pc, int bFlushCache) { /* see if we already have a password, as provided in the config file, or already requested from the user. */ if (PCU.interactive_password) { if (strlen(PCU.password) == 0) { /* we need to grab the password from the user. */ char *password; IMAP_DM(pc, DEBUG_INFO, "asking for password %d\n", bFlushCache); password = passwordFor(PCU.userName, PCU.serverName, pc, bFlushCache); if (password != NULL) { if (strlen(password) + 1 > BUF_SMALL) { DMA(DEBUG_ERROR, "Password is too long.\n"); memset(PCU.password, 0, BUF_SMALL - 1); } else { strncpy(PCU.password, password, BUF_SMALL - 1); PCU.password_len = strlen(PCU.password); } free(password); ENFROB(PCU.password); } } } } /* vim:set ts=4: */ /* * Local Variables: * tab-width: 4 * c-indent-level: 4 * c-basic-offset: 4 * End: */ wmbiff-0.4.36/wmbiff/sample.wmbiffrc0000644000207400020740000001207413500471555014264 00000000000000# $Id: sample.wmbiffrc,v 1.18 2003/11/09 07:01:15 bluehal Exp $ # # See wmbiffrc(5) for more info. # # Global interval -- seconds between check mailboxes interval=60 # Global askpass -- choose a password acting program # that behaves like ssh-askpass. The default is # askpass = /usr/bin/ssh-askpass. # askpass is invoked on IMAP entries that have no password # below. # the commented version below is likely to work on RedHat # systems; wmbiff's default is likely to work on Debian # systems with ssh-askpass installed. #askpass = /usr/libexec/openssh/x11-ssh-askpass # If you'd like it to be visually distinct so that # you aren't confused with your normal passphrase: #askpass = /usr/bin/ssh-askpass -fg cyan -bg black -xrm '*Dialog.font: -b&h-lucida-medium-r-normal-*-*-100-*-*-*-*-iso8859-1' -xrm '*Dialog.title: WMBiff Password Entry' # If you're writing a better program for password prompting, # or that stores passwords cleverly, and don't like that # wmbiff adds 'password for wmbiff: user@site' to the command # line, you can use something like this: #askpass = /bin/echo mypassword ; true # If you's like to chain the password to another program, # such as kinit for Kerberos authentication, use (with the # ruby interpreter installed): askpass = /usr/bin/ssh-askpass -fg cyan -bg black -xrm '*Dialog.title: WMBiff Password Entry' | /usr/bin/ruby -e 'm = gets; IO.popen("/usr/bin/kinit > /dev/null", "w").puts(m); puts(m)' && true # Skin. A different source pixmap can be loaded dynamically. # If not a full path, wmbiff will search /usr/share/wmbiff:/usr/local/share/wmbiff:. # which is intended to keep the .wmbiffrc simple and portable to # different systems with wmbiff installed differently. # # default #skinfile=wmbiff-master-led.xpm # higher contrast for lower-color displays #skinfile=wmbiff-master-contrast.xpm # make your own derivative and submit it # to us at wmaker-dev@googlegroups.com. ### First string ### # Label, that will be displayed label.0=Spool # Path to mailbox for UNIX-style mailboxes, # or pop3:user:password@mailserver[:port] for POP3 accounts # port are optional, default - 110 path.0=mbox:/var/mail/gb # Command, which will be executed for new mail in any watched mailbox globalnotify=my_play /home/gb/sounds/new_mail_has_arrived.wav # Command, which executed on new mail arrival, or special keyword 'beep' #notify.0=beep #notify.0=my_play /home/gb/sounds/new_mail_has_arrived.wav # Don't want any global notification for this mailbox notify.0=true # Command, which executed on left mouse click on label action.0=rxvt -name mutt -e mutt # Rescan interval; default to global interval # For POP3-accounts bigger values (>60sec) is recommended #interval.0=5 # Interval between mail auto-fetching; use 0 for disable (only # mouse right-clicking still worked) # use -1 for auto-fetching on new mail arrival #fetchinterval.0=300 # Command, which used for fetching mail. Leave commented out for full disable #fetchcmd.0=/usr/bin/fetchmail ### # NOTE: line under this line will not be parsed because the space before equal label.1 = MBOX # MBOX format: mbox:fullpathname path.1=mbox:/home/gb/mail/10_ksi-linux-list #notify.1=my_play /home/gb/sounds/new_mail_has_arrived.wav action.1=rxvt -name mutt -e mutt -f /home/gb/mail/10_ksi-linux-list # label.1 = MDIR # # Maildir format: maildir:fullpathname # path.1=maildir:/home/gb/Maildir/ # notify.1=my_play /home/gb/sounds/new_mail_has_arrived.wav # action.1=rxvt -name mutt -e mutt -f /home/gb/Maildir #or if you use gnomeicu: #label.2=ICQ #path.2=gicu:USER_UIN #notify.2=beep #action.2=gnomeicu-client show label.3=POP3 # pop3 format: pop3:user:password@server[:port] [auth] path.3=pop3:user:password@server apop #notify.3=my_play /home/gb/sounds/new_mail_has_arrived.wav action.3=rxvt -name mutt -e mutt -f /home/gb/mail/30_nftp-list interval.3=300 # 5 minutes fetchinterval.3=-1 fetchcmd.3=fetchmail label.4=IMAP4 # IMAP4 format: imap:user:password@server[/mailbox][:port] [auth] # mailbox is optional, default - INBOX # password is optional, default - ask using the askpass config # port is optional, default - 143 path.4=imap:user:password@server interval.4=300 # 5 minutes # label.4=IMAPS # Secure IMAP format: imaps:user:password@server[/mailbox][:port] [auth] # mailbox is optional, default - INBOX # password is optional, default - ask using the askpass config # port is optional, default - 993 # path.4=imaps:user:password@server cram-md5 # interval.4=300 # 5 minutes # Shell expansion. (can't be nested.) # path.4=mbox:/home/me/Mail/`ls -t1 /home/me/Mail/list-archive-* | head -1` # label.4=tick # Shell method # path.4=shell:::lpq | grep Queue | awk '{print $2}' # To check for security updates in debian path.4=shell:::/usr/lib/wmbiff/security.debian.rb # Ways wmbiff can drive MAC OS X Mail using AppleScript. # action.0 = osascript -e 'tell application "Mail"' -e 'set selected mailboxes of first message viewer to {mailbox "in-grads" of imap account "me@myaccount.org"}' -e 'activate' -e 'end tell' # action.1 = osascript -e 'tell application "Mail"' -e 'set selected mailboxes of first message viewer to {inbox}' -e 'activate' -e 'end tell' wmbiff-0.4.36/wmbiff/regulo.h0000644000207400020740000000121013515611242012711 00000000000000/* $Id: regulo.h,v 1.2 2003/03/02 02:17:14 bluehal Exp $ */ /* regulo, (pronounced as if the name of a super-hero) added by Neil Spring to provide a portable interface to regular expressions that doesn't suck. */ void regulo_atoi(void *dest_int, const char *source); void regulo_strcpy(void *dest, const char *source); void regulo_strcpy_tolower(void *dest, const char *source); void regulo_strcpy_skip1(void *dest, const char *source); struct regulo { int match_index; void *destination; void (*match_handler) (void *dest, const char *source); }; int regulo_match(const char *regex, const char *string, struct regulo *instructions); wmbiff-0.4.36/wmbiff/mboxClient.c0000644000207400020740000001046513556541661013543 00000000000000/* $Id: mboxClient.c,v 1.17 2004/03/28 00:28:58 bluehal Exp $ */ /* Author: Yong-iL Joh Modified: Jorge García Rob Funk Neil Spring * * MBOX checker. * * Last Updated : $Date: 2004/03/28 00:28:58 $ * */ #ifdef HAVE_CONFIG_H #include #endif #include "Client.h" #include #include #include #ifdef USE_DMALLOC #include #endif #define PCM (pc->u).mbox #define FROM_STR "From " #define STATUS_STR "Status: " FILE *openMailbox(Pop3 *pc, const char *mbox_filename) { FILE *mailbox; if ((mailbox = fopen(mbox_filename, "r")) == NULL) { DM(pc, DEBUG_ERROR, "Error opening mailbox '%s': %s\n", mbox_filename, strerror(errno)); pc->TotalMsgs = -1; pc->UnreadMsgs = -1; } return (mailbox); } /* count the messages in a mailbox */ static void countMessages(Pop3 *pc, const char *mbox_filename) { FILE *F; char buf[BUF_SIZE]; int is_header = 0; int next_from_is_start_of_header = 1; int count_from = 0, count_status = 0; int len_from = strlen(FROM_STR), len_status = strlen(STATUS_STR); int pseudo_mail = 0; F = openMailbox(pc, mbox_filename); if (F == NULL) return; /* count message */ while (fgets(buf, BUF_SIZE, F)) { // The first message usually is automatically created by POP3/IMAP // clients for internal record keeping and is ignored // (not displayed) by most email clients. if (is_header && !strncmp(buf, "X-IMAP: ", 8)) { pseudo_mail = 1; } if (buf[0] == '\n') { /* a newline by itself terminates the header */ if (is_header) is_header = 0; else next_from_is_start_of_header = 1; } else if (!strncmp(buf, FROM_STR, len_from)) { /* A line starting with "From" is the beginning of a new header. "From" in the text of the mail should get escaped by the MDA. If your MDA doesn't do that, it is broken. */ if (next_from_is_start_of_header) is_header = 1; if (is_header) count_from++; } else { next_from_is_start_of_header = 0; if (is_header && !strncmp(buf, STATUS_STR, len_status) && strrchr(buf, 'R')) { count_status++; } } } if (count_from && pseudo_mail) { count_from--; if (count_status) count_status--; } DM(pc, DEBUG_INFO, "from: %d status: %d\n", count_from, count_status); pc->TotalMsgs = count_from; pc->UnreadMsgs = count_from - count_status; fclose(F); } /* check file status; hold on to file information used to restore access time */ int fileHasChanged(const char *mbox_filename, time_t * atime, time_t * mtime, off_t * size) { struct stat st; /* mbox file */ if (stat(mbox_filename, &st)) { DMA(DEBUG_ERROR, "Can't stat '%s': %s\n", mbox_filename, strerror(errno)); } else if (st.st_mtime != *mtime || st.st_size != *size) { /* file was changed OR initially read */ DMA(DEBUG_INFO, " %s was changed," " mTIME: %lu -> %lu; SIZE: %lu -> %lu\n", mbox_filename, *mtime, st.st_mtime, (unsigned long) *size, (unsigned long) st.st_size); *atime = st.st_atime; *mtime = st.st_mtime; *size = st.st_size; return 1; } return 0; } int mboxCheckHistory(Pop3 *pc) { char *mbox_filename = backtickExpand(pc, pc->path); struct utimbuf ut; DM(pc, DEBUG_INFO, ">Mailbox: '%s'\n", mbox_filename); if (fileHasChanged(mbox_filename, &ut.actime, &PCM.mtime, &PCM.size) || pc->OldMsgs < 0) { countMessages(pc, mbox_filename); /* Reset atime for (at least) MUTT to work */ /* ut.actime is set above */ ut.modtime = PCM.mtime; utime(mbox_filename, &ut); } free(mbox_filename); return 0; } int mboxCreate(Pop3 *pc, const char *str) { /* MBOX format: mbox:fullpathname */ pc->TotalMsgs = 0; pc->UnreadMsgs = 0; pc->OldMsgs = -1; pc->OldUnreadMsgs = -1; pc->checkMail = mboxCheckHistory; /* default boxes are mbox... cut mbox: if it exists */ if (!strncasecmp(pc->path, "mbox:", 5)) { if (strlen(str + 5) + 1 > BUF_BIG) { DM(pc, DEBUG_ERROR, "mbox '%s' is too long.\n", str + 5); memset(pc->path, 0, BUF_BIG); } else { strncpy(pc->path, str + 5, BUF_BIG - 1); /* cut off ``mbox:'' */ } } DM(pc, DEBUG_INFO, "mbox: str = '%s'\n", str); DM(pc, DEBUG_INFO, "mbox: path= '%s'\n", pc->path); return 0; } /* vim:set ts=4: */ /* * Local Variables: * tab-width: 4 * c-indent-level: 4 * c-basic-offset: 4 * End: */ wmbiff-0.4.36/wmbiff/maildirClient.c0000644000207400020740000001100113556541661014202 00000000000000/* $Id: maildirClient.c,v 1.15 2004/03/28 00:28:58 bluehal Exp $ */ /* Author : Yong-iL Joh ( tolkien@mizi.com ) Modified : Jorge García ( Jorge.Garcia@uv.es ) Modified : Dwayne C. Litzenberger ( dlitz@dlitz.net ) * * Maildir checker. * * Last Updated : $Date: 2004/03/28 00:28:58 $ * */ #ifdef HAVE_CONFIG_H #include #endif #include "Client.h" #include #include #include #include #include #include #ifdef USE_DMALLOC #include #endif #define PCM (pc->u).maildir static int count_msgs(char *path) { DIR *D; struct dirent *de; int count = 0; D = opendir(path); if (D == NULL) { DMA(DEBUG_ERROR, "Error opening directory '%s': %s\n", path, strerror(errno)); return -1; } while ((de = readdir(D)) != NULL) { if ((strcmp(de->d_name, ".") & strcmp(de->d_name, "..")) != 0) { count++; } } closedir(D); return count; } int maildirCheckHistory(Pop3 *pc) { struct stat st_new; struct stat st_cur; struct utimbuf ut; char path_new[BUF_BIG * 2], path_cur[BUF_BIG * 2]; int count_new = 0, count_cur = 0; DM(pc, DEBUG_INFO, ">Maildir: '%s'\n", pc->path); strcpy(path_new, pc->path); strcat(path_new, "/new/"); strcpy(path_cur, pc->path); strcat(path_cur, "/cur/"); if (pc->u.maildir.dircache_flush) { /* hack to clear directory cache for network-mounted maildirs */ int fd; char path_newtmp[BUF_BIG * 2 + 32]; strcpy(path_newtmp, path_new); strcat(path_newtmp, ".wmbiff.dircache_flush.XXXXXX"); if ((fd = mkstemp(path_newtmp)) >= 0) { close(fd); unlink(path_newtmp); } else { DM(pc, DEBUG_ERROR, "Can't create dircache flush file '%s': %s\n", path_newtmp, strerror(errno)); } } /* maildir */ if (stat(path_new, &st_new)) { DM(pc, DEBUG_ERROR, "Can't stat mailbox '%s': %s\n", path_new, strerror(errno)); return -1; /* Error stating mailbox */ } if (stat(path_cur, &st_cur)) { DM(pc, DEBUG_ERROR, "Can't stat mailbox '%s': %s\n", path_cur, strerror(errno)); return -1; /* Error stating mailbox */ } /* file was changed OR initially read */ if (st_new.st_mtime != PCM.mtime_new || st_new.st_size != PCM.size_new || st_cur.st_mtime != PCM.mtime_cur || st_cur.st_size != PCM.size_cur || pc->OldMsgs < 0) { DM(pc, DEBUG_INFO, " was changed,\n" " TIME(new): old %lu, new %lu" " SIZE(new): old %lu, new %lu\n" " TIME(cur): old %lu, new %lu" " SIZE(cur): old %lu, new %lu\n", PCM.mtime_new, (unsigned long) st_new.st_mtime, (unsigned long) PCM.size_new, (unsigned long) st_new.st_size, PCM.mtime_cur, (unsigned long) st_cur.st_mtime, (unsigned long) PCM.size_cur, (unsigned long) st_cur.st_size); count_new = count_msgs(path_new); count_cur = count_msgs(path_cur); if ((count_new | count_cur) == -1) { /* errors occurred */ return -1; } pc->TotalMsgs = count_cur + count_new; pc->UnreadMsgs = count_new; /* Reset atime for MUTT and something others work correctly */ ut.actime = st_new.st_atime; ut.modtime = st_new.st_mtime; utime(path_new, &ut); ut.actime = st_cur.st_atime; ut.modtime = st_cur.st_mtime; utime(path_cur, &ut); /* Store new values */ PCM.mtime_new = st_new.st_mtime; /* Store new mtime_new */ PCM.size_new = st_new.st_size; /* Store new size_new */ PCM.mtime_cur = st_cur.st_mtime; /* Store new mtime_cur */ PCM.size_cur = st_cur.st_size; /* Store new size_cur */ } return 0; } int maildirCreate(Pop3 *pc, const char *str) { int i; char c; /* Maildir format: maildir:fullpathname */ pc->TotalMsgs = 0; pc->UnreadMsgs = 0; pc->OldMsgs = -1; pc->OldUnreadMsgs = -1; pc->checkMail = maildirCheckHistory; pc->u.maildir.dircache_flush = 0; /* special flags */ if (*(str + 8) == ':') { /* path is of the format maildir::flags:path */ c = ' '; for (i = 1; c != ':' && c != '\0'; i++) { c = *(str + 8 + i); switch (c) { case 'F': pc->u.maildir.dircache_flush = 1; DM(pc, DEBUG_INFO, "maildir: dircache_flush enabled\n"); } } } else { i = 0; } if (strlen(str + 8 + i) + 1 > BUF_BIG) { DM(pc, DEBUG_ERROR, "maildir '%s' is too long.\n", str + 8 + i); memset(pc->path, 0, BUF_BIG); } else { const char *sp = str + 8 + i; char *dp = pc->path; while (*sp && sp-strpath); return 0; } /* vim:set ts=4: */ /* * Local Variables: * tab-width: 4 * c-indent-level: 4 * c-basic-offset: 4 * End: */ wmbiff-0.4.36/wmbiff/gnutls-common.c0000644000207400020740000004140613556541661014240 00000000000000#include # include #include #include #include #include #include #include #include #include #define TEST_STRING int xml = 0; int print_cert; static char buffer[5*1024]; #define PRINTX(x,y) if (y[0]!=0) printf(" # %s %s\n", x, y) #define PRINT_PGP_NAME(X) PRINTX( "NAME:", name) const char str_unknown[] = "(unknown)"; static const char *my_ctime(const time_t * tv) { static char buf[256]; struct tm *tp; if ( ( (tp = localtime(tv)) == NULL ) || (!strftime(buf, sizeof buf, "%a %b %e %H:%M:%S %Z %Y\n", tp)) ) strcpy(buf, str_unknown);/* make sure buf text isn't garbage */ return buf; } void print_x509_info(gnutls_session_t session, const char* hostname) { gnutls_x509_crt_t crt; const gnutls_datum_t *cert_list; unsigned int cert_list_size = 0; int ret; char digest[20]; char serial[40]; char dn[256]; size_t dn_size; size_t digest_size = sizeof(digest); unsigned int i, j; size_t serial_size = sizeof(serial); char printable[256]; char *print; unsigned int bits, algo; time_t expiret, activet; cert_list = gnutls_certificate_get_peers(session, &cert_list_size); if (cert_list_size == 0) { fprintf(stderr, "No certificates found!\n"); return; } printf(" - Got a certificate list of %d certificates.\n\n", cert_list_size); for (j = 0; j < cert_list_size; j++) { gnutls_x509_crt_init(&crt); ret = gnutls_x509_crt_import(crt, &cert_list[j], GNUTLS_X509_FMT_DER); if (ret < 0) { const char* str = gnutls_strerror(ret); if (str == NULL) str = str_unknown; fprintf(stderr, "Decoding error: %s\n", str); return; } printf(" - Certificate[%d] info:\n", j); if (print_cert) { size_t size; size = sizeof(buffer); ret = gnutls_x509_crt_export( crt, GNUTLS_X509_FMT_PEM, buffer, &size); if (ret < 0) { fprintf(stderr, "Encoding error: %s\n", gnutls_strerror(ret)); return; } fputs( "\n", stdout); fputs( buffer, stdout); fputs( "\n", stdout); } if (j==0 && hostname != NULL) { /* Check the hostname of the first certificate * if it matches the name of the host we * connected to. */ if (gnutls_x509_crt_check_hostname( crt, hostname)==0) { printf(" # The hostname in the certificate does NOT match '%s'.\n", hostname); } else { printf(" # The hostname in the certificate matches '%s'.\n", hostname); } } if (xml) { #ifdef ENABLE_PKI gnutls_datum_t xml_data; ret = gnutls_x509_crt_to_xml( crt, &xml_data, 0); if (ret < 0) { const char* str = gnutls_strerror(ret); if (str == NULL) str = str_unknown; fprintf(stderr, "XML encoding error: %s\n", str); return; } printf("%s", xml_data.data); gnutls_free( xml_data.data); #endif } else { expiret = gnutls_x509_crt_get_expiration_time(crt); activet = gnutls_x509_crt_get_activation_time(crt); printf(" # valid since: %s", my_ctime(&activet)); printf(" # expires at: %s", my_ctime(&expiret)); /* Print the serial number of the certificate. */ if (gnutls_x509_crt_get_serial(crt, serial, &serial_size) >= 0) { print = printable; for (i = 0; i < serial_size; i++) { sprintf(print, "%.2x ", (unsigned char) serial[i]); print += 3; } printf(" # serial number: %s\n", printable); } /* Print the fingerprint of the certificate */ digest_size = sizeof(digest); if ((ret=gnutls_x509_crt_get_fingerprint(crt, GNUTLS_DIG_MD5, digest, &digest_size)) < 0) { const char* str = gnutls_strerror(ret); if (str == NULL) str = str_unknown; fprintf(stderr, "Error in fingerprint calculation: %s\n", str); } else { print = printable; for (i = 0; i < digest_size; i++) { sprintf(print, "%.2x ", (unsigned char) digest[i]); print += 3; } printf(" # fingerprint: %s\n", printable); } /* Print the version of the X.509 * certificate. */ printf(" # version: #%d\n", gnutls_x509_crt_get_version(crt)); algo = gnutls_x509_crt_get_pk_algorithm(crt, &bits); printf(" # public key algorithm: "); if (algo == GNUTLS_PK_RSA) { printf("RSA\n"); printf(" # Modulus: %d bits\n", bits); } else if (algo == GNUTLS_PK_DSA) { printf("DSA\n"); printf(" # Exponent: %d bits\n", bits); } else { printf("UNKNOWN\n"); } dn_size = sizeof(dn); ret = gnutls_x509_crt_get_dn(crt, dn, &dn_size); if (ret >= 0) printf(" # Subject's DN: %s\n", dn); dn_size = sizeof(dn); ret = gnutls_x509_crt_get_issuer_dn(crt, dn, &dn_size); if (ret >= 0) printf(" # Issuer's DN: %s\n", dn); } gnutls_x509_crt_deinit(crt); printf("\n"); } } #ifdef HAVE_LIBOPENCDK void print_openpgp_info(gnutls_session_t session, const char* hostname) { char digest[20]; size_t digest_size = sizeof(digest); unsigned int i; int ret; char printable[120]; char *print; char name[256]; size_t name_len = sizeof(name); gnutls_openpgp_key crt; const gnutls_datum_t *cert_list; unsigned int cert_list_size = 0; time_t expiret; time_t activet; cert_list = gnutls_certificate_get_peers(session, &cert_list_size); if (cert_list_size > 0) { unsigned int algo, bits; gnutls_openpgp_key_init(&crt); ret = gnutls_openpgp_key_import(crt, &cert_list[0], GNUTLS_OPENPGP_FMT_RAW); if (ret < 0) { const char* str = gnutls_strerror(ret); if (str == NULL) str = str_unknown; fprintf(stderr, "Decoding error: %s\n", str); return; } if (print_cert) { size_t size; size = sizeof(buffer); ret = gnutls_openpgp_key_export( crt, GNUTLS_OPENPGP_FMT_BASE64, buffer, &size); if (ret < 0) { fprintf(stderr, "Encoding error: %s\n", gnutls_strerror(ret)); return; } fputs( "\n", stdout); fputs( buffer, stdout); fputs( "\n", stdout); } if (hostname != NULL) { /* Check the hostname of the first certificate * if it matches the name of the host we * connected to. */ if (gnutls_openpgp_key_check_hostname( crt, hostname)==0) { printf(" # The hostname in the key does NOT match '%s'.\n", hostname); } else { printf(" # The hostname in the key matches '%s'.\n", hostname); } } if (xml) { gnutls_datum_t xml_data; ret = gnutls_openpgp_key_to_xml( crt, &xml_data, 0); if (ret < 0) { const char* str = gnutls_strerror(ret); if (str == NULL) str = str_unknown; fprintf(stderr, "XML encoding error: %s\n", str); return; } printf("%s", xml_data.data); gnutls_free( xml_data.data); return; } activet = gnutls_openpgp_key_get_creation_time( crt); expiret = gnutls_openpgp_key_get_expiration_time( crt); printf(" # Key was created at: %s", my_ctime(&activet)); printf(" # Key expires: "); if (expiret != 0) printf("%s", my_ctime(&expiret)); else printf("Never\n"); if (gnutls_openpgp_key_get_fingerprint(crt, digest, &digest_size) >= 0) { print = printable; for (i = 0; i < digest_size; i++) { sprintf(print, "%.2x ", (unsigned char) digest[i]); print += 3; } printf(" # PGP Key version: %d\n", gnutls_openpgp_key_get_version(crt)); algo = gnutls_openpgp_key_get_pk_algorithm(crt, &bits); printf(" # PGP Key public key algorithm: "); if (algo == GNUTLS_PK_RSA) { printf("RSA\n"); printf(" # Modulus: %d bits\n", bits); } else if (algo == GNUTLS_PK_DSA) { printf("DSA\n"); printf(" # Exponent: %d bits\n", bits); } else { printf("UNKNOWN\n"); } printf(" # PGP Key fingerprint: %s\n", printable); name_len = sizeof(name); if (gnutls_openpgp_key_get_name(crt, 0, name, &name_len) < 0) { fprintf(stderr, "Could not extract name\n"); } else { PRINT_PGP_NAME(name); } } gnutls_openpgp_key_deinit( crt); } } #endif void print_cert_vrfy(gnutls_session_t session) { unsigned int status; int ret; ret = gnutls_certificate_verify_peers2(session, &status); printf("\n"); if(ret < 0) { if (ret == GNUTLS_E_NO_CERTIFICATE_FOUND) printf("- Peer did not send any certificate.\n"); else printf("- Could not verify certificate (err: %s (%d))\n", gnutls_strerror(ret), ret); return; } if (gnutls_certificate_type_get(session)==GNUTLS_CRT_X509) { if (status & GNUTLS_CERT_SIGNER_NOT_FOUND) printf("- Peer's certificate issuer is unknown\n"); if (status & GNUTLS_CERT_INVALID) printf("- Peer's certificate is NOT trusted\n"); else printf("- Peer's certificate is trusted\n"); } else { if (status & GNUTLS_CERT_INVALID) printf("- Peer's key is invalid\n"); else printf("- Peer's key is valid\n"); if (status & GNUTLS_CERT_SIGNER_NOT_FOUND) printf("- Could not find a signer of the peer's key\n"); } } int print_info(gnutls_session_t session, const char* hostname) { const char *tmp; gnutls_credentials_type_t cred; gnutls_kx_algorithm_t kx; /* print the key exchange's algorithm name */ kx = gnutls_kx_get(session); cred = gnutls_auth_get_type(session); switch (cred) { #ifdef ENABLE_ANON case GNUTLS_CRD_ANON: printf("- Anonymous DH using prime of %d bits, secret key " "of %d bits, and peer's public key is %d bits.\n", gnutls_dh_get_prime_bits(session), gnutls_dh_get_secret_bits(session), gnutls_dh_get_peers_public_bits(session)); break; #endif #ifdef ENABLE_SRP case GNUTLS_CRD_SRP: /* This should be only called in server * side. */ if (gnutls_srp_server_get_username(session) != NULL) printf("- SRP authentication. Connected as '%s'\n", gnutls_srp_server_get_username(session)); break; #endif case GNUTLS_CRD_CERTIFICATE: { char dns[256]; size_t dns_size = sizeof(dns); unsigned int type; /* This fails in client side */ if (gnutls_server_name_get (session, dns, &dns_size, &type, 0) == 0) { printf("- Given server name[%d]: %s\n", type, dns); } } print_cert_info(session, hostname); print_cert_vrfy(session); /* Check if we have been using ephemeral Diffie Hellman. */ if (kx == GNUTLS_KX_DHE_RSA || kx == GNUTLS_KX_DHE_DSS) { printf ("- Ephemeral DH using prime of %d bits, secret key " "of %d bits, and peer's public key is %d bits.\n", gnutls_dh_get_prime_bits(session), gnutls_dh_get_secret_bits(session), gnutls_dh_get_peers_public_bits(session)); } default: break; } tmp = gnutls_protocol_get_name(gnutls_protocol_get_version(session)); if (tmp != NULL) printf("- Version: %s\n", tmp); tmp = gnutls_kx_get_name(kx); if (tmp != NULL) printf("- Key Exchange: %s\n", tmp); tmp = gnutls_cipher_get_name(gnutls_cipher_get(session)); if (tmp != NULL) printf("- Cipher: %s\n", tmp); tmp = gnutls_mac_get_name(gnutls_mac_get(session)); if (tmp != NULL) printf("- MAC: %s\n", tmp); tmp = gnutls_compression_get_name(gnutls_compression_get(session)); if (tmp != NULL) printf("- Compression: %s\n", tmp); fflush (stdout); return 0; } void print_cert_info(gnutls_session_t session, const char* hostname) { printf("- Certificate type: "); switch (gnutls_certificate_type_get(session)) { case GNUTLS_CRT_X509: printf("X.509\n"); print_x509_info(session, hostname); break; #ifdef HAVE_LIBOPENCDK case GNUTLS_CRT_OPENPGP: printf("OpenPGP\n"); print_openpgp_info(session, hostname); break; #endif default: break; } } void print_list(void) { /* FIXME: This is hard coded. Make it print all the supported * algorithms. */ printf("\n"); printf("Certificate types:"); printf(" X.509"); printf(", OPENPGP\n"); printf("Protocols:"); printf(" TLS1.0"); printf(", SSL3.0\n"); printf("Ciphers:"); printf(" AES-128-CBC"); printf(", 3DES-CBC"); printf(", ARCFOUR"); printf(", ARCFOUR-40\n"); printf("MACs:"); printf(" MD5"); printf(", RMD160"); printf(", SHA1\n"); printf("Key exchange algorithms:"); printf(" RSA"); printf(", RSA-EXPORT"); printf(", DHE-DSS"); printf(", DHE-RSA"); printf(", SRP"); printf(", SRP-RSA"); printf(", SRP-DSS"); printf(", ANON-DH\n"); printf("Compression methods:"); printf(" ZLIB"); printf(", NULL\n"); } void print_license(void) { fprintf(stdout, "\nCopyright (C) 2001-2003 Nikos Mavroyanopoulos\n" "This program is free software; you can redistribute it and/or modify \n" "it under the terms of the GNU General Public License as published by \n" "the Free Software Foundation; either version 2 of the License, or \n" "(at your option) any later version. \n" "\n" "This program is distributed in the hope that it will be useful, \n" "but WITHOUT ANY WARRANTY; without even the implied warranty of \n" "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the \n" "GNU General Public License for more details. \n" "\n" "You should have received a copy of the GNU General Public License \n" "along with this program; if not, write to the Free Software \n" "Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.\n\n"); } void parse_protocols(char **protocols, int protocols_size, int *protocol_priority) { int i, j; if (protocols != NULL && protocols_size > 0) { for (j = i = 0; i < protocols_size; i++) { if (strncasecmp(protocols[i], "SSL", 3) == 0) protocol_priority[j++] = GNUTLS_SSL3; if (strncasecmp(protocols[i], "TLS", 3) == 0) protocol_priority[j++] = GNUTLS_TLS1; } protocol_priority[j] = 0; } } void parse_ciphers(char **ciphers, int nciphers, int *cipher_priority) { int j, i; if (ciphers != NULL && nciphers > 0) { for (j = i = 0; i < nciphers; i++) { if (strncasecmp(ciphers[i], "AES", 3) == 0) cipher_priority[j++] = GNUTLS_CIPHER_AES_128_CBC; if (strncasecmp(ciphers[i], "3DE", 3) == 0) cipher_priority[j++] = GNUTLS_CIPHER_3DES_CBC; if (strcasecmp(ciphers[i], "ARCFOUR-40") == 0) cipher_priority[j++] = GNUTLS_CIPHER_ARCFOUR_40; if (strcasecmp(ciphers[i], "ARCFOUR") == 0) cipher_priority[j++] = GNUTLS_CIPHER_ARCFOUR_128; if (strncasecmp(ciphers[i], "NUL", 3) == 0) cipher_priority[j++] = GNUTLS_CIPHER_NULL; } cipher_priority[j] = 0; } } void parse_macs(char **macs, int nmacs, int *mac_priority) { int i, j; if (macs != NULL && nmacs > 0) { for (j = i = 0; i < nmacs; i++) { if (strncasecmp(macs[i], "MD5", 3) == 0) mac_priority[j++] = GNUTLS_MAC_MD5; if (strncasecmp(macs[i], "RMD", 3) == 0) mac_priority[j++] = GNUTLS_MAC_RMD160; if (strncasecmp(macs[i], "SHA", 3) == 0) mac_priority[j++] = GNUTLS_MAC_SHA; } mac_priority[j] = 0; } } void parse_ctypes(char **ctype, int nctype, int *cert_type_priority) { int i, j; if (ctype != NULL && nctype > 0) { for (j = i = 0; i < nctype; i++) { if (strncasecmp(ctype[i], "OPE", 3) == 0) cert_type_priority[j++] = GNUTLS_CRT_OPENPGP; if (strncasecmp(ctype[i], "X", 1) == 0) cert_type_priority[j++] = GNUTLS_CRT_X509; } cert_type_priority[j] = 0; } } void parse_kx(char **kx, int nkx, int *kx_priority) { int i, j; if (kx != NULL && nkx > 0) { for (j = i = 0; i < nkx; i++) { if (strcasecmp(kx[i], "SRP") == 0) kx_priority[j++] = GNUTLS_KX_SRP; if (strcasecmp(kx[i], "SRP-RSA") == 0) kx_priority[j++] = GNUTLS_KX_SRP_RSA; if (strcasecmp(kx[i], "SRP-DSS") == 0) kx_priority[j++] = GNUTLS_KX_SRP_DSS; if (strcasecmp(kx[i], "RSA") == 0) kx_priority[j++] = GNUTLS_KX_RSA; if (strcasecmp(kx[i], "RSA-EXPORT") == 0) kx_priority[j++] = GNUTLS_KX_RSA_EXPORT; if (strncasecmp(kx[i], "DHE-RSA", 7) == 0) kx_priority[j++] = GNUTLS_KX_DHE_RSA; if (strncasecmp(kx[i], "DHE-DSS", 7) == 0) kx_priority[j++] = GNUTLS_KX_DHE_DSS; if (strncasecmp(kx[i], "ANON", 4) == 0) kx_priority[j++] = GNUTLS_KX_ANON_DH; } kx_priority[j] = 0; } } void parse_comp(char **comp, int ncomp, int *comp_priority) { int i, j; if (comp != NULL && ncomp > 0) { for (j = i = 0; i < ncomp; i++) { if (strncasecmp(comp[i], "NUL", 3) == 0) comp_priority[j++] = GNUTLS_COMP_NULL; if (strncasecmp(comp[i], "ZLI", 3) == 0) comp_priority[j++] = GNUTLS_COMP_ZLIB; } comp_priority[j] = 0; } } #ifndef HAVE_INET_NTOP #ifdef _WIN32 # include #else # include # include # include #endif const char *inet_ntop(int af __attribute__((unused)), const void *src, char *dst, size_t cnt) { char* ret; ret = inet_ntoa( *((struct in_addr*)src)); if (strlen(ret) > cnt) { return NULL; } strcpy( dst, ret); return dst; } #endif void sockets_init( void) { #ifdef _WIN32 WORD wVersionRequested; WSADATA wsaData; wVersionRequested = MAKEWORD(1, 1); if (WSAStartup(wVersionRequested, &wsaData) != 0) { perror("WSA_STARTUP_ERROR"); } #endif } wmbiff-0.4.36/wmbiff/wmbiff-master-led.xpm0000644000207400020740000004377213465246305015331 00000000000000/* XPM */ static const char * wmbiff_master_xpm[] = { "160 109 15 1", " c #00000000FFFF", ". c #505075000000", "X c #FFFFFFFF0000", "o c #492441030000", "O c #79E779E70820", "+ c #000000000000", "@ c #C71BC30BC71B", ": c #000049244103", "$ c #2081B2CAAEBA", "% c #00007DF771C6", "& c #B6DA04101861", "* c #0000EBAD0000", "= c #28A23CF338E3", "- c #F7DEF3CEFFFF", "; c #71C6E38D71C6", " ................................................................................ ", " ...XXX...oooO.OXXXO.OXXXO.OoooO.OXXXO.OXXXO.OXXXO.OXXXO.OXXXO................... ", " ..X...X.o...X.o...X.o...X.X...X.X...o.X...o.o...X.X...X.X...X............X...... ", " ..X...X.o...X.o...X.o...X.X...X.X...o.X...o.o...X.X...X.X...X..X....X....X...... ", " ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ..OoooO..oooO.OXXXO..XXXO.OXXXO.OXXXO.OXXXO..oooO.oXXXo.OXXXO..O....O...X....... ", " +......................................................@ ..X...X.o...X.X...o.o...X.o...X.o...X.X...X.o...X.X...X.o...X...........X....... ", " +..:::...:::...:::...:::...:::.......:::...:::...:::...@ ..X...X.o...X.X...o.o...X.o...X.o...X.X...X.o...X.X...X.o...X..X....X..X........ ", " +.:...:.:...:.:...:.:...:.:...:.....:...:.:...:.:...:..@ ...XXX...oooX.OXXXO.OXXXO..oooO.OXXXO.OXXXO..oooO.OXXXO.OXXXO..O....O..X........ ", " +.:...:.:...:.:...:.:...:.:...:..:..:...:.:...:.:...:..@ ................................................................................ ", " +..:::...:::...:::...:::...:::...:...:::...:::...:::...@ . ", " +.:...:.:...:.:...:.:...:.:...:.....:...:.:...:.:...:..@ . ", " +.:...:.:...:.:...:.:...:.:...:..:..:...:.:...:.:...:..@ . ", " +..:::...:::...:::...:::...:::...:...:::...:::...:::...@ . ", " +......................................................@ . ", " +......................................................@ . ", " +......................................................@ . ", " +......................................................@ . ", " +..:::...:::...:::...:::...:::.......:::...:::...:::...@ . ", " +.:...:.:...:.:...:.:...:.:...:.....:...:.:...:.:...:..@ . ", " +.:...:.:...:.:...:.:...:.:...:..:..:...:.:...:.:...:..@ . ", " +..:::...:::...:::...:::...:::...:...:::...:::...:::...@ . ", " +.:...:.:...:.:...:.:...:.:...:.....:...:.:...:.:...:..@ . ", " +.:...:.:...:.:...:.:...:.:...:..:..:...:.:...:.:...:..@ . ", " +..:::...:::...:::...:::...:::...:...:::...:::...:::...@ . ", " +......................................................@ . ", " +......................................................@ . ", " +......................................................@ . ", " +......................................................@ . ", " +..:::...:::...:::...:::...:::.......:::...:::...:::...@ . ", " +.:...:.:...:.:...:.:...:.:...:.....:...:.:...:.:...:..@ . ", " +.:...:.:...:.:...:.:...:.:...:..:..:...:.:...:.:...:..@ . ", " +..:::...:::...:::...:::...:::...:...:::...:::...:::...@ . ", " +.:...:.:...:.:...:.:...:.:...:.....:...:.:...:.:...:..@ . ", " +.:...:.:...:.:...:.:...:.:...:..:..:...:.:...:.:...:..@ . ", " +..:::...:::...:::...:::...:::...:...:::...:::...:::...@ . ", " +......................................................@ . ", " +......................................................@ . ", " +......................................................@ . ", " +......................................................@ . ", " +..:::...:::...:::...:::...:::.......:::...:::...:::...@ . ", " +.:...:.:...:.:...:.:...:.:...:.....:...:.:...:.:...:..@ . ", " +.:...:.:...:.:...:.:...:.:...:..:..:...:.:...:.:...:..@ . ", " +..:::...:::...:::...:::...:::...:...:::...:::...:::...@ . ", " +.:...:.:...:.:...:.:...:.:...:.....:...:.:...:.:...:..@ . ", " +.:...:.:...:.:...:.:...:.:...:..:..:...:.:...:.:...:..@ . ", " +..:::...:::...:::...:::...:::...:...:::...:::...:::...@ . ", " +......................................................@ . ", " +......................................................@ . ", " +......................................................@ . ", " +......................................................@ . ", " +..:::...:::...:::...:::...:::.......:::...:::...:::...@ . ", " +.:...:.:...:.:...:.:...:.:...:.....:...:.:...:.:...:..@ . ", " +.:...:.:...:.:...:.:...:.:...:..:..:...:.:...:.:...:..@ . ", " +..:::...:::...:::...:::...:::...:...:::...:::...:::...@ . ", " +.:...:.:...:.:...:.:...:.:...:.....:...:.:...:.:...:..@ . ", " +.:...:.:...:.:...:.:...:.:...:..:..:...:.:...:.:...:..@ . ", " +..:::...:::...:::...:::...:::...:...:::...:::...:::...@ . ", " +......................................................@ . ", " +......................................................@ . ", " @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ . ", " . ", " . ", " . ", " . ", "............................................................................... ", "..$$$...:::%.%$$$%.%$$$%.%:::%.%$$$%.%$$$%.%$$$%.:$$$%.%$$$%................... ", ".$...$.:...$.:...$.:...$.$...$.$...:.$...:.:...$.$...$.$...$............$...... .&&. .**. .==. ", ".$...$.:...$.:...$.:...$.$...$.$...:.$...:.:...$.$...$.$...$..$....$....$...... &-&& *-** ==== ", ".%:::%..:::%.%$$$%..$$$%.%$$$%.%$$$%.%$$$%..:::%.:$$$:.%$$$%..%....%...$....... &&&& **** ==== .$:; ", ".$...$.:...$.$...:.:...$.:...$.:...$.$...$.:...$.$...$.:...$...........$....... .&&. .**. .==. ", ".$...$.:...$.$...:.:...$.:...$.:...$.$...$.:...$.$...$.:...$..$....$..$........ ", "..$$$...:::$.%$$$%.%$$$%..:::%.%$$$%.%$$$%..:::%.%$$$:.%$$$%..%....%..$........ ", "............................................................................... ", " ", "................................................................................................................................................................", ".:$$$:.%$$$..%$$$%.%$$$..%$$$%.%$$$%.%$$$%.%:::%..:::%..:::%.%:::%.%:::..$:::$.%$$$..%$$$%.%$$$%.%$$$%.%$$$%.%$$$%.%$$$%.%:::%.%:::%.%:::%.%:::%.%:::%.%$$$%....", ".$...$.$...$.$...:.$...$.$...:.$...:.$...:.$...$.:...$.:...$.$...$.$...:.$$.$$.$...$.$...$.$...$.$...$.$...$.$...:.:.$.:.$...$.$...$.$...$.$...$.$...$.:...$....", ".$...$.$...$.$...:.$...$.$...:.$...:.$...:.$...$.:...$.:...$.$..$:.$...:.$.$.$.$...$.$...$.$...$.$...$.$...$.$...:.:.$.:.$...$.$...$.$...$.:$.$:.$...$.:..$:....", ".%$$$%.%$$$..%:::..%:::%.%$$$..%$$$..%:$$%.%$$$%..:::%..:::%.%$$:..%:::..%:::%.%:::%.%:::%.%$$$%.%$::%.%$$$..%$$$%..:%:..%:::%.%:::%.%:::%..:$:..%$$$%..:$:.....", ".$...$.$...$.$...:.$...$.$...:.$...:.$...$.$...$.:...$.:...$.$..$:.$...:.$...$.$...$.$...$.$...:.$.$.$.$...$.:...$.:.$.:.$...$.$...$.$.$.$.:$.$:.:...$.:$..:....", ".$...$.$...$.$...:.$...$.$...:.$...:.$...$.$...$.:...$.:...$.$...$.$...:.$...$.$...$.$...$.$...:.$..$$.$...$.:...$.:.$.:.$...$.$...$.$$.$$.$...$.:...$.$...:....", ".%:::%.%$$$..%$$$%.$$$$..%$$$%.$:::..%$$$%.%:::%..:::$.:$$$%.%:::%.%$$$:.%:::%.$:::$.%$$$%.%:::..%$$$%.%:::%.%$$$%..:%:..:$$$$..$$$..$:::$.%:::$.:$$$%.%$$$%....", "................................................................................................................................................................", " ", " +......................................................@ . ", " ..:::...:::...:::...:::...:::.......:::...:::...:::... ", " .:...:.:...:.:...:.:...:.:...:.....:...:.:...:.:...:.. ", " .:...:.:...:.:...:.:...:.:...:..:..:...:.:...:.:...:.. ", " ..:::...:::...:::...:::...:::...:...:::...:::...:::... ", " .:...:.:...:.:...:.:...:.:...:.....:...:.:...:.:...:.. ", " .:...:.:...:.:...:.:...:.:...:..:..:...:.:...:.:...:.. ", " ..:::...:::...:::...:::...:::...:...:::...:::...:::... ", " ...................................................... ", " ...................................................... ", " ", "................................................................................................................................................................", ".oXXXo.OXXX..OXXXO.OXXX..OXXXO.OXXXO.OXXXO.OoooO..oooO..oooO.OoooO.Oooo..XoooX.OXXX..OXXXO.OXXXO.OXXXO.OXXXO.OXXXO.OXXXO.OoooO.OoooO.OoooO.OoooO.OoooO.OXXXO....", ".X...X.X...X.X...o.X...X.X...o.X...o.X...o.X...X.o...X.o...X.X...X.X...o.XX.XX.X...X.X...X.X...X.X...X.X...X.X...o.o.X.o.X...X.X...X.X...X.X...X.X...X.o...X....", ".X...X.X...X.X...o.X...X.X...o.X...o.X...o.X...X.o...X.o...X.X..Xo.X...o.X.X.X.X...X.X...X.X...X.X...X.X...X.X...o.o.X.o.X...X.X...X.X...X.oX.Xo.X...X.o..Xo....", ".OXXXO.OXXX..Oooo..OoooO.OXXX..OXXX..OoXXO.OXXXO..oooO..oooO.OXXo..Oooo..OoooO.OoooO.OoooO.OXXXO.OXooO.OXXX..OXXXO..oOo..OoooO.OoooO.OoooO..oXo..OXXXO..oXo.....", ".X...X.X...X.X...o.X...X.X...o.X...o.X...X.X...X.o...X.o...X.X..Xo.X...o.X...X.X...X.X...X.X...o.X.X.X.X...X.o...X.o.X.o.X...X.X...X.X.X.X.oX.Xo.o...X.oX..o....", ".X...X.X...X.X...o.X...X.X...o.X...o.X...X.X...X.o...X.o...X.X...X.X...o.X...X.X...X.X...X.X...o.X..XX.X...X.o...X.o.X.o.X...X.X...X.XX.XX.X...X.o...X.X...o....", ".OoooO.OXXX..OXXXO.XXXX..OXXXO.Xooo..OXXXO.OoooO..oooX.OXXXO.OoooO.OXXXo.OoooO.XoooX.OXXXO.Oooo..OXXXO.OoooO.OXXXO..oOo..oXXXX..XXX..XoooX.OoooX.oXXXO.OXXXO....", "................................................................................................................................................................", " ", " ", " ", " ", " ", " "}; wmbiff-0.4.36/wmbiff/test_tlscomm.c0000644000207400020740000000410713556541661014150 00000000000000#include #include #include #include #include #include #include int debug_default = 2; int SkipCertificateCheck = 0; const char *certificate_filename = NULL; const char *tls = "NORMAL"; int exists(const char *filename __attribute__ ((unused))) { return (0); } void ProcessPendingEvents(void) { return; } int x_socket(void) { return (0); } int print_info(void *state __attribute__((unused))) { return (0); } int Relax = 1; int indices[12]; const char *sequence[][4] = { {NULL, NULL, NULL, NULL}, {"prefix", " hello", NULL}, {"pre", "fix", " hello", NULL}, {"\r\n", ")\r\n", "prefix", NULL}, {NULL, NULL, NULL, NULL}, }; /* trick tlscomm into believing it can read. */ ssize_t read(int s, void *buf, size_t buflen) { int val = indices[s]++; if (sequence[s][val] == NULL) { indices[s]--; /* make it stay */ return 0; } else { strncpy(buf, sequence[s][val], buflen); printf("read: %s\n", sequence[s][val]); return (strlen(sequence[s][val])); } } int select(int nfds, fd_set * r, fd_set * w __attribute__ ((unused)), fd_set * x __attribute__ ((unused)), struct timeval *tv __attribute__ ((unused))) { int i; int ready = 0; for (i = 0; i < nfds; i++) { if (FD_ISSET(i, r) && sequence[i][indices[i]] != NULL) { ready++; } else { FD_CLR(i, r); } } if (ready == 0) { printf("botched.\n"); } return ready; } #define BUF_SIZE 1024 struct connection_state { int sd; char *name; /*@null@ */ void *tls_state; /*@null@ */ void *xcred; char unprocessed[BUF_SIZE]; void *pc; /* mailbox handle for debugging messages */ }; int main(int argc __attribute__ ((unused)), char **argv __attribute__ ((unused))) { char buf[255]; struct connection_state scs; scs.name = strdup("test"); scs.unprocessed[0] = '\0'; scs.pc = NULL; scs.tls_state = NULL; scs.xcred = NULL; alarm(10); for (scs.sd = 1; sequence[scs.sd][0] != NULL; scs.sd++) { memset(scs.unprocessed, 0, BUF_SIZE); printf("%d\n", tlscomm_expect(&scs, "prefix", buf, 255)); } free(scs.name); return 0; } wmbiff-0.4.36/wmbiff/wmbiff.10000644000207400020740000001070213500471555012612 00000000000000.\" Hey, Emacs! This is an -*- nroff -*- source file. .\" $Id: wmbiff.1,v 1.13 2003/02/08 21:04:48 bluehal Exp $ .\" .\" wmbiff.1 and wmbiffrc.5 are copyright 1999-2001 by .\" Jordi Mallach .\" .\" This is free documentation, see the latest version of the GNU .\" General Public License for copying conditions. There is NO warranty. .TH WMBIFF 1 "October 4, 2001" "wmbiff" .SH NAME WMBiff \- A dockable Mailbox Monitor .SH SYNOPSIS .B wmbiff [\-display ] [\-geometry +XPOS+YPOS] [\-c ] [\-h] [\-v] [\-debug] [\-fg ] [\-bg ] [\-hi ] [\-font |default] [\-o] [+w] .br .SH DESCRIPTION WMbiff displays the status of up to five mailboxes. It shows the number of new mail messages, if any, otherwise 0. In classic mode instead of 0 it shows the total number of messages. It also has mail retrieval capabilities, and can be configured to do this automatically. At the moment, UNIX-style, maildir, POP3, APOP and IMAP4 mailboxes are supported. The mailboxes are displayed in 5 different lines, each one with its own description of up to five chars. If no mail is present in a given mailbox, WMbiff will display the total number of mails in cyan. If there's new mail in the box, the number of new messages will be displayed in yellow. When new mail arrives, this number will optionally flash for a small period of time, and also optionally, a command can be executed on mail arrival (for example, opening your mail reader or playing a sound file). Pressing mouse button 1 will execute a command, defined in the user's config file. Mouse button 3 will execute a command to fetch mail, if defined. To restart wmbiff, press mouse button 1 while holding control and shift keys, or send it SIGUSR1. .PP .SH OPTIONS .TP .B \-h Show summary of options. .TP .B \-v Show version of program. .TP .B \-display Use an alternate X Display. .TP .B \-geometry Initial window position. .TP .B \-c Use specified configuration file instead of ~/.wmbiffrc. .TP .B \-debug Print verbose log of progress. .TP .B \-fg Use specified X11 color for foreground. Implies \-font default, unless overridden. .TP .B \-bg Use specified X11 color for background. Implies \-font default, unless overridden. .TP .B \-hi Use specified X11 color for new mail counters. Implies \-font default, unless overridden. .TP .B \-font Use specified X11 font instead of the LED pixmap. This may be more readable or suitable for some non-US characters. The special font "default" tells wmbiff to use a compile time default. .TP .B \-skip-certificate-check When using TLS (IMAPS), keep going, even if the server's certificate is invalid. Invalid certificates have expired, have a different hostname than you connected to, are corrupt, or have been revoked. Do not use this option unless wmbiff fails and suggests it to you, and even then, be careful and consider alerting your mail system administrator first. The need to use this option is a sign of server misconfiguration. .TP .B \-relax Assume the configuration is correct, parse it without paranoia, and assume hostnames are okay. .TP .B \-o Enable classical mode look and behaviour: shows the number of new mail messages, if any, or the total number of messages. This option also enables the special keyword "beep" (disabled by default). .TP .B \+w Do not use the "withdrawn" state: the wmbiff window will not be captured as an icon and placed in the dock, but will instead have its own window. This option starts with a '+' for consistency with other software programs: many use '\-w' to mean the opposite. .SH BUGS Send bug reports or suggestions to the Window Maker Development Mailing List . Consider attaching a transcript of your session, generated using: .RS wmbiff \-debug | tee wmbiff-log .RE Be sure to remove any instances of your password. .SH FILES .TP .I ~/.wmbiffrc peruser wmbiff configuration file. .SH AUTHOR This manual page was written by Jordi Mallach , originally for the Debian system (but may be used by others). .br WMBiff was first maintained by Gennady Belyakov. Since January 2001 it is maintained group of people that have added lots of new features to the original program. Please see the README document for a list of all the people involved. .SH SEE ALSO .PD 0 .TP \fBwmbiffrc\fP(5) .PP \fI/usr/share/doc/wmbiff/examples/sample.wmbiffrc\fP (or equivalent for your system) wmbiff-0.4.36/wmbiff/tlsComm.c0000644000207400020740000005044113556541661013053 00000000000000/* tlsComm.c - primitive routines to aid TLS communication within wmbiff, without rewriting each mailbox access scheme. These functions hide whether the underlying transport is encrypted. Neil Spring (nspring@cs.washington.edu) */ /* TODO: handle "* BYE" internally? */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #include #ifdef HAVE_GNUTLS_GNUTLS_H #define USE_GNUTLS #include #include #include #endif #ifdef USE_DMALLOC #include #endif #include "tlsComm.h" #include "Client.h" /* debugging messages */ /* if non-null, set to a file for certificate verification */ extern const char *certificate_filename; /* if set, don't fail when dealing with a bad certificate. (continue to whine, though, as bad certs should be fixed) */ extern int SkipCertificateCheck; /* gnutls: specify the priorities to use on the ciphers, key exchange methods, macs and compression methods. */ extern const char *tls; /* WARNING: implcitly uses scs to gain access to the mailbox that holds the per-mailbox debug flag. */ #define TDM(lvl, args...) DM(scs->pc, lvl, "comm: " args) /* how long to wait for the server to do its thing when we issue it a command (in seconds) */ #define EXPECT_TIMEOUT 40 /* this is the per-connection state that is maintained for each connection; BIG variables are for ssl (null if not used). */ #define BUF_SIZE 1024 struct connection_state { int sd; char *name; #ifdef USE_GNUTLS gnutls_session_t tls_state; gnutls_certificate_credentials_t xcred; #else /*@null@ */ void *tls_state; /*@null@ */ void *xcred; #endif char unprocessed[BUF_SIZE]; Pop3 *pc; /* mailbox handle for debugging messages */ }; /* gotta do our own line buffering, sigh */ int getline_from_buffer(char *readbuffer, char *linebuffer, int linebuflen); void handle_gnutls_read_error(int readbytes, struct connection_state *scs); void tlscomm_close(struct connection_state *scs) { TDM(DEBUG_INFO, "%s: closing.\n", (scs->name != NULL) ? scs->name : "null"); /* not ok to call this more than once */ if (scs->tls_state) { #ifdef USE_GNUTLS /* this next line seems capable of hanging... */ /* gnutls_bye(scs->tls_state, GNUTLS_SHUT_RDWR); */ /* so we'll try just _bye'ing the WR direction, which should send the alert but not wait for a response. */ gnutls_bye(scs->tls_state, GNUTLS_SHUT_WR); gnutls_certificate_free_credentials(scs->xcred); gnutls_deinit(scs->tls_state); scs->xcred = NULL; #endif } else { (void) close(scs->sd); } scs->sd = -1; scs->tls_state = NULL; scs->xcred = NULL; free(scs->name); scs->name = NULL; free(scs); } extern int x_socket(void); extern void ProcessPendingEvents(void); /* this avoids blocking without using non-blocking i/o */ static int wait_for_it(int sd, int timeoutseconds) { fd_set readfds; struct timeval tv; int ready_descriptors; int maxfd; int xfd; struct timeval time_now; struct timeval time_out; gettimeofday(&time_now, NULL); memcpy(&time_out, &time_now, sizeof(struct timeval)); time_out.tv_sec += timeoutseconds; xfd = x_socket(); maxfd = max(sd, xfd); do { do { ProcessPendingEvents(); gettimeofday(&time_now, NULL); tv.tv_sec = max(time_out.tv_sec - time_now.tv_sec + 1, (time_t) 0); /* sloppy, but bfd */ tv.tv_usec = 0; /* select will return if we have X stuff or we have comm stuff on sd */ FD_ZERO(&readfds); FD_SET(sd, &readfds); // FD_SET(xfd, &readfds); ready_descriptors = select(maxfd + 1, &readfds, NULL, NULL, &tv); // DMA(DEBUG_INFO, // "select %d/%d returned %d descriptor, %d\n", // sd, timeoutseconds, ready_descriptors, FD_ISSET(sd, &readfds)); } while(tv.tv_sec > 0 && (!FD_ISSET(sd, &readfds) || (errno == EINTR && ready_descriptors == -1))); FD_ZERO(&readfds); FD_SET(sd, &readfds); tv.tv_sec = 0; tv.tv_usec = 0; ready_descriptors = select(sd + 1, &readfds, NULL, NULL, &tv); } while (ready_descriptors == -1 && errno == EINTR); if (ready_descriptors == 0) { DMA(DEBUG_INFO, "select timed out after %d seconds on socket: %d\n", timeoutseconds, sd); return (0); } else if (ready_descriptors == -1) { DMA(DEBUG_ERROR, "select failed on socket %d: %s\n", sd, strerror(errno)); return (0); } return (FD_ISSET(sd, &readfds)); } /* exported for testing */ extern int getline_from_buffer(char *readbuffer, char *linebuffer, int linebuflen) { char *p, *q; int i; /* find end of line (stopping if linebuflen is too small. */ for (p = readbuffer, i = 0; *p != '\n' && *p != '\0' && i < linebuflen - 1; p++, i++); /* gobble \n if it starts the line. */ if (*p == '\n') { /* grab the end of line too! and then advance past the newline */ i++; p++; } else { /* TODO -- perhaps we should return no line at all here, as it might be incomplete. don't want to break anything though. */ DMA(DEBUG_INFO, "expected line doesn't end on its own.\n"); } if (i != 0) { /* copy a line into the linebuffer */ strncpy(linebuffer, readbuffer, (size_t) i); /* sigh, null terminate */ linebuffer[i] = '\0'; /* shift the rest over; this could be done instead with strcpy... I think. */ q = readbuffer; if (*p != '\0') { while (*p != '\0') { *(q++) = *(p++); } } /* null terminate */ *(q++) = *(p++); /* return the length of the line */ } if (i < 0 || i > linebuflen) { DM((Pop3 *) NULL, DEBUG_ERROR, "bork bork bork!: %d %d\n", i, linebuflen); } return i; } /* eat lines, until one starting with prefix is found; this skips 'informational' IMAP responses */ /* the correct response to a return value of 0 is almost certainly tlscomm_close(scs): don't _expect() anything unless anything else would represent failure */ int tlscomm_expect(struct connection_state *scs, const char *prefix, char *linebuf, int buflen) { int prefixlen = (int) strlen(prefix); int buffered_bytes = 0; memset(linebuf, 0, buflen); TDM(DEBUG_INFO, "%s: expecting: %s\n", scs->name, prefix); /* if(scs->unprocessed[0]) { TDM(DEBUG_INFO, "%s: buffered: %s\n", scs->name, scs->unprocessed); } */ while (scs->unprocessed[0] != '\0' || wait_for_it(scs->sd, EXPECT_TIMEOUT)) { if (scs->unprocessed[buffered_bytes] == '\0') { int thisreadbytes; #ifdef USE_GNUTLS if (scs->tls_state) { /* BUF_SIZE - 1 leaves room for trailing \0 */ do { thisreadbytes = gnutls_read(scs->tls_state, &scs->unprocessed[buffered_bytes], BUF_SIZE - 1 - buffered_bytes); } while (thisreadbytes == GNUTLS_E_AGAIN); if (thisreadbytes < 0) { handle_gnutls_read_error(thisreadbytes, scs); return 0; } } else #endif { thisreadbytes = read(scs->sd, &scs->unprocessed[buffered_bytes], BUF_SIZE - 1 - buffered_bytes); if (thisreadbytes < 0) { TDM(DEBUG_ERROR, "%s: error reading: %s\n", scs->name, strerror(errno)); return 0; } } buffered_bytes += thisreadbytes; /* force null termination */ scs->unprocessed[buffered_bytes] = '\0'; if (buffered_bytes == 0) { return 0; /* bummer */ } } else { buffered_bytes = strlen(scs->unprocessed); } while (buffered_bytes >= prefixlen) { int linebytes; linebytes = getline_from_buffer(scs->unprocessed, linebuf, buflen); if (linebytes == 0) { buffered_bytes = 0; } else { buffered_bytes -= linebytes; if (strncmp(linebuf, prefix, prefixlen) == 0) { TDM(DEBUG_INFO, "%s: got: %*s", scs->name, linebytes, linebuf); return 1; /* got it! */ } TDM(DEBUG_INFO, "%s: dumped(%d/%d): %.*s", scs->name, linebytes, buffered_bytes, linebytes, linebuf); } } } if (buffered_bytes == -1) { TDM(DEBUG_INFO, "%s: timed out while expecting '%s'\n", scs->name, prefix); } else { TDM(DEBUG_ERROR, "%s: expecting: '%s', saw (%d): %s%s", scs->name, prefix, buffered_bytes, linebuf, /* only print the newline if the linebuf lacks it */ (linebuf[strlen(linebuf) - 1] == '\n') ? "\n" : ""); } return 0; /* wait_for_it failed */ } int tlscomm_gets(char *buf, int buflen, struct connection_state *scs) { return (tlscomm_expect(scs, "", buf, buflen)); } void tlscomm_printf(struct connection_state *scs, const char *format, ...) { va_list args; char buf[1024]; int bytes; ssize_t unused __attribute__((unused)); if (scs == NULL) { DMA(DEBUG_ERROR, "null connection to tlscomm_printf\n"); abort(); } va_start(args, format); bytes = vsnprintf(buf, 1024, format, args); va_end(args); if (scs->sd != -1) { #ifdef USE_GNUTLS if (scs->tls_state) { int written = gnutls_write(scs->tls_state, buf, bytes); if (written < bytes) { TDM(DEBUG_ERROR, "Error %s prevented writing: %*s\n", gnutls_strerror(written), bytes, buf); return; } } else #endif /* Why???? */ unused = write(scs->sd, buf, bytes); } else { printf ("warning: tlscomm_printf called with an invalid socket descriptor\n"); return; } TDM(DEBUG_INFO, "wrote %*s", bytes, buf); } /* most of this file only makes sense if using TLS. */ #ifdef USE_GNUTLS #include "gnutls-common.h" static void bad_certificate(const struct connection_state *scs, const char *msg) { TDM(DEBUG_ERROR, "%s", msg); if (!SkipCertificateCheck) { TDM(DEBUG_ERROR, "to ignore this error, run wmbiff " "with the -skip-certificate-check option\n"); exit(1); } } static void warn_certificate(const struct connection_state *scs, const char *msg) { if (!SkipCertificateCheck) { TDM(DEBUG_ERROR, "%s", msg); TDM(DEBUG_ERROR, "to ignore this warning, run wmbiff " "with the -skip-certificate-check option\n"); } } /* a start of a hack at verifying certificates. does not provide any security at all. I'm waiting for either gnutls to make this as easy as it should be, or someone to port Andrew McDonald's gnutls-for-mutt patch. */ #define CERT_SEP "-----BEGIN" /* this bit is based on read_ca_file() in gnutls */ static int tls_compare_certificates(const gnutls_datum_t * peercert) { gnutls_datum_t cert; unsigned char *ptr; FILE *fd1; int ret; gnutls_datum_t b64_data; unsigned char *b64_data_data; struct stat filestat; if (stat(certificate_filename, &filestat) == -1) return 0; b64_data.size = filestat.st_size + 1; b64_data_data = (unsigned char *) malloc(b64_data.size); b64_data_data[b64_data.size - 1] = '\0'; b64_data.data = b64_data_data; fd1 = fopen(certificate_filename, "r"); if (fd1 == NULL) { free(b64_data_data); return 0; } b64_data.size = fread(b64_data.data, 1, b64_data.size, fd1); fclose(fd1); do { ret = gnutls_pem_base64_decode_alloc(NULL, &b64_data, &cert); if (ret != 0) { free(b64_data_data); return 0; } ptr = (unsigned char *) strstr((char *) b64_data.data, CERT_SEP) + 1; ptr = (unsigned char *) strstr((char *) ptr, CERT_SEP); b64_data.size = b64_data.size - (ptr - b64_data.data); b64_data.data = ptr; if (cert.size == peercert->size) { if (memcmp(cert.data, peercert->data, cert.size) == 0) { /* match found */ gnutls_free(cert.data); free(b64_data_data); return 1; } } gnutls_free(cert.data); } while (ptr != NULL); /* no match found */ free(b64_data_data); return 0; } static void tls_check_certificate(struct connection_state *scs, const char *remote_hostname) { int ret; unsigned int certstat; const gnutls_datum_t *cert_list; unsigned int cert_list_size = 0; gnutls_x509_crt_t cert; if (gnutls_auth_get_type(scs->tls_state) != GNUTLS_CRD_CERTIFICATE) { bad_certificate(scs, "Unable to get certificate from peer.\n"); return; /* bad_cert will exit if -skip-certificate-check was not given */ } ret = gnutls_certificate_verify_peers2(scs->tls_state, &certstat); if (ret < 0) { char errbuf[1024]; snprintf(errbuf, 1024, "could not verify certificate: %s (%d).\n", gnutls_strerror(ret), ret); bad_certificate(scs, (ret == GNUTLS_E_NO_CERTIFICATE_FOUND ? "server presented no certificate.\n" : errbuf)); return; #ifdef GNUTLS_CERT_CORRUPTED } else if (certstat & GNUTLS_CERT_CORRUPTED) { bad_certificate(scs, "server's certificate is corrupt.\n"); #endif } else if (certstat & GNUTLS_CERT_REVOKED) { bad_certificate(scs, "server's certificate has been revoked.\n"); } else if (certstat & GNUTLS_CERT_EXPIRED) { bad_certificate(scs, "server's certificate is expired.\n"); } else if (certstat & GNUTLS_CERT_INSECURE_ALGORITHM) { warn_certificate(scs, "server's certificate use an insecure algorithm.\n"); } else if (certstat & GNUTLS_CERT_INVALID) { if (gnutls_certificate_type_get(scs->tls_state) == GNUTLS_CRT_X509) { /* bad_certificate(scs, "server's certificate is not trusted.\n" "there may be a problem with the certificate stored in your certfile\n"); */ } else { bad_certificate(scs, "server's certificate is invalid or not X.509.\n" "there may be a problem with the certificate stored in your certfile\n"); } #if defined(GNUTLS_CERT_SIGNER_NOT_FOUND) } else if (certstat & GNUTLS_CERT_SIGNER_NOT_FOUND) { TDM(DEBUG_INFO, "server's certificate is not signed.\n"); TDM(DEBUG_INFO, "to verify that a certificate is trusted, use the certfile option.\n"); #endif #if defined(GNUTLS_CERT_NOT_TRUSTED) } else if (certstat & GNUTLS_CERT_NOT_TRUSTED) { TDM(DEBUG_INFO, "server's certificate is not trusted.\n"); TDM(DEBUG_INFO, "to verify that a certificate is trusted, use the certfile option.\n"); #endif } if (gnutls_x509_crt_init(&cert) < 0) { bad_certificate(scs, "Unable to initialize certificate data structure"); } /* not checking for not-yet-valid certs... this would make sense if we weren't just comparing to stored ones */ cert_list = gnutls_certificate_get_peers(scs->tls_state, &cert_list_size); if (gnutls_x509_crt_import(cert, &cert_list[0], GNUTLS_X509_FMT_DER) < 0) { bad_certificate(scs, "Error processing certificate data"); } if (gnutls_x509_crt_get_expiration_time(cert) < time(NULL)) { bad_certificate(scs, "server's certificate has expired.\n"); } else if (gnutls_x509_crt_get_activation_time(cert) > time(NULL)) { bad_certificate(scs, "server's certificate is not yet valid.\n"); } else { TDM(DEBUG_INFO, "certificate passed time check.\n"); } if (gnutls_x509_crt_check_hostname(cert, remote_hostname) == 0) { char certificate_hostname[256]; size_t buflen = 255; gnutls_x509_crt_get_dn(cert, certificate_hostname, &buflen); /* gnutls_x509_extract_certificate_dn(&cert_list[0], &dn); */ TDM(DEBUG_INFO, "server's certificate (%s) does not match its hostname (%s).\n", certificate_hostname, remote_hostname); bad_certificate(scs, "server's certificate does not match its hostname.\n"); } else { if ((scs->pc)->debug >= DEBUG_INFO) { char certificate_hostname[256]; size_t buflen = 255; gnutls_x509_crt_get_dn(cert, certificate_hostname, &buflen); /* gnutls_x509_extract_certificate_dn(&cert_list[0], &dn); */ TDM(DEBUG_INFO, "server's certificate (%s) matched its hostname (%s).\n", certificate_hostname, remote_hostname); } } if (certificate_filename != NULL && tls_compare_certificates(&cert_list[0]) == 0) { bad_certificate(scs, "server's certificate was not found in the certificate file.\n"); } gnutls_x509_crt_deinit(cert); TDM(DEBUG_INFO, "certificate check ok.\n"); return; } struct connection_state *initialize_gnutls(intptr_t sd, char *name, Pop3 *pc, const char *remote_hostname) { static int gnutls_initialized; int zok; struct connection_state *scs = malloc(sizeof(struct connection_state)); memset(scs, 0, sizeof(struct connection_state)); /* clears the unprocessed buffer */ scs->pc = pc; assert(sd >= 0); if (gnutls_initialized == 0) { assert(gnutls_global_init() == 0); gnutls_initialized = 1; } assert(gnutls_init(&scs->tls_state, GNUTLS_CLIENT) == 0); { const char *err_pos; if (GNUTLS_E_SUCCESS != gnutls_priority_set_direct(scs->tls_state, tls, &err_pos)) { DMA(DEBUG_ERROR, "Unable to set the priorities to use on the ciphers, " "key exchange methods, macs and/or compression methods.\n" "See 'tls' parameter in config file: '%s'.\n", err_pos); exit(1); } /* no client private key */ if (gnutls_certificate_allocate_credentials(&scs->xcred) < 0) { DMA(DEBUG_ERROR, "gnutls memory error\n"); exit(1); } /* certfile seems to work. */ if (certificate_filename != NULL) { if (!exists(certificate_filename)) { DMA(DEBUG_ERROR, "Certificate file (certfile=) %s not found.\n", certificate_filename); exit(1); } zok = gnutls_certificate_set_x509_trust_file(scs->xcred, (char *) certificate_filename, GNUTLS_X509_FMT_PEM); if (zok < 0) { DMA(DEBUG_ERROR, "GNUTLS did not like your certificate file %s (%d).\n", certificate_filename, zok); gnutls_perror(zok); exit(1); } } gnutls_server_name_set(scs->tls_state, GNUTLS_NAME_DNS, remote_hostname, strlen(remote_hostname)); gnutls_cred_set(scs->tls_state, GNUTLS_CRD_CERTIFICATE, scs->xcred); gnutls_transport_set_ptr(scs->tls_state, (gnutls_transport_ptr_t) sd); do { zok = gnutls_handshake(scs->tls_state); } while (zok == GNUTLS_E_INTERRUPTED || zok == GNUTLS_E_AGAIN); tls_check_certificate(scs, remote_hostname); } if (zok < 0) { TDM(DEBUG_ERROR, "%s: Handshake failed\n", name); TDM(DEBUG_ERROR, "%s: This may be a problem in gnutls, " "which is under development\n", name); TDM(DEBUG_ERROR, "%s: This copy of wmbiff was compiled with \n" " gnutls version %s.\n", name, LIBGNUTLS_VERSION); gnutls_perror(zok); if (scs->pc->u.pop_imap.serverPort != 143 /* starttls */ ) { TDM(DEBUG_ERROR, "%s: Please run 'gnutls-cli-debug -p %d %s' to test ssl directly.\n" " That tool provides a lower-level test of gnutls with your server.\n", name, scs->pc->u.pop_imap.serverPort, remote_hostname); } gnutls_deinit(scs->tls_state); free(scs); return (NULL); } else { TDM(DEBUG_INFO, "%s: Handshake was completed\n", name); if (scs->pc->debug >= DEBUG_INFO) print_info(scs->tls_state, remote_hostname); scs->sd = sd; scs->name = name; } return (scs); } /* moved down here, to keep from interrupting the flow with verbose error crap */ void handle_gnutls_read_error(int readbytes, struct connection_state *scs) { if (gnutls_error_is_fatal(readbytes) == 1) { TDM(DEBUG_ERROR, "%s: Received corrupted data(%d) - server has terminated the connection abnormally\n", scs->name, readbytes); } else { if (readbytes == GNUTLS_E_WARNING_ALERT_RECEIVED || readbytes == GNUTLS_E_FATAL_ALERT_RECEIVED) TDM(DEBUG_ERROR, "* Received alert [%d]\n", gnutls_alert_get(scs->tls_state)); if (readbytes == GNUTLS_E_REHANDSHAKE) TDM(DEBUG_ERROR, "* Received HelloRequest message\n"); } TDM(DEBUG_ERROR, "%s: gnutls error reading: %s\n", scs->name, gnutls_strerror(readbytes)); } #else /* declare stubs when tls isn't compiled in */ struct connection_state *initialize_gnutls(UNUSED(intptr_t sd), UNUSED(char *name), UNUSED(Pop3 *pc), UNUSED(const char *remote_hostname)) { DM(pc, DEBUG_ERROR, "FATAL: tried to initialize ssl when ssl wasn't compiled in.\n"); exit(EXIT_FAILURE); } #endif /* either way: */ struct connection_state *initialize_unencrypted(int sd, /*@only@ */ char *name, Pop3 *pc) { struct connection_state *ret = malloc(sizeof(struct connection_state)); assert(sd >= 0); assert(ret != NULL); memset(ret, 0, sizeof(struct connection_state)); /* clears the unprocessed buffer */ ret->sd = sd; ret->name = name; ret->tls_state = NULL; ret->xcred = NULL; ret->pc = pc; return (ret); } /* bad seed connections that can't be setup */ /*@only@*/ struct connection_state *initialize_blacklist( /*@only@ */ char *name) { struct connection_state *ret = malloc(sizeof(struct connection_state)); assert(ret != NULL); ret->sd = -1; ret->name = name; ret->tls_state = NULL; ret->xcred = NULL; ret->pc = NULL; return (ret); } int tlscomm_is_blacklisted(const struct connection_state *scs) { return (scs != NULL && scs->sd == -1); } /* vim:set ts=4: */ /* * Local Variables: * tab-width: 4 * c-indent-level: 4 * c-basic-offset: 4 * End: */ wmbiff-0.4.36/wmbiff/MessageList.c0000644000207400020740000001266313556541661013661 00000000000000#include "Client.h" #include "MessageList.h" #include #ifdef HAVE_X11_XPM_H #include #endif #ifdef HAVE_XPM_H #include #endif #include /* needed for Region on solaris? */ #include #define LEFT_MAR 6 #define RIGHT_MAR 6 #define COL_SEP 4 extern Display *display; extern Window Root; extern int screen; extern int x_fd; extern int d_depth; extern Window win; static XSizeHints mysizehints; extern Pixel back_pix, fore_pix; static Window newwin; static GC localGC; extern Pixel GetColor(const char *name); static XFontStruct *fn; static int fontHeight; extern const char *foreground; extern const char *background; Pop3 *Active_pc; static int loadFont(const char *fontname) { if (display != NULL) { fn = XLoadQueryFont(display, fontname); if (fn) { XSetFont(display, localGC, fn->fid); fontHeight = fn->max_bounds.ascent + fn->max_bounds.descent + 2; return 0; } else { printf("couldn't set font! (%s)\n", fontname); } } return -1; } static int flush_expose(Window w) { XEvent dummy; int i = 0; while (XCheckTypedWindowEvent(display, w, Expose, &dummy)) i++; return i; } struct msglst *Headers; void msglst_show(Pop3 *pc, int x, int y) { int maxfrm = 0; int maxsubj = 0; int limit = 10; XGCValues gcv; unsigned long gcm; Active_pc = pc; /* hold so we can release later. */ /* local gc */ gcm = GCForeground | GCBackground | GCGraphicsExposures; gcv.foreground = GetColor(foreground); gcv.background = GetColor(background); gcv.graphics_exposures = 0; localGC = XCreateGC(display, Root, gcm, &gcv); if (fn == NULL) { /* loadFont? or use a proportional instead? mmm. */ if (loadFont("-*-fixed-*-r-*-*-10-*-*-*-*-*-*-*") < 0) { return; } } if (pc->getHeaders == NULL) { DM(pc, DEBUG_INFO, "no getHeaders callback\n"); return; } Headers = pc->getHeaders(pc); if (Headers == NULL) { #define NO_MSG "no new messages" mysizehints.height = 5 + fontHeight; mysizehints.width = XTextWidth(fn, NO_MSG, strlen(NO_MSG)); DM(pc, DEBUG_INFO, "no new messages\n"); } else { struct msglst *h; mysizehints.height = 5; for (h = Headers; h != NULL && limit > 0; h = h->next, limit--) { int frmlen; char *c; int subjlen; if ((c = index(h->from, '\r')) != NULL) { *c = '\0'; /* chomp newlines */ } if ((c = index(h->subj, '\r')) != NULL) { *c = '\0'; /* chomp newlines */ } if ((c = index(h->from, '<')) != NULL) { *c = '\0'; /* chomp from[0] == '"') { /* remove "'s */ for (c = &h->from[1]; *c && *c != '"'; c++) { *(c - 1) = *c; } *(c - 1) = '\0'; } subjlen = XTextWidth(fn, h->subj, strlen(h->subj)); frmlen = XTextWidth(fn, h->from, strlen(h->from)); if (frmlen > maxfrm) { maxfrm = frmlen; } if (subjlen > maxsubj) { maxsubj = subjlen; } mysizehints.height += fontHeight; } mysizehints.width = maxfrm + maxsubj + LEFT_MAR + RIGHT_MAR + COL_SEP; } /* Create a window to hold the stuff */ mysizehints.flags = USSize | USPosition; mysizehints.x = max(x - mysizehints.width, 0); mysizehints.y = max(y - mysizehints.height, 0); newwin = XCreateSimpleWindow(display, Root, mysizehints.x, mysizehints.y, mysizehints.width, mysizehints.height, 2, gcv.foreground, gcv.background); XSetWMNormalHints(display, newwin, &mysizehints); XStoreName(display, newwin, pc->label); XSelectInput(display, newwin, ExposureMask); { /* I confess I don't know what this does or whether it matters */ XSetWindowAttributes xswa; xswa.backing_store = Always; xswa.bit_gravity = CenterGravity; XChangeWindowAttributes(display, newwin, CWBackingStore | CWBitGravity, &xswa); } XMapWindow(display, newwin); } /* may be called without the window open */ void msglst_hide(void) { if (newwin) { flush_expose(newwin); /* swallow the messages */ XDestroyWindow(display, newwin); // } else { // no window fprintf(stderr, "unexpected error destroying msglist window\n"); if (Active_pc->releaseHeaders != NULL && Headers != NULL) { Active_pc->releaseHeaders(Active_pc, Headers); } newwin = 0; } } void msglst_redraw(void) { XEvent dummy; unsigned int width, height; unsigned int bw, d; int x, y; Window r; if (newwin == 0) { return; } while (XCheckTypedWindowEvent(display, newwin, Expose, &dummy)); XGetGeometry(display, newwin, &r, &x, &y, &width, &height, &bw, &d); XSetForeground(display, localGC, GetColor(background)); XFillRectangle(display, newwin, localGC, 0, 0, width, height); XSetForeground(display, localGC, GetColor(foreground)); XSetBackground(display, localGC, GetColor(background)); if (Headers == NULL) { XDrawString(display, newwin, localGC, 0, fontHeight, NO_MSG, strlen(NO_MSG)); flush_expose(newwin); } else { int linenum; struct msglst *h; int limit = 10; int maxfrm = 0; /* draw the from lines */ for (h = Headers, linenum = 0; h != NULL && linenum < limit; h = h->next, linenum++) { int frm = XTextWidth(fn, h->from, strlen(h->from)); if (frm > maxfrm) { maxfrm = frm; } XDrawString(display, newwin, localGC, LEFT_MAR, (linenum + 1) * fontHeight, h->from, strlen(h->from)); } /* draw the subject lines */ for (h = Headers, linenum = 0; h != NULL && linenum < limit; h = h->next, linenum++) { XDrawString(display, newwin, localGC, LEFT_MAR + maxfrm + COL_SEP, (linenum + 1) * fontHeight, h->subj, strlen(h->subj)); } } } wmbiff-0.4.36/wmbiff/tlsComm.h0000644000207400020740000000445013515611242013043 00000000000000/* tlsComm.h - interface for the thin layer that looks sort of like fgets and fprintf, but might read or write to a socket or a TLS association Neil Spring (nspring@cs.washington.edu) Comments in @'s are for lclint's benefit: http://lclint.cs.virginia.edu/ */ /* used to drill through per-mailbox debug keys */ #include #include "Client.h" /* opaque reference to the state associated with a connection: may be just a file handle, or may include encryption state */ struct connection_state; /* take a socket descriptor and negotiate a TLS connection over it */ /*@only@*/ struct connection_state *initialize_gnutls(intptr_t sd, /* @only@ */ char *name, Pop3 *pc, const char *hostname); /* take a socket descriptor and bundle it into a connection state structure for later communication */ /*@only@*/ struct connection_state *initialize_unencrypted(int sd, /*@only@ */ char *name, Pop3 * pc); /* store a binding when connect() times out. these should be skipped when trying to check mail so that other mailboxes are checked responsively. I believe linux defaults to around 90 seconds for a failed connect() attempt */ /* TODO: engineer an eventual retry scheme */ /*@only@*/ struct connection_state *initialize_blacklist( /*@only@ */ char *name); int tlscomm_is_blacklisted(const struct connection_state *scs); /* just like fprintf, only takes a connection state structure */ void tlscomm_printf(struct connection_state *scs, const char *format, ...); /* modeled after fgets; may not work exactly the same */ int tlscomm_gets( /*@out@ */ char *buf, int buflen, struct connection_state *scs); /* gobbles lines until it finds one starting with {prefix}, which is returned in buf */ int tlscomm_expect(struct connection_state *scs, const char *prefix, /*@out@ */ char *buf, int buflen); /* terminates the TLS association or just closes the socket, and frees the connection state */ void tlscomm_close( /*@only@ */ struct connection_state *scs); /* internal function exported for testing */ int getline_from_buffer(char *readbuffer, char *linebuffer, int linebuflen); #ifndef UNUSED #ifdef HAVE___ATTRIBUTE__ #define UNUSED(x) /*@unused@*/ x __attribute__((unused)) #else #define UNUSED(x) x #endif #endif wmbiff-0.4.36/wmbiff/wmbiff.c0000644000207400020740000011601213556541661012704 00000000000000/* $Id: wmbiff.c,v 1.70 2005/10/07 03:07:58 bluehal Exp $ */ // typedef int gcry_error_t; #ifdef HAVE_CONFIG_H #include #endif #include #include #ifdef HAVE_POLL #include #else #include #endif #include #include #include #include #include #include #include #include #include #include #include "../wmgeneral/wmgeneral.h" #include "../wmgeneral/misc.h" #include "Client.h" #include "charutil.h" #include "MessageList.h" #ifdef USE_DMALLOC #include #endif #include "wmbiff-master-led.xpm" #include "wmbiff-classic-master-led.xpm" static char wmbiff_mask_bits[64 * 64]; static const int wmbiff_mask_width = 64; // const int wmbiff_mask_height = 64; #define CHAR_WIDTH 5 #define CHAR_HEIGHT 7 #define BLINK_TIMES 8 #define DEFAULT_SLEEP_INTERVAL 20000 #define BLINK_SLEEP_INTERVAL 200 #define DEFAULT_LOOP 5 #define MAX_NUM_MAILBOXES 40 static Pop3 mbox[MAX_NUM_MAILBOXES]; /* this is the normal pixmap. */ static const char *skin_filename = "wmbiff-master-led.xpm"; static const char *classic_skin_filename = "wmbiff-classic-master-led.xpm"; /* global notify action taken (if globalnotify option is set) */ static const char *globalnotify = NULL; /* path to search for pixmaps */ /* /usr/share/wmbiff should have the default pixmap. */ /* /usr/local/share/wmbiff if compiled locally. */ /* / is there in case a user wants to specify a complete path */ /* . is there for development. */ static const char *skin_search_path = DEFAULT_SKIN_PATH; /* for gnutls */ const char *certificate_filename = NULL; /* gnutls: specify the priorities to use on the ciphers, key exchange methods, macs and compression methods. */ const char *tls = NULL; /* it could be argued that a better default exists. */ #define DEFAULT_FONT "-*-fixed-*-r-*-*-10-*-*-*-*-*-*-*" static const char *font = NULL; int debug_default = DEBUG_ERROR; /* color from wmbiff's xpm, down to 24 bits. */ const char *foreground = "white"; /* foreground white */ const char *background = "#505075"; /* background blue */ static const char *highlight = "red"; const char *foreground_classic = "#21B3AF"; /* classic foreground cyan */ const char *background_classic = "#202020"; /* classic background gray */ static const char *highlight_classic = "yellow"; /* classic highlight color */ int SkipCertificateCheck = 0; int Relax = 0; /* be not paranoid */ static int notWithdrawn = 0; static unsigned int num_mailboxes = 1; static const int x_origin = 5; static const int y_origin = 5; static int forever = 1; /* keep running. */ unsigned int custom_skin = 0; /* user has choose a custom skin */ static int classic_mode = 0; /* use classic behaviour/theme of wmbiff */ extern Window win; extern Window iconwin; Cursor busy_cursor, ready_cursor; static __inline /*@out@ */ void * malloc_ordie(size_t len) { void *ret = malloc(len); if (ret == NULL) { fprintf(stderr, "unable to allocate %d bytes\n", (int) len); abort(); } return (ret); } /* where vertically the mailbox sits for blitting characters. */ static int mbox_y(unsigned int mboxnum) { return ((11 * mboxnum) + y_origin); } /* Read a line from a file to obtain a pair setting=value skips # and leading spaces NOTE: if setting finish with 0, 1, 2, 3 or 4 last char are deleted and index takes its value... if not index will get -1 Returns -1 if no setting=value */ static int ReadLine(FILE * fp, /*@out@ */ char *setting, /*@out@ */ char *value, /*@out@ */ int *mbox_index) { char buf[BUF_SIZE]; char *p, *q; int len; *setting = '\0'; *value = '\0'; *mbox_index = -1; if (!fp || feof(fp)) return -1; if (!fgets(buf, BUF_SIZE - 1, fp)) return -1; len = strlen(buf); if (buf[len - 1] == '\n') { buf[len - 1] = '\0'; /* strip linefeed */ } StripComment(buf); if (!(p = strtok(buf, "="))) return -1; if (!(q = strtok(NULL, "\n"))) return -1; /* Chg - Mark Hurley * Date: May 8, 2001 * Removed for loop (which removed leading spaces) * Leading & Trailing spaces need to be removed * to Fix Debian bug #95849 */ FullTrim(p); FullTrim(q); /* strcpy(setting, p); nspring replaced with sscanf dec 2002 */ strcpy(value, q); if (sscanf(p, "%[_a-z.]%d", setting, mbox_index) == 2) { /* mailbox-specific configuration, ends in a digit */ if (*mbox_index < 0 || *mbox_index >= MAX_NUM_MAILBOXES) { DMA(DEBUG_ERROR, "invalid mailbox number %d\n", *mbox_index); exit(EXIT_FAILURE); } } else if (sscanf(p, "%[a-z]", setting) == 1) { /* global configuration, all text. */ *mbox_index = -1; } else { /* we found an uncommented line that has an equals, but is non-alphabetic. */ DMA(DEBUG_INFO, "unparsed setting %s\n", p); return -1; } DMA(DEBUG_INFO, "@%s.%d=%s@\n", setting, *mbox_index, value); return 1; } struct path_demultiplexer { const char *id; /* followed by a colon */ int (*creator)( /*@notnull@ */ Pop3 *pc, const char *path); }; static struct path_demultiplexer paths[] = { {"pop3:", pop3Create}, {"pop3s:", pop3Create}, {"shell:", shellCreate}, {"imap:", imap4Create}, {"imaps:", imap4Create}, {"sslimap:", imap4Create}, {"maildir:", maildirCreate}, {"mbox:", mboxCreate}, {NULL, NULL} }; static void parse_mbox_path(unsigned int item) { int i; /* find the creator */ for (i = 0; paths[i].id != NULL && strncasecmp(mbox[item].path, paths[i].id, strlen(paths[i].id)); i++); /* if found, execute */ if (paths[i].id != NULL) { if (paths[i].creator((&mbox[item]), mbox[item].path) != 0) { DMA(DEBUG_ERROR, "creator for mailbox %u returned failure\n", item); } } else { /* default are mbox */ mboxCreate((&mbox[item]), mbox[item].path); } } static int Read_Config_File(char *filename, int *loopinterval) { FILE *fp; char setting[BUF_SMALL], value[BUF_SIZE]; int mbox_index; unsigned int i; char *skin = NULL; if (classic_mode) { skin = strdup_ordie(skin_filename); } if (!(fp = fopen(filename, "r"))) { DMA(DEBUG_ERROR, "Unable to open %s, no settings read: %s\n", filename, strerror(errno)); return 0; } while (!feof(fp)) { /* skanky: -1 can represent an unparsed line or an error */ if (ReadLine(fp, setting, value, &mbox_index) == -1) continue; /* settings that can be global go here. */ if (!strcmp(setting, "interval")) { *loopinterval = atoi(value); continue; } else if (!strcmp(setting, "askpass")) { const char *askpass = strdup_ordie(value); if (mbox_index == -1) { DMA(DEBUG_INFO, "setting all to askpass %s\n", askpass); for (i = 0; i < MAX_NUM_MAILBOXES; i++) mbox[i].askpass = askpass; } else { mbox[mbox_index].askpass = askpass; } continue; } else if (!strcmp(setting, "skinfile")) { skin_filename = strdup_ordie(value); custom_skin = 1; continue; } else if (!strcmp(setting, "certfile")) { /* not yet supported */ certificate_filename = strdup_ordie(value); continue; } else if (!strcmp(setting, "globalnotify")) { globalnotify = strdup_ordie(value); continue; } else if (!strcmp(setting, "tls")) { tls = strdup_ordie(value); continue; } else if (mbox_index == -1) { DMA(DEBUG_INFO, "Unknown global setting '%s'\n", setting); continue; /* Didn't read any setting.[0-5] value */ } if (mbox_index >= MAX_NUM_MAILBOXES) { DMA(DEBUG_ERROR, "Don't have %d mailboxes.\n", mbox_index); continue; } if (1U + mbox_index > num_mailboxes && mbox_index + 1 <= MAX_NUM_MAILBOXES) { num_mailboxes = 1U + mbox_index; } /* now only local settings */ if (!strcmp(setting, "label.")) { if (strlen(value) + 1 > BUF_SMALL) { DMA(DEBUG_ERROR, "Mailbox %i label string '%s' is too long.\n", mbox_index, value); continue; } else { strncpy(mbox[mbox_index].label, value, BUF_SMALL - 1); } } else if (!strcmp(setting, "path.")) { if (strlen(value) + 1 > BUF_BIG) { DMA(DEBUG_ERROR, "Mailbox %i path string '%s' is too long.\n", mbox_index, value); continue; } else { strncpy(mbox[mbox_index].path, value, BUF_BIG - 1); } } else if (!strcmp(setting, "notify.")) { if (strlen(value) + 1 > BUF_BIG) { DMA(DEBUG_ERROR, "Mailbox %i notify string '%s' is too long.\n", mbox_index, value); continue; } else { strncpy(mbox[mbox_index].notify, value, BUF_BIG - 1); } } else if (!strcmp(setting, "action.")) { if (strlen(value) + 1 > BUF_BIG) { DMA(DEBUG_ERROR, "Mailbox %i action string '%s' is too long.\n", mbox_index, value); continue; } else { strncpy(mbox[mbox_index].action, value, BUF_BIG - 1); } } else if (!strcmp(setting, "action_disconnected.")) { if (strlen(value) + 1 > BUF_BIG) { DMA(DEBUG_ERROR, "Mailbox %i action_disconnected string '%s' is too long.\n", mbox_index, value); continue; } else { strncpy(mbox[mbox_index].actiondc, value, BUF_BIG - 1); } } else if (!strcmp(setting, "action_new_mail.")) { if (strlen(value) + 1 > BUF_BIG) { DMA(DEBUG_ERROR, "Mailbox %i action_new_mail string '%s' is too long.\n", mbox_index, value); continue; } else { strncpy(mbox[mbox_index].actionnew, value, BUF_BIG - 1); } } else if (!strcmp(setting, "action_no_new_mail.")) { if (strlen(value) + 1 > BUF_BIG) { DMA(DEBUG_ERROR, "Mailbox %i action_no_new_mail string '%s' is too long.\n", mbox_index, value); continue; } else { strncpy(mbox[mbox_index].actionnonew, value, BUF_BIG - 1); } } else if (!strcmp(setting, "interval.")) { mbox[mbox_index].loopinterval = atoi(value); } else if (!strcmp(setting, "buttontwo.")) { if (strlen(value) + 1 > BUF_BIG) { DMA(DEBUG_ERROR, "Mailbox %i buttontwo string '%s' is too long.\n", mbox_index, value); continue; } else { strncpy(mbox[mbox_index].button2, value, BUF_BIG - 1); } } else if (!strcmp(setting, "fetchcmd.")) { if (strlen(value) + 1 > BUF_BIG) { DMA(DEBUG_ERROR, "Mailbox %i fetchcmd string '%s' is too long.\n", mbox_index, value); continue; } else { strncpy(mbox[mbox_index].fetchcmd, value, BUF_BIG - 1); } } else if (!strcmp(setting, "fetchinterval.")) { mbox[mbox_index].fetchinterval = atoi(value); } else if (!strcmp(setting, "debug.")) { int debug_value = debug_default; if (strcasecmp(value, "all") == 0) { debug_value = DEBUG_ALL; } /* could disable debugging, but I want the command line argument to provide all information possible. */ mbox[mbox_index].debug = debug_value; } else { DMA(DEBUG_INFO, "Unknown setting '%s'\n", setting); } } (void) fclose(fp); if (!tls) // use GnuTLS's default ciphers. tls = "NORMAL"; if (classic_mode && skin && !strcmp(skin, skin_filename)) skin_filename = classic_skin_filename; if (skin) free(skin); for (i = 0; i < num_mailboxes; i++) if (mbox[i].label[0] != '\0') parse_mbox_path(i); return 1; } static void init_biff(char *config_file) { #ifdef HAVE_GCRYPT_H gcry_error_t rc; #endif int loopinterval = DEFAULT_LOOP; unsigned int i; for (i = 0; i < MAX_NUM_MAILBOXES; i++) { memset(mbox[i].label, 0, BUF_SMALL); memset(mbox[i].path, 0, BUF_BIG); memset(mbox[i].notify, 0, BUF_BIG); memset(mbox[i].action, 0, BUF_BIG); memset(mbox[i].actiondc, 0, BUF_BIG); memset(mbox[i].actionnew, 0, BUF_BIG); memset(mbox[i].actionnonew, 0, BUF_BIG); memset(mbox[i].button2, 0, BUF_BIG); memset(mbox[i].fetchcmd, 0, BUF_BIG); mbox[i].loopinterval = 0; mbox[i].getHeaders = NULL; mbox[i].releaseHeaders = NULL; mbox[i].debug = debug_default; mbox[i].askpass = DEFAULT_ASKPASS; } #ifdef HAVE_GCRYPT_H /* gcrypt is a little strange, in that it doesn't * seem to initialize its memory pool by itself. * I believe we *expect* "Warning: using insecure memory!" */ /* gcryctl_disable_secmem gets called before check_version -- in a message on gcrypt-devel august 17 2004. */ if ((rc = gcry_control(GCRYCTL_DISABLE_SECMEM, 0)) != 0) { DMA(DEBUG_ERROR, "Error: tried to disable gcrypt warning and failed: %d\n" " Message: %s\n" " libgcrypt version: %s\n", rc, gcry_strerror(rc), gcry_check_version(NULL)); } /* recently made a requirement, section 2.4 of gcrypt manual */ if (gcry_check_version("1.1.42") == NULL) { DMA(DEBUG_ERROR, "Error: incompatible gcrypt version.\n"); } #endif DMA(DEBUG_INFO, "config_file = %s.\n", config_file); if (!Read_Config_File(config_file, &loopinterval)) { char *m; /* setup defaults if there's no config */ if ((m = getenv("MAIL")) != NULL) { /* we are using MAIL environment var. type mbox */ if (strlen(m) + 1 > BUF_BIG) { DMA(DEBUG_ERROR, "MAIL environment var '%s' is too long.\n", m); } else { DMA(DEBUG_INFO, "Using MAIL environment var '%s'.\n", m); strncpy(mbox[0].path, m, BUF_BIG - 1); } } else if ((m = getenv("USER")) != NULL) { /* we will use the USER env var to find an mbox name */ if (strlen(m) + 10 + 1 > BUF_BIG) { DMA(DEBUG_ERROR, "USER environment var '%s' is too long.\n", m); } else { DMA(DEBUG_INFO, "Using /var/mail/%s.\n", m); strcpy(mbox[0].path, "/var/mail/"); strncat(mbox[0].path, m, BUF_BIG - 1 - 10); if (mbox[0].path[9] != '/') { DMA(DEBUG_ERROR, "Unexpected failure to construct /var/mail/username, please " "report this with your operating system info and the version of wmbiff."); } } } else { DMA(DEBUG_ERROR, "Cannot open config file '%s' nor use the " "MAIL environment var.\n", config_file); exit(EXIT_FAILURE); } if (!exists(mbox[0].path)) { DMA(DEBUG_ERROR, "Cannot open config file '%s', and the " "default %s doesn't exist.\n", config_file, mbox[0].path); exit(EXIT_FAILURE); } strcpy(mbox[0].label, "Spool"); mboxCreate((&mbox[0]), mbox[0].path); } /* Make labels look right */ for (i = 0; i < num_mailboxes; i++) { if (mbox[i].label[0] != '\0') { /* append a colon, but skip if we're using fonts. */ if (font == NULL) { int j = strlen(mbox[i].label); if (j < 5) { memset(mbox[i].label + j, ' ', 5 - j); } } /* but always end after 5 characters */ mbox[i].label[6] = '\0'; /* set global loopinterval to boxes with 0 loop */ if (!mbox[i].loopinterval) { mbox[i].loopinterval = loopinterval; } } } } static char **LoadXPM(const char *pixmap_filename) { char **xpm; int success; success = XpmReadFileToData((char *) pixmap_filename, &xpm); switch (success) { case XpmOpenFailed: DMA(DEBUG_ERROR, "Unable to open %s\n", pixmap_filename); break; case XpmFileInvalid: DMA(DEBUG_ERROR, "%s is not a valid pixmap\n", pixmap_filename); break; case XpmNoMemory: DMA(DEBUG_ERROR, "Insufficient memory to read %s\n", pixmap_filename); break; default: break; } return (xpm); } /* tests as "test -f" would */ int exists(const char *filename) { struct stat st_buf; DMA(DEBUG_INFO, "looking for %s\n", filename); if (stat(filename, &st_buf) == 0 && S_ISREG(st_buf.st_mode)) { DMA(DEBUG_INFO, "found %s\n", filename); return (1); } return (0); } /* acts like execvp, with code inspired by it */ /* mustfree */ static char *search_path(const char *path, const char *find_me) { char *buf; const char *p; int len, pathlen; if (strchr(find_me, '/') != NULL) { return (strdup_ordie(find_me)); } pathlen = strlen(path); len = strlen(find_me) + 1; buf = malloc_ordie(pathlen + len + 1); memcpy(buf + pathlen + 1, find_me, len); buf[pathlen] = '/'; for (p = path; p != NULL; path = p, path++) { char *startp; p = strchr(path, ':'); if (p == NULL) { /* not found; p should point to the null char at the end */ startp = memcpy(buf + pathlen - strlen(path), path, strlen(path)); } else if (p == path) { /* double colon in a path apparently means try here */ startp = &buf[pathlen + 1]; } else { /* copy the part between the colons to the buffer */ startp = memcpy(buf + pathlen - (p - path), path, p - path); } if (exists(startp) != 0) { char *ret = strdup_ordie(startp); free(buf); return (ret); } } free(buf); return (NULL); } /* verifies that .wmbiffrc, is a file, is owned by the user, is not world writeable, and is not world readable. This is just to help keep passwords secure */ static int wmbiffrc_permissions_check(const char *wmbiffrc_fname) { struct stat st; if (stat(wmbiffrc_fname, &st) != 0) { DMA(DEBUG_ERROR, "Can't stat wmbiffrc: '%s'\n", wmbiffrc_fname); return (1); /* well, it's not a bad permission problem: if you can't find it, neither can the bad guys.. */ } if ((st.st_mode & S_IFDIR) != 0) { DMA(DEBUG_ERROR, ".wmbiffrc '%s' is a directory!\n" "exiting. don't do that.", wmbiffrc_fname); exit(EXIT_FAILURE); } if (st.st_uid != getuid()) { char *user = getenv("USER"); DMA(DEBUG_ERROR, ".wmbiffrc '%s' isn't owned by you.\n" "Verify its contents, then 'chown %s %s'\n", wmbiffrc_fname, ((user != NULL) ? user : "(your username)"), wmbiffrc_fname); return (0); } if ((st.st_mode & S_IWOTH) != 0) { DMA(DEBUG_ERROR, ".wmbiffrc '%s' is world writable.\n" "Verify its contents, then 'chmod 0600 %s'\n", wmbiffrc_fname, wmbiffrc_fname); return (0); } if ((st.st_mode & S_IROTH) != 0) { DMA(DEBUG_ERROR, ".wmbiffrc '%s' is world readable.\n" "Please run 'chmod 0600 %s' and consider changing your passwords.\n", wmbiffrc_fname, wmbiffrc_fname); return (0); } return (1); } static void ClearDigits(unsigned int i) { if (font) { eraseRect(39, mbox_y(i), 58, mbox_y(i + 1) - 1, background); } else { /* overwrite the colon */ copyXPMArea((10 * (CHAR_WIDTH + 1)), 64, (CHAR_WIDTH + 1), (CHAR_HEIGHT + 1), 35, mbox_y(i)); /* blank out the number fields. */ copyXPMArea(39, 84, (3 * (CHAR_WIDTH + 1)), (CHAR_HEIGHT + 1), 39, mbox_y(i)); } } /* Blits a string at given co-ordinates. If a ``new'' parameter is nonzero, all digits will be yellow */ static void BlitString(const char *name, int x, int y, int new) { if (font != NULL) { /* an alternate behavior - draw the string using a font instead of the pixmap. should allow pretty colors */ drawString(x, y + CHAR_HEIGHT + 1, name, new ? highlight : foreground, background, 0); } else { /* normal, LED-like behavior. */ int i, c, k = x; for (i = 0; name[i] != '\0'; i++) { c = toupper(name[i]); if (c >= 'A' && c <= 'Z') { /* it's a letter */ c -= 'A'; copyXPMArea(c * (CHAR_WIDTH + 1), (new ? 95 : 74), (CHAR_WIDTH + 1), (CHAR_HEIGHT + 1), k, y); k += (CHAR_WIDTH + 1); } else { /* it's a number or symbol */ c -= '0'; if (new) { copyXPMArea((c * (CHAR_WIDTH + 1)) + 65, 0, (CHAR_WIDTH + 1), (CHAR_HEIGHT + 1), k, y); } else { copyXPMArea((c * (CHAR_WIDTH + 1)), 64, (CHAR_WIDTH + 1), (CHAR_HEIGHT + 1), k, y); } k += (CHAR_WIDTH + 1); } } } } /* Blits number to give coordinates.. two 0's, right justified */ static void BlitNum(int num, int x, int y, int new) { char buf[32]; sprintf(buf, "%02i", num); if (font != NULL) { const char *color = (new) ? highlight : foreground; drawString(x + (CHAR_WIDTH * 2 + 4), y + CHAR_HEIGHT + 1, buf, color, background, 1); } else { int newx = x; if (num > 99) newx -= (CHAR_WIDTH + 1); if (num > 999) newx -= (CHAR_WIDTH + 1); BlitString(buf, newx, y, new); } } /* helper function for displayMsgCounters, which has outgrown its name */ static void blitMsgCounters(unsigned int i) { int y_row = mbox_y(i); /* constant for each mailbox */ ClearDigits(i); /* Clear digits */ if ((mbox[i].blink_stat & 0x01) == 0) { int newmail = (mbox[i].UnreadMsgs > 0) ? 1 : 0; if (mbox[i].TextStatus[0] != '\0') { BlitString(mbox[i].TextStatus, 39, y_row, newmail); } else { int mailcount = (newmail) ? mbox[i].UnreadMsgs : ( classic_mode ? mbox[i].TotalMsgs : 0 ); BlitNum(mailcount, 45, y_row, newmail); } } } /* * void execnotify(1) : runs notify command, if given (not null) */ static void execnotify( /*@null@ */ const char *notifycmd) { if (notifycmd != NULL) { /* need to call notify() ? */ if (classic_mode && !strcasecmp(notifycmd, "beep")) XBell(display, 100); else if (!strcasecmp(notifycmd, "true")) { /* Yes, nothing */ } else { /* Else call external notifyer, ignoring the pid */ (void) execCommand(notifycmd); } } } static void displayMsgCounters(unsigned int i, int mail_stat, int *Blink_Mode) { switch (mail_stat) { case 2: /* New mail has arrived */ /* Enter blink-mode for digits */ mbox[i].blink_stat = BLINK_TIMES * 2; *Blink_Mode |= (1 << i); /* Global blink flag set for this mailbox */ blitMsgCounters(i); execnotify(mbox[i].notify); break; case 1: /* mailbox has been rescanned/changed */ blitMsgCounters(i); break; case 0: break; case -1: /* Error was detected */ ClearDigits(i); /* Clear digits */ BlitString("XX", 45, mbox_y(i), 0); break; } } /** counts mail in spool-file Returned value: -1 : Error was encountered 0 : mailbox status wasn't changed 1 : mailbox was changed (NO new mail) 2 : mailbox was changed AND new mail has arrived **/ static int count_mail(unsigned int item) { int rc = 0; if (!mbox[item].checkMail) { return -1; } if (mbox[item].checkMail(&(mbox[item])) < 0) { /* we failed to obtain any numbers therefore set * them to -1's ensuring the next pass (even if * zero) will be captured correctly */ mbox[item].TotalMsgs = -1; mbox[item].UnreadMsgs = -1; mbox[item].OldMsgs = -1; mbox[item].OldUnreadMsgs = -1; return -1; } if (mbox[item].UnreadMsgs > mbox[item].OldUnreadMsgs && mbox[item].UnreadMsgs > 0) { rc = 2; /* New mail detected */ } else if (mbox[item].UnreadMsgs < mbox[item].OldUnreadMsgs || mbox[item].TotalMsgs != mbox[item].OldMsgs) { rc = 1; /* mailbox was changed - NO new mail */ } else { rc = 0; /* mailbox wasn't changed */ } mbox[item].OldMsgs = mbox[item].TotalMsgs; mbox[item].OldUnreadMsgs = mbox[item].UnreadMsgs; return rc; } static int periodic_mail_check(void) { int NeedRedraw = 0; static int Blink_Mode = 0; /* Bit mask, digits are in blinking mode or not. Each bit for separate mailbox */ int Sleep_Interval; /* either DEFAULT_SLEEP_INTERVAL or BLINK_SLEEP_INTERVAL */ int NewMail = 0; /* flag for global notify */ unsigned int i; time_t curtime = time(0); for (i = 0; i < num_mailboxes; i++) { if (mbox[i].label[0] != '\0') { if (curtime >= mbox[i].prevtime + mbox[i].loopinterval) { int mailstat = 0; NeedRedraw = 1; DM(&mbox[i], DEBUG_INFO, "working on [%u].label=>%s< [%u].path=>%s<\n", i, mbox[i].label, i, mbox[i].path); DM(&mbox[i], DEBUG_INFO, "curtime=%d, prevtime=%d, interval=%d\n", (int) curtime, (int) mbox[i].prevtime, mbox[i].loopinterval); mbox[i].prevtime = curtime; XDefineCursor(display, iconwin, busy_cursor); RedrawWindow(); mailstat = count_mail(i); XUndefineCursor(display, iconwin); /* Global notify */ if (mailstat == 2) NewMail = 1; displayMsgCounters(i, mailstat, &Blink_Mode); /* update our idea of current time, as it may have changed as we check. */ curtime = time(0); } if (mbox[i].blink_stat > 0) { if (--mbox[i].blink_stat <= 0) { Blink_Mode &= ~(1 << i); mbox[i].blink_stat = 0; } displayMsgCounters(i, 1, &Blink_Mode); NeedRedraw = 1; } if (mbox[i].fetchinterval > 0 && mbox[i].fetchcmd[0] != '\0' && curtime >= mbox[i].prevfetch_time + mbox[i].fetchinterval) { XDefineCursor(display, iconwin, busy_cursor); RedrawWindow(); (void) execCommand(mbox[i].fetchcmd); XUndefineCursor(display, iconwin); mbox[i].prevfetch_time = curtime; } } } /* exec globalnotify if there was any new mail */ if (NewMail == 1) execnotify(globalnotify); if (Blink_Mode == 0) { for (i = 0; i < num_mailboxes; i++) { mbox[i].blink_stat = 0; } Sleep_Interval = DEFAULT_SLEEP_INTERVAL; } else { Sleep_Interval = BLINK_SLEEP_INTERVAL; } if (NeedRedraw) { RedrawWindow(); } return Sleep_Interval; } static int findTopOfMasterXPM(const char **skin_xpm) { int i; for (i = 0; skin_xpm[i] != NULL; i++) { if (strstr(skin_xpm[i], "++++++++") != NULL) return i; } DMA(DEBUG_ERROR, "couldn't find the top of the xpm file using the simple method\n"); exit(EXIT_FAILURE); } static char **CreateBackingXPM(int width, int height, const char **skin_xpm) { char **ret = malloc_ordie(sizeof(char *) * (height + 6) + sizeof(void *) /* trailing null space */ ); const int colors = 5; const int base = colors + 1; const int margin = 4; int i; int top = findTopOfMasterXPM(skin_xpm); ret[0] = malloc_ordie(30); sprintf(ret[0], "%d %d %d %d", width, height, colors, 1); ret[1] = (char *) " \tc #0000FF"; /* no color */ ret[2] = malloc_ordie(30); sprintf(ret[2], ".\tc %s", background); ret[3] = (char *) "+\tc #000000"; /* shadowed */ ret[4] = (char *) "@\tc #C7C3C7"; /* highlight */ ret[5] = (char *) ":\tc #004941"; /* led off */ for (i = base; i < base + height; i++) { ret[i] = malloc_ordie(width); if (i < base + margin) { memset(ret[i], ' ', width); } else if (i < height + base - margin) { memset(ret[i], ' ', margin); if (i == base + margin) { memset(ret[i] + margin, '+', width - margin - margin); } else if (i == base + height - margin - 1) { memset(ret[i] + margin, '@', width - margin - margin); } else { // " +..:::...:::...:::...:::...:::.......:::...:::...:::...@ " // " +.:...:.:...:.:...:.:...:.:...:..:..:...:.:...:.:...:..@ " ", ret[i][margin] = '+'; memset(ret[i] + margin + 1, '.', width - margin - margin - 1); ret[i][width - margin - 1] = '@'; memcpy(ret[i], skin_xpm[((i - (base + margin) - 1) % 11) + top + 1], width); } memset(ret[i] + width - margin, ' ', margin); } else { memset(ret[i], ' ', width); } } /* * Not sure if this is necessary, it just seemed like a good idea */ ret[height + base] = NULL; return (ret); } /* * NOTE: this function assumes that the ConnectionNumber() macro * will return the file descriptor of the Display struct * (it does under XFree86 and solaris' openwin X) */ static void XSleep(int millisec) { #ifdef HAVE_POLL struct pollfd timeout; timeout.fd = ConnectionNumber(display); timeout.events = POLLIN; poll(&timeout, 1, millisec); #else struct timeval to; struct timeval *timeout = NULL; fd_set readfds; int max_fd; if (millisec >= 0) { timeout = &to; to.tv_sec = millisec / 1000; to.tv_usec = (millisec % 1000) * 1000; } FD_ZERO(&readfds); FD_SET(ConnectionNumber(display), &readfds); max_fd = ConnectionNumber(display); select(max_fd + 1, &readfds, NULL, NULL, timeout); #endif } const char **restart_args; static void restart_wmbiff(int sig #ifdef HAVE___ATTRIBUTE__ __attribute__ ((unused)) #endif ) { if (restart_args) { DMA(DEBUG_ERROR, "exec()'ing %s\n", restart_args[0]); sleep(1); execvp(restart_args[0], (char *const *) restart_args); DMA(DEBUG_ERROR, "exec of %s failed: %s\n", restart_args[0], strerror(errno)); exit(EXIT_FAILURE); } else fprintf(stderr, "Unable to restart wmbiff: missing restart arguments (NULL)!\n"); } extern int x_socket(void) { return ConnectionNumber(display); } extern void ProcessPendingEvents(void) { static int but_pressed_region = -1; /* static so click can be determined */ int but_released_region = -1; /* X Events */ while (XPending(display)) { XEvent Event; const char *press_action; XNextEvent(display, &Event); switch (Event.type) { case Expose: if (Event.xany.window != win && Event.xany.window != iconwin) { msglst_redraw(); } else { RedrawWindow(); } break; case DestroyNotify: XCloseDisplay(display); exit(EXIT_SUCCESS); break; case ButtonPress: but_pressed_region = CheckMouseRegion(Event.xbutton.x, Event.xbutton.y); switch (Event.xbutton.button) { case 1: press_action = mbox[but_pressed_region].action; break; case 2: press_action = mbox[but_pressed_region].button2; break; case 3: press_action = mbox[but_pressed_region].fetchcmd; break; default: press_action = NULL; break; } if (press_action && strcmp(press_action, "msglst") == 0) { msglst_show(&mbox[but_pressed_region], Event.xbutton.x_root, Event.xbutton.y_root); } break; case ButtonRelease: but_released_region = CheckMouseRegion(Event.xbutton.x, Event.xbutton.y); if (but_released_region == but_pressed_region && but_released_region >= 0) { const char *click_action, *extra_click_action = NULL; switch (Event.xbutton.button) { case 1: /* Left mouse-click */ /* C-S-left will restart wmbiff. */ if ((Event.xbutton.state & ControlMask) && (Event.xbutton.state & ShiftMask)) { restart_wmbiff(0); } /* do we need to run an extra action? */ if (mbox[but_released_region].UnreadMsgs == -1) { extra_click_action = mbox[but_released_region].actiondc; } else if (mbox[but_released_region].UnreadMsgs > 0) { extra_click_action = mbox[but_released_region].actionnew; } else { extra_click_action = mbox[but_released_region].actionnonew; } click_action = mbox[but_released_region].action; break; case 2: /* Middle mouse-click */ click_action = mbox[but_released_region].button2; break; case 3: /* Right mouse-click */ click_action = mbox[but_released_region].fetchcmd; break; default: click_action = NULL; break; } if (extra_click_action != NULL && extra_click_action[0] != 0 && strcmp(extra_click_action, "msglst")) { DM(&mbox[but_released_region], DEBUG_INFO, "running: %s", extra_click_action); (void) execCommand(extra_click_action); } if (click_action != NULL && click_action[0] != '\0' && strcmp(click_action, "msglst")) { DM(&mbox[but_released_region], DEBUG_INFO, "running: %s", click_action); (void) execCommand(click_action); } } /* a button was released, hide the message list if open */ msglst_hide(); but_pressed_region = -1; /* RedrawWindow(); */ break; case MotionNotify: break; case KeyPress:{ XKeyPressedEvent *xkpe = (XKeyPressedEvent *) & Event; KeySym ks = XkbKeycodeToKeysym(display, xkpe->keycode, 0, 0); if (ks > XK_0 && ks < XK_0 + min(9U, num_mailboxes)) { const char *click_action = mbox[ks - XK_1].action; if (click_action != NULL && click_action[0] != '\0' && strcmp(click_action, "msglst")) { DM(&mbox[but_released_region], DEBUG_INFO, "running: %s", click_action); (void) execCommand(click_action); } } } break; default: break; } } } static void do_biff(int argc, const char **argv) { unsigned int i; int Sleep_Interval; const char **skin_xpm = NULL; const char **bkg_xpm = NULL; char *skin_file_path = search_path(skin_search_path, skin_filename); int wmbiff_mask_height = mbox_y(num_mailboxes) + 4; DMA(DEBUG_INFO, "running %u mailboxes w %d h %d\n", num_mailboxes, wmbiff_mask_width, wmbiff_mask_height); if (skin_file_path != NULL) { skin_xpm = (const char **) LoadXPM(skin_file_path); free(skin_file_path); } if (skin_xpm == NULL) { DMA(DEBUG_ERROR, "using built-in xpm; %s wasn't found in %s\n", skin_filename, skin_search_path); skin_xpm = (classic_mode ? wmbiff_classic_master_xpm : wmbiff_master_xpm); } bkg_xpm = (const char **) CreateBackingXPM(wmbiff_mask_width, wmbiff_mask_height, skin_xpm); createXBMfromXPM(wmbiff_mask_bits, (const char**)bkg_xpm, wmbiff_mask_width, wmbiff_mask_height); openXwindow(argc, argv, (const char**)bkg_xpm, skin_xpm, wmbiff_mask_bits, wmbiff_mask_width, wmbiff_mask_height, notWithdrawn); /* now that display is set, we can create the cursors (mouse pointer shapes) */ busy_cursor = XCreateFontCursor(display, XC_watch); ready_cursor = XCreateFontCursor(display, XC_left_ptr); if (font != NULL) { if (loadFont(font) < 0) { DMA(DEBUG_ERROR, "unable to load font. exiting.\n"); exit(EXIT_FAILURE); } } /* First time setup of button regions and labels */ for (i = 0; i < num_mailboxes; i++) { /* make it easy to recover the mbox index from a mouse click */ AddMouseRegion(i, x_origin, mbox_y(i), 58, mbox_y(i + 1) - 1); if (mbox[i].label[0] != '\0') { mbox[i].prevtime = mbox[i].prevfetch_time = 0; BlitString(mbox[i].label, x_origin, mbox_y(i), 0); } } do { Sleep_Interval = periodic_mail_check(); ProcessPendingEvents(); XSleep(Sleep_Interval); } while (forever); /* forever is usually true, but not when debugging with -exit */ if (skin_xpm != NULL && skin_xpm != wmbiff_master_xpm && skin_xpm != wmbiff_classic_master_xpm) { free(skin_xpm); // added 3 jul 02, appeasing valgrind } if (bkg_xpm != NULL) { // Allocated in CreateBackingXPM() free((void *)bkg_xpm[0]); free((void *)bkg_xpm[2]); int mem_block; for (mem_block = 6; mem_block < 6 + wmbiff_mask_height; mem_block++) free((void *)bkg_xpm[mem_block]); free(bkg_xpm); } } static void sigchld_handler(int sig #ifdef HAVE___ATTRIBUTE__ __attribute__ ((unused)) #endif ) { while (waitpid(0, NULL, WNOHANG) > 0); signal(SIGCHLD, sigchld_handler); } static void usage(void) { printf("\nwmBiff v%s" " - incoming mail checker\n" "Gennady Belyakov and others (see the README file)\n" "Please report bugs to %s\n" "\n" "usage:\n" " -bg background color\n" " -c use specified config file\n" " -debug enable debugging\n" " -display use specified X display\n" " -fg foreground color\n" " -font font instead of LED\n" " -geometry +XPOS+YPOS initial window position\n" " -h this help screen\n" " -hi highlight color for new mail\n" #ifdef USE_GNUTLS " -skip-certificate-check using TLS, don't validate the\n" " server's certificate\n" #endif " -relax assume the configuration is \n" " correct, parse it without paranoia, \n" " and assume hostnames are okay.\n" " -o enable classical mode look and behaviour\n" " -v print the version number\n" " +w not withdrawn: run as a window\n" "\n", PACKAGE_VERSION, PACKAGE_BUGREPORT); } static void printversion(void) { printf("wmbiff v%s\n", PACKAGE_VERSION); } static void parse_cmd(int argc, const char **argv, char *config_file) { int i; int fg = 0, bg = 0, hi = 0; config_file[0] = '\0'; /* Parse Command Line */ for (i = 1; i < argc; i++) { const char *arg = argv[i]; if (*arg == '-') { switch (arg[1]) { case 'b': if (strcmp(arg + 1, "bg") == 0) { if (argc > (i + 1)) { background = strdup_ordie(argv[i + 1]); bg = 1; DMA(DEBUG_INFO, "new background: '%s'\n", foreground); i++; if (font == NULL) font = DEFAULT_FONT; } } break; case 'd': if (strcmp(arg + 1, "debug") == 0) { debug_default = DEBUG_ALL; } else if (strcmp(arg + 1, "display") == 0) { /* passed to X's command line parser */ } else { usage(); exit(EXIT_FAILURE); } break; case 'f': if (strcmp(arg + 1, "fg") == 0) { if (argc > (i + 1)) { foreground = strdup_ordie(argv[i + 1]); fg = 1; DMA(DEBUG_INFO, "new foreground: '%s'\n", foreground); i++; if (font == NULL) font = DEFAULT_FONT; } } else if (strcmp(arg + 1, "font") == 0) { if (argc > (i + 1)) { if (strcmp(argv[i + 1], "default") == 0) { font = DEFAULT_FONT; } else { font = strdup_ordie(argv[i + 1]); } DMA(DEBUG_INFO, "new font: '%s'\n", font); i++; } } else { usage(); exit(EXIT_FAILURE); } break; case 'g': if (strcmp(arg + 1, "geometry") != 0) { usage(); exit(EXIT_FAILURE); } else { i++; /* gobble the argument */ if (i >= argc) { /* fail if there's nothing to gobble */ usage(); exit(EXIT_FAILURE); } } break; case 'h': if (strcmp(arg + 1, "hi") == 0) { if (argc > (i + 1)) { highlight = strdup_ordie(argv[i + 1]); hi = 1; DMA(DEBUG_INFO, "new highlight: '%s'\n", highlight); i++; if (font == NULL) font = DEFAULT_FONT; } } else if (strcmp(arg + 1, "h") == 0) { usage(); exit(EXIT_SUCCESS); } break; case 'v': printversion(); exit(EXIT_SUCCESS); break; case 's': if (strcmp(arg + 1, "skip-certificate-check") == 0) { SkipCertificateCheck = 1; } else { usage(); exit(EXIT_SUCCESS); } break; case 'r': if (strcmp(arg + 1, "relax") == 0) { Relax = 1; } else { usage(); exit(EXIT_SUCCESS); } break; case 'c': if (argc > (i + 1)) { strncpy(config_file, argv[i + 1], 255); i++; } break; case 'e': /* undocumented for debugging */ if (strcmp(arg + 1, "exit") == 0) { forever = 0; } break; case 'o': /* use classic behaviour/theme */ classic_mode = 1; break; default: usage(); exit(EXIT_SUCCESS); break; } } else if (*arg == '+') { switch (arg[1]) { case 'w': notWithdrawn = 1; break; default: usage(); exit(EXIT_SUCCESS); break; } } } if (classic_mode) { /* load classic colors if user did not override them */ if(!fg) foreground = foreground_classic; if(!bg) background = background_classic; if(!hi) highlight = highlight_classic; } } int main(int argc, const char *argv[]) { char uconfig_file[256]; /* hold on to the arguments we were started with; we will need them if we have to restart on sigusr1 */ restart_args = (const char **) malloc((argc + 1) * sizeof(const char *)); if (restart_args) { memcpy(restart_args, argv, (argc) * sizeof(const char *)); restart_args[argc] = NULL; } parse_cmd(argc, argv, uconfig_file); /* decide what the config file is */ if (uconfig_file[0] != '\0') { /* user-specified config file */ DMA(DEBUG_INFO, "Using user-specified config file '%s'.\n", uconfig_file); } else { const char *home = getenv("HOME"); if (home == NULL) { DMA(DEBUG_ERROR, "$HOME undefined. Use the -c option to specify a wmbiffrc\n"); exit(EXIT_FAILURE); } sprintf(uconfig_file, "%s/.wmbiffrc", home); } if (wmbiffrc_permissions_check(uconfig_file) == 0) { DMA(DEBUG_ERROR, "WARNING: In future versions of WMBiff, .wmbiffrc MUST be\n" "owned by the user, and not readable or writable by others.\n\n"); } init_biff(uconfig_file); signal(SIGCHLD, sigchld_handler); signal(SIGUSR1, restart_wmbiff); signal(SIGPIPE, SIG_IGN); /* write() may fail */ do_biff(argc, argv); // free resources if (restart_args) free(restart_args); if (custom_skin) free((void *)skin_filename); return 0; } wmbiff-0.4.36/test-driver0000755000207400020740000001104213644655242012206 00000000000000#! /bin/sh # test-driver - basic testsuite driver script. scriptversion=2018-03-07.03; # UTC # Copyright (C) 2011-2020 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . # Make unconditional expansion of undefined variables an error. This # helps a lot in preventing typo-related bugs. set -u usage_error () { echo "$0: $*" >&2 print_usage >&2 exit 2 } print_usage () { cat <$log_file 2>&1 estatus=$? if test $enable_hard_errors = no && test $estatus -eq 99; then tweaked_estatus=1 else tweaked_estatus=$estatus fi case $tweaked_estatus:$expect_failure in 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; 0:*) col=$grn res=PASS recheck=no gcopy=no;; 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; *:*) col=$red res=FAIL recheck=yes gcopy=yes;; esac # Report the test outcome and exit status in the logs, so that one can # know whether the test passed or failed simply by looking at the '.log' # file, without the need of also peaking into the corresponding '.trs' # file (automake bug#11814). echo "$res $test_name (exit status: $estatus)" >>$log_file # Report outcome to console. echo "${col}${res}${std}: $test_name" # Register the test result, and other relevant metadata. echo ":test-result: $res" > $trs_file echo ":global-test-result: $res" >> $trs_file echo ":recheck: $recheck" >> $trs_file echo ":copy-in-global-log: $gcopy" >> $trs_file # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: wmbiff-0.4.36/config.guess0000755000207400020740000012637313244306071012333 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2018 Free Software Foundation, Inc. timestamp='2018-02-24' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 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 to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess # # Please send patches to . me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > "$dummy.c" ; for c in cc gcc c89 c99 ; do if ($c -c -o "$dummy.o" "$dummy.c") >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "$UNAME_SYSTEM" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval "$set_cc_for_build" cat <<-EOF > "$dummy.c" #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^LIBC' | sed 's, ,,g'`" # If ldd exists, use it to detect musl libc. if command -v ldd >/dev/null && \ ldd --version 2>&1 | grep -q ^musl then LIBC=musl fi ;; esac # Note: order is significant - the case branches are not exclusive. case "$UNAME_MACHINE:$UNAME_SYSTEM:$UNAME_RELEASE:$UNAME_VERSION" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ "/sbin/$sysctl" 2>/dev/null || \ "/usr/sbin/$sysctl" 2>/dev/null || \ echo unknown)` case "$UNAME_MACHINE_ARCH" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; earmv*) arch=`echo "$UNAME_MACHINE_ARCH" | sed -e 's,^e\(armv[0-9]\).*$,\1,'` endian=`echo "$UNAME_MACHINE_ARCH" | sed -ne 's,^.*\(eb\)$,\1,p'` machine="${arch}${endian}"-unknown ;; *) machine="$UNAME_MACHINE_ARCH"-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently (or will in the future) and ABI. case "$UNAME_MACHINE_ARCH" in earm*) os=netbsdelf ;; arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval "$set_cc_for_build" if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # Determine ABI tags. case "$UNAME_MACHINE_ARCH" in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' abi=`echo "$UNAME_MACHINE_ARCH" | sed -e "$expr"` ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "$UNAME_VERSION" in Debian*) release='-gnu' ;; *) release=`echo "$UNAME_RELEASE" | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "$machine-${os}${release}${abi}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo "$UNAME_MACHINE_ARCH"-unknown-bitrig"$UNAME_RELEASE" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo "$UNAME_MACHINE_ARCH"-unknown-openbsd"$UNAME_RELEASE" exit ;; *:LibertyBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/^.*BSD\.//'` echo "$UNAME_MACHINE_ARCH"-unknown-libertybsd"$UNAME_RELEASE" exit ;; *:MidnightBSD:*:*) echo "$UNAME_MACHINE"-unknown-midnightbsd"$UNAME_RELEASE" exit ;; *:ekkoBSD:*:*) echo "$UNAME_MACHINE"-unknown-ekkobsd"$UNAME_RELEASE" exit ;; *:SolidBSD:*:*) echo "$UNAME_MACHINE"-unknown-solidbsd"$UNAME_RELEASE" exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd"$UNAME_RELEASE" exit ;; *:MirBSD:*:*) echo "$UNAME_MACHINE"-unknown-mirbsd"$UNAME_RELEASE" exit ;; *:Sortix:*:*) echo "$UNAME_MACHINE"-unknown-sortix exit ;; *:Redox:*:*) echo "$UNAME_MACHINE"-unknown-redox exit ;; mips:OSF1:*.*) echo mips-dec-osf1 exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE=alpha ;; "EV4.5 (21064)") UNAME_MACHINE=alpha ;; "LCA4 (21066/21068)") UNAME_MACHINE=alpha ;; "EV5 (21164)") UNAME_MACHINE=alphaev5 ;; "EV5.6 (21164A)") UNAME_MACHINE=alphaev56 ;; "EV5.6 (21164PC)") UNAME_MACHINE=alphapca56 ;; "EV5.7 (21164PC)") UNAME_MACHINE=alphapca57 ;; "EV6 (21264)") UNAME_MACHINE=alphaev6 ;; "EV6.7 (21264A)") UNAME_MACHINE=alphaev67 ;; "EV6.8CB (21264C)") UNAME_MACHINE=alphaev68 ;; "EV6.8AL (21264B)") UNAME_MACHINE=alphaev68 ;; "EV6.8CX (21264D)") UNAME_MACHINE=alphaev68 ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE=alphaev69 ;; "EV7 (21364)") UNAME_MACHINE=alphaev7 ;; "EV7.9 (21364A)") UNAME_MACHINE=alphaev79 ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo "$UNAME_MACHINE"-dec-osf"`echo "$UNAME_RELEASE" | sed -e 's/^[PVTX]//' | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz`" # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo "$UNAME_MACHINE"-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo "$UNAME_MACHINE"-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix"$UNAME_RELEASE" exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo "$UNAME_MACHINE"-ibm-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2"`echo "$UNAME_RELEASE" | sed -e 's/[^.]*//'`" exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux"$UNAME_RELEASE" exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval "$set_cc_for_build" SUN_ARCH=i386 # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH=x86_64 fi fi echo "$SUN_ARCH"-pc-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos"`echo "$UNAME_RELEASE"|sed -e 's/-/_/'`" exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos"$UNAME_RELEASE" exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x$UNAME_RELEASE" = x && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos"$UNAME_RELEASE" ;; sun4) echo sparc-sun-sunos"$UNAME_RELEASE" ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos"$UNAME_RELEASE" exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint"$UNAME_RELEASE" exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint"$UNAME_RELEASE" exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint"$UNAME_RELEASE" exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint"$UNAME_RELEASE" exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint"$UNAME_RELEASE" exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint"$UNAME_RELEASE" exit ;; m68k:machten:*:*) echo m68k-apple-machten"$UNAME_RELEASE" exit ;; powerpc:machten:*:*) echo powerpc-apple-machten"$UNAME_RELEASE" exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix"$UNAME_RELEASE" exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix"$UNAME_RELEASE" exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix"$UNAME_RELEASE" exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval "$set_cc_for_build" sed 's/^ //' << EOF > "$dummy.c" #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && dummyarg=`echo "$UNAME_RELEASE" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`"$dummy" "$dummyarg"` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos"$UNAME_RELEASE" exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ "$UNAME_PROCESSOR" = mc88100 ] || [ "$UNAME_PROCESSOR" = mc88110 ] then if [ "$TARGET_BINARY_INTERFACE"x = m88kdguxelfx ] || \ [ "$TARGET_BINARY_INTERFACE"x = x ] then echo m88k-dg-dgux"$UNAME_RELEASE" else echo m88k-dg-dguxbcs"$UNAME_RELEASE" fi else echo i586-dg-dgux"$UNAME_RELEASE" fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix"`echo "$UNAME_RELEASE"|sed -e 's/-/_/g'`" exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi echo "$UNAME_MACHINE"-ibm-aix"$IBM_REV" exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval "$set_cc_for_build" sed 's/^ //' << EOF > "$dummy.c" #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El "$IBM_CPU_ID" | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/lslpp ] ; then IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV="$UNAME_VERSION.$UNAME_RELEASE" fi echo "$IBM_ARCH"-ibm-aix"$IBM_REV" exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:4.4BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd"$UNAME_RELEASE" # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` case "$UNAME_MACHINE" in 9000/31?) HP_ARCH=m68000 ;; 9000/[34]??) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "$sc_cpu_version" in 523) HP_ARCH=hppa1.0 ;; # CPU_PA_RISC1_0 528) HP_ARCH=hppa1.1 ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "$sc_kernel_bits" in 32) HP_ARCH=hppa2.0n ;; 64) HP_ARCH=hppa2.0w ;; '') HP_ARCH=hppa2.0 ;; # HP-UX 10.20 esac ;; esac fi if [ "$HP_ARCH" = "" ]; then eval "$set_cc_for_build" sed 's/^ //' << EOF > "$dummy.c" #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS="" $CC_FOR_BUILD -o "$dummy" "$dummy.c" 2>/dev/null) && HP_ARCH=`"$dummy"` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ "$HP_ARCH" = hppa2.0w ] then eval "$set_cc_for_build" # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH=hppa2.0w else HP_ARCH=hppa64 fi fi echo "$HP_ARCH"-hp-hpux"$HPUX_REV" exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo "$UNAME_RELEASE"|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux"$HPUX_REV" exit ;; 3050*:HI-UX:*:*) eval "$set_cc_for_build" sed 's/^ //' << EOF > "$dummy.c" #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o "$dummy" "$dummy.c" && SYSTEM_NAME=`"$dummy"` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:*) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:*) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo "$UNAME_MACHINE"-unknown-osf1mk else echo "$UNAME_MACHINE"-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo "$UNAME_MACHINE"-cray-unicos"$UNAME_RELEASE" \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp"$UNAME_RELEASE" | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz` FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/\///'` FUJITSU_REL=`echo "$UNAME_RELEASE" | tr ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo "$UNAME_MACHINE"-pc-bsdi"$UNAME_RELEASE" exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi"$UNAME_RELEASE" exit ;; *:BSD/OS:*:*) echo "$UNAME_MACHINE"-unknown-bsdi"$UNAME_RELEASE" exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case "$UNAME_PROCESSOR" in amd64) UNAME_PROCESSOR=x86_64 ;; i386) UNAME_PROCESSOR=i586 ;; esac echo "$UNAME_PROCESSOR"-unknown-freebsd"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" exit ;; i*:CYGWIN*:*) echo "$UNAME_MACHINE"-pc-cygwin exit ;; *:MINGW64*:*) echo "$UNAME_MACHINE"-pc-mingw64 exit ;; *:MINGW*:*) echo "$UNAME_MACHINE"-pc-mingw32 exit ;; *:MSYS*:*) echo "$UNAME_MACHINE"-pc-msys exit ;; i*:PW*:*) echo "$UNAME_MACHINE"-pc-pw32 exit ;; *:Interix*:*) case "$UNAME_MACHINE" in x86) echo i586-pc-interix"$UNAME_RELEASE" exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix"$UNAME_RELEASE" exit ;; IA64) echo ia64-unknown-interix"$UNAME_RELEASE" exit ;; esac ;; i*:UWIN*:*) echo "$UNAME_MACHINE"-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`" exit ;; *:GNU:*:*) # the GNU system echo "`echo "$UNAME_MACHINE"|sed -e 's,[-/].*$,,'`-unknown-$LIBC`echo "$UNAME_RELEASE"|sed -e 's,/.*$,,'`" exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo "$UNAME_MACHINE-unknown-`echo "$UNAME_SYSTEM" | sed 's,^[^/]*/,,' | tr "[:upper:]" "[:lower:]"``echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`-$LIBC" exit ;; i*86:Minix:*:*) echo "$UNAME_MACHINE"-pc-minix exit ;; aarch64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC=gnulibc1 ; fi echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; arm*:Linux:*:*) eval "$set_cc_for_build" if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabi else echo "$UNAME_MACHINE"-unknown-linux-"$LIBC"eabihf fi fi exit ;; avr32*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; cris:Linux:*:*) echo "$UNAME_MACHINE"-axis-linux-"$LIBC" exit ;; crisv32:Linux:*:*) echo "$UNAME_MACHINE"-axis-linux-"$LIBC" exit ;; e2k:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; frv:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; hexagon:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:Linux:*:*) echo "$UNAME_MACHINE"-pc-linux-"$LIBC" exit ;; ia64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; k1om:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m32r*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; m68*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval "$set_cc_for_build" sed 's/^ //' << EOF > "$dummy.c" #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E "$dummy.c" 2>/dev/null | grep '^CPU'`" test "x$CPU" != x && { echo "$CPU-unknown-linux-$LIBC"; exit; } ;; mips64el:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; openrisc*:Linux:*:*) echo or1k-unknown-linux-"$LIBC" exit ;; or32:Linux:*:* | or1k*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; padre:Linux:*:*) echo sparc-unknown-linux-"$LIBC" exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-"$LIBC" exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-"$LIBC" ;; PA8*) echo hppa2.0-unknown-linux-"$LIBC" ;; *) echo hppa-unknown-linux-"$LIBC" ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-"$LIBC" exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-"$LIBC" exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-"$LIBC" exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-"$LIBC" exit ;; riscv32:Linux:*:* | riscv64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo "$UNAME_MACHINE"-ibm-linux-"$LIBC" exit ;; sh64*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sh*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; tile*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; vax:Linux:*:*) echo "$UNAME_MACHINE"-dec-linux-"$LIBC" exit ;; x86_64:Linux:*:*) if objdump -f /bin/sh | grep -q elf32-x86-64; then echo "$UNAME_MACHINE"-pc-linux-"$LIBC"x32 else echo "$UNAME_MACHINE"-pc-linux-"$LIBC" fi exit ;; xtensa*:Linux:*:*) echo "$UNAME_MACHINE"-unknown-linux-"$LIBC" exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo "$UNAME_MACHINE"-pc-sysv4.2uw"$UNAME_VERSION" exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo "$UNAME_MACHINE"-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo "$UNAME_MACHINE"-unknown-stop exit ;; i*86:atheos:*:*) echo "$UNAME_MACHINE"-unknown-atheos exit ;; i*86:syllable:*:*) echo "$UNAME_MACHINE"-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos"$UNAME_RELEASE" exit ;; i*86:*DOS:*:*) echo "$UNAME_MACHINE"-pc-msdosdjgpp exit ;; i*86:*:4.*:*) UNAME_REL=`echo "$UNAME_RELEASE" | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo "$UNAME_MACHINE"-univel-sysv"$UNAME_REL" else echo "$UNAME_MACHINE"-pc-sysv"$UNAME_REL" fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo "$UNAME_MACHINE-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}{$UNAME_VERSION}" exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo "$UNAME_MACHINE"-pc-sco"$UNAME_REL" else echo "$UNAME_MACHINE"-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configure will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv"$UNAME_RELEASE" # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv"$UNAME_RELEASE" # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3"$OS_REL"; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos"$UNAME_RELEASE" exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos"$UNAME_RELEASE" exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos"$UNAME_RELEASE" exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos"$UNAME_RELEASE" exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv"$UNAME_RELEASE" exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo "$UNAME_MACHINE"-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo "$UNAME_MACHINE"-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux"$UNAME_RELEASE" exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv"$UNAME_RELEASE" else echo mips-unknown-sysv"$UNAME_RELEASE" fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux"$UNAME_RELEASE" exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux"$UNAME_RELEASE" exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux"$UNAME_RELEASE" exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux"$UNAME_RELEASE" exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux"$UNAME_RELEASE" exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux"$UNAME_RELEASE" exit ;; SX-ACE:SUPER-UX:*:*) echo sxace-nec-superux"$UNAME_RELEASE" exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody"$UNAME_RELEASE" exit ;; *:Rhapsody:*:*) echo "$UNAME_MACHINE"-apple-rhapsody"$UNAME_RELEASE" exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown eval "$set_cc_for_build" if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if test "`echo "$UNAME_RELEASE" | sed -e 's/\..*//'`" -le 10 ; then if [ "$CC_FOR_BUILD" != no_compiler_found ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi # On 10.4-10.6 one might compile for PowerPC via gcc -arch ppc if (echo '#ifdef __POWERPC__'; echo IS_PPC; echo '#endif') | \ (CCOPTS="" $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_PPC >/dev/null then UNAME_PROCESSOR=powerpc fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub # that puts up a graphical alert prompting to install # developer tools. Any system running Mac OS X 10.7 or # later (Darwin 11 and later) is required to have a 64-bit # processor. This is not true of the ARM version of Darwin # that Apple uses in portable devices. UNAME_PROCESSOR=x86_64 fi echo "$UNAME_PROCESSOR"-apple-darwin"$UNAME_RELEASE" exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = x86; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo "$UNAME_PROCESSOR"-"$UNAME_MACHINE"-nto-qnx"$UNAME_RELEASE" exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-*:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk"$UNAME_RELEASE" exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk"$UNAME_RELEASE" exit ;; NSR-*:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk"$UNAME_RELEASE" exit ;; NSV-*:NONSTOP_KERNEL:*:*) echo nsv-tandem-nsk"$UNAME_RELEASE" exit ;; NSX-*:NONSTOP_KERNEL:*:*) echo nsx-tandem-nsk"$UNAME_RELEASE" exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo "$UNAME_MACHINE"-"$UNAME_SYSTEM"-"$UNAME_RELEASE" exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = 386; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo "$UNAME_MACHINE"-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux"$UNAME_RELEASE" exit ;; *:DragonFly:*:*) echo "$UNAME_MACHINE"-unknown-dragonfly"`echo "$UNAME_RELEASE"|sed -e 's/[-(].*//'`" exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "$UNAME_MACHINE" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo "$UNAME_MACHINE"-pc-skyos"`echo "$UNAME_RELEASE" | sed -e 's/ .*$//'`" exit ;; i*86:rdos:*:*) echo "$UNAME_MACHINE"-pc-rdos exit ;; i*86:AROS:*:*) echo "$UNAME_MACHINE"-pc-aros exit ;; x86_64:VMkernel:*:*) echo "$UNAME_MACHINE"-unknown-esx exit ;; amd64:Isilon\ OneFS:*:*) echo x86_64-unknown-onefs exit ;; esac echo "$0: unable to guess system type" >&2 case "$UNAME_MACHINE:$UNAME_SYSTEM" in mips:Linux | mips64:Linux) # If we got here on MIPS GNU/Linux, output extra information. cat >&2 <&2 </dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = "$UNAME_MACHINE" UNAME_RELEASE = "$UNAME_RELEASE" UNAME_SYSTEM = "$UNAME_SYSTEM" UNAME_VERSION = "$UNAME_VERSION" EOF exit 1 # Local variables: # eval: (add-hook 'write-file-functions 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: wmbiff-0.4.36/ChangeLog0000644000207400020740000025461613646363662011606 000000000000002020-04-17 Jeremy Sowden * ChangeLog, configure.ac: wmbiff: bump to 0.4.36. 2020-04-17 Jeremy Sowden * wmgeneral/wmgeneral.c, wmgeneral/wmgeneral.h: wmbiff: fix multiple definitions of display variable. The display variable is declared in a header with no explicit linkage. This results in there being multiple definitions of it in wmbiff.o and libwmgeneral.a and a failure during linking with gcc 10. Add `extern` to the header declaration and a separate declaration with no linkage in wmgeneral.c where it is assigned. Link: https://bugs.debian.org/957937 Signed-off-by: Jeremy Sowden 2019-07-23 Jeremy Sowden * ChangeLog, NEWS, configure.ac: bumped to 0.4.35. 2019-07-23 Jeremy Sowden * AUTHORS: added Doug Torrance and myself to the list. 2019-07-23 Jeremy Sowden * wmbiff/tlsComm.c: added support for TLS SNI. From Debian bug #917993: From: Nye Liu Subject: wmbiff: gmail (and many other IMAP servers) now require SNI Date: Tue, 01 Jan 2019 18:33:51 -0800 wmbiff/gmail imap4: Need new connection to ***@gmail.com@imap.gmail.com wmbiff/gmail comm: certificate passed time check. wmbiff/gmail comm: server's certificate (OU=No SNI provided\; please fix your client.,CN=invalid2.invalid) does not match its hostname (imap.gmail.com). wmbiff/gmail comm: server's certificate does not match its hostname. wmbiff/gmail comm: to ignore this error, run wmbiff with the -skip-certificate-check option 2019-07-22 Jeremy Sowden * ChangeLog, NEWS, configure.ac: bumped to 0.4.34. 2019-07-02 Jeremy Sowden * wmbiff/wmbiff.c: use one for-loop when creating backing XPM. Fixes static analysis warning about uninitialized value. 2019-07-02 Jeremy Sowden * wmbiff/passwordMgr.c: fixed possible null-pointer dereference. 2019-07-02 Jeremy Sowden * wmbiff/Imap4Client.c, wmbiff/passwordMgr.c, wmbiff/test_tlscomm.c, wmbiff/tlsComm.c, wmgeneral/wmgeneral.c: fixed leaks. 2019-07-02 Jeremy Sowden * wmbiff/wmbiff.c: removed superfluous assignment. 2019-07-02 Jeremy Sowden * wmbiff/Pop3Client.c: replaced strncpy with memcpy. 2019-07-02 Jeremy Sowden * wmbiff/Client.h, wmbiff/Imap4Client.c, wmbiff/MessageList.c, wmbiff/MessageList.h, wmbiff/Pop3Client.c, wmbiff/ShellClient.c, wmbiff/maildirClient.c, wmbiff/mboxClient.c, wmbiff/passwordMgr.c, wmbiff/passwordMgr.h, wmbiff/test_wmbiff.c, wmbiff/tlsComm.c, wmbiff/tlsComm.h, wmbiff/wmbiff.c: stop hiding pointers behind typedefs. 2019-07-02 Jeremy Sowden * .gitignore: added .gitignore. 2019-07-02 Jeremy Sowden * Makefile.am, autoconf/Makefile.am, configure.ac: removed autoconf directory. 2019-07-02 Jeremy Sowden * autogen: added autogen. 2019-06-28 Jeremy Sowden * wmbiff/Client.h, wmbiff/Imap4Client.c, wmbiff/passwordMgr.c: use `size_t` for password-lengths. 2019-06-28 Jeremy Sowden * wmbiff/Imap4Client.c: fixed endianness problems parsing server-ports. `regulo_atoi` expects a pointer-to-int and `PCU.serverPort` is a `uint16_t`, so `&PCU.serverPort` is not compatible and we need to use an `int` temporary variable to avoid endianness problems. 2019-06-28 Jeremy Sowden * wmbiff/socket.c: fixed endianness problems connecting to POP and IMAP servers. `addr.sin_addr.s_addr` is a `uint32_t` in NBO, so assigning a `struct in_addr` cast to `unsigned long` will break on 64-bit big-endian architectures. 2019-06-28 Jeremy Sowden * wmbiff/test_wmbiff.c: `addr.sin_port` is in NBO, so we should use ntohs(3), not htons(3). 2019-06-28 Jeremy Sowden * wmbiff/socket.c, wmbiff/test_wmbiff.c: tidy up socket connexions. 2019-06-28 Jeremy Sowden * wmbiff/socket.c: correct the address size passed to connect(2). `addr` is a `struct sockaddr_in`, not a `struct sockaddr`; using `sizeof var` instead of `sizeof (type)` ensures that the right size is used. 2019-06-28 Jeremy Sowden * wmbiff/regulo.c, wmbiff/wmbiff/regulo.h: `regulo_match` modifies `instructions[i].destination`, so remove `const`. 2019-06-28 Jeremy Sowden * wmbiff/regulo.c: use temporary variables and remove casts. 2019-03-01 Doug Torrance * ChangeLog, NEWS, configure.ac: Bump to version 0.4.33 2019-03-01 Doug Torrance * wmbiff/tlsComm.c: Remove unnecessary loop. The last release of wmbiff included a patch by Nye Liu from Debian bug #917467 [1]. However, the second part of that patch is not necessary. From Andreas Metzler's comment I am not sure about the second part of the patch. I understand wmbiff breaking on GNUTLS_E_AGAIN from gnutls_read, because this only started to happen recently (with TLS1.3) on blocking sockets. What I do not get from my rudimentary understanding C programmimg is the second part, this is in the else of "if (scs->tls_state)", so, afaiui for non-encrypted connections. Is the change necessary there at all, is it the right thing to retry read on EAGAIN then? We revert the second part of the patch. [1] https://bugs.debian.org/917467 2019-02-12 Doug Torrance * ChangeLog, NEWS, configure.ac: Bump to version 0.4.32. 2019-02-12 Doug Torrance * wmbiff/Imap4Client.c, wmbiff/tlsComm.c: handle EAGAIN or GNUTLS_E_AGAIN From Debian bug #917467, reported by Nye Liu [1]: If gnutls_read() or read() report EAGAIN, tlscomm_expect() fails: wmbiff/nyet comm: wrote a000 CAPABILITY wmbiff/nyet comm: imap.***.***:993: expecting: * CAPABILITY wmbiff/nyet comm: imap.***.***:993: gnutls error reading: Resource temporarily unavailable, try again. wmbiff/nyet imap4: unable to query capability stringwmbiff/nyet comm: wrote a002 LOGOUT wmbiff/nyet comm: imap.***.***:993: closing. [1] https://bugs.debian.org/917467 2018-05-14 Doug Torrance * FAQ, README, configure.ac, wmbiff/sample.wmbiffrc, wmbiff/wmbiff.1: Update mailing list links to new Google Groups. 2017-06-23 Doug Torrance * ChangeLog, NEWS, configure.ac: Bump to version 0.4.31. 2017-06-23 Doug Torrance * wmbiff/Imap4Client.c, wmbiff/ShellClient.c, wmbiff/passwordMgr.c, wmbiff/test_wmbiff.c: Remove #define _GNU_SOURCE; already defined in CFLAGS. 2017-06-23 Doug Torrance * wmbiff/maildirClient.c: Manually copy mailbox path. Patch by Demi to fix Debian bug #621690 [1]. [1] https://bugs.debian.org/621690 2016-11-30 Doug Torrance * ChangeLog, NEWS, configure.ac: Bump to verson 0.4.30. 2016-11-30 Doug Torrance * wmbiff/Imap4Client.c, wmbiff/ShellClient.c, wmbiff/passwordMgr.c, wmbiff/test_wmbiff.c: Add #define _GNU_SOURCE to avoid "implicit declaration" warnings. 2016-11-30 Doug Torrance * wmbiff/Client.h, wmbiff/socket.c: Use unsigned data type for port number. 2016-07-20 Doug Torrance * wmbiff/wmbiff.1, wmbiff/wmbiff.c: Fix typos. 2016-07-19 Doug Torrance * ChangeLog, configure.ac: Bump to version 0.4.29. 2016-07-19 Doug Torrance * wmbiff/Imap4Client.c: Close mailbox before we call status on it. Additional patch by Nye Liu to fix Debian bug #830889 [1]. [1] https://bugs.debian.org/830889 2016-07-12 Doug Torrance * wmbiff/Imap4Client.c: EXAMINE before STATUS Patch by Nye Liu to fix Debian bug #830889 [1]. Outlook Office365 IMAP servers now expect a client to issue at least one EXAMINE before STATUS, or UNSEEN is always zero. [1] https://bugs.debian.org/830889 2015-10-25 Doug Torrance * wmbiff/wmbiff.1, wmbiff/wmbiff.c: Add missing command line options to documentation. Closes Debian bug #770117 [1]. [1] https://bugs.debian.org/770117 2015-08-16 Rodolfo García Peñas (kix) * wmbiff/tlsComm.c: FTBFS with initialize_gnutls The first argument for the function initialize_gnutls is an intptr_t so wmbiff fails to build from source. This patch changes the current int to intptr_t. 2014-11-07 Doug Torrance * wmbiff/Makefile.am: Remove sourceforgeupload target from Makefile; no longer needed. 2014-11-07 Doug Torrance * wmbiff/README, wmbiff/configure.ac, wmbiff/wmbiff/sample.wmbiffrc, wmbiff/wmbiff/wmbiff.1: Update email address. 2014-11-07 Doug Torrance * wmbiff/wmbiff/Imap4Client.c, wmbiff/wmbiff/Pop3Client.c: Use PACKAGE_BUGREPORT instead of hardcoding address. 2014-11-07 Doug Torrance * wmbiff/FAQ: Update FAQ. 2014-11-05 Doug Torrance * wmbiff/wmbiff/tlsComm.c, wmbiff/wmbiff/tlsComm.h: Fix cast to pointer from integer of different size compiler warning. 2014-11-05 Doug Torrance * wmbiff/wmbiff/gnutls-common.c, wmbiff/wmbiff/gnutls-common.h, wmbiff/wmbiff/tlsComm.c: Fix compiler warnings from deprecated gnutls types. 2014-11-05 Doug Torrance * wmbiff/wmbiff/wmbiff.1, wmbiff/wmbiff/wmbiffrc.5.in: Fix manpages. In particular, fix spelling-error-in-manpage, hyphen-used-as-minus-sign, and manpage-has-errors-from-man Lintian warnings from the Debian package. 2014-11-05 Doug Torrance * wmbiff/configure.ac: Remove arguments to AM_INIT_AUTOMAKE in configure.ac. This patch serves two purposes: - Avoid a " AM_INIT_AUTOMAKE: two- and three-arguments forms are deprecated" warning when running autoreconf. - Fix "syntax error near unexpected token" when running configure. 2014-11-05 Doug Torrance * wmbiff/INSTALL: Remove INSTALL; automatically generated by autotools. 2014-11-04 Doug Torrance * wmbiff/wmgeneral/wmgeneral.h: Increase number of actions to 40. Patch by Alberto Morales . For more information, see: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=589408 2014-11-04 Doug Torrance * wmbiff/wmbiff/Client.h, wmbiff/wmbiff/Imap4Client.c: Allow usernames with more than 32 characters. Patch by Tommaso Parisi . For more information, see: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=626393 2014-11-04 Doug Torrance * wmbiff/wmbiff/socket.c: Fix connection leak. Patch by Arnaud Giersch . For more information, see: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=663876 2014-11-04 Doug Torrance * wmbiff/scripts/security.debian.rb: Fix security.debian.rb script. Patch by Lothar Ketterer For more information, see: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=525749 2014-11-04 Doug Torrance * wmbiff/wmbiff/gnutls-common.c: Remove LZO compression. GnuTLS LZO support was removed in version 3.0.0. Based on the patch by Andreas Metzler : http://sources.debian.net/src/wmbiff/0.4.27-2.3/debian/patches/15_no_more_LZO.diff/ For more information, see: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=638736 2014-10-05 Doug Torrance * wmbiff/AUTHORS, wmbiff/FAQ, wmbiff/Makefile.am, wmbiff/NEWS, wmbiff/README, wmbiff/TODO, wmbiff/autoconf/Makefile.am, wmbiff/configure.ac, wmbiff/scripts/security.debian.rb, wmbiff/wmbiff/Client.h, wmbiff/wmbiff/Imap4Client.c, wmbiff/wmbiff/Makefile.am, wmbiff/wmbiff/Pop3Client.c, wmbiff/wmbiff/ShellClient.c, wmbiff/wmbiff/charutil.c, wmbiff/wmbiff/charutil.h, wmbiff/wmbiff/gnutls-common.c, wmbiff/wmbiff/maildirClient.c, wmbiff/wmbiff/mboxClient.c, wmbiff/wmbiff/passwordMgr.c, wmbiff/wmbiff/sample.wmbiffrc, wmbiff/wmbiff/socket.c, wmbiff/wmbiff/test_wmbiff.c, wmbiff/wmbiff/tlsComm.c, wmbiff/wmbiff/tlsComm.h, wmbiff/wmbiff/wmbiff.1, wmbiff/wmbiff/wmbiff.c, wmbiff/wmbiff/wmbiffrc.5.in, wmbiff/wmgeneral/Makefile.am, wmbiff/wmgeneral/misc.c, wmbiff/wmgeneral/wmgeneral.c: Remove trailing whitespace. 2013-04-08 Gabriel VLASIU * wmbiff/wmbiff/Makefile.am, wmbiff/wmbiff/mboxClient.c, wmbiff/wmbiff/wmbiff-classic-master-led.xpm, wmbiff/wmbiff/wmbiff.1, wmbiff/wmbiff/wmbiff.c: Enable classic mode. 2013-04-08 Gabriel VLASIU * wmbiff/configure.ac, wmbiff/wmbiff/Imap4Client.c, wmbiff/wmbiff/Pop3Client.c, wmbiff/wmbiff/gnutls-common.c, wmbiff/wmbiff/test_tlscomm.c, wmbiff/wmbiff/test_wmbiff.c, wmbiff/wmbiff/tlsComm.c, wmbiff/wmbiff/wmbiff.c, wmbiff/wmbiff/wmbiffrc.5.in: Update gnutls code (require at least 2.2.0). 2013-04-08 Gabriel VLASIU * wmbiff/wmbiff/wmbiff.1: Remove gnomeicu from wmbif's manual. 2013-04-04 Gabriel VLASIU * wmbiff/wmgeneral/wmgeneral.c: Fix segfault when -display or -geometry argument is missing. 2013-04-04 Gabriel VLASIU * wmbiff/wmbiff/wmbiff.c: Free memory when using a custom skin. 2013-04-04 Gabriel VLASIU * wmbiff/wmbiff/wmbiff.c: Fix wmbiff restart. 2013-04-04 Gabriel VLASIU * wmbiff/wmbiff/gnutls-common.c: More gnutls casts. 2013-04-04 Gabriel VLASIU * wmbiff/wmbiff/wmbiff.c, wmbiff/wmgeneral/wmgeneral.c: Fix memory leaks pointed out by valgrind. 2013-04-04 Gabriel VLASIU * wmbiff/wmgeneral/Makefile.am, wmbiff/wmgeneral/list.c, wmbiff/wmgeneral/list.h, wmbiff/wmgeneral/misc.c: Remove unused files. 2013-04-03 Gabriel VLASIU * wmbiff/wmbiff/wmbiff.c: XKeycodeToKeysym is deprecated. 2013-04-03 Gabriel VLASIU * wmbiff/wmbiff/wmbiff.c: Remove unused variable. 2013-04-03 Gabriel VLASIU * wmbiff/wmbiff/gnutls-common.c, wmbiff/wmbiff/test_wmbiff.c, wmbiff/wmbiff/tlsComm.c: Fix signedness and/or cast. 2013-04-03 Gabriel VLASIU * wmbiff/wmbiff/Pop3Client.c: comparison between pointer and integer. 2013-04-03 Gabriel VLASIU * wmbiff/wmbiff/test_tlscomm.c: Add missing include. 2013-04-03 Gabriel VLASIU * wmbiff/wmbiff/wmbiff.1, wmbiff/wmbiff/wmbiffrc.5.in: Update manual for wmbiff and wmbiffrc. 2012-06-12 Wade Berrier * wmbiff/configure.ac, wmbiff/scripts/Makefile.am: slight automake/autoconf refresh AM_PATH_LIBGNUTLS seems to be obsolete. Replace the check with pkg-config using PKG_CHECK_MODULES. AM_CONFIG_HEADER also seems to be obsolete. Replace with AC_CONFIG_HEADER. Fix installing an extra script (security.debian.rb) 2012-06-05 Alexey I. Froloff * wmbiff/wmbiff/gnutls-common.c, wmbiff/wmbiff/socket.c, wmbiff/wmgeneral/list.c, wmbiff/wmgeneral/list.h, wmbiff/wmgeneral/misc.c: Mass update FSF address 2012-06-05 Alexey I. Froloff * wmbiff/configure.ac: Make autoreconf happy 2012-06-05 Alexey I. Froloff * wmbiff/Makefile.in, wmbiff/aclocal.m4, wmbiff/autoconf/Makefile.in, wmbiff/autoconf/depcomp, wmbiff/autoconf/install-sh, wmbiff/autoconf/missing, wmbiff/autoconf/mkinstalldirs, wmbiff/config.h.in, wmbiff/configure, wmbiff/scripts/Makefile.in, wmbiff/wmbiff/Makefile.in, wmbiff/wmbiff/wmbiffrc.5, wmbiff/wmgeneral/Makefile.in: Removed all autogenerated autotools and imake stuff There's no need to keep autogenerated files in repository. Those dockapps which use autotoold must be autoreconf'ed prior to build, those which use imake must be xmkmf'ed. As of wmbiff, AC_PATH_XTRA_CORRECTED was a hack to avoid bug in older autoconf version, which is no longer needed (it's 2012 now already). 2012-06-05 Alexey I. Froloff * wmbiff/COPYING: Mass update GPLv2 from http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt 2011-03-21 Carlos R. Mafra * wmbiff/wmbiff-master-led.xpm, wmbiff/wmbiff.c: Change default colors 2011-03-21 Carlos R. Mafra * wmbiff/wmbiff.c: Remove trailing colon from mailbox label So now we have one extra char for the label name. 2011-03-21 Carlos R. Mafra * Makefile.am, README.licq, wmbiff/Client.h, wmbiff/LicqClient.c, wmbiff/Makefile.am, wmbiff/Makefile.in, wmbiff/sample.wmbiffrc, wmbiff/wmbiff.1, wmbiff/wmbiff.c: Remove Licq, gnomeicu and finger support 2011-03-21 Carlos R. Mafra * wmbiff/wmbiff.c: Raise sleep interval to 20 secs 2011-03-21 Carlos R. Mafra * wmbiff/wmbiff.c: Trivial code cleanups 2011-03-21 Carlos R. Mafra * wmbiff/wmbiff.c: Fix global notification Global notification would only work if all 'notify' commands for all mailboxes were unset (=='\0'). Fix that. 2011-03-21 Carlos R. Mafra * wmbiff/wmbiff.c: Remove autofetch on new email arrival 2011-03-21 Carlos R. Mafra * wmbiff/wmbiff.c: Remove 'beep' option for notification 2011-03-21 Carlos R. Mafra * wmbiff/wmbiff.c: Display "0" when there are no new emails ...instead of displaying the total number of emails in the mailbox. On my gmail account with +16k emails, there was not enough space to display the account label. Besides, the total number of emails is useless information anyway. 2005-10-08 Saturday 18:13 UTC -- Neil Spring * configure.ac: year stale 0.4.26 news 2005-10-07 Friday 03:07 UTC -- Neil Spring * wmbiff/wmbiff.c: fix debian #332540: prevent -c 'directory' from making wmbiff run away 2005-05-08 Sunday 21:31 UTC -- Neil Spring * wmbiff/: Client.h, MessageList.c, test_tlscomm.c, test_wmbiff.c, tlsComm.c, tlsComm.h, wmbiff.c: changes for gnutls 1.2 and attempt to make wmbiff more responsive to X events while communicating over the network 2004-12-12 Sunday 00:06 UTC -- Neil Spring * check-includes.rb: update the portability checker 2004-12-12 Sunday 00:05 UTC -- Neil Spring * wmgeneral/wmgeneral.c: allow KeyPress events through 2004-12-12 Sunday 00:03 UTC -- Neil Spring * wmbiff/passwordMgr.c: nicer debug message 2004-12-12 Sunday 00:02 UTC -- Neil Spring * wmbiff/: gnutls-common.c, test_wmbiff.c: compiler appeasement 2004-12-12 Sunday 00:01 UTC -- Neil Spring * wmbiff/: Pop3Client.c, wmbiff.c, wmbiffrc.5.in: tls and password asking support for pop3, keyboard event handling for the main window 2004-10-31 Sunday 22:09 UTC -- Neil Spring * wmbiff/tlsComm.c: indent and make tls_check_certificate void 2004-10-01 Friday 21:15 UTC -- Neil Spring * wmbiff/tlsComm.c: comment the SHUT_WR 2004-10-01 Friday 21:06 UTC -- Neil Spring * wmbiff/tlsComm.c: indent, and return if no certificate came back from the far side 2004-10-01 Friday 21:05 UTC -- Neil Spring * wmbiff/socket.c: thwack duplicate error messages about connecting to a remote server 2004-10-01 Friday 21:02 UTC -- Neil Spring * wmbiff/wmbiff.c: indent 2004-08-23 Monday 00:37 UTC -- Neil Spring * wmbiff/wmbiff.c: disable the secure memory warning (and its use) 2004-07-03 Saturday 23:45 UTC -- Neil Spring * FAQ: some faqs 2004-07-03 Saturday 23:43 UTC -- Neil Spring * scripts/security.debian.rb: handle the timeout error explicitly, better for disconnected operation 2004-07-03 Saturday 23:43 UTC -- Neil Spring * wmbiff/socket.c: strerror preferred to perror 2004-06-28 Monday 18:20 UTC -- Neil Spring * scripts/security.debian.rb: fix debian #256505: a small problem with the .wmbiff-sdr directory not being created 2004-06-23 Wednesday 21:51 UTC -- Neil Spring * configure.ac: 0.4.25 2004-06-23 Wednesday 21:46 UTC -- Neil Spring * configure.ac, wmbiff/tlsComm.c: probably fix the s390 debian build problems 2004-06-20 Sunday 01:03 UTC -- Neil Spring * wmbiff/tlsComm.c: oops, should pay attention to the retval of tls_compare_certificates 2004-06-19 Saturday 21:38 UTC -- Neil Spring * wmbiff/gnutls-common.c: warning cleanup 2004-06-19 Saturday 20:53 UTC -- Neil Spring * configure.ac, wmbiff/Client.h, wmbiff/Imap4Client.c, wmbiff/Pop3Client.c, wmbiff/gnutls-common.c, wmbiff/gnutls-common.h, wmbiff/tlsComm.c, wmbiff/wmbiff.c, wmgeneral/wmgeneral.c: 0.4.24, supporting newer gnutls, I think 2004-06-18 Friday 21:29 UTC -- Neil Spring * wmbiff/wmbiff.c: paranoid test to see if /var/mail/nspring is constructed wrong. 2004-04-28 Wednesday 00:19 UTC -- Neil Spring * wmbiff/: Client.h, charutil.c, socket.c, test_wmbiff.c, wmbiff.c: indent run 2004-04-28 Wednesday 00:18 UTC -- Neil Spring * wmbiff/: socket.c, test_wmbiff.c: handle ip addresses instead of hostnames in sock_connect 2004-04-27 Tuesday 23:35 UTC -- Neil Spring * configure.ac: 0.4.23 2004-04-27 Tuesday 23:31 UTC -- Neil Spring * wmbiff/test_wmbiff.c: ensure that sock_connect works with IP addresses 2004-04-21 Wednesday 21:53 UTC -- Neil Spring * wmbiff/Imap4Client.c: oops, broke the cacheHeaders flag 2004-04-20 Tuesday 04:55 UTC -- Neil Spring * wmbiff/: charutil.c, charutil.h, test_wmbiff.c, wmbiff.c: factor out comment stripping for testing, which seems to have passed 2004-04-06 Tuesday 20:58 UTC -- Neil Spring * wmbiff/: Imap4Client.c, Pop3Client.c, test_wmbiff.c: fix debian #242458 -- allow IP addresses as server names for IMAP mailboxes, and also for POP3 mailboxes 2004-03-28 Sunday 00:36 UTC -- Neil Spring * configure.ac: 0.4.22 2004-03-28 Sunday 00:28 UTC -- Neil Spring * wmbiff/: Client.h, Imap4Client.c, Pop3Client.c, ShellClient.c, charutil.c, maildirClient.c, mboxClient.c, passwordMgr.c, regulo.c, test_tlscomm.c, tlsComm.c, tlsComm.h, wmbiff.c: lots of indent changes and a change to let msglst enable header caching for imap 2004-03-12 Friday 21:35 UTC -- Neil Spring * wmbiff/wmbiffrc.5.in: mention courier imapd's means of specifying subfolders 2004-02-14 Saturday 18:10 UTC -- Neil Spring * wmbiff/Imap4Client.c: bugfix for cyrus imap servers, thanks to Jon Ramsey 2004-01-01 Thursday 23:47 UTC -- Neil Spring * configure.ac: really call it 0.4.20 2004-01-01 Thursday 07:47 UTC -- Neil Spring * AUTHORS, wmbiff/Client.h, wmbiff/Imap4Client.c, wmbiff/ShellClient.c, wmbiff/maildirClient.c, wmbiff/mboxClient.c, wmbiff/passwordMgr.c, wmbiff/wmbiff.c: Sam Izzo's patch 2003-12-30 Tuesday 19:44 UTC -- Neil Spring * Makefile.am, configure.ac: add --disable-crypto 2003-12-22 Monday 00:08 UTC -- Neil Spring * wmbiff/Imap4Client.c: print failure message if imap login fails 2003-11-09 Sunday 07:01 UTC -- Neil Spring * wmbiff/sample.wmbiffrc: mac os 10.3 mail responds to a different way of identifying the inbox 2003-11-09 Sunday 03:16 UTC -- Neil Spring * configure.ac: 0.4.19 2003-11-09 Sunday 03:16 UTC -- Neil Spring * wmbiff/test_tlscomm.c: fix bug #219787 2003-11-08 Saturday 23:46 UTC -- Neil Spring * Makefile.am: helper rule for sourceforge upload (I know, I know, maintenance cruft making it into the release, whatever) 2003-11-08 Saturday 23:46 UTC -- Neil Spring * wmbiff/Client.h: philosophical definition of truth 2003-11-08 Saturday 23:45 UTC -- Neil Spring * wmbiff/Imap4Client.c: because having both from and subject headers is no longer a way to tell when the end has happened, must clean up the completed command tag explicitly 2003-11-08 Saturday 23:44 UTC -- Neil Spring * wmbiff/passwordMgr.c: avoid compiler warning from inconsistent def of size_t as passed into printf 2003-11-08 Saturday 22:58 UTC -- Neil Spring * wmbiff/: ShellClient.c, charutil.c: strcpy is not defined to handle overlapping regions. valgrind complains, rightly, so reimplement lefttrim to avoid such behavior 2003-11-08 Saturday 22:17 UTC -- Neil Spring * wmbiff/wmbiff.c: bump up default_sleep_interval to clean up strace output while bored. 2003-11-08 Saturday 22:13 UTC -- Neil Spring * wmbiff/Imap4Client.c: handle messages without subject lines in msglst 2003-11-07 Friday 09:11 UTC -- Neil Spring * wmbiff/passwordMgr.c: panther (mac 10.3) does not appear to null-terminate passwords in the keychain for us 2003-10-29 Wednesday 18:15 UTC -- Neil Spring * wmbiff/: Imap4Client.c, Pop3Client.c: handle capitalized FROM and SUBJECT headers common typical of spam spam spam 2003-10-28 Tuesday 23:39 UTC -- Neil Spring * wmbiff/test_tlscomm.c: indent and add another check 2003-10-28 Tuesday 23:38 UTC -- Neil Spring * wmbiff/: Makefile.am, test_wmbiff.c: indent 2003-10-28 Tuesday 07:09 UTC -- Neil Spring * wmbiff/: Makefile.am, test_tlscomm.c: fix bug reported by Jingshao Chen with buffering trouble, and incorporate a regression test to keep it from accidentally popping up again 2003-10-28 Tuesday 06:56 UTC -- Neil Spring * wmbiff/: test_tlscomm.c, tlsComm.c: test for proper handling of buffering small bits of expected data 2003-10-26 Sunday 08:33 UTC -- Neil Spring * wmbiff/: Imap4Client.c, passwordMgr.c: sigh, I dislike running make indent 2003-10-26 Sunday 08:31 UTC -- Neil Spring * AUTHORS, wmbiff/Pop3Client.c, wmbiff/wmbiffrc.5.in: Paolo Gianrossi's patch to provide msglst support for pop3 mailboxes 2003-10-26 Sunday 07:42 UTC -- Neil Spring * check-includes.rb, wmbiff/maildirClient.c, wmbiff/socket.c: include file reordering, based on wisdom from porting some other networky code 2003-10-26 Sunday 07:31 UTC -- Neil Spring * scripts/security.debian.rb: fix some ruby1.8 warnings, minor cleanup 2003-10-10 Friday 18:00 UTC -- Neil Spring * configure.ac: 0.4.18 2003-10-10 Friday 15:59 UTC -- Neil Spring * scripts/security.debian.rb: fix ruby1.8's complaint. 2003-08-31 Sunday 18:05 UTC -- Neil Spring * configure.ac: 0.4.17 2003-08-31 Sunday 06:47 UTC -- Neil Spring * wmbiff/tlsComm.c: oops, looks like I resolved a conflict poorly 2003-08-31 Sunday 04:39 UTC -- Neil Spring * wmbiff/Makefile.am: build the test cases well 2003-08-31 Sunday 03:33 UTC -- Neil Spring * wmbiff/: test_wmbiff.c, tlsComm.h: check the newline bugfix 2003-08-31 Sunday 03:32 UTC -- Neil Spring * wmbiff/tlsComm.c: bugfix to avoid handing odd newlines badly 2003-07-31 Thursday 23:37 UTC -- Neil Spring * wmbiff/Imap4Client.c: fix some potential bugs - an access of freed memory and an uninitialized reference counter 2003-07-20 Sunday 00:52 UTC -- Neil Spring * wmbiff/: passwordMgr.c, test_wmbiff.c: fix a five-minute old regression test failure where null was returned instead of an empty string for an empty password. not sure it matters, but maybe. 2003-07-20 Sunday 00:44 UTC -- Neil Spring * wmbiff/passwordMgr.c: oops, I left a use-after-free bug in the askpass code 2003-07-19 Saturday 23:56 UTC -- Neil Spring * configure.ac, wmbiff/passwordMgr.c: use the apple keychain to grab passwords! I can very nearly forget about typing them in anymore 2003-07-10 Thursday 17:44 UTC -- Neil Spring * Makefile.am: ensure that the current directory is not setgid when making a distribution; this borks some untars 2003-07-07 Monday 09:00 UTC -- Neil Spring * wmbiff/Imap4Client.c: warnings cleanup 2003-07-07 Monday 08:57 UTC -- Neil Spring * configure.ac, wmbiff/Client.h, wmgeneral/wmgeneral.c: call it 0.4.16 2003-07-07 Monday 08:43 UTC -- Neil Spring * wmbiff/: Client.h, Imap4Client.c, passwordMgr.c, test_wmbiff.c: fix memfrob * bug (memfrob makes *'s zero, so password length must be tracked separately 2003-07-04 Friday 21:42 UTC -- Neil Spring * wmbiff/wmbiff.c: handle comments the way I meant to... 2003-07-03 Thursday 11:10 UTC -- Neil Spring * wmbiff/Imap4Client.c: switch the new header cache to use reference counting (better, but possibly buggy) instead of locking (dumb, and certainly buggy) 2003-07-03 Thursday 05:39 UTC -- Neil Spring * wmbiff/Imap4Client.c: try to avoid repetitive complaints of failed connections 2003-07-03 Thursday 05:34 UTC -- Neil Spring * wmbiff/socket.c: avoid repetitive error messages when hostname lookup fails (such as when disconnected) 2003-07-03 Thursday 05:33 UTC -- Neil Spring * wmgeneral/wmgeneral.c: last fix to geometry handling had a compiler warning 2003-07-03 Thursday 05:12 UTC -- Neil Spring * wmgeneral/wmgeneral.c: try doing geometry the way X intends it to be done, at least as far as I can tell. 2003-07-03 Thursday 01:03 UTC -- Neil Spring * wmbiff/wmbiff.c: make #'s comments only if preceded by whitespace or at the beginning of the line 2003-07-03 Thursday 00:53 UTC -- Neil Spring * wmbiff/wmbiff.c: looks like I'd broken the button click events recently 2003-07-03 Thursday 00:52 UTC -- Neil Spring * wmbiff/sample.wmbiffrc: osascript samples for driving mac mail using applescript 2003-06-30 Monday 23:42 UTC -- Neil Spring * wmbiff/: Imap4Client.c, tlsComm.c: warning message beautification 2003-06-08 Sunday 07:01 UTC -- Neil Spring * wmbiff/: Client.h, Imap4Client.c, MessageList.c, MessageList.h, ShellClient.c: general rewrite of the msglst headers, so that the list is pre-cached for responsiveness. 2003-06-08 Sunday 06:59 UTC -- Neil Spring * wmbiff/wmbiffrc.5.in: document msglst and buttontwo 2003-06-08 Sunday 06:59 UTC -- Neil Spring * wmbiff/wmbiff.c: show a watch pointer while working behind the scenes 2003-06-03 Tuesday 04:57 UTC -- Neil Spring * autogen.sh: enable dependency tracking 2003-04-17 Thursday 05:04 UTC -- Neil Spring * scripts/security.debian.rb: trap socket errors 2003-04-17 Thursday 01:56 UTC -- Neil Spring * scripts/security.debian.rb: print the detailed version 2003-04-17 Thursday 01:56 UTC -- Neil Spring * wmbiff/: Client.h, ShellClient.c, passwordMgr.c: space for detail in grab command output, use the detail to populate a message list in a getheaders function (eg. can see the list of thought to be updated packages if using hte security.debian script 2003-04-17 Thursday 01:54 UTC -- Neil Spring * wmbiff/test-wmbiffrc.shell: test usingthe debian script, allows trying shell get headers 2003-04-17 Thursday 01:54 UTC -- Neil Spring * wmbiff/tlsComm.c: try to print a helpful hint message to use gnutls-cli-debug 2003-04-16 Wednesday 23:30 UTC -- Neil Spring * configure.ac: downgrade configure.ac use of AM_INIT_AUTOMAKE to support automake-1.5 2003-04-16 Wednesday 08:21 UTC -- Neil Spring * wmgeneral/wmgeneral.c: export GetColor 2003-04-16 Wednesday 08:18 UTC -- Neil Spring * wmbiff/: Client.h, Imap4Client.c, MessageList.c, MessageList.h, tlsComm.c, wmbiff.c: indent run 2003-04-16 Wednesday 08:16 UTC -- Neil Spring * wmbiff/Imap4Client.c: get headers / message list support 2003-04-16 Wednesday 08:16 UTC -- Neil Spring * wmbiff/Makefile.am: messagelist 2003-04-16 Wednesday 08:15 UTC -- Neil Spring * wmbiff/tlsComm.c: rename state to tls_state for clarity, small cleanup, fixes for buffering several lines in an expectation 2003-04-16 Wednesday 08:14 UTC -- Neil Spring * wmbiff/: wmbiff.c, Client.h: message list, button 2 support 2003-04-16 Wednesday 08:13 UTC -- Neil Spring * wmbiff/: MessageList.c, MessageList.h: list new messages, currently only with an imap driver 2003-04-09 Wednesday 04:51 UTC -- Neil Spring * autogen.sh: fall back to automake-1.5 if necessary 2003-04-07 Monday 10:10 UTC -- Neil Spring * wmbiff/tlsComm.c: invalid is returned when it doesn't match? 2003-04-07 Monday 09:41 UTC -- Neil Spring * wmbiff/tlsComm.c: fix some info messages - drop complaints about version 0.2.3 of gnutls, mention certfile. 2003-04-07 Monday 09:33 UTC -- Neil Spring * wmbiff/wmbiffrc.5.in: doc certfile 2003-04-07 Monday 09:16 UTC -- Neil Spring * wmbiff/tlsComm.c: handle certfile errors properly; positive return values from gnutls_certificate_set_x509_trust_file appear okay. 2003-03-30 Sunday 11:47 UTC -- Neil Spring * wmbiff/: passwordMgr.c, test_wmbiff.c: oh, now I get why that foolish null-termination was present. it's better now 2003-03-30 Sunday 11:23 UTC -- Neil Spring * configure.ac: 0.4.15 2003-03-30 Sunday 11:22 UTC -- Neil Spring * wmbiff/wmbiffrc.5.in: note the hash caveat 2003-03-30 Sunday 11:05 UTC -- Neil Spring * wmbiff/passwordMgr.c: remove (unreleased) foolhardy null-termination 2003-03-30 Sunday 10:57 UTC -- Neil Spring * wmbiff/test_wmbiff.c: just so as not to confuse anyone that wmbiff allows #'s in passwords 2003-03-30 Sunday 10:38 UTC -- Neil Spring * README, wmbiff/wmbiff.c, wmgeneral/wmgeneral.c, wmgeneral/wmgeneral.h: support setting the background color using -bg 2003-03-28 Friday 08:16 UTC -- Neil Spring * wmbiff/test_wmbiff.c: check that passwords with # can be parsed 2003-03-28 Friday 08:16 UTC -- Neil Spring * wmbiff/wmbiffrc.5.in: doc password parsing damage 2003-03-11 Tuesday 08:07 UTC -- Neil Spring * README: gnupg reorganized their website 2003-03-11 Tuesday 08:03 UTC -- Neil Spring * configure.ac: provide a helpful message as to where gnutls and libgcrypt can be found in configure.ac 2003-03-06 Thursday 21:15 UTC -- Neil Spring * wmbiff/wmbiff.c: fix debian bug #183529 2003-03-03 Monday 19:06 UTC -- Neil Spring * wmbiff/passwordMgr.c: make returned password length consistent with stored password length 2003-03-02 Sunday 02:37 UTC -- Neil Spring * configure.ac, wmbiff/Imap4Client.c, wmbiff/passwordMgr.c, wmbiff/passwordMgr.h: in-memory frobnication of imap passwords 2003-03-02 Sunday 02:17 UTC -- Neil Spring * wmbiff/: Imap4Client.c, Makefile.am, Pop3Client.c, regulo.c, regulo.h, socket.c, test_wmbiff.c, wmbiff.c: hostname paranoia patch -- use -relax to skip hostname validation check, parse ambiguous config lines 2003-03-02 Sunday 01:04 UTC -- Neil Spring * wmbiff/wmbiff.c, wmgeneral/wmgeneral.c: indent run 2003-02-13 Thursday 21:07 UTC -- Neil Spring * Makefile.am, configure.ac: 0.4.14 2003-02-08 Saturday 21:04 UTC -- Neil Spring * wmbiff/: wmbiff.1, wmbiffrc.5.in: document restart schemes 2003-02-08 Saturday 07:06 UTC -- Neil Spring * wmbiff/wmbiff.c: restart wmbiff also on ctrl-shift-left click 2003-02-08 Saturday 03:45 UTC -- Neil Spring * wmbiff/wmbiff.c: restart on sig usr1 using exec() 2003-02-08 Saturday 03:43 UTC -- Neil Spring * autogen.sh: I think symlink is okay for autoreconf 2003-02-08 Saturday 03:42 UTC -- Neil Spring * wmgeneral/: wmgeneral.c, wmgeneral.h: much prefer if wmgeneral proclaimed that it would not modify argv; I think it's even true 2003-01-28 Tuesday 11:14 UTC -- Neil Spring * configure.ac: remove check for gnuregex 2003-01-28 Tuesday 11:13 UTC -- Neil Spring * wmbiff/Imap4Client.c: bugfix to avoid problems with the new regex scheme and the default mailbox (aliasing sucks.) 2003-01-28 Tuesday 11:12 UTC -- Neil Spring * wmbiff/charutil.h: remove gnuregex.h incl 2003-01-28 Tuesday 11:12 UTC -- Neil Spring * wmbiff/wmbiff.c: newline after error message 2003-01-25 Saturday 04:54 UTC -- Neil Spring * autogen.sh: remove dangling symlinks config.guess, config.sub 2003-01-25 Saturday 04:33 UTC -- Neil Spring * wmgeneral/list.c: compiler warning appeasement (shadowing index) 2003-01-25 Saturday 04:32 UTC -- Neil Spring * wmbiff/Makefile.am: use the non gnu-make form of the indent-a-c-file rule 2003-01-22 Wednesday 01:56 UTC -- Neil Spring * autogen.sh: make sure ChangeLog exists locally. 2003-01-21 Tuesday 08:56 UTC -- Neil Spring * wmbiff/tlsComm.c: fix some minor damage when select is interrupted (EINTR) 2003-01-21 Tuesday 05:55 UTC -- Neil Spring * autogen.sh: warn if autoconf/libgnutls.m4 does not exist 2003-01-20 Monday 19:52 UTC -- Neil Spring * wmbiff/Makefile.am: add libgcrypt libraries if used to test_wmbiff 2003-01-20 Monday 19:52 UTC -- Neil Spring * configure.ac: remove possibly unneeded check for gdbm 2003-01-19 Sunday 13:13 UTC -- Neil Spring * wmbiff/: Client.h, Imap4Client.c, Makefile.am, Pop3Client.c, ShellClient.c, charutil.c, charutil.h, passwordMgr.c, test_wmbiff.c, tlsComm.c, wmbiff.c: general portability fixes, including HAVE___ATTRIBUTE__ 2003-01-19 Sunday 13:12 UTC -- Neil Spring * wmbiff/: regulo.c, regulo.h: posix based regular expression handling with a not so lame interface 2003-01-19 Sunday 13:11 UTC -- Neil Spring * configure.ac: portability fixes: HAVE___ATTRIBUTE__ (maybe), libnsl (solaris), -no-cpp-precomp (os x) 2003-01-04 Saturday 03:39 UTC -- Neil Spring * configure.ac, wmbiff/wmbiff.c: 0.4.12, release to fix bad -geometry handling 2003-01-03 Friday 20:37 UTC -- Neil Spring * wmbiff/wmbiff.c: fix geometry argument handling bug (Debian #175220) 2002-12-29 Sunday 07:46 UTC -- Neil Spring * scripts/security.debian.rb: I meant to say 6 hours 2002-12-29 Sunday 05:42 UTC -- Neil Spring * wmbiff/sample.wmbiffrc: shell recipe for security.debian.rb 2002-12-29 Sunday 05:28 UTC -- Neil Spring * scripts/security.debian.rb: didn't mean to commit with a 6 minute refresh interval 2002-12-29 Sunday 04:54 UTC -- Neil Spring * Makefile.am, check-includes.rb, configure.ac: add scripts subdirectory to build system 2002-12-29 Sunday 04:54 UTC -- Neil Spring * scripts/: Makefile.am, security.debian.rb: new scripts directory to hold debian security checker and install it. 2002-12-29 Sunday 03:25 UTC -- Neil Spring * wmbiff/wmbiff.c: general cleanup - use strdup_ordie, malloc_ordie. reduce using ints and chars interchangeably. static annotations on module-local variables 2002-12-29 Sunday 03:22 UTC -- Neil Spring * wmbiff/tlsComm.c: bad_certificate called as if void, so change the signature 2002-12-29 Sunday 03:22 UTC -- Neil Spring * configure.ac: autodetect whether to use poll() 2002-12-29 Sunday 02:47 UTC -- Neil Spring * wmgeneral/: Makefile.am, wmgeneral.c, wmgeneral.h: make AddMouseRegion take an unsigned int for the region index (which is an _index_ which means negative values need not apply) 2002-12-29 Sunday 02:31 UTC -- Neil Spring * wmbiff/: charutil.c, charutil.h: change signature of *Trim to reflect that they can't fail (void instead of int); the return values are ignored in wmbiff 2002-12-29 Sunday 01:36 UTC -- Neil Spring * wmbiff/wmbiff.c: reorder functions to avoid pre-declaration. should simplify reading the (now very long) code 2002-12-29 Sunday 01:11 UTC -- Neil Spring * wmgeneral/: misc.c, misc.h: exec command can take a const char * 2002-12-29 Sunday 01:05 UTC -- Neil Spring * wmbiff/sample.wmbiffrc: another askpass recipe 2002-12-29 Sunday 00:57 UTC -- Neil Spring * wmbiff/wmbiff.c: cleanup unused variables 2002-12-29 Sunday 00:57 UTC -- Neil Spring * wmbiff/Makefile.am: surgical indent rule 2002-12-29 Sunday 00:37 UTC -- Neil Spring * configure.ac, wmbiff/wmbiff.c: use automake/autoconf defined PACKAGE_VERSION and PACKAGE_BUGREPORT 2002-12-29 Sunday 00:15 UTC -- Neil Spring * wmbiff/passwordMgr.c: support arbitrarily long password query commands 2002-12-29 Sunday 00:14 UTC -- Neil Spring * wmbiff/wmbiff.c: configuration file parsing cleanup, support longer configuration options, remove some ad-hockery in favor of sscanf 2002-12-13 Friday 05:38 UTC -- Neil Spring * configure.ac, wmbiff/tlsComm.c, wmbiff/wmbiff.1, wmbiff/wmbiff.c: 0.4.10, -skip-certificate-check option 2002-12-09 Monday 21:45 UTC -- Neil Spring * AUTHORS, wmbiff/sample.wmbiffrc, wmbiff/wmbiff.c, wmbiff/wmbiffrc.5.in: Peter McAlpine's globalnotify patch 2002-12-09 Monday 21:45 UTC -- Neil Spring * wmbiff/Imap4Client.c: minor change to timeout behavior, just delay a while before next check 2002-12-02 Monday 07:16 UTC -- Neil Spring * configure.ac: require gnutls 0.5.9, release 0.4.9 2002-11-30 Saturday 07:58 UTC -- Neil Spring * wmbiff/Imap4Client.c: more robust ETIMEDOUT handling -- just chill out for a few minues rather than blacklist as a compromise between the responsiveness of not retrying unresponsive servers and the robustness of prodding on. the right thing is probably a non-blocking connect, but that's messy 2002-11-15 Friday 08:06 UTC -- Neil Spring * wmbiff/tlsComm.c: should really be able to catch these problems earler - without gnutls, the build would fail 2002-11-15 Friday 08:05 UTC -- Neil Spring * autogen.sh: red hat hackery 2002-11-13 Wednesday 06:44 UTC -- Neil Spring * wmbiff/wmbiff.1, wmbiff/wmbiff.c, wmgeneral/wmgeneral.c, wmgeneral/wmgeneral.h: a method for not using the withdrawn state 2002-11-12 Tuesday 08:27 UTC -- Neil Spring * Makefile.am, configure.ac, wmbiff/wmbiff.c, wmbiff/wmbiffrc.5.in, wmgeneral/wmgeneral.c, wmgeneral/wmgeneral.h: Allow automatic sizing of the wmbiff window, effective for other window managers. 2002-10-26 Saturday 23:17 UTC -- Jordi Mallach * FromCVS.sh, autogen.sh: Rename FromCVS.sh to autogen.sh, which is the "common" name for such script. 2002-10-26 Saturday 23:15 UTC -- Jordi Mallach * ChangeLog, Makefile.am, maint/changelog-header, maint/prerelease.sh: Stop doing the ChangeLog header hack. Instead, remove ChangeLog entirely from CVS and get it generated correctly on dist. Remove unneeded maint scripts. 2002-10-26 Saturday 23:12 UTC -- Jordi Mallach * FromCVS.sh: Add automake-1.7 support. 2002-10-20 Sunday 21:58 UTC -- Jordi Mallach * wmbiff/: wmbiff.1, wmbiffrc.5.in: do not specify Debian GNU/Linux... I'm actually more interested in the Hurd right now :) 2002-10-14 Monday 05:52 UTC -- Neil Spring * wmbiff/maildirClient.c: use mkstemp instead of mktemp to appease the compiler 2002-10-14 Monday 01:47 UTC -- Neil Spring * wmbiff/wmbiffrc.5.in: add the 'this file automatically generated' tag 2002-10-13 Sunday 21:28 UTC -- Neil Spring * wmbiff/: Imap4Client.c, tlsComm.c, tlsComm.h: Check certificate hostname, using gnutls's new function 2002-10-13 Sunday 21:27 UTC -- Neil Spring * wmbiff/Client.h: a formatting glitch 2002-10-13 Sunday 21:27 UTC -- Neil Spring * FromCVS.sh, Makefile.am: use autoreconf instead of the ad-hockery 2002-09-25 Wednesday 06:16 UTC -- Neil Spring * FAQ: why doesn't wmbiff update my mailbox count when I read a message 2002-09-20 Friday 19:50 UTC -- Neil Spring * FromCVS.sh: support redhat autoconf sadness 2002-09-19 Thursday 07:00 UTC -- Neil Spring * wmbiff/test_wmbiff.c: allow test to run when nnot linked with gnutls 2002-09-18 Wednesday 23:45 UTC -- Neil Spring * wmbiff/maildirClient.c: compiler warning fixes 2002-09-18 Wednesday 23:43 UTC -- Neil Spring * ChangeLog, configure.ac, wmbiff/Client.h, wmbiff/Imap4Client.c, wmbiff/Makefile.am, wmbiff/maildirClient.c, wmbiff/test_wmbiff.c, wmbiff/wmbiffrc.5.in: bugfix to allow imap mailbox filenames to contain spaces, test that it works; also, prepare 0.4.8 2002-09-14 Saturday 18:51 UTC -- Dwayne C. Litzenberger * wmbiff/: Client.h, maildirClient.c, wmbiffrc.5.in: * maildirClient: Added support for quick checking of writable network-mounted maildirs where directory caching normally causes unwanted delays. 2002-08-16 Friday 07:55 UTC -- Neil Spring * ChangeLog, configure.ac, autoconf/libgnutls.m4, wmbiff/Imap4Client.c, wmbiff/gnutls-common.c, wmbiff/gnutls-common.h, wmbiff/tlsComm.c: handle new gnutls/gnutls.h convention, release 0.4.7 2002-08-06 Tuesday 08:05 UTC -- Neil Spring * FromCVS.sh: seek out and use athe underrated automake 1.6. 2002-07-27 Saturday 17:50 UTC -- Neil Spring * wmbiff/: Imap4Client.c, tlsComm.c: trivial formatting fixes 2002-07-19 Friday 18:51 UTC -- Neil Spring * ChangeLog, configure.ac: release version 0.4.6 2002-07-18 Thursday 02:55 UTC -- Neil Spring * wmbiff/wmbiff.c: ignore sigpipe, possible bugfix for abnormal termination during suspend for imap/gnutls 2002-07-04 Thursday 08:00 UTC -- Neil Spring * ChangeLog, configure.ac: last minute changes for 0.4.5 2002-07-04 Thursday 01:07 UTC -- Neil Spring * wmbiff/: Imap4Client.c, Makefile.am, Pop3Client.c, charutil.c, tlsComm.c, wmbiff.c: valgrind debugging, and support for -exit. some bugs were probably fixed, but since nobody has noticed yet, I don't know if they mattered 2002-07-04 Thursday 00:45 UTC -- Neil Spring * wmgeneral/wmgeneral.c: reminder in where valgrind complains 2002-07-04 Thursday 00:45 UTC -- Neil Spring * Makefile.am: add a top-level 'indent' rule 2002-07-03 Wednesday 02:28 UTC -- Neil Spring * wmbiff/tlsComm.c: doubled the timeout to 40 seconds. 2002-06-26 Wednesday 19:04 UTC -- Neil Spring * ChangeLog, Makefile.am, autoconf/Makefile.am: die configure.in! die acconfig.h! 2002-06-26 Wednesday 18:56 UTC -- Neil Spring * ChangeLog, FromCVS.sh, Makefile.am, configure.ac, configure.in, autoconf/acconfig.h: migrate to newer autoconf (2.5) to try to debug making-from-scratch problem and get rid of acconfig.h cruft 2002-06-25 Tuesday 23:52 UTC -- Neil Spring * Makefile.am: tiny automake 1.6 fix (doesn't appear to use stamp-h. who knew.) 2002-06-25 Tuesday 23:33 UTC -- Neil Spring * autoconf/libgnutls.m4: trivial upstream bugfix 2002-06-25 Tuesday 23:29 UTC -- Neil Spring * wmbiff/Makefile.am: never underestimate the complexity of solutions involving automake 2002-06-25 Tuesday 23:24 UTC -- Neil Spring * configure.in, wmbiff/Makefile.am: corrections to conditional compilation of gnutls-common for automake 1.5 (and thereby the true automake way) 2002-06-25 Tuesday 23:15 UTC -- Neil Spring * configure.in, wmbiff/Makefile.am: only compile gnutls-common.[ch] if gnutls is configured in (duh), and only check for gcrypt.h if libgcrypt is installed and current 2002-06-24 Monday 07:18 UTC -- Neil Spring * ChangeLog, FromCVS.sh: roughly finished 0.4.4 2002-06-24 Monday 07:16 UTC -- Neil Spring * wmbiff/tlsComm.c: restore certificate checking 2002-06-24 Monday 07:15 UTC -- Neil Spring * wmbiff/: gnutls-common.c, gnutls-common.h: indent run 2002-06-24 Monday 01:23 UTC -- Neil Spring * wmbiff/Makefile.am, configure.in: basic gnutls 0.4.3 support (that is, it compiles.) 2002-06-24 Monday 01:18 UTC -- Neil Spring * wmbiff/: gnutls-common.c, gnutls-common.h, tlsComm.c: basic gnutls 0.4.3 support (that is, it compiles.) 2002-06-23 Sunday 01:26 UTC -- Neil Spring * wmbiff/wmbiff.c: cleanup to periodic mail checking, removal of the first mail check - now all cases are the same 2002-06-21 Friday 04:34 UTC -- Neil Spring * wmbiff/wmbiff.c: y_ and x_origin, and num_mailboxes constants, highlight color for fn, restructured mailbox creation routines 2002-06-21 Friday 04:31 UTC -- Neil Spring * wmbiff/Pop3Client.c: splint 2002-06-21 Friday 04:31 UTC -- Neil Spring * wmbiff/: LicqClient.c, ShellClient.c, charutil.c, maildirClient.c, mboxClient.c, passwordMgr.c, test_wmbiff.c: config.h 2002-06-21 Friday 04:30 UTC -- Neil Spring * wmbiff/Imap4Client.c: clarity and splint 2002-06-21 Friday 04:29 UTC -- Neil Spring * wmbiff/Client.h: splint support 2002-06-21 Friday 04:29 UTC -- Neil Spring * wmbiff/wmbiff.1: highlight color 2002-06-21 Friday 04:28 UTC -- Neil Spring * wmbiff/Makefile.am: verify that config.h is included in each .c file 2002-06-15 Saturday 09:05 UTC -- Neil Spring * configure.in: likely bugfix for newer autoconf? 2002-06-15 Saturday 09:04 UTC -- Neil Spring * Makefile.am: keep automake1.6 happy 2002-06-08 Saturday 22:22 UTC -- Neil Spring * ChangeLog, configure.in: release 0.4.3 final updates 2002-06-08 Saturday 22:20 UTC -- Neil Spring * wmbiff/wmbiff.c: make the background black when using fonts 2002-06-08 Saturday 22:15 UTC -- Neil Spring * wmgeneral/: wmgeneral.c, wmgeneral.h: font support, ability to erase rectangles 2002-06-08 Saturday 22:14 UTC -- Neil Spring * wmbiff/Client.h: slightly changed debug messages; exists() is more a test -f than a test -e 2002-06-08 Saturday 22:13 UTC -- Neil Spring * wmbiff/wmbiff.1: documentation of -fg and -font options 2002-06-08 Saturday 22:13 UTC -- Neil Spring * wmbiff/: Imap4Client.c, ShellClient.c: cleanup for splint annotations 2002-06-08 Saturday 22:13 UTC -- Neil Spring * wmbiff/wmbiff.c: basic font support, color selection, cleanup to default configuration code, bugifx and cleanup to mouse region code 2002-06-08 Saturday 21:40 UTC -- Neil Spring * wmbiff/socket.c: need config.h to get IPv6 support 2002-06-01 Saturday 18:10 UTC -- Neil Spring * ChangeLog: 0.4.2 2002-06-01 Saturday 17:58 UTC -- Neil Spring * configure.in, wmbiff/wmbiff.c: oops, didn't really want to release with the crazy font stuff quite yet 2002-06-01 Saturday 07:03 UTC -- Neil Spring * ChangeLog, configure.in, wmbiff/test-wmbiffrc.shell: release 0.4.1 2002-06-01 Saturday 07:01 UTC -- Neil Spring * AUTHORS: release preparation 2002-06-01 Saturday 06:47 UTC -- Neil Spring * wmgeneral/wmgeneral.h: prototypes for basic font support 2002-06-01 Saturday 06:47 UTC -- Neil Spring * wmgeneral/wmgeneral.c: indent run 2002-06-01 Saturday 06:02 UTC -- Neil Spring * wmbiff/: Client.h, ShellClient.c, charutil.c, mboxClient.c: indent run 2002-06-01 Saturday 06:01 UTC -- Neil Spring * wmbiff/wmbiff.c: font support, disabled by default 2002-06-01 Saturday 06:00 UTC -- Neil Spring * wmbiff/tlsComm.c: a start at certificate checking (a daunting task at the moment) 2002-06-01 Saturday 05:59 UTC -- Neil Spring * wmbiff/Client.h: declare exists() 2002-06-01 Saturday 05:51 UTC -- Neil Spring * wmgeneral/wmgeneral.c: some basic font support, renaming some variables for clarity 2002-06-01 Saturday 05:45 UTC -- Neil Spring * wmbiff/socket.c: correct date 2002-06-01 Saturday 05:42 UTC -- Neil Spring * configure.in, wmbiff/socket.c: IPv6 support using getaddrinfo from Jun-ichiro itojun Hagino 2002-05-03 Friday 05:51 UTC -- Neil Spring * ChangeLog, configure.in: Release 0.4.0 2002-05-03 Friday 05:51 UTC -- Neil Spring * Makefile.am: don't list TODO changes in ChangeLog, to avoid confusion 2002-05-03 Friday 05:43 UTC -- Neil Spring * wmbiff/mboxClient.c: type casting hackery to help architectures I don't have 2002-05-03 Friday 05:42 UTC -- Neil Spring * wmbiff/: sample.wmbiffrc, wmbiffrc.5.in: lpq example creep 2002-05-03 Friday 05:42 UTC -- Neil Spring * wmbiff/ShellClient.c: bugfix when alternates between numeric and text 2002-04-29 Monday 02:01 UTC -- Neil Spring * wmbiff/: Client.h, ShellClient.c, charutil.c, charutil.h: lclint cleanups - strdup_ordie, some null annotations 2002-04-27 Saturday 08:54 UTC -- Neil Spring * wmbiff/: Client.h, ShellClient.c, passwordMgr.c: cleanup to use grabCommandOutput in passwordMgr instead of duplicating the popen/fgets/pclose code 2002-04-27 Saturday 08:29 UTC -- Neil Spring * wmbiff/: Client.h, Makefile.am, charutil.c, passwordMgr.c, passwordMgr.h, test_wmbiff.c: move passwordMgr testing to test_wmbiff.c; catch a small bug in handling empty passwords 2002-04-27 Saturday 08:29 UTC -- Neil Spring * FromCVS.sh: apparently aclocal barfs when macros are defined both in the system directory and in a local copy. semper fragile. 2002-04-25 Thursday 20:28 UTC -- Neil Spring * README: add a note about gnutls version 0.3.5 2002-04-25 Thursday 18:33 UTC -- Neil Spring * configure.in: hack attempt at supporting gnutls built locally 2002-04-25 Thursday 17:31 UTC -- Neil Spring * ChangeLog, FromCVS.sh, autoconf/libgcrypt.m4, autoconf/libgnutls.m4: add m4 macros for libgcrypt and libgnutls to the repository, so that FromCVS can be run to regenerate configure.in, even on systems without gnutls. 2002-04-20 Saturday 09:55 UTC -- Neil Spring * wmbiff/Makefile.am: correct a problem uncovered by sourceforge's compile farm 2002-04-20 Saturday 09:27 UTC -- Neil Spring * wmbiff/ShellClient.c: BSD fix (no strndup, no sighandler_t) 2002-04-20 Saturday 09:12 UTC -- Neil Spring * wmbiff/: LicqClient.c, mboxClient.c: move msgs=-1 assignment on failure to the common openMailbox() 2002-04-20 Saturday 08:53 UTC -- Neil Spring * ChangeLog, configure.in, wmbiff/Client.h: update meta-information for prerelease 5 2002-04-20 Saturday 08:51 UTC -- Neil Spring * wmbiff/Makefile.am: correct syntax for making a test program 2002-04-20 Saturday 08:13 UTC -- Neil Spring * wmbiff/sample.wmbiffrc: finish deprecating 2002-04-20 Saturday 08:12 UTC -- Neil Spring * wmbiff/: sample.wmbiffrc, wmbiffrc.5.in: document back-tick expansion, deprecate mbox style without mbox: prefix 2002-04-20 Saturday 07:54 UTC -- Neil Spring * wmbiff/: Client.h, LicqClient.c, ShellClient.c, mboxClient.c: oops (indent) 2002-04-20 Saturday 07:53 UTC -- Neil Spring * wmbiff/: LicqClient.c, mboxClient.c: refactor mailbox stat()'ting to reduce duplicated code and supprort backticks. 2002-04-20 Saturday 07:52 UTC -- Neil Spring * wmbiff/ShellClient.c: refactor command execution code to support backtick foo expansion 2002-04-20 Saturday 07:50 UTC -- Neil Spring * wmbiff/: Makefile.am, test_wmbiff.c: add tests for bbacktick expansion 2002-04-20 Saturday 07:49 UTC -- Neil Spring * wmbiff/Client.h: ctime has become useless; new prototypes to handle backtick 2002-04-16 Tuesday 07:37 UTC -- Neil Spring * ChangeLog, wmbiff/Client.h, wmbiff/Imap4Client.c, wmbiff/LicqClient.c, wmbiff/Pop3Client.c, wmbiff/mboxClient.c, wmbiff/passwordMgr.c, wmbiff/wmbiff.c: remove vestigial pc->open() 2002-04-16 Tuesday 07:08 UTC -- Neil Spring * wmbiff/test-make.sh: unnecessary now that autoconf is involved 2002-04-15 Monday 22:58 UTC -- Neil Spring * Makefile.am: dist the FAQ 2002-04-15 Monday 21:19 UTC -- Neil Spring * wmgeneral/: Makefile.am, list.c, list.h, misc.c, misc.h, wmgeneral.c, wmgeneral.h: run make indent; also tolerate standard geometry string (dumping the dimensions provided) 2002-04-15 Monday 21:06 UTC -- Neil Spring * wmbiff/wmbiff.c: bugfix to sigchld_handler (argh) 2002-04-15 Monday 08:15 UTC -- Neil Spring * ChangeLog, Makefile.am, configure.in, wmbiff/Makefile.am, autoconf/Makefile.am: try to make the distcheck target work correctly. voodoo. 2002-04-15 Monday 08:14 UTC -- Neil Spring * FAQ: a little documentation 2002-04-15 Monday 02:21 UTC -- Neil Spring * wmbiff/wmbiff.c: treat all gicu messages as new (they're unread) 2002-04-15 Monday 02:10 UTC -- Neil Spring * configure.in: chmod 0444 wmbiffrc.5 to remind me not to try to edit it. 2002-04-15 Monday 02:09 UTC -- Neil Spring * wmbiff/wmbiffrc.5.in: document finger, changes to shell 2002-04-15 Monday 01:58 UTC -- Neil Spring * wmbiff/: ShellClient.c, wmbiff.c: waitpid until done 2002-04-15 Monday 01:48 UTC -- Neil Spring * configure.in: slightly nicer message 2002-04-15 Monday 01:47 UTC -- Neil Spring * ChangeLog, configure.in, wmbiff/wmbiff-master-contrast.xpm: 0.4.0pre4 - finger support, text from shell support, minor code reorganization 2002-04-15 Monday 01:38 UTC -- Neil Spring * AUTHORS, README: add Andelko Horvat to the list of contributors, remove author list from README 2002-04-15 Monday 01:30 UTC -- Neil Spring * wmbiff/test-wmbiffrc.shell: test finger as well 2002-04-15 Monday 01:30 UTC -- Neil Spring * wmbiff/Client.h: TextStatus to hold a three-character status message 2002-04-15 Monday 01:30 UTC -- Neil Spring * wmbiff/wmbiff.c: support TextString as status; factor blitMsgCounters as displayMsgCounters was starting to get ugly, add finger recipe to use ShellClient instead of a separate module 2002-04-15 Monday 01:26 UTC -- Neil Spring * wmbiff/passwordMgr.c: use chomp to remove the newline from ssh-askpass output 2002-04-15 Monday 01:26 UTC -- Neil Spring * wmbiff/: charutil.c, charutil.h: duplicate perl's chomp() 2002-04-15 Monday 01:26 UTC -- Neil Spring * wmbiff/ShellClient.c: return sigchld to default hander before using popen; handle text input. Much complexity, I hope it's worth it. 2002-04-15 Monday 01:25 UTC -- Neil Spring * wmbiff/wmbiff-master-led.xpm: support yellow text 2002-04-15 Monday 01:24 UTC -- Neil Spring * wmbiff/Makefile.am: derive wmbiff-master-contrast.xpm from wmbiff-master-led.xpm 2002-04-12 Friday 05:54 UTC -- Neil Spring * wmbiff/socket.c: extra debugging messages, to be in-line with our -debug to stdout philosophy 2002-04-11 Thursday 21:39 UTC -- Jordi Mallach * autoconf/: install-sh, missing, mkinstalldirs: Shouldn't be in CVS... 2002-04-11 Thursday 18:24 UTC -- Neil Spring * configure.in: attempt to fix Jordi's configure bug 2002-04-11 Thursday 07:24 UTC -- Neil Spring * wmbiff/Pop3Client.c: APOP bugfix (unreleased bug) 2002-04-09 Tuesday 07:52 UTC -- Neil Spring * ChangeLog, configure.in: bump version to 0.4.0pre3 - permissions checking for .wmbiffrc added. 2002-04-09 Tuesday 07:47 UTC -- Neil Spring * Makefile.am: try to tell the difference between running make dist with cvs and missing cvs2cl (an error), and running make dist without cvs (which should be ok). 2002-04-09 Tuesday 07:45 UTC -- Neil Spring * wmbiff/: LicqClient.c, maildirClient.c, mboxClient.c: some explicit casts to make compiling on non-linux a bit more warning-free 2002-04-09 Tuesday 07:44 UTC -- Neil Spring * wmbiff/wmbiff.c: permissions checking for .wmbiffrc (if it exists), some minor cleanup associated with this. 2002-04-09 Tuesday 07:43 UTC -- Neil Spring * wmbiff/Makefile.am: _DATA files don't get distributed, add the skins into extra_dist. automake can be confusing 2002-04-08 Monday 09:35 UTC -- Neil Spring * configure.in, wmbiff/wmbiffrc.5, wmbiff/wmbiffrc.5.in: automatically generate wmbiffrc.5 based on the results of configure, so that the configure-time chosen defaults are accurately shown 2002-04-07 Sunday 19:30 UTC -- Neil Spring * configure.in: don't try to configure gnutls if libz or libgdbm aren't installed 2002-04-07 Sunday 19:30 UTC -- Neil Spring * FromCVS.sh: allow for automake 1.5's need for depcomp 2002-04-07 Sunday 05:08 UTC -- Neil Spring * COPYING, ChangeLog, FromCVS.sh, INSTALL, Makefile.am, configure.in, autoconf/acconfig.h, autoconf/install-sh, autoconf/missing, autoconf/mkinstalldirs, maint/changelog-header, wmbiff/Client.h, wmbiff/Imap4Client.c, wmbiff/LicqClient.c, wmbiff/Makefile, wmbiff/Makefile.am, wmbiff/Pop3Client.c, wmbiff/charutil.h, wmbiff/maildirClient.c, wmbiff/mboxClient.c, wmbiff/tlsComm.c, wmbiff/wmbiff.c, wmgeneral/Makefile.am, wmgeneral/wmgeneral.c: use automake / autoconf; after checkout run ./FromCVS.sh 2002-04-07 Sunday 03:23 UTC -- Neil Spring * AUTHORS: automake required file, duplicated from README 2002-04-05 Friday 19:44 UTC -- Neil Spring * wmbiff/wmbiff-master-contrast.xpm: a first cut higher-contrast skin 2002-04-05 Friday 19:43 UTC -- Neil Spring * wmbiff/: Makefile, sample.wmbiffrc, test-make.sh, wmbiff.c: askpass - invoke ssh-askpass to fill in passwords for IMAP servers; skin - dynamically load an .xpm background 2002-04-05 Friday 19:42 UTC -- Neil Spring * wmbiff/wmbiffrc.5: documentation of askpass and skin 2002-04-05 Friday 19:08 UTC -- Neil Spring * wmbiff/tlsComm.c: explicit handling of timeouts 2002-04-05 Friday 19:02 UTC -- Neil Spring * wmbiff/passwordMgr.c: askpass having a space in it is an INFO, not an ERR. 2002-04-04 Thursday 08:51 UTC -- Neil Spring * wmbiff/: Client.h, Imap4Client.c, Makefile, Pop3Client.c, passwordMgr.c, passwordMgr.h, sample.wmbiffrc, test-make.sh: interactive password prompting support for imap - leave password in the : format blank to use 2002-03-26 Tuesday 16:30 UTC -- Jordi Mallach * ChangeLog, wmbiff/Makefile: Released WMBiff 0.3.8. 2002-03-18 Monday 09:47 UTC -- Neil Spring * wmgeneral/wmgeneral.h: un-shadow index 2002-03-18 Monday 09:46 UTC -- Neil Spring * wmgeneral/wmgeneral.c: un-shadow a global variable 2002-03-14 Thursday 08:51 UTC -- Neil Spring * README: correct and expand upon crypto instructions 2002-03-12 Tuesday 23:53 UTC -- Neil Spring * wmbiff/: Client.h, Imap4Client.c, Pop3Client.c, ShellClient.c, tlsComm.c: fixed misunderstanding of the use of ## in macros with strings - the compiler does the concatenation, not the preprocessor 2002-03-11 Monday 00:11 UTC -- Neil Spring * wmbiff/tlsComm.c: slightly better message on expect failure 2002-03-09 Saturday 08:50 UTC -- Neil Spring * wmbiff/ShellClient.c: debug messages cleanup; start handling pclose errors; remove open() function pointer assignment; #include fix 2002-03-09 Saturday 08:03 UTC -- Neil Spring * wmgeneral/: list.h, wmgeneral.c: minor warning cleanups 2002-03-08 Friday 19:26 UTC -- Neil Spring * README: credit Ben 2002-03-07 Thursday 22:20 UTC -- Neil Spring * wmbiff/ShellClient.c: fix error return status (ben's 'lil' patch) 2002-03-07 Thursday 07:04 UTC -- Neil Spring * wmbiff/ShellClient.c: appropriate credits 2002-03-06 Wednesday 18:01 UTC -- Neil Spring * wmbiff/ShellClient.c: fix my sloppy mistake in shell path parsing 2002-03-06 Wednesday 07:59 UTC -- Neil Spring * wmbiff/ShellClient.c: misplaced string.h 2002-03-06 Wednesday 07:59 UTC -- Neil Spring * wmbiff/wmbiff.c: rename in Read_Config_File for more 'index' purging 2002-03-06 Wednesday 07:44 UTC -- Neil Spring * wmbiff/ShellClient.c: fix a potential file descriptor leak 2002-03-06 Wednesday 07:15 UTC -- Neil Spring * wmbiff/: Client.h, Makefile, ShellClient.c, mboxClient.c, sample.wmbiffrc, test-wmbiffrc.shell, wmbiff.1, wmbiff.c, wmbiffrc.5: Draft shell command and gnomeicu support from Benoît Rouits with minor modifications 1) implement gicu using the shell module rather than as a separate module, 2) edit Ben's shell format to have extra colons for extensibility, 3) add some extra error checking in the shell method. I also added a test wmbiffrc that can be used to verify that the gicu and shell methods "work". 2002-03-05 Tuesday 05:02 UTC -- Dwayne C. Litzenberger * wmbiff/maildirClient.c: cosmetic changes 2002-03-04 Monday 06:57 UTC -- Neil Spring * wmbiff/mboxClient.c: convert a lingering fprintf to DM 2002-03-02 Saturday 23:25 UTC -- Neil Spring * wmbiff/: Imap4Client.c, Makefile, wmbiff.c: a little -Wshadow and -Wcast-qual cleanup (or, eliminate the use of 'index' as a variable name) 2002-03-02 Saturday 22:38 UTC -- Neil Spring * wmbiff/Client.h: add preprocessor define to handle portability of __attribute__ tag to non-gcc compilers (untested) 2002-03-02 Saturday 06:42 UTC -- Neil Spring * wmbiff/tlsComm.c: indent run (oops) 2002-03-02 Saturday 06:41 UTC -- Neil Spring * wmbiff/: Pop3Client.c, Imap4Client.c: minor reorganization of gcrypt-needing authentication schemes 2002-03-02 Saturday 06:39 UTC -- Neil Spring * wmbiff/tlsComm.c: attribute tags for warning cleanup w/o gnutls 2002-03-02 Saturday 06:36 UTC -- Neil Spring * wmbiff/wmbiff.c: gcc attribute tags, minor debug message cleanup 2002-03-02 Saturday 06:31 UTC -- Neil Spring * wmbiff/Makefile: rearrange which compiler warnings are implied by DEBUG 2002-03-02 Saturday 05:58 UTC -- Neil Spring * wmbiff/Client.h: use off_t instead of size_t in Licq and Maildir for file sizes from stat() 2002-03-02 Saturday 05:50 UTC -- Neil Spring * wmbiff/tlsComm.c: bugfix to support compilation without crypto 2002-03-01 Friday 11:58 UTC -- Jordi Mallach * wmbiff/wmbiff.c: Added -debug to help text. Removed Gennady's mail address and added our devel list. 2002-03-01 Friday 11:28 UTC -- Jordi Mallach * wmbiff/Makefile: Fixed install rule in Makefile. 2002-03-01 Friday 08:41 UTC -- Neil Spring * wmbiff/: Client.h, Imap4Client.c, LicqClient.c, Makefile, Pop3Client.c, maildirClient.c, mboxClient.c, tlsComm.c, tlsComm.h, wmbiff.1, wmbiff.c, wmbiffrc.5: Replaced DEBUG_x preprocessor defines with a -debug option and debug configuration keyword. Replaced most debugging messages with a DM (debug message) macro. Removed gnutls version 0.2.x support. Added troubleshooting section to man page. 2002-02-03 Sunday 22:48 UTC -- Jordi Mallach * ChangeLog: Released WMBiff 0.3.7. 2002-02-03 Sunday 22:43 UTC -- Jordi Mallach * wmbiff/Makefile: Bumped WMBIFF_VERSION to 0.3.7. 2002-02-02 Saturday 18:04 UTC -- Jordi Mallach * wmbiff/: Client.h, Imap4Client.c, Makefile, Pop3Client.c, charutil.h: Makefile fixes from Simon L. Nielsen, which help building wmbiff in FreeBSD. Fixed the previous IMAP regex patch. 2002-01-27 Sunday 20:20 UTC -- Jordi Mallach * ChangeLog, maint/changelog.sed, maint/prerelease.sh: Some fixes for the maint scripts. 2002-01-27 Sunday 19:59 UTC -- Jordi Mallach * ChangeLog: Released WMBiff 0.3.6. 2002-01-27 Sunday 19:56 UTC -- Jordi Mallach * wmbiff/Imap4Client.c: Indent fixes. 2002-01-27 Sunday 19:52 UTC -- Jordi Mallach * wmbiff/Makefile: Bump WMBIFF_VERSION to 0.3.6. 2002-01-27 Sunday 12:46 UTC -- Jordi Mallach * README, wmbiff/Imap4Client.c, wmbiff/Makefile, wmbiff/wmbiffrc.5: Alternate regex for imap/imaps which allows "@" in passwords. Fix to correctly handle the auth list in imap. Patch from David Smith . 2002-01-14 Monday 01:51 UTC -- Jordi Mallach * ChangeLog: Released WMBiff 0.3.5. 2002-01-14 Monday 01:50 UTC -- Jordi Mallach * wmbiff/Makefile: Bump WMBIFF_VERSION to 0.3.5. 2002-01-12 Saturday 19:18 UTC -- Neil Spring * wmbiff/Imap4Client.c: quote patch from Nick Mitchell, ref debian #128863 2002-01-12 Saturday 06:17 UTC -- Neil Spring * wmbiff/tlsComm.c: debugging for gnutls3 2002-01-12 Saturday 05:50 UTC -- Neil Spring * wmbiff/Makefile: clarify what to do with gnutls version define 2002-01-12 Saturday 05:30 UTC -- Neil Spring * wmbiff/: Makefile, charutil.c, tlsComm.c: update for the interface change in gnutls 0.3.0 2001-11-23 Friday 15:57 UTC -- Jordi Mallach * ChangeLog: Released WMBiff 0.3.4. 2001-11-23 Friday 15:55 UTC -- Jordi Mallach * wmbiff/Makefile: Bumped version to 0.3.4, and release. 2001-11-23 Friday 15:53 UTC -- Jordi Mallach * ChangeLog, wmbiff/sample.wmbiffrc: Doc updates for 0.3.4. 2001-11-16 Friday 07:11 UTC -- Neil Spring * wmbiff/: Imap4Client.c, Pop3Client.c, charutil.c: regexes limit password and username to 32 characters 2001-11-16 Friday 06:08 UTC -- Neil Spring * wmgeneral/: wmgeneral.c, wmgeneral.h: -Wwrite-strings cleanliness 2001-11-16 Friday 01:13 UTC -- Neil Spring * wmbiff/: Client.h, Imap4Client.c, Makefile, Pop3Client.c, charutil.c: rewrite of authentication code to a) allow users to specify authentication type, b) fall back to other authentication methods when hash-based authentication fails (because not everybody uses the cleartext password file) c) fix debug messages 2001-11-16 Friday 00:40 UTC -- Neil Spring * wmbiff/charutil.h: regex helpers common to pop3 and imap4 clients extracted and moved here 2001-11-16 Friday 00:40 UTC -- Neil Spring * wmbiff/: tlsComm.c, tlsComm.h: blacklist and debugging updates for gnutls 0.2.10 and DM macro 2001-11-16 Friday 00:39 UTC -- Neil Spring * wmbiff/wmbiffrc.5: authentication method list, reduced indentation to fit screen better 2001-11-16 Friday 00:38 UTC -- Neil Spring * wmbiff/wmbiff-master-led.xpm: made pixmap const char 2001-11-16 Friday 00:37 UTC -- Neil Spring * wmbiff/wmbiff.c: -Wwrite-strings cleanliness 2001-11-02 Friday 08:53 UTC -- Neil Spring * wmbiff/: Imap4Client.c, wmbiff.c, wmbiffrc.5: Prefer "imaps" instead of "sslimap" (sslimap is still supported, but imaps is documented, and a better name). 2001-11-02 Friday 08:48 UTC -- Neil Spring * wmbiff/tlsComm.c: Small debugging message to help if a connection ends unexpectedly. 2001-10-29 Monday 13:57 UTC -- Jordi Mallach * ChangeLog: Released WMBiff 0.3.3. 2001-10-29 Monday 13:54 UTC -- Jordi Mallach * wmbiff/: Imap4Client.c, wmbiff.c: Indent run. 2001-10-28 Sunday 23:32 UTC -- Jordi Mallach * ChangeLog, README, wmbiff/Makefile, wmbiff/sample.wmbiffrc: Preparation for 0.3.3. Documentation updates. 2001-10-28 Sunday 22:22 UTC -- Neil Spring * wmbiff/wmbiff.c: Bugfix: initialize libgcrypt properly before cram-md5 (or probably apop) authentication. 2001-10-24 Wednesday 15:35 UTC -- Jordi Mallach * maint/changelog.sed: Added Neil to the sed script. 2001-10-23 Tuesday 21:14 UTC -- Neil Spring * wmbiff/Imap4Client.c: error check just in case sighup patch is applied 2001-10-23 Tuesday 18:35 UTC -- Jordi Mallach * ChangeLog: Released WMBiff 0.3.2. 2001-10-23 Tuesday 18:33 UTC -- Jordi Mallach * wmbiff/Makefile: Bump WMBIFF_VERSION to 0.3.2. 2001-10-05 Friday 16:10 UTC -- Jordi Mallach * wmbiff/Makefile: Changed order of additions to LIBS and EXTRAFLAGS, removed extra WMBIFF_VERSION definition. 2001-10-04 Thursday 09:50 UTC -- Jordi Mallach * README, wmbiff/Client.h, wmbiff/Imap4Client.c, wmbiff/LicqClient.c, wmbiff/Makefile, wmbiff/Pop3Client.c, wmbiff/charutil.c, wmbiff/charutil.h, wmbiff/maildirClient.c, wmbiff/mboxClient.c, wmbiff/socket.c, wmbiff/tlsComm.c, wmbiff/tlsComm.h, wmbiff/wmbiff.1, wmbiff/wmbiff.c, wmbiff/wmbiffrc.5: * Big patch from Neil Spring which adds lots of crypto support to WMBiff. * WMBiff can now speak IMAP over TLS and CRAM-MD5, and APOP using libgcrypt. * Known problems: - gnutls is being developed still, so it may have security related bugs. - A bug in gnutls (a too-small buffer) may cause problems in the parsing of openssl certificates. This should be fixed by gnutls soon, hopefully. Added error messages if this bug is tickled. If you've got problems with IMAP SSL, please try upgrading gnutls. If the problem persists, let us know. - IMAP has totally been rewritten, so bugs may crop up. - Pop3 hasn't been rewritten to use the TLS primitives, though it probably could be if someone wanted to. * There's a new interface for reading and writing to the socket in tlsComm.[ch]. This makes the IMAP code somewhat independent of whether ssl is used, and provides nicer primitives to help skip 'informational' messages. * WITH_TLS and WITH_GCRYPT are on-by-default in the Makefile. TLS applies to encryption, GCRYPT to cram-md5 and apop authentication. Since gnutls depends on libgcrypt anyway, these probably don't need to be independent. Some compile warnings may be generated when these are disabled. * Added code to optionally include dmalloc.h and link -ldmalloc. This doesn't do anything at the moment, but shouldn't hurt. It's off-by-default. * IMAP connections are now persistent. persistent. This is to cut down on the need to re-negotiate an SSL connection every time you want to check mail. It tries to use just one connection per (server/username/password/port number), which means multiple mailboxes need only one connection. * There are a handful of lclint (http://lclint.cs.virginia.edu) annotations in tlsComm.[ch]. These should also not hurt anyone, and are meant to keep the signal to noise ratio of lclint high. * The rewritten IMAP code uses the GNU regex library to handle the configuration line. I think its clearer than the cascading strtok() solution, but the regex might not be perfect. * Removed an unnecessary "inline" keyword from charutil.h. * Added a TODO document with the bits that are missing from the picture. * Please bow in awe at NAKAYAMA Takao, Jay T. Francis and specially Neil Spring for all of this. 2001-10-04 Thursday 09:21 UTC -- Jordi Mallach * wmbiff/ApopClient.c: Removed unneeded Apop support code, now integrated in Neil and Jay's patch. 2001-10-04 Thursday 09:00 UTC -- Jordi Mallach * maint/changelog.sed: Added my other SF account, which I intend to use now. 2001-10-04 Thursday 08:54 UTC -- Jordi Mallach * ChangeLog, README, wmbiff/Client.h, wmbiff/Makefile, wmbiff/sample.wmbiffrc, wmbiff/wmbiff.1, wmbiff/wmbiff.c, wmbiff/wmbiffrc.5: Backed out hoehoe's patch, preparing to apply Neil's. 2001-09-24 Monday 11:58 UTC -- Jordi Mallach * ChangeLog, README, wmbiff/ApopClient.c, wmbiff/Client.h, wmbiff/Makefile, wmbiff/sample.wmbiffrc, wmbiff/wmbiff.1, wmbiff/wmbiff.c, wmbiff/wmbiffrc.5: Added APOP support, patch from NAKAYAMA Takao . Fixed some bits of the manpage (Jordi) Bumped version to 0.3.2. 2001-09-24 Monday 11:56 UTC -- Jordi Mallach * maint/prerelease.sh: Removed -t to cvs2cl invocation, to make cleaner ChangeLogs. 2001-06-24 Sunday 18:17 UTC -- Jordi Mallach * ChangeLog: Released wmbiff 0.3.1. 2001-06-24 Sunday 18:08 UTC -- Jordi Mallach * ChangeLog, README: Removed duplicate entry for Vladimir Popov in README. 2001-06-23 Saturday 00:09 UTC -- Jordi Mallach * wmbiff/Imap4Client.c: Imap fix from Rob Funk 2001-06-23 Saturday 00:07 UTC -- Jordi Mallach * ChangeLog, maint/changelog.sed, maint/prerelease.sh: Renamed CHANGES to ChangeLog and RELEASE-NOTES to NEWS, modified release scripts accordingly. Added Mark to the sed file. 2001-06-22 Friday 23:55 UTC -- Jordi Mallach * CHANGES, RELEASE-NOTES: Renamed to NEWS and ChangeLog 2001-06-19 Tuesday 03:52 UTC -- Dwayne C. Litzenberger * CHANGES, maint/prerelease.sh: * Whoops! Messed up CVS expansion in maint/prerelease.sh. Fixed it. * Also changed maint/prerelease.sh a bit. 2001-06-19 Tuesday 03:38 UTC -- Dwayne C. Litzenberger * CHANGES, ChangeLog, README, RELEASE-NOTES, maint/changelog.sed, maint/prerelease.sh, wmbiff/Client.h, wmbiff/Imap4Client.c, wmbiff/LicqClient.c, wmbiff/Makefile, wmbiff/Pop3Client.c, wmbiff/charutil.c, wmbiff/charutil.h, wmbiff/maildirClient.c, wmbiff/mboxClient.c, wmbiff/sample.wmbiffrc, wmbiff/socket.c, wmbiff/wmbiff.1, wmbiff/wmbiff.c, wmbiff/wmbiffrc.5: * Another big patch that mucks with everything. I probably deserve to be flamed for this practice. Feel free... :-) * Added maint/prerelease.sh script. Run it before making any releases. * Added maint/changelog.sed. Add your SourceForge userid here. * Moved ChangeLog to RELEASE-NOTES (see below). * Added a new file, CHANGES (created by maint/prerelease.sh) that tabulates all the CVS changes. * Added "distclean" to wmbiff/Makefile. * Added CVS Id$ to all the files in wmbiff/ . * I reformatted ths changelog, again. I hope this is the last time I need to do this. The CVS logs should be used for all changes, and this file should by updated for user-visible changes only, from now on. (Dwayne C. Litzenberger) * Updated the README to reflect that Gennady Belyakov died right after releasing wmBiff 0.2. May your soul rest in peace, Gennady. (Dwayne C. Litzenberger) 2001-06-16 Saturday 01:02 UTC -- Jordi Mallach * ChangeLog, wmbiff/Makefile, wmbiff/sample.wmbiffrc, wmbiff/wmbiff.c: An FHS fix for wmbiff.c and use $(CC) in the Makefile 2001-05-17 Thursday 04:22 UTC -- Dwayne C. Litzenberger * ChangeLog, wmbiff/Makefile, wmbiff/charutil.c: Committing Mark Hurley's patch 2001-05-16 Wednesday 10:48 UTC -- Jordi Mallach * ChangeLog, README: Updated some obsolete info in README 2001-05-11 Friday 15:04 UTC -- Jordi Mallach * ChangeLog, wmbiff/Imap4Client.c, wmbiff/Makefile, wmbiff/charutil.c, wmbiff/charutil.h, wmbiff/wmbiff.c: Mark's wmbiffrc parsing fix, small Makefile changes and bump version to 0.3.0. 2001-05-11 Friday 14:49 UTC -- Jordi Mallach * wmbiff/Makefile: Uncommitted stuff to deal with the removal of the xmp link 2001-05-04 Friday 11:01 UTC -- Jordi Mallach * ChangeLog, wmbiff/Makefile: Updated Changelog and Makefile for 0.2r. 2001-05-01 Tuesday 16:11 UTC -- Jordi Mallach * README.licq, ChangeLog, README, wmgeneral/list.c, wmgeneral/list.h, wmgeneral/misc.c, wmgeneral/misc.h, wmgeneral/wmgeneral.h, wmbiff/socket.c, wmgeneral/wmgeneral.c, wmbiff/Imap4Client.c, wmbiff/Makefile, wmbiff/mboxClient.c, wmbiff/sample.wmbiffrc, wmbiff/wmbiff.1, wmbiff/wmbiff.c, wmbiff/wmbiff-master-led.xpm, wmbiff/Client.h, wmbiff/LicqClient.c, wmbiff/Pop3Client.c, wmbiff/maildirClient.c, wmbiff/wmbiffrc.5: Initial import to SourceForge, version 0.2q1+Debian 2001-05-01 Tuesday 16:11 UTC -- Jordi Mallach * README.licq, ChangeLog, README, wmgeneral/list.c, wmgeneral/list.h, wmgeneral/misc.c, wmgeneral/misc.h, wmgeneral/wmgeneral.h, wmbiff/socket.c, wmgeneral/wmgeneral.c, wmbiff/Imap4Client.c, wmbiff/Makefile, wmbiff/mboxClient.c, wmbiff/sample.wmbiffrc, wmbiff/wmbiff.1, wmbiff/wmbiff.c, wmbiff/wmbiff-master-led.xpm, wmbiff/Client.h, wmbiff/LicqClient.c, wmbiff/Pop3Client.c, wmbiff/maildirClient.c, wmbiff/wmbiffrc.5: Initial revision wmbiff-0.4.36/Makefile.am0000644000207400020740000000207513513051371012036 00000000000000SUBDIRS = wmgeneral wmbiff scripts EXTRA_DIST = ChangeLog FAQ TODO # make maintainer-clean is all about returning to CVS. # aclocal.m4 is generated by aclocal # config.h.in is generated by autoheader # stamp-h.in appears somewhere # Makefile.in and configure are obviously generated. MAINTAINERCLEANFILES = aclocal.m4 config.h.in stamp-h.in \ Makefile.in configure Changelog.bak stamp-h1 maintainer-clean-local: rm -f *~ # conf.libgnutlstest seems to outstay its welcome. # I don't know why the -stamp s linger. DISTCLEANFILES = conf.libgnutlstest build-stamp install-stamp dist-hook-local: ChangeLog chmod -R g-s . indent: cd wmbiff && make indent cd wmgeneral && make indent # manually increment version in configure.ac, which should be enough. ChangeLog: Makefile configure.ac @if test "x$(CVS2CL)" != "x" && test -e maint/changelog.sed; then \ echo "Running $(CVS2CL)..."; \ $(CVS2CL) --stdout --utc --day-of-week -I TODO -I NEWS -I .cvsignore | \ sed -f maint/changelog.sed > $@; \ else \ echo "Unable to build ChangeLog for distribution"; \ exit 0; \ fi wmbiff-0.4.36/COPYING0000644000207400020740000004325413465246305011052 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Lesser General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. wmbiff-0.4.36/AUTHORS0000644000207400020740000000277713556541417011077 00000000000000 Copyrights This program was written by Gennady Belyakov [8]gb@ccat.elect.ru Exterior appearance was heavily derived from wminet, written by Dave Clark (clarkd@skynet.ca), Antoine Nulle (warp@xs4all.nl), Martijn Pieterse (pieterse@xs4all.nl) Some code (around mailbox checking, with some modifications) was taken from xled, written by Jan Schoenepauck (schoenep@uni-wuppertal.de) and Joachim Gassen (joachim@fb4-1112.uni-muenster.de) POP3 checking code was taken from wmpop3 by Scott Holden (scotth@thezone.net) Additional code was taken from xlassie, written by Trent Piepho Many thanks for: Angus Mackay (amackay@gusnet.cx) Jordi Mallach Pérez (jordi@sindominio.net) Eugene Bobin (gene@utb.ru) Helmut 'Kolbi' Kolb (office@kolbi.net) Vladimir Popov (pva48@mail.ru) Jorge García (Jorge.Garcia@uv.es) Nick Clarey (nclarey@3glab.com) Dwayne C. Litzenberger (dlitz@dlitz.net) Mark Hurley (debian4tux@telocity.com) Rob Funk (rfunk@funkinet.net) Neil Spring (nspring@cs.washington.edu) NAKAYAMA Takao (hoehoe@wakaba.jp) Jay T Francis (jtf@u880.org) David Smith (davidsmith@acm.org) Benoît Rouits (brouits@free.fr) Andelko Horvat (comel@srk.fer.hr) Jun-ichiro itojun Hagino (itojun@iijlab.net) Peter McAlpine (pmcalpin@uoguelph.ca) Paolo Gianrossi (paolino@yersinia.org) Sam Izzo (izzo@humbug.net) Doug Torrance Jeremy Sowden wmbiff-0.4.36/configure0000755000207400020740000066777513646607003011747 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for WMBiff 0.4.36. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: wmaker-dev@googlegroups.com about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='WMBiff' PACKAGE_TARNAME='wmbiff' PACKAGE_VERSION='0.4.36' PACKAGE_STRING='WMBiff 0.4.36' PACKAGE_BUGREPORT='wmaker-dev@googlegroups.com' PACKAGE_URL='' # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS SKINDIR CVS2CL DEFAULT_ASKPASS X_EXTRA_LIBS X_LIBS X_PRE_LIBS X_CFLAGS XMKMF GNUTLS_COMMON_O GCRYPT_MAN_STATUS GNUTLS_MAN_STATUS LIBGCRYPT_LIBS LIBGCRYPT_CFLAGS LIBGCRYPT_CONFIG host_os host_vendor host_cpu host build_os build_vendor build_cpu build LIBGNUTLS_LIBS LIBGNUTLS_CFLAGS PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG EGREP GREP CPP RANLIB am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir runstatedir 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 am__quote' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_dependency_tracking enable_crypto with_libgcrypt_prefix with_x ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR LIBGNUTLS_CFLAGS LIBGNUTLS_LIBS XMKMF' # 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' runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -runstatedir | --runstatedir | --runstatedi | --runstated \ | --runstate | --runstat | --runsta | --runst | --runs \ | --run | --ru | --r) ac_prev=runstatedir ;; -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | --run=* | --ru=* | --r=*) runstatedir=$ac_optarg ;; -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 runstatedir 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 WMBiff 0.4.36 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --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/wmbiff] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names X features: --x-includes=DIR X include files are in DIR --x-libraries=DIR X library files are in DIR System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of WMBiff 0.4.36:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --disable-crypto disable gnutls/gcrypt Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-libgcrypt-prefix=PFX prefix where LIBGCRYPT is installed (optional) --with-x use the X Window System 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 PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path LIBGNUTLS_CFLAGS C compiler flags for LIBGNUTLS, overriding pkg-config LIBGNUTLS_LIBS linker flags for LIBGNUTLS, overriding pkg-config XMKMF Path to xmkmf, Makefile generator for X Window System Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF WMBiff configure 0.4.36 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ------------------------------------------ ## ## Report this to wmaker-dev@googlegroups.com ## ## ------------------------------------------ ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_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.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func 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 WMBiff $as_me 0.4.36, 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 am__api_version='1.16' ac_aux_dir= for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='wmbiff' VERSION='0.4.36' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi ac_config_headers="$ac_config_headers config.h" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${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 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 whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 $as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out .PHONY: am__doit END am__include="#" am__quote= # BSD make does it like this. echo '.include "confinc.mk" # ignored' > confmf.BSD # Other make implementations (GNU, Solaris 10, AIX) do it like this. echo 'include confinc.mk # ignored' > confmf.GNU _am_result=no for s in GNU BSD; do { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } case $?:`cat confinc.out 2>/dev/null` in #( '0:this is the am__doit target') : case $s in #( BSD) : am__include='.include' am__quote='"' ;; #( *) : am__include='include' am__quote='' ;; esac ;; #( *) : ;; esac if test "$am__include" != "#"; then _am_result="yes ($s style)" break fi done rm -f confinc.* confmf.* { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 $as_echo "${_am_result}" >&6; } # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi if test -n "$ac_tool_prefix"; then # 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 if test -n "$GCC"; then CFLAGS="$CFLAGS -D_GNU_SOURCE -W -Wall -Wshadow -Wpointer-arith -Wwrite-strings" { $as_echo "$as_me:${as_lineno-$LINENO}: result: adding -Wall and friends to CFLAGS." >&5 $as_echo "adding -Wall and friends to CFLAGS." >&6; } fi case `(uname -s) 2>/dev/null` in "Darwin") CFLAGS="$CFLAGS -no-cpp-precomp" { $as_echo "$as_me:${as_lineno-$LINENO}: result: adding cpp precompiler workaround for Mac OS X" >&5 $as_echo "adding cpp precompiler workaround for Mac OS X" >&6; } LDFLAGS="$LDFLAGS -framework Security" { $as_echo "$as_me:${as_lineno-$LINENO}: result: adding -framework Security for Mac OS X" >&5 $as_echo "adding -framework Security for Mac OS X" >&6; } ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 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 for ac_header in stdio.h do : ac_fn_c_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default" if test "x$ac_cv_header_stdio_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDIO_H 1 _ACEOF fi done for ac_func in getaddrinfo do : ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo" if test "x$ac_cv_func_getaddrinfo" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETADDRINFO 1 _ACEOF fi done for ac_func in memfrob do : ac_fn_c_check_func "$LINENO" "memfrob" "ac_cv_func_memfrob" if test "x$ac_cv_func_memfrob" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MEMFROB 1 _ACEOF fi done for ac_func in poll do : ac_fn_c_check_func "$LINENO" "poll" "ac_cv_func_poll" if test "x$ac_cv_func_poll" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_POLL 1 _ACEOF fi done for ac_func in inet_ntop do : ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop" if test "x$ac_cv_func_inet_ntop" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_INET_NTOP 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5 $as_echo_n "checking return type of signal handlers... " >&6; } if ${ac_cv_type_signal+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { return *(signal (0, 0)) (0) == 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_type_signal=int else ac_cv_type_signal=void fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5 $as_echo "$ac_cv_type_signal" >&6; } cat >>confdefs.h <<_ACEOF #define RETSIGTYPE $ac_cv_type_signal _ACEOF { $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 : cat >>confdefs.h <<_ACEOF #define HAVE_LIBNSL 1 _ACEOF LIBS="-lnsl $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5 $as_echo_n "checking for connect in -lsocket... " >&6; } if ${ac_cv_lib_socket_connect+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char connect (); int main () { return connect (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_connect=yes else ac_cv_lib_socket_connect=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5 $as_echo "$ac_cv_lib_socket_connect" >&6; } if test "x$ac_cv_lib_socket_connect" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSOCKET 1 _ACEOF LIBS="-lsocket $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for herror in -lresolv" >&5 $as_echo_n "checking for herror in -lresolv... " >&6; } if ${ac_cv_lib_resolv_herror+:} 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 herror (); int main () { return herror (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_resolv_herror=yes else ac_cv_lib_resolv_herror=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_herror" >&5 $as_echo "$ac_cv_lib_resolv_herror" >&6; } if test "x$ac_cv_lib_resolv_herror" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBRESOLV 1 _ACEOF LIBS="-lresolv $LIBS" fi gnutls="ok" gcrypt="ok" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gzopen in -lz" >&5 $as_echo_n "checking for gzopen in -lz... " >&6; } if ${ac_cv_lib_z_gzopen+:} 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 gzopen (); int main () { return gzopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_z_gzopen=yes else ac_cv_lib_z_gzopen=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_gzopen" >&5 $as_echo "$ac_cv_lib_z_gzopen" >&6; } if test "x$ac_cv_lib_z_gzopen" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBZ 1 _ACEOF LIBS="-lz $LIBS" else gnutls="nope" fi # Check whether --enable-crypto was given. if test "${enable_crypto+set}" = set; then : enableval=$enable_crypto; if test $enableval != yes; then gnutls="disabled" gcrypt="disabled" fi fi GNUTLS_MAN_STATUS="This copy of WMBiff was not compiled with GNUTLS." if test "$gnutls" = "ok"; then if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-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_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # 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_PKG_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 PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-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_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # 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_ac_pt_PKG_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 ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" 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 PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBGNUTLS" >&5 $as_echo_n "checking for LIBGNUTLS... " >&6; } if test -n "$LIBGNUTLS_CFLAGS"; then pkg_cv_LIBGNUTLS_CFLAGS="$LIBGNUTLS_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnutls > 2.2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gnutls > 2.2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBGNUTLS_CFLAGS=`$PKG_CONFIG --cflags "gnutls > 2.2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$LIBGNUTLS_LIBS"; then pkg_cv_LIBGNUTLS_LIBS="$LIBGNUTLS_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"gnutls > 2.2.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "gnutls > 2.2.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_LIBGNUTLS_LIBS=`$PKG_CONFIG --libs "gnutls > 2.2.0" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then LIBGNUTLS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "gnutls > 2.2.0" 2>&1` else LIBGNUTLS_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "gnutls > 2.2.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$LIBGNUTLS_PKG_ERRORS" >&5 echo GNUTLS can be found at ftp://gnutls.hellug.gr/pub/gnutls elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } echo GNUTLS can be found at ftp://gnutls.hellug.gr/pub/gnutls else LIBGNUTLS_CFLAGS=$pkg_cv_LIBGNUTLS_CFLAGS LIBGNUTLS_LIBS=$pkg_cv_LIBGNUTLS_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } LIBS="$LIBS $LIBGNUTLS_LIBS" CFLAGS="$CFLAGS $LIBGNUTLS_CFLAGS" CPPFLAGS="$CPPFLAGS $LIBGNUTLS_CFLAGS" GNUTLS_COMMON_O="gnutls-common.o" GNUTLS_MAN_STATUS="This copy of WMBiff was compiled with GNUTLS." for ac_header in gnutls/gnutls.h do : ac_fn_c_check_header_mongrel "$LINENO" "gnutls/gnutls.h" "ac_cv_header_gnutls_gnutls_h" "$ac_includes_default" if test "x$ac_cv_header_gnutls_gnutls_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GNUTLS_GNUTLS_H 1 _ACEOF fi done fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: GNUTLS support requires libz.a and libgdbm.a" >&5 $as_echo "GNUTLS support requires libz.a and libgdbm.a" >&6; } fi GCRYPT_MAN_STATUS="This copy of WMBiff was not compiled with gcrypt." if test "$gcrypt" = "ok"; then # 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 # Check whether --with-libgcrypt-prefix was given. if test "${with_libgcrypt_prefix+set}" = set; then : withval=$with_libgcrypt_prefix; libgcrypt_config_prefix="$withval" else libgcrypt_config_prefix="" fi if test x"${LIBGCRYPT_CONFIG}" = x ; then if test x"${libgcrypt_config_prefix}" != x ; then LIBGCRYPT_CONFIG="${libgcrypt_config_prefix}/bin/libgcrypt-config" fi fi use_gpgrt_config="" if test x"${LIBGCRYPT_CONFIG}" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then if $GPGRT_CONFIG libgcrypt --exists; then LIBGCRYPT_CONFIG="$GPGRT_CONFIG libgcrypt" { $as_echo "$as_me:${as_lineno-$LINENO}: Use gpgrt-config as libgcrypt-config" >&5 $as_echo "$as_me: Use gpgrt-config as libgcrypt-config" >&6;} use_gpgrt_config=yes fi fi if test -z "$use_gpgrt_config"; then if test x"${LIBGCRYPT_CONFIG}" = x ; then case "${SYSROOT}" in /*) if test -x "${SYSROOT}/bin/libgcrypt-config" ; then LIBGCRYPT_CONFIG="${SYSROOT}/bin/libgcrypt-config" fi ;; '') ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring \$SYSROOT as it is not an absolute path." >&5 $as_echo "$as_me: WARNING: Ignoring \$SYSROOT as it is not an absolute path." >&2;} ;; esac fi # Extract the first word of "libgcrypt-config", so it can be a program name with args. set dummy libgcrypt-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_LIBGCRYPT_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $LIBGCRYPT_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_LIBGCRYPT_CONFIG="$LIBGCRYPT_CONFIG" # 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_LIBGCRYPT_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 test -z "$ac_cv_path_LIBGCRYPT_CONFIG" && ac_cv_path_LIBGCRYPT_CONFIG="no" ;; esac fi LIBGCRYPT_CONFIG=$ac_cv_path_LIBGCRYPT_CONFIG if test -n "$LIBGCRYPT_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBGCRYPT_CONFIG" >&5 $as_echo "$LIBGCRYPT_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi tmp=1.1.90 if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` min_libgcrypt_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'` else req_libgcrypt_api=0 min_libgcrypt_version="$tmp" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBGCRYPT - version >= $min_libgcrypt_version" >&5 $as_echo_n "checking for LIBGCRYPT - version >= $min_libgcrypt_version... " >&6; } ok=no if test "$LIBGCRYPT_CONFIG" != "no" ; then req_major=`echo $min_libgcrypt_version | \ sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\1/'` req_minor=`echo $min_libgcrypt_version | \ sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\2/'` req_micro=`echo $min_libgcrypt_version | \ sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\)/\3/'` if test -z "$use_gpgrt_config"; then libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version` else libgcrypt_config_version=`$LIBGCRYPT_CONFIG --modversion` fi major=`echo $libgcrypt_config_version | \ sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\1/'` minor=`echo $libgcrypt_config_version | \ sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\2/'` micro=`echo $libgcrypt_config_version | \ sed 's/\([0-9]*\)\.\([0-9]*\)\.\([0-9]*\).*/\3/'` if test "$major" -gt "$req_major"; then ok=yes else if test "$major" -eq "$req_major"; then if test "$minor" -gt "$req_minor"; then ok=yes else if test "$minor" -eq "$req_minor"; then if test "$micro" -ge "$req_micro"; then ok=yes fi fi fi fi fi fi if test $ok = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes ($libgcrypt_config_version)" >&5 $as_echo "yes ($libgcrypt_config_version)" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test $ok = yes; then # If we have a recent libgcrypt, we should also check that the # API is compatible if test "$req_libgcrypt_api" -gt 0 ; then if test -z "$use_gpgrt_config"; then tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0` else tmp=`$LIBGCRYPT_CONFIG --variable=api_version 2>/dev/null || echo 0` fi if test "$tmp" -gt 0 ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking LIBGCRYPT API version" >&5 $as_echo_n "checking LIBGCRYPT API version... " >&6; } if test "$req_libgcrypt_api" -eq "$tmp" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: okay" >&5 $as_echo "okay" >&6; } else ok=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: does not match. want=$req_libgcrypt_api got=$tmp" >&5 $as_echo "does not match. want=$req_libgcrypt_api got=$tmp" >&6; } fi fi fi fi if test $ok = yes; then LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags` LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs` CFLAGS="$CFLAGS $LIBGCRYPT_CFLAGS" CPPFLAGS="$CPPFLAGS $LIBGCRYPT_CFLAGS" GCRYPT_MAN_STATUS="This copy of WMBiff was compiled with gcrypt." for ac_header in gcrypt.h do : ac_fn_c_check_header_mongrel "$LINENO" "gcrypt.h" "ac_cv_header_gcrypt_h" "$ac_includes_default" if test "x$ac_cv_header_gcrypt_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GCRYPT_H 1 _ACEOF fi done if test -z "$use_gpgrt_config"; then libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none` else libgcrypt_config_host=`$LIBGCRYPT_CONFIG --variable=host 2>/dev/null || echo none` fi if test x"$libgcrypt_config_host" != xnone ; then if test x"$libgcrypt_config_host" != x"$host" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: *** *** The config script \"$LIBGCRYPT_CONFIG\" was *** built for $libgcrypt_config_host and thus may not match the *** used host $host. *** You may want to use the configure option --with-libgcrypt-prefix *** to specify a matching config script or use \$SYSROOT. ***" >&5 $as_echo "$as_me: WARNING: *** *** The config script \"$LIBGCRYPT_CONFIG\" was *** built for $libgcrypt_config_host and thus may not match the *** used host $host. *** You may want to use the configure option --with-libgcrypt-prefix *** to specify a matching config script or use \$SYSROOT. ***" >&2;} gpg_config_script_warn="$gpg_config_script_warn libgcrypt" fi fi else LIBGCRYPT_CFLAGS="" LIBGCRYPT_LIBS="" echo libgcrypt can be found at ftp://ftp.gnupg.org/pub/gcrypt/alpha/libgcrypt/ fi else { $as_echo "$as_me:${as_lineno-$LINENO}: result: GCRYPT disabled." >&5 $as_echo "GCRYPT disabled." >&6; } fi; for ac_header in regex.h do : ac_fn_c_check_header_mongrel "$LINENO" "regex.h" "ac_cv_header_regex_h" "$ac_includes_default" if test "x$ac_cv_header_regex_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_REGEX_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 $as_echo_n "checking for X... " >&6; } # Check whether --with-x was given. if test "${with_x+set}" = set; then : withval=$with_x; fi # $have_x is `yes', `no', `disabled', or empty when we do not yet know. if test "x$with_x" = xno; then # The user explicitly disabled X. have_x=disabled else case $x_includes,$x_libraries in #( *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : $as_echo_n "(cached) " >&6 else # One or both of the vars are not set, and there is no cached value. ac_x_includes=no ac_x_libraries=no rm -f -r conftest.dir if mkdir conftest.dir; then cd conftest.dir cat >Imakefile <<'_ACEOF' incroot: @echo incroot='${INCROOT}' usrlibdir: @echo usrlibdir='${USRLIBDIR}' libdir: @echo libdir='${LIBDIR}' _ACEOF if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. for ac_var in incroot usrlibdir libdir; do eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" done # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. for ac_extension in a so sl dylib la dll; do if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && test -f "$ac_im_libdir/libX11.$ac_extension"; then ac_im_usrlibdir=$ac_im_libdir; break fi done # Screen out bogus values from the imake configuration. They are # bogus both because they are the default anyway, and because # using them would break gcc on systems where it needs fixed includes. case $ac_im_incroot in /usr/include) ac_x_includes= ;; *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; esac case $ac_im_usrlibdir in /usr/lib | /usr/lib64 | /lib | /lib64) ;; *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; esac fi cd .. rm -f -r conftest.dir fi # Standard set of common directories for X headers. # Check X11 before X11Rn because it is often a symlink to the current release. ac_x_header_dirs=' /usr/X11/include /usr/X11R7/include /usr/X11R6/include /usr/X11R5/include /usr/X11R4/include /usr/include/X11 /usr/include/X11R7 /usr/include/X11R6 /usr/include/X11R5 /usr/include/X11R4 /usr/local/X11/include /usr/local/X11R7/include /usr/local/X11R6/include /usr/local/X11R5/include /usr/local/X11R4/include /usr/local/include/X11 /usr/local/include/X11R7 /usr/local/include/X11R6 /usr/local/include/X11R5 /usr/local/include/X11R4 /usr/X386/include /usr/x386/include /usr/XFree86/include/X11 /usr/include /usr/local/include /usr/unsupported/include /usr/athena/include /usr/local/x11r5/include /usr/lpp/Xamples/include /usr/openwin/include /usr/openwin/share/include' if test "$ac_x_includes" = no; then # Guess where to find include files, by looking for Xlib.h. # First, try using that file with no special directory specified. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # We can compile using X headers with no special include directory. ac_x_includes= else for ac_dir in $ac_x_header_dirs; do if test -r "$ac_dir/X11/Xlib.h"; then ac_x_includes=$ac_dir break fi done fi rm -f conftest.err conftest.i conftest.$ac_ext fi # $ac_x_includes = no if test "$ac_x_libraries" = no; then # Check for the libraries. # See if we find them without any special options. # Don't add to $LIBS permanently. ac_save_LIBS=$LIBS LIBS="-lX11 $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { XrmInitialize () ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : LIBS=$ac_save_LIBS # We can link X programs with no special library path. ac_x_libraries= else LIBS=$ac_save_LIBS for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` do # Don't even attempt the hair of trying to link an X program! for ac_extension in a so sl dylib la dll; do if test -r "$ac_dir/libX11.$ac_extension"; then ac_x_libraries=$ac_dir break 2 fi done done fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi # $ac_x_libraries = no case $ac_x_includes,$ac_x_libraries in #( no,* | *,no | *\'*) # Didn't find X, or a directory has "'" in its name. ac_cv_have_x="have_x=no";; #( *) # Record where we found X for the cache. ac_cv_have_x="have_x=yes\ ac_x_includes='$ac_x_includes'\ ac_x_libraries='$ac_x_libraries'" esac fi ;; #( *) have_x=yes;; esac eval "$ac_cv_have_x" fi # $with_x != no if test "$have_x" != yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 $as_echo "$have_x" >&6; } no_x=yes else # If each of the values was on the command line, it overrides each guess. test "x$x_includes" = xNONE && x_includes=$ac_x_includes test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries # Update the cache value to reflect the command line values. ac_cv_have_x="have_x=yes\ ac_x_includes='$x_includes'\ ac_x_libraries='$x_libraries'" { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 $as_echo "libraries $x_libraries, headers $x_includes" >&6; } fi if test "$no_x" = yes; then # Not all programs may use this symbol, but it does not hurt to define it. $as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS= else if test -n "$x_includes"; then X_CFLAGS="$X_CFLAGS -I$x_includes" fi # It would also be nice to do this for all -L options, not just this one. if test -n "$x_libraries"; then X_LIBS="$X_LIBS -L$x_libraries" # For Solaris; some versions of Sun CC require a space after -R and # others require no space. Words are not sufficient . . . . { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5 $as_echo_n "checking whether -R must be followed by a space... " >&6; } ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries" ac_xsave_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; 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; } X_LIBS="$X_LIBS -R$x_libraries" else LIBS="$ac_xsave_LIBS -R $x_libraries" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } X_LIBS="$X_LIBS -R $x_libraries" else { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5 $as_echo "neither works" >&6; } 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 ac_c_werror_flag=$ac_xsave_c_werror_flag LIBS=$ac_xsave_LIBS fi # Check for system-dependent libraries X programs must link with. # Do this before checking for the system-independent R6 libraries # (-lICE), since we may need -lsocket or whatever for X linking. if test "$ISC" = yes; then X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet" else # Martyn Johnson says this is needed for Ultrix, if the X # libraries were built with DECnet support. And Karl Berry says # the Alpha needs dnet_stub (dnet does not exist). ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11" 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 XOpenDisplay (); int main () { return XOpenDisplay (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; } if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet $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 dnet_ntoa (); int main () { return dnet_ntoa (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnet_dnet_ntoa=yes else ac_cv_lib_dnet_dnet_ntoa=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_dnet_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; } if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet" fi if test $ac_cv_lib_dnet_dnet_ntoa = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5 $as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; } if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldnet_stub $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 dnet_ntoa (); int main () { return dnet_ntoa (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dnet_stub_dnet_ntoa=yes else ac_cv_lib_dnet_stub_dnet_ntoa=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_dnet_stub_dnet_ntoa" >&5 $as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; } if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub" fi fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$ac_xsave_LIBS" # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT, # to get the SysV transport functions. # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4) # needs -lnsl. # The nsl library prevents programs from opening the X display # on Irix 5.2, according to T.E. Dickey. # The functions gethostbyname, getservbyname, and inet_addr are # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking. ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" if test "x$ac_cv_func_gethostbyname" = xyes; then : fi if test $ac_cv_func_gethostbyname = no; then { $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 : X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl" fi if test $ac_cv_lib_nsl_gethostbyname = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5 $as_echo_n "checking for gethostbyname in -lbsd... " >&6; } if ${ac_cv_lib_bsd_gethostbyname+:} 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 gethostbyname (); int main () { return gethostbyname (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_bsd_gethostbyname=yes else ac_cv_lib_bsd_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_bsd_gethostbyname" >&5 $as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; } if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd" fi fi fi # lieder@skyler.mavd.honeywell.com says without -lsocket, # socket/setsockopt and other routines are undefined under SCO ODT # 2.0. But -lsocket is broken on IRIX 5.2 (and is not necessary # on later versions), says Simon Leinen: it contains gethostby* # variants that don't use the name server (or something). -lsocket # must be given before -lnsl if both are needed. We assume that # if connect needs -lnsl, so does gethostbyname. ac_fn_c_check_func "$LINENO" "connect" "ac_cv_func_connect" if test "x$ac_cv_func_connect" = xyes; then : fi if test $ac_cv_func_connect = no; then { $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 $X_EXTRA_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 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 : X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS" fi fi # Guillermo Gomez says -lposix is necessary on A/UX. ac_fn_c_check_func "$LINENO" "remove" "ac_cv_func_remove" if test "x$ac_cv_func_remove" = xyes; then : fi if test $ac_cv_func_remove = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5 $as_echo_n "checking for remove in -lposix... " >&6; } if ${ac_cv_lib_posix_remove+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lposix $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 remove (); int main () { return remove (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_posix_remove=yes else ac_cv_lib_posix_remove=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_posix_remove" >&5 $as_echo "$ac_cv_lib_posix_remove" >&6; } if test "x$ac_cv_lib_posix_remove" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix" fi fi # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay. ac_fn_c_check_func "$LINENO" "shmat" "ac_cv_func_shmat" if test "x$ac_cv_func_shmat" = xyes; then : fi if test $ac_cv_func_shmat = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5 $as_echo_n "checking for shmat in -lipc... " >&6; } if ${ac_cv_lib_ipc_shmat+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lipc $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 shmat (); int main () { return shmat (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ipc_shmat=yes else ac_cv_lib_ipc_shmat=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_ipc_shmat" >&5 $as_echo "$ac_cv_lib_ipc_shmat" >&6; } if test "x$ac_cv_lib_ipc_shmat" = xyes; then : X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc" fi fi fi # Check for libraries that X11R6 Xt/Xaw programs need. ac_save_LDFLAGS=$LDFLAGS test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries" # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to # check for ICE first), but we must link in the order -lSM -lICE or # we get undefined symbols. So assume we have SM if we have ICE. # These have to be linked with before -lX11, unlike the other # libraries we check for below, so use a different variable. # John Interrante, Karl Berry { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5 $as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; } if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lICE $X_EXTRA_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 IceConnectionNumber (); int main () { return IceConnectionNumber (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_ICE_IceConnectionNumber=yes else ac_cv_lib_ICE_IceConnectionNumber=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_ICE_IceConnectionNumber" >&5 $as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; } if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then : X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE" fi LDFLAGS=$ac_save_LDFLAGS fi if test "$no_x" = yes; then as_fn_error $? "\"Really need a working X. Check config.log to see why configure couldn't find it\"" "$LINENO" 5 fi LIBS="$X_LIBS $LIBS" CPPFLAGS="$X_CFLAGS $CPPFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XrmParseCommand in -lX11" >&5 $as_echo_n "checking for XrmParseCommand in -lX11... " >&6; } if ${ac_cv_lib_X11_XrmParseCommand+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lX11 $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 XrmParseCommand (); int main () { return XrmParseCommand (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_X11_XrmParseCommand=yes else ac_cv_lib_X11_XrmParseCommand=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_X11_XrmParseCommand" >&5 $as_echo "$ac_cv_lib_X11_XrmParseCommand" >&6; } if test "x$ac_cv_lib_X11_XrmParseCommand" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBX11 1 _ACEOF LIBS="-lX11 $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XShapeCombineMask in -lXext" >&5 $as_echo_n "checking for XShapeCombineMask in -lXext... " >&6; } if ${ac_cv_lib_Xext_XShapeCombineMask+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXext $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 XShapeCombineMask (); int main () { return XShapeCombineMask (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_Xext_XShapeCombineMask=yes else ac_cv_lib_Xext_XShapeCombineMask=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_Xext_XShapeCombineMask" >&5 $as_echo "$ac_cv_lib_Xext_XShapeCombineMask" >&6; } if test "x$ac_cv_lib_Xext_XShapeCombineMask" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXEXT 1 _ACEOF LIBS="-lXext $LIBS" else as_fn_error $? "libXext not found or does not include XShape" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XpmCreateImageFromXpmImage in -lXpm" >&5 $as_echo_n "checking for XpmCreateImageFromXpmImage in -lXpm... " >&6; } if ${ac_cv_lib_Xpm_XpmCreateImageFromXpmImage+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lXpm $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 XpmCreateImageFromXpmImage (); int main () { return XpmCreateImageFromXpmImage (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_Xpm_XpmCreateImageFromXpmImage=yes else ac_cv_lib_Xpm_XpmCreateImageFromXpmImage=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_Xpm_XpmCreateImageFromXpmImage" >&5 $as_echo "$ac_cv_lib_Xpm_XpmCreateImageFromXpmImage" >&6; } if test "x$ac_cv_lib_Xpm_XpmCreateImageFromXpmImage" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBXPM 1 _ACEOF LIBS="-lXpm $LIBS" fi for ac_header in X11/xpm.h do : ac_fn_c_check_header_mongrel "$LINENO" "X11/xpm.h" "ac_cv_header_X11_xpm_h" "$ac_includes_default" if test "x$ac_cv_header_X11_xpm_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_X11_XPM_H 1 _ACEOF else for ac_header in xpm.h do : ac_fn_c_check_header_mongrel "$LINENO" "xpm.h" "ac_cv_header_xpm_h" "$ac_includes_default" if test "x$ac_cv_header_xpm_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_XPM_H 1 _ACEOF else as_fn_error $? "xpm.h is needed" "$LINENO" 5 fi done fi done # WM_C_ATTRIBUTE { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__ support" >&5 $as_echo_n "checking for __attribute__ support... " >&6; } if ${wm_cv_c_attribute+:} false; then : $as_echo_n "(cached) " >&6 else wm_cv_c_attribute=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; foo_t foo () __attribute__((unused)); foo_t foo () {return 0; } #endif _ACEOF if ac_fn_c_try_compile "$LINENO"; then : wm_cv_c_attribute=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $wm_cv_c_attribute" >&5 $as_echo "$wm_cv_c_attribute" >&6; } case $wm_cv_c_attribute in yes) $as_echo "#define HAVE___ATTRIBUTE__ /**/" >>confdefs.h ;; esac for ac_prog in ssh-askpass x11-ssh-askpass ssh-askpass-gnome 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_path_DEFAULT_ASKPASS+:} false; then : $as_echo_n "(cached) " >&6 else case $DEFAULT_ASKPASS in [\\/]* | ?:[\\/]*) ac_cv_path_DEFAULT_ASKPASS="$DEFAULT_ASKPASS" # 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_DEFAULT_ASKPASS="$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 DEFAULT_ASKPASS=$ac_cv_path_DEFAULT_ASKPASS if test -n "$DEFAULT_ASKPASS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_ASKPASS" >&5 $as_echo "$DEFAULT_ASKPASS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DEFAULT_ASKPASS" && break done test -n "$DEFAULT_ASKPASS" || DEFAULT_ASKPASS="/usr/bin/ssh-askpass" # Extract the first word of "cvs2cl", so it can be a program name with args. set dummy cvs2cl; 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_CVS2CL+:} false; then : $as_echo_n "(cached) " >&6 else case $CVS2CL in [\\/]* | ?:[\\/]*) ac_cv_path_CVS2CL="$CVS2CL" # 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_CVS2CL="$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 CVS2CL=$ac_cv_path_CVS2CL if test -n "$CVS2CL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CVS2CL" >&5 $as_echo "$CVS2CL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi cat >>confdefs.h <<_ACEOF #define DEFAULT_ASKPASS "$DEFAULT_ASKPASS" _ACEOF for ac_header in CoreServices/CoreServices.h Security/Security.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 if test "x$prefix" != xNONE; then SKINDIR="$prefix/share/wmbiff/skins" else SKINDIR="$ac_default_prefix/share/wmbiff/skins" fi cat >>confdefs.h <<_ACEOF #define DEFAULT_SKIN_PATH "$SKINDIR:/usr/share/wmbiff/skins:/usr/local/share/wmbiff/skins:." _ACEOF ac_config_files="$ac_config_files Makefile wmbiff/Makefile wmgeneral/Makefile wmbiff/wmbiffrc.5 scripts/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by WMBiff $as_me 0.4.36, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ WMBiff config.status 0.4.36 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "wmbiff/Makefile") CONFIG_FILES="$CONFIG_FILES wmbiff/Makefile" ;; "wmgeneral/Makefile") CONFIG_FILES="$CONFIG_FILES wmgeneral/Makefile" ;; "wmbiff/wmbiffrc.5") CONFIG_FILES="$CONFIG_FILES wmbiff/wmbiffrc.5" ;; "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. # TODO: see whether this extra hack can be removed once we start # requiring Autoconf 2.70 or later. case $CONFIG_FILES in #( *\'*) : eval set x "$CONFIG_FILES" ;; #( *) : set x $CONFIG_FILES ;; #( *) : ;; esac shift # Used to flag and report bootstrapping failures. am_rc=0 for am_mf do # Strip MF so we end up with the name of the file. am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ || continue am_dirpart=`$as_dirname -- "$am_mf" || $as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$am_mf" : 'X\(//\)[^/]' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$am_mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` am_filepart=`$as_basename -- "$am_mf" || $as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ X"$am_mf" : 'X\(//\)$' \| \ X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$am_mf" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` { echo "$as_me:$LINENO: cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles" >&5 (cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } || am_rc=$? done if test $am_rc -ne 0; 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 $? "Something went wrong bootstrapping makefile fragments for automatic dependency tracking. If GNU make was not used, consider re-running the configure script with MAKE=\"gmake\" (or whatever is necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking). See \`config.log' for more details" "$LINENO" 5; } fi { am_dirpart=; unset am_dirpart;} { am_filepart=; unset am_filepart;} { am_mf=; unset am_mf;} { am_rc=; unset am_rc;} rm -f conftest-deps.mk } ;; 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 chmod 0444 wmbiff/wmbiffrc.5 wmbiff-0.4.36/FAQ0000644000207400020740000000615213500471555010342 00000000000000* Does WMBiff have a mailing list? There is no longer a WMBiff-specific mailing list, but it may be discussed on the Window Maker Developers mailing list, wmaker-dev@googlegroups.com. See http://lists.windowmaker.org/. * Why doesn't WMBiff update immediately after I read my mail? WMBiff looks only at the flags associated with mail messages to decide if they've been read. If your mail reader doesn't bother to update those flags immediately after you read a message, WMBiff has (essentially) no way of knowing that you've read the message. There are some workarounds: In mutt, you can ask it to sync the mailbox using the sync-mailbox command: it will write the mailbox file to disk (or back to the IMAP server) so that WMBiff can update its counters. Mutt's sync-mailbox command is bound to the $ key by default. In Mac OS X mail, changing to a different mailbox usually flushes changes, so I often hit Command-4 to switch to the sent mailbox for a few seconds. No workarounds are known for Kmail, which updates the status flags of all mail as if it were read, then adds its own status field to note that some are unread. (sourceforge tracker #706995). * WMBiff doesn't work. How do I submit a bug? See the Troubleshooting section of the wmbiffrc man page. If that doesn't work, run 'wmbiff -debug > wmbiff.log' and remove any passwords left in wmbiff.log. Submit this log and your wmbiffrc (sanitized of passwords of course) using 'reportbug' under Debian, or by sending mail to wmaker-dev. * WMBiff doesn't do something I want. How do I suggest a feature? If using Debian, use 'reportbug wmbiff' and submit a wishlist bug. Or, send mail with your suggestion to wmaker-dev@googlegroups.com. Some previously requested features can't be done: - Count IMAP deleted messages separately (the protocol doesn't support it without locking the mailbox). - Reset the count of new messages to zero when spawning a mailer (it would just jump back again the next time wmbiff looked). Previously suggested features that are really hard: - Support dock sizes other than 64x64 - Inverse video on new mail (or do more visually to grab attention) * I'm about to start writing a patch. How do I make sure it will get incorporated in WMBiff? Start a conversation on wmaker-dev, and you'll probably get some help. Tidbits: Avoid creating new Clients. - If you want an existing client to do something differently, find a way to parameterize its behavior. - If you want to use a shell command to get some information, make a recipe for ShellClient (open wmbiff.c and search for 'gicu'). If you must create a new client, Avoid Duplicating Code. Document your patch. Add entries as appropriate to: - sample.wmbiffrc - wmbiffrc.5.in - wmbiff.1 * How do I get the very latest WMBiff from git? git clone http://repo.or.cz/dockapps.git cd dockapps/wmbiff * I added a feature to WMBiff. How do I submit a patch? Submit patches in the same way as you would patches for Window Maker. See: http://repo.or.cz/w/wmaker-crm.git/blob/HEAD:/The-perfect-Window-Maker-patch.txt * This FAQ is wrong. Send mail to wmaker-dev@googlegroups.com. wmbiff-0.4.36/README0000644000207400020740000000710113500471555010663 00000000000000 Introducing WMBiff is an WindowMaker docking utility, that displays number of total messages count or unread mail messages count in differrent mailboxes. WMBiff was created by Gennady Belyakov in 1999, and was continued by a team of volunteers after his death. Green ( cyan? :) ) digits display total number of messages, if there are no unread messages in it. Yellow digits display number of unread messages, with blinking on new mail arrival, if any. At this moment unix-style (mbox), maildir, POP3, APOP and IMAP mailboxes are supported. WMBiff also understands Licq's history files. WMBiff supports up to 5 mailboxes (but you can start 2 or more wmbiff's with differrent configs). Pressing on a 1st (left) mouse button will execute appropriate mail reader (if defined in config file). Right-clicking will exec mail fetching program (if any). It is also possible to execute user-defined command line on new mail arrival (for example, play .WAV file). _________________________________________________________________ Compiling and Installation Extract the archive: tar -xvzf wmbiff-0.x.tar.gz Enter the wmbiff directory and follow INSTALL's directions. cd wmbiff-0.x/ ./configure For crypto support either: *) Install gnutls and libgrcypt packages from your distribution. *) Download them from http://www.gnupg.org/(en)/download/mirrors.html Choose a mirror, then download from the alpha/gnutls and alpha/libgcrypt directories. *) Do nothing; the configure script will note its absence. NOTE: gnutls-0.3.5 is the version that this release was tested with. Newer versions may have incompatible changes. Make the binary: make Install the binary: make install This will copy the binary to /usr/local/bin Then you need to copy sample.wmbiffrc into your home directory as .wmbiffrc, correct it as you like. Or, you can use the ``-c'' option and specify differrent name of config file. Without any config file wmbiff will use only default mailbox (from environment variable MAIL), labeled with word SPOOL, at first position. All other positions will be empty. _________________________________________________________________ See AUTHORS to see who has contributed to WMBiff. _________________________________________________________________ Any suggestions/bug reports please send to our mailing list, wmaker-dev@googlegroups.com Please include the output of 'wmbiff -debug'. _________________________________________________________________ UPDATE [2001-06-18]: On Tuesday, 22 May 2001, Jordi Mallach sent the following email to the wmbiff-devel list: Hello, I just found evidence of what I had believed for a long time. http://www.monkey.org/openbsd/archive/ports/0101/msg00311.html Gennady Belyakov passed away right after releasing 0.2 and when he stopped answering mail :| I guess we need to update the docs. Jordi Here is the message, if that URL becomes unavailable: To: ports@openbsd.org Subject: Re: mail/wmbiff update From: Vladimir Popov Date: Sat, 27 Jan 2001 09:34:15 +0500 On Fri, Jan 26, 2001 at 01:02:59PM +0000, Christian Weisgerber wrote: > > The major issue I have with this port is that the master site/home > page is unreachable. > Well, wmbiff's author Gennady Belyakov passed away in late November 1999. That's why that url isn't any longer valid. -- Vladimir May your soul rest in peace, Gennady. wmbiff-0.4.36/INSTALL0000644000207400020740000003661413644655242011055 00000000000000Installation Instructions ************************* Copyright (C) 1994-1996, 1999-2002, 2004-2016 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell command './configure && make && make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the 'README' file for instructions specific to this package. Some packages provide this 'INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The 'configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a 'Makefile' in each directory of the package. It may also create one or more '.h' files containing system-dependent definitions. Finally, it creates a shell script 'config.status' that you can run in the future to recreate the current configuration, and a file 'config.log' containing compiler output (useful mainly for debugging 'configure'). It can also use an optional file (typically called 'config.cache' and enabled with '--cache-file=config.cache' or simply '-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how 'configure' could check whether to do them, and mail diffs or instructions to the address given in the 'README' so they can be considered for the next release. If you are using the cache, and at some point 'config.cache' contains results you don't want to keep, you may remove or edit it. The file 'configure.ac' (or 'configure.in') is used to create 'configure' by a program called 'autoconf'. You need 'configure.ac' if you want to change it or regenerate 'configure' using a newer version of 'autoconf'. The simplest way to compile this package is: 1. 'cd' to the directory containing the package's source code and type './configure' to configure the package for your system. Running 'configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type 'make' to compile the package. 3. Optionally, type 'make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type 'make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the 'make install' phase executed with root privileges. 5. Optionally, type 'make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior 'make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing 'make clean'. To also remove the files that 'configure' created (so you can compile the package for a different kind of computer), type 'make distclean'. There is also a 'make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type 'make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide 'make distcheck', which can by used by developers to test that all other targets like 'make install' and 'make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the 'configure' script does not know about. Run './configure --help' for details on some of the pertinent environment variables. You can give 'configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU 'make'. 'cd' to the directory where you want the object files and executables to go and run the 'configure' script. 'configure' automatically checks for the source code in the directory that 'configure' is in and in '..'. This is known as a "VPATH" build. With a non-GNU 'make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use 'make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple '-arch' options to the compiler but only a single '-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the 'lipo' tool if you have problems. Installation Names ================== By default, 'make install' installs the package's commands under '/usr/local/bin', include files under '/usr/local/include', etc. You can specify an installation prefix other than '/usr/local' by giving 'configure' the option '--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option '--exec-prefix=PREFIX' to 'configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like '--bindir=DIR' to specify different values for particular kinds of files. Run 'configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of '${prefix}', so that specifying just '--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to 'configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the 'make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, 'make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of '${prefix}'. Any directories that were specified during 'configure', but not in terms of '${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the 'DESTDIR' variable. For example, 'make install DESTDIR=/alternate/directory' will prepend '/alternate/directory' before all installation names. The approach of 'DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of '${prefix}' at 'configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving 'configure' the option '--program-prefix=PREFIX' or '--program-suffix=SUFFIX'. Some packages pay attention to '--enable-FEATURE' options to 'configure', where FEATURE indicates an optional part of the package. They may also pay attention to '--with-PACKAGE' options, where PACKAGE is something like 'gnu-as' or 'x' (for the X Window System). The 'README' should mention any '--enable-' and '--with-' options that the package recognizes. For packages that use the X Window System, 'configure' can usually find the X include and library files automatically, but if it doesn't, you can use the 'configure' options '--x-includes=DIR' and '--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of 'make' will be. For these packages, running './configure --enable-silent-rules' sets the default to minimal output, which can be overridden with 'make V=1'; while running './configure --disable-silent-rules' sets the default to verbose, which can be overridden with 'make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. HP-UX 'make' updates targets which have the same time stamps as their prerequisites, which makes it generally unusable when shipped generated files such as 'configure' are involved. Use GNU 'make' instead. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its '' header file. The option '-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put '/usr/ucb' early in your 'PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in '/usr/bin'. So, if you need '/usr/ucb' in your 'PATH', put it _after_ '/usr/bin'. On Haiku, software installed for all users goes in '/boot/common', not '/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features 'configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, 'configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the '--build=TYPE' option. TYPE can either be a short name for the system type, such as 'sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file 'config.sub' for the possible values of each field. If 'config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option '--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with '--host=TYPE'. Sharing Defaults ================ If you want to set default values for 'configure' scripts to share, you can create a site shell script called 'config.site' that gives default values for variables like 'CC', 'cache_file', and 'prefix'. 'configure' looks for 'PREFIX/share/config.site' if it exists, then 'PREFIX/etc/config.site' if it exists. Or, you can set the 'CONFIG_SITE' environment variable to the location of the site script. A warning: not all 'configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to 'configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the 'configure' command line, using 'VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified 'gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for 'CONFIG_SHELL' due to an Autoconf limitation. Until the limitation is lifted, you can use this workaround: CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash 'configure' Invocation ====================== 'configure' recognizes the following options to control how it operates. '--help' '-h' Print a summary of all of the options to 'configure', and exit. '--help=short' '--help=recursive' Print a summary of the options unique to this package's 'configure', and exit. The 'short' variant lists options used only in the top level, while the 'recursive' variant lists options also present in any nested packages. '--version' '-V' Print the version of Autoconf used to generate the 'configure' script, and exit. '--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally 'config.cache'. FILE defaults to '/dev/null' to disable caching. '--config-cache' '-C' Alias for '--cache-file=config.cache'. '--quiet' '--silent' '-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to '/dev/null' (any error messages will still be shown). '--srcdir=DIR' Look for the package's source code in directory DIR. Usually 'configure' can determine that directory automatically. '--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. '--no-create' '-n' Run the configure checks, but stop before creating any output files. 'configure' also accepts some other, not widely useful, options. Run 'configure --help' for more details. wmbiff-0.4.36/compile0000755000207400020740000001635013644655242011375 00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2018-03-07.03; # UTC # Copyright (C) 1999-2020 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN* | MSYS*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/* | msys/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe | \ icl | *[/\\]icl | icl.exe | *[/\\]icl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: wmbiff-0.4.36/missing0000755000207400020740000001533613644655242011421 00000000000000#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2018-03-07.03; # UTC # Copyright (C) 1996-2020 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=https://www.perl.org/ flex_URL=https://github.com/westes/flex gnu_software_URL=https://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: wmbiff-0.4.36/wmgeneral/0000755000207400020740000000000013646607022012046 500000000000000wmbiff-0.4.36/wmgeneral/misc.h0000644000207400020740000000026113515611145013065 00000000000000#ifndef __MISC_H #define __MISC_H #include extern void parse_command(char *, char ***, int *); extern pid_t execCommand(const char *); #endif /* __MISC_H */ wmbiff-0.4.36/wmgeneral/wmgeneral.c0000644000207400020740000004023613646354751014130 00000000000000/* Best viewed with vim5, using ts=4 wmgeneral was taken from wmppp. It has a lot of routines which most of the wm* programs use. ------------------------------------------------------------ Author: Martijn Pieterse (pieterse@xs4all.nl) --- CHANGES: --- 14/09/1998 (Dave Clark, clarkd@skyia.com) * Updated createXBMfromXPM routine * Now supports >256 colors 11/09/1998 (Martijn Pieterse, pieterse@xs4all.nl) * Removed a bug from parse_rcfile. You could not use "start" in a command if a label was also start. * Changed the needed geometry string. We don't use window size, and don't support negative positions. 03/09/1998 (Martijn Pieterse, pieterse@xs4all.nl) * Added parse_rcfile2 02/09/1998 (Martijn Pieterse, pieterse@xs4all.nl) * Added -geometry support (untested) 28/08/1998 (Martijn Pieterse, pieterse@xs4all.nl) * Added createXBMfromXPM routine * Saves a lot of work with changing xpm's. 02/05/1998 (Martijn Pieterse, pieterse@xs4all.nl) * changed the read_rc_file to parse_rcfile, as suggested by Marcelo E. Magallon * debugged the parse_rc file. 30/04/1998 (Martijn Pieterse, pieterse@xs4all.nl) * Ripped similar code from all the wm* programs, and put them in a single file. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include #include #include #ifdef HAVE_X11_XPM_H #include #endif #ifdef HAVE_XPM_H #include #endif #include /* needed for Region on solaris? */ #include #include "wmgeneral.h" /*****************/ /* X11 Variables */ /*****************/ Display *display; Window Root; int screen; int x_fd; int d_depth; XSizeHints mysizehints; XWMHints mywmhints; Pixel back_pix, fore_pix; // static const char *Geometry = ""; Window iconwin, win; GC NormalGC; XpmIcon wmgen_bkg; XpmIcon wmgen_src; Pixmap pixmask; /*****************/ /* Mouse Regions */ /*****************/ typedef struct { int enable; int top; int bottom; int left; int right; } MOUSE_REGION; MOUSE_REGION mouse_region[MAX_MOUSE_REGION]; /***********************/ /* Function Prototypes */ /***********************/ static void GetXPM(XpmIcon *, const char **); Pixel GetColor(const char *); void RedrawWindow(void); int CheckMouseRegion(int, int); /*******************************************************************************\ |* parse_rcfile *| \*******************************************************************************/ void parse_rcfile(const char *filename, rckeys * keys) { char *p, *q; char temp[128]; const char *tokens = " :\t\n"; FILE *fp; int i, key; fp = fopen(filename, "r"); if (fp) { while (fgets(temp, 128, fp)) { key = 0; char *t = strdup(temp); q = strtok(t, tokens); while (key >= 0 && keys[key].label) { if ((!strcmp(q, keys[key].label))) { p = strstr(temp, keys[key].label); p += strlen(keys[key].label); p += strspn(p, tokens); if ((i = strcspn(p, "#\n"))) p[i] = 0; free(*keys[key].var); *keys[key].var = strdup(p); key = -1; } else key++; } free(t); } fclose(fp); } } /*******************************************************************************\ |* parse_rcfile2 *| \*******************************************************************************/ void parse_rcfile2(const char *filename, rckeys2 * keys) { char *p; char temp[128]; const char *tokens = " :\t\n"; FILE *fp; int i, key; char *family = NULL; fp = fopen(filename, "r"); if (fp) { while (fgets(temp, 128, fp)) { key = 0; while (key >= 0 && keys[key].label) { if ((p = strstr(temp, keys[key].label))) { p += strlen(keys[key].label); p += strspn(p, tokens); if ((i = strcspn(p, "#\n"))) p[i] = 0; free(*keys[key].var); *keys[key].var = strdup(p); key = -1; } else key++; } } fclose(fp); } free(family); } /*******************************************************************************\ |* GetXPM *| \*******************************************************************************/ static void GetXPM(XpmIcon * wmgen_local, const char *pixmap_bytes[]) { XWindowAttributes attributes; int err; /* For the colormap */ XGetWindowAttributes(display, Root, &attributes); /* despite the comment, I still don't understand... attributes is subsequently unused in this function -ns 11/2002 */ wmgen_local->attributes.valuemask |= (XpmReturnPixels | XpmReturnExtensions); err = XpmCreatePixmapFromData(display, Root, (char **) pixmap_bytes, &(wmgen_local->pixmap), &(wmgen_local->mask), &(wmgen_local->attributes)); if (err != XpmSuccess) { fprintf(stderr, "Not enough free colorcells to create pixmap from data (err=%d).\n", err); exit(1); } } /*******************************************************************************\ |* GetColor *| \*******************************************************************************/ Pixel GetColor(const char *name) { XColor color; XWindowAttributes attributes; XGetWindowAttributes(display, Root, &attributes); color.pixel = 0; if (!XParseColor(display, attributes.colormap, name, &color)) { fprintf(stderr, "wm.app: GetColor() can't parse %s.\n", name); } else if (!XAllocColor(display, attributes.colormap, &color)) { fprintf(stderr, "wm.app: GetColor() can't allocate %s.\n", name); } return color.pixel; } /*******************************************************************************\ |* flush_expose *| \*******************************************************************************/ static int flush_expose(Window w) { XEvent dummy; int i = 0; while (XCheckTypedWindowEvent(display, w, Expose, &dummy)) i++; return i; } /*******************************************************************************\ |* RedrawWindow *| \*******************************************************************************/ void RedrawWindow(void) { flush_expose(iconwin); XCopyArea(display, wmgen_bkg.pixmap, iconwin, NormalGC, 0, 0, wmgen_bkg.attributes.width, wmgen_bkg.attributes.height, 0, 0); flush_expose(win); XCopyArea(display, wmgen_bkg.pixmap, win, NormalGC, 0, 0, wmgen_bkg.attributes.width, wmgen_bkg.attributes.height, 0, 0); } /*******************************************************************************\ |* RedrawWindowXY *| \*******************************************************************************/ void RedrawWindowXY(int x, int y) { flush_expose(iconwin); XCopyArea(display, wmgen_bkg.pixmap, iconwin, NormalGC, x, y, wmgen_bkg.attributes.width, wmgen_bkg.attributes.height, 0, 0); flush_expose(win); XCopyArea(display, wmgen_bkg.pixmap, win, NormalGC, x, y, wmgen_bkg.attributes.width, wmgen_bkg.attributes.height, 0, 0); } /*******************************************************************************\ |* AddMouseRegion *| \*******************************************************************************/ void AddMouseRegion(unsigned int region_idx, int left, int top, int right, int bottom) { if (region_idx < MAX_MOUSE_REGION) { mouse_region[region_idx].enable = 1; mouse_region[region_idx].top = top; mouse_region[region_idx].left = left; mouse_region[region_idx].bottom = bottom; mouse_region[region_idx].right = right; } } /*******************************************************************************\ |* CheckMouseRegion *| \*******************************************************************************/ int CheckMouseRegion(int x, int y) { int i; int found; found = 0; for (i = 0; i < MAX_MOUSE_REGION && !found; i++) { if (mouse_region[i].enable && x <= mouse_region[i].right && x >= mouse_region[i].left && y <= mouse_region[i].bottom && y >= mouse_region[i].top) found = 1; } if (!found) return -1; return (i - 1); } /*******************************************************************************\ |* createXBMfromXPM *| \*******************************************************************************/ void createXBMfromXPM(char *xbm, const char **xpm, int sx, int sy) { int i, j, k; int width, height, numcol, depth; int zero = 0; unsigned char bwrite; int bcount; int curpixel; sscanf(*xpm, "%d %d %d %d", &width, &height, &numcol, &depth); for (k = 0; k != depth; k++) { zero <<= 8; zero |= xpm[1][k]; } for (i = numcol + 1; i < numcol + sy + 1; i++) { bcount = 0; bwrite = 0; for (j = 0; j < sx * depth; j += depth) { bwrite >>= 1; curpixel = 0; for (k = 0; k != depth; k++) { curpixel <<= 8; curpixel |= xpm[i][j + k]; } if (curpixel != zero) { bwrite += 128; } bcount++; if (bcount == 8) { *xbm = bwrite; xbm++; bcount = 0; bwrite = 0; } } } } /*******************************************************************************\ |* copyXPMArea *| \*******************************************************************************/ void copyXPMArea(int src_x, int src_y, int width, int height, int dest_x, int dest_y) { XCopyArea(display, wmgen_src.pixmap, wmgen_bkg.pixmap, NormalGC, src_x, src_y, width, height, dest_x, dest_y); } /*******************************************************************************\ |* copyXBMArea *| \*******************************************************************************/ void copyXBMArea(int src_x, int src_y, int width, int height, int dest_x, int dest_y) { XCopyArea(display, wmgen_src.mask, wmgen_bkg.pixmap, NormalGC, src_x, src_y, width, height, dest_x, dest_y); } /* added for wmbiff */ XFontStruct *f; int loadFont(const char *fontname) { if (display != NULL) { f = XLoadQueryFont(display, fontname); if (f) { XSetFont(display, NormalGC, f->fid); return 0; } else { printf("couldn't set font!\n"); } } return -1; } void drawString(int dest_x, int dest_y, const char *string, const char *colorname, const char *bgcolorname, int right_justify) { int len = strlen(string); assert(colorname != NULL); XSetForeground(display, NormalGC, GetColor(colorname)); XSetBackground(display, NormalGC, GetColor(bgcolorname)); if (right_justify) dest_x -= XTextWidth(f, string, len); XDrawImageString(display, wmgen_bkg.pixmap, NormalGC, dest_x, dest_y, string, len); } void eraseRect(int x, int y, int x2, int y2, const char *bgcolorname) { XSetForeground(display, NormalGC, GetColor(bgcolorname)); XFillRectangle(display, wmgen_bkg.pixmap, NormalGC, x, y, x2 - x, y2 - y); } /* end wmbiff additions */ /*******************************************************************************\ |* setMaskXY *| \*******************************************************************************/ void setMaskXY(int x, int y) { XShapeCombineMask(display, win, ShapeBounding, x, y, pixmask, ShapeSet); XShapeCombineMask(display, iconwin, ShapeBounding, x, y, pixmask, ShapeSet); } /*******************************************************************************\ |* openXwindow *| \*******************************************************************************/ void openXwindow(int argc, const char *argv[], const char *pixmap_bytes_bkg[], const char *pixmap_bytes_src[], char *pixmask_bits, int pixmask_width, int pixmask_height, int notWithdrawn) { unsigned int borderwidth = 1; XClassHint classHint; const char *display_name = NULL; char *wname = strdup(argv[0]); XTextProperty name; XGCValues gcv; unsigned long gcm; const char *geometry = NULL; char default_geometry[128]; int dummy = 0; int i; if (!wname) { fprintf(stderr, "Unable to allocate memory for window name!\n"); abort(); } for (i = 1; argv[i]; i++) { if (!strcmp(argv[i], "-display") && i < argc - 1) { display_name = argv[i + 1]; i++; } if (!strcmp(argv[i], "-geometry") && i < argc - 1) { geometry = argv[i + 1]; i++; } } sprintf(default_geometry, "%dx%d+0+0", pixmask_width, pixmask_height); if (!(display = XOpenDisplay(display_name))) { fprintf(stderr, "%s: can't open display %s\n", wname, XDisplayName(display_name)); exit(1); } screen = DefaultScreen(display); Root = RootWindow(display, screen); d_depth = DefaultDepth(display, screen); x_fd = XConnectionNumber(display); /* Convert XPM to XImage */ GetXPM(&wmgen_bkg, pixmap_bytes_bkg); GetXPM(&wmgen_src, pixmap_bytes_src); /* Create a window to hold the stuff */ mysizehints.flags = USSize | USPosition; mysizehints.x = 0; mysizehints.y = 0; back_pix = GetColor("black"); fore_pix = GetColor("cyan"); XWMGeometry(display, screen, geometry, default_geometry, borderwidth, &mysizehints, &mysizehints.x, &mysizehints.y, &mysizehints.width, &mysizehints.height, &dummy); mysizehints.width = pixmask_width; /* changed 11/2002 for wmbiff non 64x64-ness */ mysizehints.height = pixmask_height; /* was statically 64. */ win = XCreateSimpleWindow(display, Root, mysizehints.x, mysizehints.y, mysizehints.width, mysizehints.height, borderwidth, fore_pix, back_pix); iconwin = XCreateSimpleWindow(display, win, mysizehints.x, mysizehints.y, mysizehints.width, mysizehints.height, borderwidth, fore_pix, back_pix); /* Activate hints */ XSetWMNormalHints(display, win, &mysizehints); classHint.res_name = wname; classHint.res_class = wname; XSetClassHint(display, win, &classHint); /* Was PointerMotionMask instead of KeyPressMask, but pointer motion is irrelevant, and if the user went to the trouble of giving us keypresses, the least we can do is handle em... */ XSelectInput(display, win, ButtonPressMask | ExposureMask | ButtonReleaseMask | KeyPressMask | StructureNotifyMask); XSelectInput(display, iconwin, ButtonPressMask | ExposureMask | ButtonReleaseMask | KeyPressMask | StructureNotifyMask); /* wname is argv[0] */ if (XStringListToTextProperty(&wname, 1, &name) == 0) { fprintf(stderr, "%s: can't allocate window name\n", wname); exit(1); } XSetWMName(display, win, &name); XFree(name.value); /* Create GC for drawing */ gcm = GCForeground | GCBackground | GCGraphicsExposures; gcv.foreground = fore_pix; gcv.background = back_pix; gcv.graphics_exposures = 0; NormalGC = XCreateGC(display, Root, gcm, &gcv); /* ONLYSHAPE ON */ pixmask = XCreateBitmapFromData(display, win, pixmask_bits, pixmask_width, pixmask_height); XShapeCombineMask(display, win, ShapeBounding, 0, 0, pixmask, ShapeSet); XShapeCombineMask(display, iconwin, ShapeBounding, 0, 0, pixmask, ShapeSet); /* ONLYSHAPE OFF */ mywmhints.initial_state = WithdrawnState; mywmhints.icon_window = iconwin; mywmhints.icon_x = mysizehints.x; mywmhints.icon_y = mysizehints.y; mywmhints.window_group = win; mywmhints.flags = (notWithdrawn ? 0 : StateHint) | IconWindowHint | IconPositionHint | WindowGroupHint; XSetWMHints(display, win, &mywmhints); XSetCommand(display, win, (char **) argv, argc); XMapWindow(display, win); if (geometry) { /* we'll silently drop width and height as well as negative positions */ /* mostly because I don't know how to deal with them */ /* int wx, wy, x, y; int specified = XParseGeometry(geometry, &x, &y, &wx, &wy); printf("%d %d %d %d\n", x, y, wx, wy); if( specified & XNegative ) { x = DisplayWidth(display, DefaultScreen(display)) - x - pixmask_width; } if( specified & YNegative ) { y = DisplayHeight(display, DefaultScreen(display)) - y - pixmask_height; } if( specified & XValue || specified & YValue ) { XMoveWindow(display, win, x, y); } */ /* if (sscanf(geometry, "+%d+%d", &wx, &wy) == 2) { XMoveWindow(display, win, wx, wy); } else if (sscanf(geometry, "%dx%d+%d+%d", &x, &y, &wx, &wy) == 4) { XMoveWindow(display, win, wx, wy); } else if (sscanf(geometry, "+%d-%d", &wx, &wy) == 2) { XMoveWindow(display, win, wx, 0 - wy); } else { fprintf(stderr, "Unsupported geometry string '%s'\n", geometry); exit(1); } */ } if (wname) free(wname); } wmbiff-0.4.36/wmgeneral/Makefile.in0000644000207400020740000004155213646607004014042 00000000000000# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = wmgeneral ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LIBRARIES = $(noinst_LIBRARIES) AR = ar ARFLAGS = cru AM_V_AR = $(am__v_AR_@AM_V@) am__v_AR_ = $(am__v_AR_@AM_DEFAULT_V@) am__v_AR_0 = @echo " AR " $@; am__v_AR_1 = libwmgeneral_a_AR = $(AR) $(ARFLAGS) libwmgeneral_a_LIBADD = am_libwmgeneral_a_OBJECTS = misc.$(OBJEXT) wmgeneral.$(OBJEXT) libwmgeneral_a_OBJECTS = $(am_libwmgeneral_a_OBJECTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir) depcomp = $(SHELL) $(top_srcdir)/depcomp am__maybe_remake_depfiles = depfiles am__depfiles_remade = ./$(DEPDIR)/misc.Po ./$(DEPDIR)/wmgeneral.Po am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libwmgeneral_a_SOURCES) DIST_SOURCES = $(libwmgeneral_a_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags am__DIST_COMMON = $(srcdir)/Makefile.in $(top_srcdir)/depcomp DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CVS2CL = @CVS2CL@ CYGPATH_W = @CYGPATH_W@ DEFAULT_ASKPASS = @DEFAULT_ASKPASS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GCRYPT_MAN_STATUS = @GCRYPT_MAN_STATUS@ GNUTLS_COMMON_O = @GNUTLS_COMMON_O@ GNUTLS_MAN_STATUS = @GNUTLS_MAN_STATUS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SKINDIR = @SKINDIR@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LIBRARIES = libwmgeneral.a libwmgeneral_a_SOURCES = misc.c misc.h wmgeneral.c wmgeneral.h MAINTAINERCLEANFILES = Makefile.in all: all-am .SUFFIXES: .SUFFIXES: .c .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu wmgeneral/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu wmgeneral/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLIBRARIES: -test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES) libwmgeneral.a: $(libwmgeneral_a_OBJECTS) $(libwmgeneral_a_DEPENDENCIES) $(EXTRA_libwmgeneral_a_DEPENDENCIES) $(AM_V_at)-rm -f libwmgeneral.a $(AM_V_AR)$(libwmgeneral_a_AR) libwmgeneral.a $(libwmgeneral_a_OBJECTS) $(libwmgeneral_a_LIBADD) $(AM_V_at)$(RANLIB) libwmgeneral.a mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/misc.Po@am__quote@ # am--include-marker @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/wmgeneral.Po@am__quote@ # am--include-marker $(am__depfiles_remade): @$(MKDIR_P) $(@D) @echo '# dummy' >$@-t && $(am__mv) $@-t $@ am--depfiles: $(am__depfiles_remade) .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ $< @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)$(COMPILE) -MT $@ -MD -MP -MF $(DEPDIR)/$*.Tpo -c -o $@ `$(CYGPATH_W) '$<'` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/$*.Tpo $(DEPDIR)/$*.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES) clean: clean-am clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am distclean: distclean-am -rm -f ./$(DEPDIR)/misc.Po -rm -f ./$(DEPDIR)/wmgeneral.Po -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f ./$(DEPDIR)/misc.Po -rm -f ./$(DEPDIR)/wmgeneral.Po -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am am--depfiles check check-am clean \ clean-generic clean-noinstLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am .PRECIOUS: Makefile indent: indent -npro -kr -i4 -ts4 $(libwmgeneral_a_SOURCES) || true dist-hook-local: indent # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: wmbiff-0.4.36/wmgeneral/Makefile.am0000644000207400020740000000034513465246305014026 00000000000000noinst_LIBRARIES = libwmgeneral.a libwmgeneral_a_SOURCES = misc.c misc.h wmgeneral.c wmgeneral.h MAINTAINERCLEANFILES = Makefile.in indent: indent -npro -kr -i4 -ts4 $(libwmgeneral_a_SOURCES) || true dist-hook-local: indent wmbiff-0.4.36/wmgeneral/misc.c0000644000207400020740000000207113515611145013061 00000000000000/* dock.c- built-in Dock module for WindowMaker * * WindowMaker window manager * * Copyright (c) 1997 Alfredo K. Kojima * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #include #include #include "misc.h" extern pid_t execCommand(const char *command) { pid_t pid; if ((pid = fork()) == 0) { execl("/bin/sh", "sh", "-c", command, (char *) 0); } return pid; } wmbiff-0.4.36/wmgeneral/wmgeneral.h0000644000207400020740000000270613646354751014135 00000000000000#ifndef WMGENERAL_H_INCLUDED #define WMGENERAL_H_INCLUDED /***********/ /* Defines */ /***********/ #define MAX_MOUSE_REGION (40) /************/ /* Typedefs */ /************/ typedef struct _rckeys rckeys; struct _rckeys { const char *label; char **var; }; typedef struct _rckeys2 rckeys2; struct _rckeys2 { const char *family; const char *label; char **var; }; typedef struct { Pixmap pixmap; Pixmap mask; XpmAttributes attributes; } XpmIcon; /*******************/ /* Global variable */ /*******************/ extern Display *display; /***********************/ /* Function Prototypes */ /***********************/ void AddMouseRegion(unsigned int rgn_index, int left, int top, int right, int bottom); int CheckMouseRegion(int x, int y); void openXwindow(int argc, const char *argv[], const char **, const char **, char *, int, int, int); void RedrawWindow(void); void RedrawWindowXY(int x, int y); void createXBMfromXPM(char *, const char **, int, int); void copyXPMArea(int, int, int, int, int, int); void copyXBMArea(int, int, int, int, int, int); void setMaskXY(int, int); void parse_rcfile(const char *, rckeys *); /* for wmbiff */ int loadFont(const char *fontname); /* -1 on fail, 0 success. */ void drawString(int dest_x, int dest_y, const char *string, const char *colorname, const char *bgcolorname, int right_justify); void eraseRect(int x, int y, int x2, int y2, const char *bgcolorname); /* end wmbiff */ #endif wmbiff-0.4.36/NEWS0000644000207400020740000005060413646363662010522 00000000000000Release Notes ~~~~~~~~~~~~~ Release 0.4.36 - April 4, 2020 * GCC 10 linkage fix. Release 0.4.35 - July 23, 2019 * TLS SNI support. Release 0.4.34 - July 23, 2019 * Bug fixes. * Code cleanup. * Call XSetCommand. Release 0.4.33 - March 1, 2019 * Code cleanup. Release 0.4.32 - February 12, 2019 * Bug fix. Release 0.4.31 - June 23, 2017 * Bug fix. Release 0.4.30 - November 30, 2016 * Bug fixes. Release 0.4.29 - July 19, 2016 * Bug fixes. Release 0.4.28 - November 7, 2014 * Lots of bug fixes and code cleanup. Release 0.4.27 - October 8, 2005 * GNUTLS 1.2 support * Minor bugfixes. Release 0.4.26 - October 10, 2004 * Don't crash if no certificate is sent by the remote side and -skip-certificate-check has been given. * Avoid duplicate error messages. * Disable libgcrypt secure memory warning. * security.debian.rb: better when disconnected. Release 0.4.25 - June 23, 2004 * Fix a build error in the new gnutls certificate verification code on s390. Release 0.4.24 - June 22, 2004 * Use GNUTLS 1.0.4 and GCRYPT 1.1.90, current Debian unstable package libgnutls10-dev. Release 0.4.23 - April 27, 2004 * Allow server hostnames in IMAP to be IP addresses (start with a number). Release 0.4.22 - March 27, 2004 * Skip examine/search unless requested with msglst option. * Exit if ssh-askpass permissions check fails. Release 0.4.21 - February 21, 2004 * Fix a bug where fetch times out to some IMAP servers. Release 0.4.20 - January 1, 2004 * Add --disable-crypto for source-based distributions while libgcrypt is unstable. * Sam Izzo's patch for changing the mouse click action depending on whether a box has new mail. Release 0.4.19 - November 8, 2003 * Fix test_tlscomm with the right signature for read() * Another bugfix to IMAP msglst when headers are abnormal. * Avoid strcpy for overlapping regions. Release 0.4.18 - November 8, 2003 * Update security.debian.rb for ruby 1.8. * Bugfix to avoid infinite loop when reading from IMAP. * Bugfix to msglst to allow capitalized header names. * Add msglst feature to Pop3 mailboxes. (Paolo Gianrossi) * Bugfix to OS X keychain use for panther. Release 0.4.17 - August 31, 2003 * On Mac, ask the keychain for passwords if askpass = internal:apple:keychain * Bugfix to an infinite loop found in the TLS interface. Release 0.4.16 - July 7, 2003 * Checks TLS certificates. See wmbiffrc(5) for details on the certfile option. Designed to work with mutt. * Show a busy mouse cursor while talking to remote servers, to show that wmbiff won't be responsive to mouse clicks for a little bit. * New buttontwo (middle click) action to complement action (left mouse click) and fetchcmd (right mouse). * #'s are now only comments in .wmbiffrc at the beginning of lines or following whitespace, allowing #'s in (most) passwords. * AppleScript examples for driving Apple's Mail application in sample.wmbiffrc * Special mailbox action 'msglst' brings up a transient window showing message headers from IMAP and program output for shell methods. This is intended to be faster than starting up a new mail program or re-executing a script. * Avoid repetitive error messages when disconnected. * Use conventional -geometry option handling. * Fix bug in 0.4.15 to re-enable *'s in IMAP passwords. Release 0.4.15 - Mar 30, 2003 * Frobnicate internally stored passwords, partially obfuscating them in memory. Not actually more secure, but harder to casually discover a password. * Tighten configuration file lines to more quickly detect misconfiguration. Add the -relax option if it is too paranoid. * Add support for -bg to round out -hi and -fg color specifiers. Release 0.4.14 - Jan 24, 2003 * Handle building on systems with both posix and gnu regex in different but conflicting files. * Restart wmbiff on SIGUSR1. You may need to use 'killall -USR1 wmbiff' if it gets stuck. * Restart wmbiff on ctrl-shift mouse 1. Release 0.4.13 - Jan 20, 2003 * Fix a file descriptor leak when using both Shell and IMAP clients. * Portability to Mac OS X, Solaris, and probably BSD restored (thanks sourceforge compile farm!) with a partial rewrite of regular expression handling for IMAP and POP mailboxes. Release 0.4.12 - Jan 3, 2003 * Fix a bug introduced in 0.4.9 that interfered with -geometry handling. (Debian #173813) Release 0.4.11 - Dec 28, 2002 * security.debian.rb script to check for updates on security.debian.org, installed in $prefix/lib/wmbiff/ add: path.x=/usr/lib/wmbiff/security.debian.rb to your .wmbiffrc (and install ruby if you haven't already). * Internal cleanups to allow long askpass commands. Release 0.4.10 - Dec 12, 2002 * Peter McAlpine's globalnotify feature - elect to play a sound on new mail in *any* mailbox without a chorus of sounds from every mailbox. * -skip-certificate-check option for when your imaps server is misconfigured and you can't do anything about it. Release 0.4.9 - Dec 1, 2002 * GNUTLS v0.5.9 or higher required * Check TLS certificate hostname against the hostname we're connecting to. This raises the bar, but does not make wmbiff's TLS implementation secure against man in the middle attacks. * WMBiff scales to the number of mailboxes you're using. For openbox, this means less wasted space in the slit and the possibility of up to 40 mailboxes. For WindowMaker, this means more pretty chrome and less dark LED if you have only a couple boxes. If you prefer the empty cells at the end, place "path.4=" in your .wmbiffrc. Release 0.4.8 - Sept 18, 2002 * GNUTLS v0.5.1-0.5.6, gcrypt v1.1.8 required. * Allow spaces in IMAP mailbox paths. The new syntax is: server/"mail box with spaces" where the old is server/mailbox. See wmbiffrc(5) for details. * Avoid filesystem caching for network mounted maildirs. See wmbiffrc(5) for details. (Dwayne C. Litzenberger) Release 0.4.7 - August 16, 2002 * GNUTLS v0.5.1, gcrypt v1.1.8 required. (no other changes) Release 0.4.6 - July 19, 2002 * Ignore sigpipe so that apm suspend works with IMAP/TLS. * Memory handling bugfixes to appease valgrind. * GNUTLS v0.4.3, gcrypt v1.17 expected Release 0.4.4 - June 27, 2002 * GNUTLS version 0.4.3 required. The API has changed, and wmbiff is no longer compatible with GNUTLS versions prior to 0.4.3. Certificate checking may be slightly more strict. * GCRYPT version 1.1.7 is expected as well. * Partial rewrite of mailbox-parsing code, splint annotations. * Bugfix in debug messages of ShellClient. * Internal cleanups; migration to autoconf 2.5 Release 0.4.3 - June 8, 2002 * IPv6 support for real. (missed a detail with autoconf) * Preliminary font support, allowing variable colors. Use wmbiff -fg violet to give it a spin. Note: if the number of old messages is at least 1000, the old number of messages will not be completely erased when new mail arrives. * Mouse handling fix. * Cleanup of internals: handling of default configuration when .wmbiffrc does not exist, vertical position of rows, variable names, etc. * GNUTLS version 0.3.5 is expected; earlier and later versions may be incompatible. * This release is by Neil Spring . Release 0.4.2 - June 1, 2002 * Bugfix: accidentally released a partial feature. Release 0.4.1 - June 1, 2002 * This release is by Neil Spring . * GNUTLS version 0.3.5 is expected; earlier and later versions may be incompatible. * IPv6 is now supported, thanks to Jun-ichiro itojun Hagino Release 0.4.0 - May 3, 2002 * This release is by Neil Spring . * GNUTLS version 0.3.5 is expected; earlier and later versions may be incompatible. * askpass: Passwords can be left empty for IMAP: ssh-askpass will be used to prompt the user. See sample.wmbiffrc and wmbiffrc(5). * skinfile: Background pixmaps can be specified in .wmbiffrc. This has the effect of "skins." See wmbiffrc(5). Add "skinfile=wmbiff-master-contrast.xpm" to .wmbiffrc for a more readable wmbiff. * finger: Finger client added - finger a user's mailbox to get its status. Requires perl and finger commands. See wmbiffrc(5). Thanks to Andelko Horvat. * shell: Improvements to ShellClient - now allows three character text to be printed as status. If "new" is on the output line, the text will be in yellow. Thanks to Andelko Horvat. * mbox: Paths can be specified including shell expressions in `'s. If requested, this feature can be expanded to other clients. Nested expressions are not supported. * Permissions on .wmbiffrc are checked to protect security. Only a warning is printed now. This will degenerate in later releases for .wmbiffrc's that store passwords. * Migrated to automake / autoconf to detect defaults for ssh-askpass and prepare for future changes. * Bugfix to handle -geometry tags with dimension as generated by fvwmSaveDesk. The size is ignored. (in Debian 0.3.8-3) Release 0.3.8 - Tue, 26 Mar 2002 17:17:07 +0100 * Added GnomeICU support. * Added an experimental shell command method which reads the output for a given command. See wmbiffrc(5) for details. * Debug support moved to runtime, using the -debug switch. * Fix for the install rule in Makefile. Release 0.3.7 - Sun, 3 Feb 2002 23:46:44 +0100 * No, 0.3.6 never happened :) * Removed unneeded auth list fix which broke things. * Makefile cleanup, with better FreeBSD support. You can now easily use the external GNU regex lib. Release 0.3.6 - Sun, 27 Jan 2002 20:49:52 +0100 * Added a new syntax for IMAP, which allows using a "@" in the password field. See wmbiffrc(5) for details. * Fix for a correct usage of the auth list in IMAP. Release 0.3.5 - Mon, 14 Jan 2002 02:43:23 +0100 * Added support for GNUtls 0.3. You can still compile wmbiff using GNUtls 0.2.x by removing the GNUTLS_VER=3 define in the Makefile. * Fixed password quoting in IMAP logins. Release 0.3.4 - Fri, 23 Nov 2001 16:56:29 +0100 * "imaps" is now prefered to "sslimap" in config files. The old type is still supported for backwards compatibility. * You can now specify what protocol wmbiff should use for a given Pop3 or IMAP mailbox. If unspecified, it will try the secure ones first, falling back to unsecure if they fail. See wmbiffrc(5). * Added some debug messages for tls connections. * Pop3 path parsing rewrite. * Manual page fixes. * Compile warning fixes. Release 0.3.3 - Mon, 29 Oct 2001 14:55:00 +0100 * Sanity check to IMAP code: exit if wmbiff tries to connect to more than 5 servers. * Fix a missbehaviour of cram-md5 (broke pop3). * Documentation updates. Release 0.3.2 - Tue, 23 Oct 2001 20:30:37 +0200 * After some tries (other OpenSSL based patches, independent APOP & CRAM-Md5 patches) we've come up with something based on GNUtls and gcrypt, which are GPL based and have no licensing issues for us. See ChangeLog for details. * WMBiff now supports IMAP-SSL, APOP and CRAM-Md5 authentication. These can be disabled at compile time, commenting out the WITH_TLS and WITH_GCRYPT defines. (Neil Spring, NAKAYAMA Takao and Jay T. Francis). Release 0.3.1 - Sun, 24 Jun 2001 20:15:41 +0200 * Replaced /var/spool/mail with /var/mail, which is what the FHS mandates. All decent systems should have either the directory or a symlink pointing somewhere else. (Jordi Mallach) * I reformatted ths changelog, again. I hope this is the last time I need to do this. The CVS logs should be used for all changes, and this file should by updated for user-visible changes only, from now on. (Dwayne C. Litzenberger) * Updated the README to reflect that Gennady Belyakov died right after releasing wmBiff 0.2. May your soul rest in peace, Gennady. (Dwayne C. Litzenberger) * Fixed the IMAP support, again. (Rob Funk) Release 0.3.0 - Fri, 16 May 2001 12:16:44 +0200 * [ReadLine] removed previous trim leading spaces, added TrimFull. Fixes Debian Bug #95849 (Mark Hurley). * There was a bug where if a POP3 or IMAP mailbox read failed and the following reads were successful, but no mail was in the server, the given mailbox would remain reading "XX". Now it updates the counter no matter what the read was (Mark Hurley). * wmBiff would only count as new mails in mbox mailboxes with "N" flags, ignoring those marked "ON" (Rob Funk). * Fixed reading of quoted imap folders, which some IMAPd's do (Rob Funk). * README: updated some very obsolete info. (Jordi Mallach) Release 0.2q1+Debian - Tue, 1 May 2001 10:11:00 +0000 * Moved to CVS at SourceForge. (Jordi Mallach) Release 0.2q1 - Fri, 13 Apr 2001 02:47:10 -0400 * This release is by Mark Hurley . * wmbiff/Client.h: move DEBUG_* macros to wmbiff/Makefile * wmbiff/Pop3Client.c: + My password contains an @ character. This causes the pop3 line to be incorrectly parsed by wmbiff. * Drop all of the ":" after the pop3 and delimit all values with spaces. This works well, as passwords/user-id's all agree that the space is a non-legit value. Example: assume my password is: myEmailhasa@init Old way: path.3=pop3:debian4tux:myEmailhasa@init@mail.telocity.com New way: path.3=pop3:debian4tux myEmailhasa@init mail.telcoity.com Ahh...before you say it. "Backward compatibility?" You will also find in the patch, a NEW function. So that the OLD and NEW way is easily compatible with all ".wmbiffrc" files. Dev. Comments: This was not the cleanest way to implement it, but I had to suffice with a clean/quick implementation. I originally wrote one function to handle past and new parsing. However, I thought it would be beneficial to leave them separated, so we could eventually drop the old method? Related Changes: The man page will need to be updated (not provided in patch). We can weed the "old" style out of the example script as well. Still explaining the changes in the man page to leave out confusion in a users mind (as they are likely to find "old" style scripts). + My mail server at Telocity.com is following the RFC's to a "T". RFC 1725 states that the LAST command be removed. After some searching I have NOT turned up a replacement. Which does make sense, this command is only so useful, and contributes to the popularity of other such remoting such as LDAP? * I've set the Unread messages to the TotalMessages, assuming (as suggested by the RFC) no messages have been read. I have also suppressed the error printed to stderr, it is correct to return an error, *now*. ;) The only way to keep track of messages which have been read, is to remember the unique number assigned to them. This is what fetchmail does. However, it does not work correctly if you check and read mail thru other methods (a web mail client). * wmbiff/wmbiff.c: - for (index = 0; index < 4; index++) + for (index = 0; index < 5; index++) BUG! Last postion #4 was not correctly being checked. Now correctly checks each position. Release 0.2q - Tue, 20 Mar 2001 05:32:35 +0100 * This release is by Jorge García . * wmbiff/{*.[ch]}: removed unnecesary includes. * wmbiff/wmbiff.c: some cleanups and optimizations. + init_biff: * show error if user config file does not exists * use of userconfig "interval" (wasn't correctly parsed) + {do_biff, displayMsgCounters}: some changes to make Sleep_Interval and Blink_Mode local + parse_cmd: some changes to make uconfig_file local + {BlinkOn, BlinkOff, BlinkToogle}: Removed (merged by do_biff) + {ReadConfigString, ReadConfigInt}: Removed + countmail: removed init in header (wasn't used) + ReadLine: Created (new parsing code, extracts pairs of setting and value) + Read_Config_File: now there is only ONE parse not 36! * wmbiff/{IMap4Client.c, Pop3Client.c}: check for correct format line to avoid "segmentation fault" while parsing. Release 0.2p - Mon, 12 Mar 2001 00:00:00 -0600 * This release is by Dwayne C. Litzenberger . * Added maildir support! Yay! * Stole the manpages from Debian. * Massive (lack of) coding style cleanup; Standardized coding style using GNU indent. * Reversed order of ChangeLog as suggested by Jordi. * Cleaned up the v0.2o ChangeLog entry. What a mess! Added missing credits. * Cleaned up and reformatted the rest of the changelog to an almost-Debian format while I'm at it. It's much more readable that way. * Moved definition of WMBIFF_VERSION to the Makefile. * All your base are belong to us. * I'm not maintaining wmBiff; I just submitted a big patch. Send your complaints (or complements) to Yong-iL Joh. Release 0.2o - Mon, 12 Mar 2001 00:00:00 +0900 * This release is by Yong-iL Joh . * I don't think the date of this changelog entry is right. (Dwayne C. Litzenberger) * Jordi Mallach , Debian's wmbiff maintainer, sent me an email a couple of days ago which included a patch with man pages. The patch did the following: + Fixed a major upstream bug that renders this new wmbiff unusable. Thanks to Guillaume Morin, Jérôme Marant and Mark Hurley for their help identifying the bug, and Jorge García for writing a patch. Basically, the new upstream broke backwards compatibility of wmbiffrc with Gennady's wmbiff, fixed that. This patch also fixes wmbiff not using $MAIL or defaulting to /var/spool/mail/$USER if no ~/.wmbiffrc is found (closes: #87778). + wmbiff/wmbiff.c: updated WMBIFF_VERSION to current. + wmbiff/{socket.c, wmbiff.c}: removed includes. + debian/{wmbiff.1, wmbiffrc.5}: updated for IMAP4 and Licq support. + Jorge García removed the segfault in Jordi's wmbiffrc + Vladimir Popov fixed a potential buffer overflow in init_biff() (The "/* Make labels look right */" section). + Jorge García fixed a display bug in the number-of- mails display. * use poll() instead of select() -- Yong-iL Joh 12-Mar-2001 +0900 Release 0.2n - Tue, 20 Feb 2001 0:00:00 +0900 * This release is by Yong-iL Joh . * Nick Clarey sent me a patch. that enhances the following: + UW Imap server 2000.283rh + Config file now supports IMAP mailbox "paths" rather than just the mailbox name (e.g. mail/foo/blah) Release 0.2m - Mon, 5 Feb 2001 00:00:00 +0900 * This release is by Yong-iL Joh . * Imap4Client.c did not close when a connection error occurred. Fixed it. Release 0.2l - Thu, 11 Jan 2001 00:00:00 +0900 * This release is by Yong-iL Joh . * Imap4Client.c had a bug when trying to connect to an imap4 server. Fixed it. Release 0.2j - Mon, 1 Jan 2001 00:00:00 +0900 * This release is by Yong-iL Joh . * Because I can't contact the author, I jumped to version 0.2j * Added imap4-based mail server check component. * Divided wmbiff.c to wmbiff.c, LicqClient.c mboxClient.c Release 0.2-licq - Sat, 1 Jan 2000 00:00:00 +0000 * This release is by Yong-iL Joh . * The actual date of this release is unknown, so I picked New Year's Day, Y2K. (Dwayne C. Litzenberger) * I found it from http://www.licq.org/download.html. Release 0.2 - Fri, 26 Nov 1999 00:00:00 +0000 * This release is by Gennady Belyakov . * We don't actually know the time zone of Gennady's changelog entries (Dwayne C. Litzenberger). * POP3 support added with (auto)fetching * digits blinking on new mail arrival * resource wasting lowered * individual rescan interval for differrent mailboxes * some bugfixes Release 0.1a - Thu, 18 Nov 1999 00:00:00 +0000 * This release is by Gennady Belyakov . * Some fixes with intialization Release 0.1 - Wed, 17 Nov 1999 00:00:00 +0000 * Initial release by Gennady Belyakov . $Id: NEWS,v 1.61 2005/10/08 18:13:09 bluehal Exp $ wmbiff-0.4.36/install-sh0000755000207400020740000003643513644655242012031 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2018-03-11.20; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) is_target_a_directory=always dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename. if test -d "$dst"; then if test "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dstbase=`basename "$src"` case $dst in */) dst=$dst$dstbase;; *) dst=$dst/$dstbase;; esac dstdir_status=0 else dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi fi case $dstdir in */) dstdirslash=$dstdir;; *) dstdirslash=$dstdir/;; esac obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) # Note that $RANDOM variable is not portable (e.g. dash); Use it # here however when possible just to lower collision chance. tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 # Because "mkdir -p" follows existing symlinks and we likely work # directly in world-writeable /tmp, make sure that the '$tmpdir' # directory is successfully created first before we actually test # 'mkdir -p' feature. if (umask $mkdir_umask && $mkdirprog $mkdir_mode "$tmpdir" && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. test_tmpdir="$tmpdir/a" ls_ld_tmpdir=`ls -ld "$test_tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac oIFS=$IFS IFS=/ set -f set fnord $dstdir shift set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=${dstdirslash}_inst.$$_ rmtmp=${dstdirslash}_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && { test -z "$stripcmd" || { # Create $dsttmp read-write so that cp doesn't create it read-only, # which would cause strip to fail. if test -z "$doit"; then : >"$dsttmp" # No need to fork-exec 'touch'. else $doit touch "$dsttmp" fi } } && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: wmbiff-0.4.36/scripts/0000755000207400020740000000000013646607023011555 500000000000000wmbiff-0.4.36/scripts/Makefile.in0000644000207400020740000003532613646607004013552 00000000000000# Makefile.in generated by automake 1.16.2 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2020 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = scripts ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(wmbiff_pkglibdir)" SCRIPTS = $(wmbiff_pkglib_SCRIPTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CVS2CL = @CVS2CL@ CYGPATH_W = @CYGPATH_W@ DEFAULT_ASKPASS = @DEFAULT_ASKPASS@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ GCRYPT_MAN_STATUS = @GCRYPT_MAN_STATUS@ GNUTLS_COMMON_O = @GNUTLS_COMMON_O@ GNUTLS_MAN_STATUS = @GNUTLS_MAN_STATUS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ LDFLAGS = @LDFLAGS@ LIBGCRYPT_CFLAGS = @LIBGCRYPT_CFLAGS@ LIBGCRYPT_CONFIG = @LIBGCRYPT_CONFIG@ LIBGCRYPT_LIBS = @LIBGCRYPT_LIBS@ LIBGNUTLS_CFLAGS = @LIBGNUTLS_CFLAGS@ LIBGNUTLS_LIBS = @LIBGNUTLS_LIBS@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MKDIR_P = @MKDIR_P@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ RANLIB = @RANLIB@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ SKINDIR = @SKINDIR@ STRIP = @STRIP@ VERSION = @VERSION@ XMKMF = @XMKMF@ X_CFLAGS = @X_CFLAGS@ X_EXTRA_LIBS = @X_EXTRA_LIBS@ X_LIBS = @X_LIBS@ X_PRE_LIBS = @X_PRE_LIBS@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_CC = @ac_ct_CC@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ wmbiff_pkglibdir = $(pkglibdir) wmbiff_pkglib_SCRIPTS = security.debian.rb EXTRA_DIST = security.debian.rb all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu scripts/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu scripts/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__maybe_remake_depfiles);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-wmbiff_pkglibSCRIPTS: $(wmbiff_pkglib_SCRIPTS) @$(NORMAL_INSTALL) @list='$(wmbiff_pkglib_SCRIPTS)'; test -n "$(wmbiff_pkglibdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(wmbiff_pkglibdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(wmbiff_pkglibdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(wmbiff_pkglibdir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(wmbiff_pkglibdir)$$dir" || exit $$?; \ } \ ; done uninstall-wmbiff_pkglibSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(wmbiff_pkglib_SCRIPTS)'; test -n "$(wmbiff_pkglibdir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(wmbiff_pkglibdir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) distdir-am distdir-am: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(SCRIPTS) installdirs: for dir in "$(DESTDIR)$(wmbiff_pkglibdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-wmbiff_pkglibSCRIPTS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-wmbiff_pkglibSCRIPTS .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic cscopelist-am \ ctags-am distclean distclean-generic distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip \ install-wmbiff_pkglibSCRIPTS installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags-am \ uninstall uninstall-am uninstall-wmbiff_pkglibSCRIPTS .PRECIOUS: Makefile # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: wmbiff-0.4.36/scripts/security.debian.rb0000755000207400020740000001137213465246305015122 00000000000000#! /usr/bin/ruby # Copyright 2002 Neil Spring # GPL # report bugs to wmbiff-devel@lists.sourceforge.net # or (preferred) use the debian BTS via 'reportbug' # Based on security-update-check.py by Rob Bradford require 'net/ftp' #require 'profile' # re-fetch interval - only bug the server once every hour. # allows wmbiff to ask us often how many packages have been # updated so that the number goes back to cyan (old) from # yellow (new) quickly on upgrade. # this still doesn't mean we grab the whole file. we get # if-modified-since. it just means we don't connect to the # server more often than this. # 6 hours * 60 min/hour * 60 sec/min Refetch_Interval_Sec = 6 * 60 * 60 # as an ordinary user, we store Packages in the home directory. Cachedir = ENV['HOME'] + '/.wmbiff-sdr' # look for updates from this server. This script is designed around # (and simplified greatly by) using just a single server. Server = 'security.debian.org' # extend the Array class with a max method. class Array def inject(n) each { |value| n = yield(n, value) } n end def max inject(0) { |n, value| ((n > value) ? n : value) } end end def debugmsg(str) $stderr.puts str if($VERBOSE) end # to be reimplemented without execing touch. def touch(filename) debugmsg "touching #{filename}" Kernel.system('/usr/bin/touch ' + filename) end # to be reimplemented without execing dpkg, though running # dpkg excessively doesn't seem to be a bottleneck. def version_a_gt_b(a, b) cmd = "/usr/bin/dpkg --compare-versions %s le %s" % [ a, b ] # $stderr.puts cmd return (!Kernel.system(cmd)) end # figure out which lists to check # there can be many implementations of # this behavior, this seemed simplest. # we're going to make an array of arrays, for each package # file, the url, the system's cache of the file, and a # per-user cache of the file. packagelists = Dir.glob("/var/lib/apt/lists/#{Server}*Packages").map { |pkgfile| [ '/debian-security' + pkgfile.gsub(/.*#{Server}/, '').tr('_','/').gsub(/Packages/, ''), # the url path pkgfile, # the system cache of the packages file. probably up-to-date. # and finally, a user's cache of the page, if needed. "%s/%s" % [ Cachedir, pkgfile.gsub(/.*#{Server}_/,'') ] ] } # update the user's cache if necessary. packagelists.each { |urlpath, sc, uc| sctime = File.stat(sc).mtime cached_time = if(test(?e, uc)) then uctime = File.stat(uc).mtime if ( uctime < sctime ) then # we have a user cache, but it is older than the system cache File.unlink(uc) # delete the obsolete user cache. sctime else uctime end else sctime end if(Time.now > cached_time + Refetch_Interval_Sec) then debugmsg "fetching #{urlpath} %s > %s + %d" % [Time.now, cached_time, Refetch_Interval_Sec] begin test(?e, Cachedir) or Dir.mkdir(Cachedir) ftp = Net::FTP.new(Server) ftp.login ftp.chdir(urlpath) ftp.getbinaryfile('Packages.gz', uc + '.gz', 1024) ftp.close # need to unzip Packages.gz cmd_gunzip = "gzip -df %s" % [ uc + '.gz' ] Kernel.system(cmd_gunzip) rescue SocketError => e # if the net is down, we'll get this error; avoid printing a stack trace. puts "XX old" puts e exit 1; rescue Timeout::Error => e # if the net is down, we might get this error instead. # but there is no good reason to print the specific exception. (execution expired) puts "XX old" exit 1; end debugmsg "urlpath updated" else debugmsg "skipping #{urlpath}" end } available = Hash.new package = nil packagelists.each { |url, sc, uc| File.open( (test(?e, uc)) ? uc : sc, 'r').each { |ln| if(m = /^Package: (.*)/.match(ln)) then package = m[1] elsif(m = /^Version: (.*)/.match(ln)) then available[package] = m[1] end } } installed = Hash.new package = nil isinstalled = false File.open('/var/lib/dpkg/status').each { |ln| if(m = /^Package: (.*)$/.match(ln)) then package = m[1] isinstalled = false # reset elsif(m = /^Status: install ok installed/.match(ln)) then isinstalled = true elsif(m = /^Version: (.*)$/.match(ln)) then isinstalled && installed[package] = m[1] end } debugmsg "%d installed, %d available" % [ installed.length, available.length ] updatedcount = 0 updated = Array.new ( installed.keys & available.keys ).each { |pkg| if(version_a_gt_b(available[pkg], installed[pkg])) then updatedcount += 1 updated.push(pkg + ": #{available[pkg]} > #{installed[pkg]}") end } # we're done. output a count in the format expected by wmbiff. if(updatedcount > 0) then puts "%d new" % [ updatedcount ] else puts "%d old" % [ installed.length ] end puts updated.join("\n") wmbiff-0.4.36/scripts/Makefile.am0000644000207400020740000000015313465246305013531 00000000000000wmbiff_pkglibdir = $(pkglibdir) wmbiff_pkglib_SCRIPTS = security.debian.rb EXTRA_DIST = security.debian.rb wmbiff-0.4.36/config.h.in0000644000207400020740000000662713646607003012042 00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* Program to use for querying the user for a password: redefine if not on a debian system */ #undef DEFAULT_ASKPASS /* Path to use when finding skins (modified pixmaps) */ #undef DEFAULT_SKIN_PATH /* Define to 1 if you have the header file. */ #undef HAVE_CORESERVICES_CORESERVICES_H /* Define to 1 if you have the header file. */ #undef HAVE_GCRYPT_H /* Define to 1 if you have the `getaddrinfo' function. */ #undef HAVE_GETADDRINFO /* Define to 1 if you have the header file. */ #undef HAVE_GNUTLS_GNUTLS_H /* Define to 1 if you have the `inet_ntop' function. */ #undef HAVE_INET_NTOP /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `nsl' library (-lnsl). */ #undef HAVE_LIBNSL /* Define to 1 if you have the `resolv' library (-lresolv). */ #undef HAVE_LIBRESOLV /* Define to 1 if you have the `socket' library (-lsocket). */ #undef HAVE_LIBSOCKET /* Define to 1 if you have the `X11' library (-lX11). */ #undef HAVE_LIBX11 /* Define to 1 if you have the `Xext' library (-lXext). */ #undef HAVE_LIBXEXT /* Define to 1 if you have the `Xpm' library (-lXpm). */ #undef HAVE_LIBXPM /* Define to 1 if you have the `z' library (-lz). */ #undef HAVE_LIBZ /* Define to 1 if you have the `memfrob' function. */ #undef HAVE_MEMFROB /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `poll' function. */ #undef HAVE_POLL /* Define to 1 if you have the header file. */ #undef HAVE_REGEX_H /* Define to 1 if you have the header file. */ #undef HAVE_SECURITY_SECURITY_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDIO_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the header file. */ #undef HAVE_X11_XPM_H /* Define to 1 if you have the header file. */ #undef HAVE_XPM_H /* Define if '__attribute__' is supported by the compiler */ #undef HAVE___ATTRIBUTE__ /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define as the return type of signal handlers (`int' or `void'). */ #undef RETSIGTYPE /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* wmbiff's release version */ #undef VERSION /* Define to 1 if the X Window System is missing or not being used. */ #undef X_DISPLAY_MISSING wmbiff-0.4.36/config.sub0000755000207400020740000010645013244306071011770 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2018 Free Software Foundation, Inc. timestamp='2018-02-22' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 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 to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # https://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS or ALIAS Canonicalize a configuration name. Options: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo "$1" exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ kopensolaris*-gnu* | cloudabi*-eabi* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo "$1" | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo "$1" | sed 's/-[^-]*$//'` if [ "$basic_machine" != "$1" ] then os=`echo "$1" | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo "$1" | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo "$1" | sed -e 's/86-.*/86-sequent/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | ba \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | e2k | epiphany \ | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia16 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 | or1k | or1knd | or32 \ | pdp10 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pru \ | pyramid \ | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | visium \ | wasm32 \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; leon|leon[3-9]) basic_machine=sparc-$basic_machine ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | ba-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | e2k-* | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia16-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pru-* \ | pyramid-* \ | riscv32-* | riscv64-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | visium-* \ | wasm32-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-pc os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; asmjs) basic_machine=asmjs-unknown ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2*) basic_machine=m68k-bull os=-sysv3 ;; e500v[12]) basic_machine=powerpc-unknown os=$os"spe" ;; e500v[12]-*) basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=$os"spe" ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo "$1" | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; leon-*|leon[3-9]-*) basic_machine=sparc-`echo "$basic_machine" | sed 's/-.*//'` ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze*) basic_machine=microblaze-xilinx ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i686-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo "$basic_machine" | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; moxiebox) basic_machine=moxie-unknown os=-moxiebox ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo "$basic_machine" | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; nsv-tandem) basic_machine=nsv-tandem ;; nsx-tandem) basic_machine=nsx-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo "$basic_machine" | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh5el) basic_machine=sh5le-unknown ;; simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo "$basic_machine" | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; x64) basic_machine=x86_64-pc ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo "$basic_machine" | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`"$1"\': machine \`"$basic_machine"\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo "$basic_machine" | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo "$basic_machine" | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases that might get confused # with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # es1800 is here to avoid being matched by es* (a different OS) -es1800*) os=-ose ;; # Now accept the basic system types. # The portable systems comes first. # Each alternative MUST end in a * to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* | -cloudabi* | -sortix* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* | -libertybsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* | -glidix* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -midipix* | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* \ | -onefs* | -tirtos* | -phoenix* | -fuchsia* | -redox* | -bme* \ | -midnightbsd*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -xray | -os68k* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo "$os" | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo "$os" | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo "$os" | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4*) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -pikeos*) # Until real need of OS specific support for # particular features comes up, bare metal # configurations are quite functional. case $basic_machine in arm*) os=-eabi ;; *) os=-elf ;; esac ;; -nacl*) ;; -ios) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`"$1"\': system \`"$os"\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; c8051-*) os=-elf ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; pru-*) os=-elf ;; *-be) os=-beos ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo "$basic_machine" | sed "s/unknown/$vendor/"` ;; esac echo "$basic_machine$os" exit # Local variables: # eval: (add-hook 'write-file-functions 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: wmbiff-0.4.36/depcomp0000755000207400020740000005602013644655242011372 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2018-03-07.03; # UTC # Copyright (C) 1999-2020 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" # End: wmbiff-0.4.36/aclocal.m40000644000207400020740000016221313646607003011651 00000000000000# generated automatically by aclocal 1.16.2 -*- Autoconf -*- # Copyright (C) 1996-2020 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # libgcrypt.m4 - Autoconf macros to detect libgcrypt # Copyright (C) 2002, 2003, 2004, 2011, 2014, 2018 g10 Code GmbH # # This file is free software; as a special exception the author gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # # This file is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY, to the extent permitted by law; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # # Last-changed: 2018-11-13 dnl AM_PATH_LIBGCRYPT([MINIMUM-VERSION, dnl [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND ]]]) dnl Test for libgcrypt and define LIBGCRYPT_CFLAGS and LIBGCRYPT_LIBS. dnl MINIMUN-VERSION is a string with the version number optionalliy prefixed dnl with the API version to also check the API compatibility. Example: dnl a MINIMUN-VERSION of 1:1.2.5 won't pass the test unless the installed dnl version of libgcrypt is at least 1.2.5 *and* the API number is 1. Using dnl this features allows to prevent build against newer versions of libgcrypt dnl with a changed API. dnl dnl If a prefix option is not used, the config script is first dnl searched in $SYSROOT/bin and then along $PATH. If the used dnl config script does not match the host specification the script dnl is added to the gpg_config_script_warn variable. dnl AC_DEFUN([AM_PATH_LIBGCRYPT], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_ARG_WITH(libgcrypt-prefix, AC_HELP_STRING([--with-libgcrypt-prefix=PFX], [prefix where LIBGCRYPT is installed (optional)]), libgcrypt_config_prefix="$withval", libgcrypt_config_prefix="") if test x"${LIBGCRYPT_CONFIG}" = x ; then if test x"${libgcrypt_config_prefix}" != x ; then LIBGCRYPT_CONFIG="${libgcrypt_config_prefix}/bin/libgcrypt-config" fi fi use_gpgrt_config="" if test x"${LIBGCRYPT_CONFIG}" = x -a x"$GPGRT_CONFIG" != x -a "$GPGRT_CONFIG" != "no"; then if $GPGRT_CONFIG libgcrypt --exists; then LIBGCRYPT_CONFIG="$GPGRT_CONFIG libgcrypt" AC_MSG_NOTICE([Use gpgrt-config as libgcrypt-config]) use_gpgrt_config=yes fi fi if test -z "$use_gpgrt_config"; then if test x"${LIBGCRYPT_CONFIG}" = x ; then case "${SYSROOT}" in /*) if test -x "${SYSROOT}/bin/libgcrypt-config" ; then LIBGCRYPT_CONFIG="${SYSROOT}/bin/libgcrypt-config" fi ;; '') ;; *) AC_MSG_WARN([Ignoring \$SYSROOT as it is not an absolute path.]) ;; esac fi AC_PATH_PROG(LIBGCRYPT_CONFIG, libgcrypt-config, no) fi tmp=ifelse([$1], ,1:1.2.0,$1) if echo "$tmp" | grep ':' >/dev/null 2>/dev/null ; then req_libgcrypt_api=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\1/'` min_libgcrypt_version=`echo "$tmp" | sed 's/\(.*\):\(.*\)/\2/'` else req_libgcrypt_api=0 min_libgcrypt_version="$tmp" fi AC_MSG_CHECKING(for LIBGCRYPT - version >= $min_libgcrypt_version) ok=no if test "$LIBGCRYPT_CONFIG" != "no" ; then req_major=`echo $min_libgcrypt_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\1/'` req_minor=`echo $min_libgcrypt_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\2/'` req_micro=`echo $min_libgcrypt_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\)/\3/'` if test -z "$use_gpgrt_config"; then libgcrypt_config_version=`$LIBGCRYPT_CONFIG --version` else libgcrypt_config_version=`$LIBGCRYPT_CONFIG --modversion` fi major=`echo $libgcrypt_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\1/'` minor=`echo $libgcrypt_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\2/'` micro=`echo $libgcrypt_config_version | \ sed 's/\([[0-9]]*\)\.\([[0-9]]*\)\.\([[0-9]]*\).*/\3/'` if test "$major" -gt "$req_major"; then ok=yes else if test "$major" -eq "$req_major"; then if test "$minor" -gt "$req_minor"; then ok=yes else if test "$minor" -eq "$req_minor"; then if test "$micro" -ge "$req_micro"; then ok=yes fi fi fi fi fi fi if test $ok = yes; then AC_MSG_RESULT([yes ($libgcrypt_config_version)]) else AC_MSG_RESULT(no) fi if test $ok = yes; then # If we have a recent libgcrypt, we should also check that the # API is compatible if test "$req_libgcrypt_api" -gt 0 ; then if test -z "$use_gpgrt_config"; then tmp=`$LIBGCRYPT_CONFIG --api-version 2>/dev/null || echo 0` else tmp=`$LIBGCRYPT_CONFIG --variable=api_version 2>/dev/null || echo 0` fi if test "$tmp" -gt 0 ; then AC_MSG_CHECKING([LIBGCRYPT API version]) if test "$req_libgcrypt_api" -eq "$tmp" ; then AC_MSG_RESULT([okay]) else ok=no AC_MSG_RESULT([does not match. want=$req_libgcrypt_api got=$tmp]) fi fi fi fi if test $ok = yes; then LIBGCRYPT_CFLAGS=`$LIBGCRYPT_CONFIG --cflags` LIBGCRYPT_LIBS=`$LIBGCRYPT_CONFIG --libs` ifelse([$2], , :, [$2]) if test -z "$use_gpgrt_config"; then libgcrypt_config_host=`$LIBGCRYPT_CONFIG --host 2>/dev/null || echo none` else libgcrypt_config_host=`$LIBGCRYPT_CONFIG --variable=host 2>/dev/null || echo none` fi if test x"$libgcrypt_config_host" != xnone ; then if test x"$libgcrypt_config_host" != x"$host" ; then AC_MSG_WARN([[ *** *** The config script "$LIBGCRYPT_CONFIG" was *** built for $libgcrypt_config_host and thus may not match the *** used host $host. *** You may want to use the configure option --with-libgcrypt-prefix *** to specify a matching config script or use \$SYSROOT. ***]]) gpg_config_script_warn="$gpg_config_script_warn libgcrypt" fi fi else LIBGCRYPT_CFLAGS="" LIBGCRYPT_LIBS="" ifelse([$3], , :, [$3]) fi AC_SUBST(LIBGCRYPT_CFLAGS) AC_SUBST(LIBGCRYPT_LIBS) ]) dnl pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- dnl serial 11 (pkg-config-0.29) dnl dnl Copyright © 2004 Scott James Remnant . dnl Copyright © 2012-2015 Dan Nicholson dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, but dnl WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU dnl General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, write to the Free Software dnl Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA dnl 02111-1307, USA. dnl dnl As a special exception to the GNU General Public License, if you dnl distribute this file as part of a program that contains a dnl configuration script generated by Autoconf, you may include it under dnl the same distribution terms that you use for the rest of that dnl program. dnl PKG_PREREQ(MIN-VERSION) dnl ----------------------- dnl Since: 0.29 dnl dnl Verify that the version of the pkg-config macros are at least dnl MIN-VERSION. Unlike PKG_PROG_PKG_CONFIG, which checks the user's dnl installed version of pkg-config, this checks the developer's version dnl of pkg.m4 when generating configure. dnl dnl To ensure that this macro is defined, also add: dnl m4_ifndef([PKG_PREREQ], dnl [m4_fatal([must install pkg-config 0.29 or later before running autoconf/autogen])]) dnl dnl See the "Since" comment for each macro you use to see what version dnl of the macros you require. m4_defun([PKG_PREREQ], [m4_define([PKG_MACROS_VERSION], [0.29]) m4_if(m4_version_compare(PKG_MACROS_VERSION, [$1]), -1, [m4_fatal([pkg.m4 version $1 or higher is required but ]PKG_MACROS_VERSION[ found])]) ])dnl PKG_PREREQ dnl PKG_PROG_PKG_CONFIG([MIN-VERSION]) dnl ---------------------------------- dnl Since: 0.16 dnl dnl Search for the pkg-config tool and set the PKG_CONFIG variable to dnl first found in the path. Checks that the version of pkg-config found dnl is at least MIN-VERSION. If MIN-VERSION is not specified, 0.9.0 is dnl used since that's the first version where most current features of dnl pkg-config existed. AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])dnl PKG_PROG_PKG_CONFIG dnl PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl ------------------------------------------------------------------- dnl Since: 0.18 dnl dnl Check to see whether a particular set of modules exists. Similar to dnl PKG_CHECK_MODULES(), but does not set variables or print errors. dnl dnl Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) dnl only at the first occurence in configure.ac, so if the first place dnl it's called might be skipped (such as if it is within an "if", you dnl have to call PKG_CHECK_EXISTS manually AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) dnl _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) dnl --------------------------------------------- dnl Internal wrapper calling pkg-config via PKG_CONFIG and setting dnl pkg_failed based on the result. m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])dnl _PKG_CONFIG dnl _PKG_SHORT_ERRORS_SUPPORTED dnl --------------------------- dnl Internal check to see if pkg-config supports short errors. AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])dnl _PKG_SHORT_ERRORS_SUPPORTED dnl PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], dnl [ACTION-IF-NOT-FOUND]) dnl -------------------------------------------------------------- dnl Since: 0.4.0 dnl dnl Note that if there is a possibility the first call to dnl PKG_CHECK_MODULES might not happen, you should be sure to include an dnl explicit call to PKG_PROG_PKG_CONFIG in your configure.ac AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])dnl PKG_CHECK_MODULES dnl PKG_CHECK_MODULES_STATIC(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], dnl [ACTION-IF-NOT-FOUND]) dnl --------------------------------------------------------------------- dnl Since: 0.29 dnl dnl Checks for existence of MODULES and gathers its build flags with dnl static libraries enabled. Sets VARIABLE-PREFIX_CFLAGS from --cflags dnl and VARIABLE-PREFIX_LIBS from --libs. dnl dnl Note that if there is a possibility the first call to dnl PKG_CHECK_MODULES_STATIC might not happen, you should be sure to dnl include an explicit call to PKG_PROG_PKG_CONFIG in your dnl configure.ac. AC_DEFUN([PKG_CHECK_MODULES_STATIC], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl _save_PKG_CONFIG=$PKG_CONFIG PKG_CONFIG="$PKG_CONFIG --static" PKG_CHECK_MODULES($@) PKG_CONFIG=$_save_PKG_CONFIG[]dnl ])dnl PKG_CHECK_MODULES_STATIC dnl PKG_INSTALLDIR([DIRECTORY]) dnl ------------------------- dnl Since: 0.27 dnl dnl Substitutes the variable pkgconfigdir as the location where a module dnl should install pkg-config .pc files. By default the directory is dnl $libdir/pkgconfig, but the default can be changed by passing dnl DIRECTORY. The user can override through the --with-pkgconfigdir dnl parameter. AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([pkgconfigdir], [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, [with_pkgconfigdir=]pkg_default) AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ])dnl PKG_INSTALLDIR dnl PKG_NOARCH_INSTALLDIR([DIRECTORY]) dnl -------------------------------- dnl Since: 0.27 dnl dnl Substitutes the variable noarch_pkgconfigdir as the location where a dnl module should install arch-independent pkg-config .pc files. By dnl default the directory is $datadir/pkgconfig, but the default can be dnl changed by passing DIRECTORY. The user can override through the dnl --with-noarch-pkgconfigdir parameter. AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([noarch-pkgconfigdir], [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, [with_noarch_pkgconfigdir=]pkg_default) AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ])dnl PKG_NOARCH_INSTALLDIR dnl PKG_CHECK_VAR(VARIABLE, MODULE, CONFIG-VARIABLE, dnl [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) dnl ------------------------------------------- dnl Since: 0.28 dnl dnl Retrieves the value of the pkg-config variable for the given module. AC_DEFUN([PKG_CHECK_VAR], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1], [value of $3 for $2, overriding pkg-config])dnl _PKG_CONFIG([$1], [variable="][$3]["], [$2]) AS_VAR_COPY([$1], [pkg_cv_][$1]) AS_VAR_IF([$1], [""], [$5], [$4])dnl ])dnl PKG_CHECK_VAR # Copyright (C) 2002-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.16' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.16.2], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.16.2])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. # TODO: see whether this extra hack can be removed once we start # requiring Autoconf 2.70 or later. AS_CASE([$CONFIG_FILES], [*\'*], [eval set x "$CONFIG_FILES"], [*], [set x $CONFIG_FILES]) shift # Used to flag and report bootstrapping failures. am_rc=0 for am_mf do # Strip MF so we end up with the name of the file. am_mf=`AS_ECHO(["$am_mf"]) | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile which includes # dependency-tracking related rules and includes. # Grep'ing the whole file directly is not great: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ || continue am_dirpart=`AS_DIRNAME(["$am_mf"])` am_filepart=`AS_BASENAME(["$am_mf"])` AM_RUN_LOG([cd "$am_dirpart" \ && sed -e '/# am--include-marker/d' "$am_filepart" \ | $MAKE -f - am--depfiles]) || am_rc=$? done if test $am_rc -ne 0; then AC_MSG_FAILURE([Something went wrong bootstrapping makefile fragments for automatic dependency tracking. If GNU make was not used, consider re-running the configure script with MAKE="gmake" (or whatever is necessary). You can also try re-running configure with the '--disable-dependency-tracking' option to at least be able to build the package (albeit without support for automatic dependency tracking).]) fi AS_UNSET([am_dirpart]) AS_UNSET([am_filepart]) AS_UNSET([am_mf]) AS_UNSET([am_rc]) rm -f conftest-deps.mk } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking is enabled. # This creates each '.Po' and '.Plo' makefile fragment that we'll need in # order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}"])]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- # Check whether make has an 'include' directive that can support all # the idioms we need for our automatic dependency tracking code. AC_DEFUN([AM_MAKE_INCLUDE], [AC_MSG_CHECKING([whether ${MAKE-make} supports the include directive]) cat > confinc.mk << 'END' am__doit: @echo this is the am__doit target >confinc.out .PHONY: am__doit END am__include="#" am__quote= # BSD make does it like this. echo '.include "confinc.mk" # ignored' > confmf.BSD # Other make implementations (GNU, Solaris 10, AIX) do it like this. echo 'include confinc.mk # ignored' > confmf.GNU _am_result=no for s in GNU BSD; do AM_RUN_LOG([${MAKE-make} -f confmf.$s && cat confinc.out]) AS_CASE([$?:`cat confinc.out 2>/dev/null`], ['0:this is the am__doit target'], [AS_CASE([$s], [BSD], [am__include='.include' am__quote='"'], [am__include='include' am__quote=''])]) if test "$am__include" != "#"; then _am_result="yes ($s style)" break fi done rm -f confinc.* confmf.* AC_MSG_RESULT([${_am_result}]) AC_SUBST([am__include])]) AC_SUBST([am__quote])]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2020 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR wmbiff-0.4.36/TODO0000644000207400020740000001041713465246305010502 00000000000000This is not a prioritized list. Patches that accomplish these todo items are welcome. * Config file rewrite The current configuration file has the following problems ** # comments make #'s unsuitable for passwords. ** : and @ delimiters make such characters unsuitable for passwords. ** the hierarchical configuration is not exported cleanly, setting a default and then propagating or overriding it requires an odd syntax. ** elements with spaces are problematic ** annotations / customizations (such as the authentication methods) are cumbersome. ** continuation lines would allow richer shell actions without external shell scripts. * GNUTLS 0.5.9 ** adds gnutls_set_default_priority, which could clean up a lot of the code to set priorities for ciphers that don't really matter to wmbiff. * Font support ** Erase counts > 1000 successfully (redraw the whole line) ** Discover height of the font, scale appropriately. ** Draw relative to symbolic width, height. * Finish checking .wmbiffrc permissions. With shell command execution support, it is even more important to protect against other/group writability. With passwords in the .wmbiffrc, .wmbiffrc shouldn't be readable. It might be best to complain all the time, but only abort when a password is used from a readable file, or a shell command is executed from a writable file. * Better timeout handling Sometimes my IMAP server is slow... well, it's my fault that I keep a few thousand messages on it. The current timeout code will cause it to fail prematurely. * Generic constructors for mboxes. There's some common code across different Clients; this is one piece that could use refactoring. * Add more shell "recipes" besides gicu. Just added 'finger'. I'm hoping to add something to integrate 'remind' just as soon as I can figure it out. * Support on/off status LED's, for, for example, grep eth0 /proc/net/dev | wc -l The colored LED's are already in WMBiff's pixmap. * Support buttons 4 and 5 The mousewheel could be useful for some behaviors, like controlling volume, or selecting different mailboxes. * Use a helper program to blink keyboard led's. Requires killing the 'notify' program when new mail no longer exists. Keyboard blinking is done via a helper program because it requires root. ledcontrol seems ok, but extra complicated, and has a useless default install that requires root. xbuffy's led program seems quite good, but depending on another biff program seems odd. * Add a failure-expect case in tlsComm. For example, an IMAP status query has a good response (* STATUS) and a bad response (a003 NO STATUS). As soon as one of them is received, we're done. * Reload .wmbiffrc when it changes This is straightforward, except for IMAP mailboxes that keep a connection to the server open. A close function will have to be implemented to shut those down gracefully. Do not involve sighup or any other signals. Use or improve fileHasChanged(). * Runtime back-tick expansion for non-mbox Because interesting mailboxes can be defined by date, though its not clear any other clients can take advantage. * Support GSSAPI or SASL authentication Authentication using krb5 would be sweet. * Unlikely to get done, unless someone volunteers: * KDE/Gnome users: Test with KDE or gnome-panel Does Debian bug #108529 apply to wmbiff? Can wmbiff be swallowed by gnome-panel? It seems possible. It appears to be swallowed by FVWM correctly. * Autoconf / Automake Wizards: fix FromCVS.sh How best to deal with libgnutls's macros? All I can do is hack. * Paranoid Pop People: Support POP over TLS. tlsComm.c should make it easy to provide TLS support for POP. Unfortunately, this would only be useful for someone who has such a server that doesn't support IMAPS. * MH support Try "path.n=shell:::ls -1 directoryname | wc -l". If it works, tell us. Optionally the patch at sourceforge could be integrated. * Recursive maildir support Aggregation in general is an oft-desired feature. * G-Mail support Though the business model of free mail forces screen scrubbing, having someone else write and maintain the interface seems like it would significantly improve the utility of gmail. $Id: TODO,v 1.21 2004/10/31 22:08:42 bluehal Exp $ Local Variables: mode: outline End: