libsylph-1.1.0/0000777000175000017500000000000010760423125010344 500000000000000libsylph-1.1.0/Makefile.in0000644000175000017500000003050510760423124012327 00000000000000# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am # Copyright (C) 1994, 1995-8, 1999, 2001 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. SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include DESTDIR = pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = . ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_alias = @build_alias@ build_triplet = @build@ host_alias = @host_alias@ host_triplet = @host@ target_alias = @target_alias@ target_triplet = @target@ AR = @AR@ AS = @AS@ BUILD_REVISION = @BUILD_REVISION@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CPP = @CPP@ CXX = @CXX@ CXXCPP = @CXXCPP@ DATADIRNAME = @DATADIRNAME@ DLLTOOL = @DLLTOOL@ ECHO = @ECHO@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ GCJ = @GCJ@ GCJFLAGS = @GCJFLAGS@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GLIB_MKENUMS = @GLIB_MKENUMS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GOBJECT_QUERY = @GOBJECT_QUERY@ HAVE_LIB = @HAVE_LIB@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LEX = @LEX@ LIB = @LIB@ LIBICONV = @LIBICONV@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIB = @LTLIB@ LTLIBICONV = @LTLIBICONV@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ MAJOR_VERSION = @MAJOR_VERSION@ MAKEINFO = @MAKEINFO@ MICRO_VERSION = @MICRO_VERSION@ MINOR_VERSION = @MINOR_VERSION@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT_OPTS = @MSGFMT_OPTS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ RC = @RC@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WINDRES = @WINDRES@ YACC = @YACC@ localedir = @localedir@ SUBDIRS = ac doc examples libsylph po EXTRA_DIST = config.rpath INSTALL.ja README.ja autogen.sh makewin32.sh mime.types BZIP2_ENV = ACLOCAL_AMFLAGS = -I m4 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = DIST_COMMON = README ./stamp-h.in ABOUT-NLS AUTHORS COPYING ChangeLog \ INSTALL Makefile.am Makefile.in NEWS TODO aclocal.m4 config.guess \ config.h.in config.sub configure configure.in install-sh ltmain.sh \ missing mkinstalldirs DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.in cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(srcdir)/configure: @MAINTAINER_MODE_TRUE@$(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES) cd $(srcdir) && $(AUTOCONF) config.h: stamp-h @if test ! -f $@; then \ rm -f stamp-h; \ $(MAKE) stamp-h; \ else :; fi stamp-h: $(srcdir)/config.h.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES= CONFIG_HEADERS=config.h \ $(SHELL) ./config.status @echo timestamp > stamp-h 2> /dev/null $(srcdir)/config.h.in: @MAINTAINER_MODE_TRUE@$(srcdir)/stamp-h.in @if test ! -f $@; then \ rm -f $(srcdir)/stamp-h.in; \ $(MAKE) $(srcdir)/stamp-h.in; \ else :; fi $(srcdir)/stamp-h.in: $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOHEADER) @echo timestamp > $(srcdir)/stamp-h.in 2> /dev/null mostlyclean-hdr: clean-hdr: distclean-hdr: -rm -f config.h maintainer-clean-hdr: # 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. @SET_MAKE@ all-recursive install-data-recursive install-exec-recursive \ installdirs-recursive install-recursive uninstall-recursive \ check-recursive installcheck-recursive info-recursive dvi-recursive: @set fnord $(MAKEFLAGS); amf=$$2; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" mostlyclean-recursive clean-recursive distclean-recursive \ maintainer-clean-recursive: @set fnord $(MAKEFLAGS); amf=$$2; \ dot_seen=no; \ rev=''; list='$(SUBDIRS)'; for subdir in $$list; do \ rev="$$subdir $$rev"; \ test "$$subdir" != "." || dot_seen=yes; \ done; \ test "$$dot_seen" = "no" && rev=". $$rev"; \ target=`echo $@ | sed s/-recursive//`; \ for subdir in $$rev; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \ done && test -z "$$fail" tags-recursive: list='$(SUBDIRS)'; for subdir in $$list; do \ test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) tags); \ done tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ here=`pwd` && cd $(srcdir) \ && mkid -f$$here/ID $$unique $(LISP) TAGS: tags-recursive $(HEADERS) $(SOURCES) config.h.in $(TAGS_DEPENDENCIES) $(LISP) tags=; \ here=`pwd`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test -f $$subdir/TAGS && tags="$$tags -i $$here/$$subdir/TAGS"; \ fi; \ done; \ list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)config.h.in$$unique$(LISP)$$tags" \ || (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags config.h.in $$unique $(LISP)) mostlyclean-tags: clean-tags: distclean-tags: -rm -f TAGS ID maintainer-clean-tags: distdir = $(PACKAGE)-$(VERSION) top_distdir = $(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 -rm -rf $(distdir) GZIP=$(GZIP_ENV) $(TAR) zxf $(distdir).tar.gz mkdir $(distdir)/=build mkdir $(distdir)/=inst dc_install_base=`cd $(distdir)/=inst && pwd`; \ cd $(distdir)/=build \ && ../configure --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) dist -rm -rf $(distdir) @banner="$(distdir).tar.gz is ready for distribution"; \ dashes=`echo "$$banner" | sed s/./=/g`; \ echo "$$dashes"; \ echo "$$banner"; \ echo "$$dashes" dist: distdir -chmod -R a+r $(distdir) GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) -rm -rf $(distdir) dist-all: distdir -chmod -R a+r $(distdir) GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) -rm -rf $(distdir) distdir: $(DISTFILES) -rm -rf $(distdir) mkdir $(distdir) -chmod 777 $(distdir) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done for subdir in $(SUBDIRS); do \ if test "$$subdir" = .; then :; else \ test -d $(distdir)/$$subdir \ || mkdir $(distdir)/$$subdir \ || exit 1; \ chmod 777 $(distdir)/$$subdir; \ (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir=../$(distdir) distdir=../$(distdir)/$$subdir distdir) \ || exit 1; \ fi; \ done info-am: info: info-recursive dvi-am: dvi: dvi-recursive check-am: all-am check: check-recursive installcheck-am: installcheck: installcheck-recursive all-recursive-am: config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive install-exec-am: install-exec: install-exec-recursive install-data-am: install-data: install-data-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-recursive uninstall-am: uninstall: uninstall-recursive all-am: Makefile config.h all-redirect: all-recursive-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: installdirs-recursive installdirs-am: mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: mostlyclean-am: mostlyclean-hdr mostlyclean-tags mostlyclean-generic mostlyclean: mostlyclean-recursive clean-am: clean-hdr clean-tags clean-generic mostlyclean-am clean: clean-recursive distclean-am: distclean-hdr distclean-tags distclean-generic clean-am -rm -f libtool distclean: distclean-recursive -rm -f config.status maintainer-clean-am: maintainer-clean-hdr maintainer-clean-tags \ maintainer-clean-generic distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." maintainer-clean: maintainer-clean-recursive -rm -f config.status .PHONY: mostlyclean-hdr distclean-hdr clean-hdr maintainer-clean-hdr \ install-data-recursive uninstall-data-recursive install-exec-recursive \ uninstall-exec-recursive installdirs-recursive uninstalldirs-recursive \ all-recursive check-recursive installcheck-recursive info-recursive \ dvi-recursive mostlyclean-recursive distclean-recursive clean-recursive \ maintainer-clean-recursive tags tags-recursive mostlyclean-tags \ distclean-tags clean-tags maintainer-clean-tags distdir info-am info \ dvi-am dvi check check-am installcheck-am installcheck all-recursive-am \ install-exec-am install-exec install-data-am install-data install-am \ install uninstall-am uninstall all-redirect all-am all installdirs-am \ installdirs mostlyclean-generic distclean-generic clean-generic \ maintainer-clean-generic clean mostlyclean distclean maintainer-clean release: distdir -chmod -R a+r $(distdir) GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) BZIP2=$(BZIP2_ENV) $(TAR) --bzip2 -chof $(distdir).tar.bz2 $(distdir) -rm -rf $(distdir) # 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: libsylph-1.1.0/README0000644000175000017500000001101010760422022011124 00000000000000 LibSylph -- E-Mail client library Copyright (C) 1999-2008 Hiroyuki Yamamoto This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA For more details see the file COPYING. What's LibSylph =============== LibSylph is an e-mail client library which is derived from Sylpheed. LibSylph is a lightweight but featureful library. It has many common e-mail related features and other useful functions, and you can utilize them from your application. Moreover you can create a new e-mail client by wrapping LibSylph with any UI. LibSylph is a free software distributed under the GNU LGPL. Currently implemented major features ==================================== Supported protocols o POP3 o IMAP4rev1 o SMTP o NNTP o SSL/TLSv1 (POP3, SMTP, IMAP4rev1, NNTP) o IPv6 Features o OOP-like message management o multiple accounts o powerful filtering o powerful search (query search and search folder) o MIME handling o SMTP AUTH support (PLAIN / LOGIN / CRAM-MD5) o CRAM-MD5 authentication (SMTP AUTH / IMAP4rev1) o APOP authentication (POP3) o multiple MH folder support o per-folder configuration o autoconf, automake support o internationalization of messages by gettext o m17n (multilingualization) support and more. Installation ============ See INSTALL for installation instructions. Usage ===== Preparation before running -------------------------- If you are using a character encodings other than UTF-8 for filename on Unix-like OS, you must set the following environmental variable (it will not work correctly if it is not specified): (use locale-specific encoding) % export G_FILENAME_ENCODING=@locale or (manually specifying encoding) % export G_FILENAME_ENCODING=ISO-8859-1 If you want to display messages translated to your language, you must specify some environmental variables related to locale. For example: % export LANG=de_DE (replace de_DE to the actual locale name) If you don't want translated messages, set LC_MESSAGES to "C" (and unset LC_ALL if specified). How to use ---------- The simplest way for linking: gcc -o foo foo.c `pkg-config glib-2.0 --cflags --libs` -lsylph If you want to auto detect LibSylph with configure script, use the following in configure.ac: AC_ARG_WITH(libsylph, [AC_HELP_STRING([--with-libsylph=DIR], [search for LibSylph in DIR/include and DIR/lib])], [if test "x$with_libsylph" != x; then CPPFLAGS="$CPPFLAGS -I$with_libsylph/include" LDFLAGS="$LDFLAGS -L$with_libsylph/lib" fi]) AC_CHECK_LIB(sylph, syl_init,, AC_MSG_ERROR(Test for LibSylph failed.)) There are sample programs under examples directory in the distributed packages. The method of compilation is described at the head of the sources as a comment. The license of these sample programs is public domain. See examples/README for details. Documentation ------------- The reference manuals are under doc directory (Japanese). See doc/README.ja for details. Information =========== You can check the newest version and information about Sylpheed and LibSylph at: http://sylpheed.sraoss.jp/ Feedback ======== Comments, ideas and (most of all) bug reports (and especially patches) are very welcome. Subversion ========== You can get the newest source code from the Subversion repository. To retrieve Sylpheed trunk tree, move to an appropriate directory, and run the command: svn checkout svn://sylpheed.sraoss.jp/sylpheed/trunk Then a source tree named 'trunk' will be created under the current directory. The subdirectory of sylpheed is divided as following: * trunk/ Main tree * branches/ Miscellaneous experimental branches * tags/ Release-tagged branches To update to the newest source tree, run the command: svn update at the target directory. The libsylph branch is located at branches/libsylph . -- Hiroyuki Yamamoto libsylph-1.1.0/stamp-h.in0000644000175000017500000000001210760423111012145 00000000000000timestamp libsylph-1.1.0/ABOUT-NLS0000644000175000017500000015113010457702571011520 00000000000000Notes on the Free Translation Project ************************************* Free software is going international! The Free Translation Project is a way to get maintainers of free software, translators, and users all together, so that free software will gradually become able to speak many languages. A few packages already provide translations for their messages. If you found this `ABOUT-NLS' file inside a distribution, you may assume that the distributed package does use GNU `gettext' internally, itself available at your nearest GNU archive site. But you do _not_ need to install GNU `gettext' prior to configuring, installing or using this package with messages translated. Installers will find here some useful hints. These notes also explain how users should proceed for getting the programs to use the available translations. They tell how people wanting to contribute and work on translations can contact the appropriate team. When reporting bugs in the `intl/' directory or bugs which may be related to internationalization, you should tell about the version of `gettext' which is used. The information can be found in the `intl/VERSION' file, in internationalized packages. Quick configuration advice ========================== If you want to exploit the full power of internationalization, you should configure it using ./configure --with-included-gettext to force usage of internationalizing routines provided within this package, despite the existence of internationalizing capabilities in the operating system where this package is being installed. So far, only the `gettext' implementation in the GNU C library version 2 provides as many features (such as locale alias, message inheritance, automatic charset conversion or plural form handling) as the implementation here. It is also not possible to offer this additional functionality on top of a `catgets' implementation. Future versions of GNU `gettext' will very likely convey even more functionality. So it might be a good idea to change to GNU `gettext' as soon as possible. So you need _not_ provide this option if you are using GNU libc 2 or you have installed a recent copy of the GNU gettext package with the included `libintl'. INSTALL Matters =============== Some packages are "localizable" when properly installed; the programs they contain can be made to speak your own native language. Most such packages use GNU `gettext'. Other packages have their own ways to internationalization, predating GNU `gettext'. By default, this package will be installed to allow translation of messages. It will automatically detect whether the system already provides the GNU `gettext' functions. If not, the included GNU `gettext' library will be used. This library is wholly contained within this package, usually in the `intl/' subdirectory, so prior installation of the GNU `gettext' package is _not_ required. Installers may use special options at configuration time for changing the default behaviour. The commands: ./configure --with-included-gettext ./configure --disable-nls will, respectively, bypass any pre-existing `gettext' to use the internationalizing routines provided within this package, or else, _totally_ disable translation of messages. When you already have GNU `gettext' installed on your system and run configure without an option for your new package, `configure' will probably detect the previously built and installed `libintl.a' file and will decide to use this. This might not be desirable. You should use the more recent version of the GNU `gettext' library. I.e. if the file `intl/VERSION' shows that the library which comes with this package is more recent, you should use ./configure --with-included-gettext to prevent auto-detection. The configuration process will not test for the `catgets' function and therefore it will not be used. The reason is that even an emulation of `gettext' on top of `catgets' could not provide all the extensions of the GNU `gettext' library. Internationalized packages usually have many `po/LL.po' files, where LL gives an ISO 639 two-letter code identifying the language. Unless translations have been forbidden at `configure' time by using the `--disable-nls' switch, all available translations are installed together with the package. However, the environment variable `LINGUAS' may be set, prior to configuration, to limit the installed set. `LINGUAS' should then contain a space separated list of two-letter codes, stating which languages are allowed. Using This Package ================== As a user, if your language has been installed for this package, you only have to set the `LANG' environment variable to the appropriate `LL_CC' combination. Here `LL' is an ISO 639 two-letter language code, and `CC' is an ISO 3166 two-letter country code. For example, let's suppose that you speak German and live in Germany. At the shell prompt, merely execute `setenv LANG de_DE' (in `csh'), `export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash'). This can be done from your `.login' or `.profile' file, once and for all. You might think that the country code specification is redundant. But in fact, some languages have dialects in different countries. For example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The country code serves to distinguish the dialects. The locale naming convention of `LL_CC', with `LL' denoting the language and `CC' denoting the country, is the one use on systems based on GNU libc. On other systems, some variations of this scheme are used, such as `LL' or `LL_CC.ENCODING'. You can get the list of locales supported by your system for your country by running the command `locale -a | grep '^LL''. Not all programs have translations for all languages. By default, an English message is shown in place of a nonexistent translation. If you understand other languages, you can set up a priority list of languages. This is done through a different environment variable, called `LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG' for the purpose of message handling, but you still need to have `LANG' set to the primary language; this is required by other parts of the system libraries. For example, some Swedish users who would rather read translations in German than English for when Swedish is not available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'. Special advice for Norwegian users: The language code for Norwegian bokma*l changed from `no' to `nb' recently (in 2003). During the transition period, while some message catalogs for this language are installed under `nb' and some older ones under `no', it's recommended for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and older translations are used. In the `LANGUAGE' environment variable, but not in the `LANG' environment variable, `LL_CC' combinations can be abbreviated as `LL' to denote the language's main dialect. For example, `de' is equivalent to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT' (Portuguese as spoken in Portugal) in this context. Translating Teams ================= For the Free Translation Project to be a success, we need interested people who like their own language and write it well, and who are also able to synergize with other translators speaking the same language. Each translation team has its own mailing list. The up-to-date list of teams can be found at the Free Translation Project's homepage, `http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams" area. If you'd like to volunteer to _work_ at translating messages, you should become a member of the translating team for your own language. The subscribing address is _not_ the same as the list itself, it has `-request' appended. For example, speakers of Swedish can send a message to `sv-request@li.org', having this message body: subscribe Keep in mind that team members are expected to participate _actively_ in translations, or at solving translational difficulties, rather than merely lurking around. If your team does not exist yet and you want to start one, or if you are unsure about what to do or how to get started, please write to `translation@iro.umontreal.ca' to reach the coordinator for all translator teams. The English team is special. It works at improving and uniformizing the terminology in use. Proven linguistic skill are praised more than programming skill, here. Available Packages ================== Languages are not equally supported in all packages. The following matrix shows the current state of internationalization, as of January 2004. The matrix shows, in regard of each package, for which languages PO files have been submitted to translation coordination, with a translation percentage of at least 50%. Ready PO files af am ar az be bg bs ca cs da de el en en_GB eo es +----------------------------------------------------+ a2ps | [] [] [] [] | aegis | () | ant-phone | () | anubis | | ap-utils | | aspell | [] | bash | [] [] [] [] | batchelor | | bfd | [] [] | binutils | [] [] | bison | [] [] [] | bluez-pin | [] [] [] | clisp | | clisp | [] [] [] | console-tools | [] [] | coreutils | [] [] [] [] | cpio | [] [] [] | darkstat | [] () [] | diffutils | [] [] [] [] [] [] [] | e2fsprogs | [] [] [] | enscript | [] [] [] [] | error | [] [] [] [] [] | fetchmail | [] () [] [] [] [] | fileutils | [] [] [] | findutils | [] [] [] [] [] [] [] | flex | [] [] [] [] | fslint | | gas | [] | gawk | [] [] [] [] | gbiff | [] | gcal | [] | gcc | [] [] | gettext | [] [] [] [] [] | gettext-examples | [] [] [] [] | gettext-runtime | [] [] [] [] [] | gettext-tools | [] [] [] | gimp-print | [] [] [] [] [] | gliv | | glunarclock | [] [] | gnubiff | [] | gnucash | [] () [] [] | gnucash-glossary | [] () [] | gnupg | [] () [] [] [] [] | gpe-aerial | [] | gpe-beam | [] [] | gpe-calendar | [] [] | gpe-clock | [] [] | gpe-conf | [] [] | gpe-contacts | [] [] | gpe-edit | [] | gpe-go | [] | gpe-login | [] [] | gpe-ownerinfo | [] [] | gpe-sketchbook | [] [] | gpe-su | [] [] | gpe-taskmanager | [] [] | gpe-timesheet | [] | gpe-today | [] [] | gpe-todo | [] [] | gphoto2 | [] [] [] [] | gprof | [] [] [] | gpsdrive | () () () | gramadoir | [] | grep | [] [] [] [] [] [] | gretl | [] | gtick | [] () | hello | [] [] [] [] [] [] | id-utils | [] [] | indent | [] [] [] [] | iso_3166 | [] [] [] [] [] [] [] [] [] [] | iso_3166_1 | [] [] [] [] [] [] | iso_3166_2 | | iso_3166_3 | [] | iso_4217 | [] [] [] [] | iso_639 | | jpilot | [] [] [] | jtag | | jwhois | [] | kbd | [] [] [] [] [] | latrine | () | ld | [] [] | libc | [] [] [] [] [] [] | libgpewidget | [] [] | libiconv | [] [] [] [] [] | lifelines | [] () | lilypond | [] | lingoteach | | lingoteach_lessons | () () | lynx | [] [] [] [] | m4 | [] [] [] [] | mailutils | [] [] | make | [] [] [] | man-db | [] () [] [] () | minicom | [] [] [] | mysecretdiary | [] [] [] | nano | [] () [] [] [] | nano_1_0 | [] () [] [] [] | opcodes | [] | parted | [] [] [] [] [] | ptx | [] [] [] [] [] | python | | radius | [] | recode | [] [] [] [] [] [] [] | rpm | [] [] | screem | | scrollkeeper | [] [] [] [] [] [] | sed | [] [] [] [] [] [] | sh-utils | [] [] [] | shared-mime-info | | sharutils | [] [] [] [] [] [] | silky | () | skencil | [] () [] | sketch | [] () [] | soundtracker | [] [] [] | sp | [] | tar | [] [] [] [] | texinfo | [] [] [] | textutils | [] [] [] [] | tin | () () | tp-robot | | tuxpaint | [] [] [] [] [] [] [] | unicode-han-tra... | | unicode-transla... | | util-linux | [] [] [] [] [] | vorbis-tools | [] [] [] [] | wastesedge | () | wdiff | [] [] [] [] | wget | [] [] [] [] [] [] | xchat | [] [] [] [] | xfree86_xkb_xml | [] [] | xpad | [] | +----------------------------------------------------+ af am ar az be bg bs ca cs da de el en en_GB eo es 4 0 0 1 9 4 1 40 41 60 78 17 1 5 13 68 et eu fa fi fr ga gl he hr hu id is it ja ko lg +-------------------------------------------------+ a2ps | [] [] [] () () | aegis | | ant-phone | [] | anubis | [] | ap-utils | [] | aspell | [] [] | bash | [] [] | batchelor | [] [] | bfd | [] | binutils | [] [] | bison | [] [] [] [] | bluez-pin | [] [] [] [] [] | clisp | | clisp | [] | console-tools | | coreutils | [] [] [] [] [] [] | cpio | [] [] [] [] | darkstat | () [] [] [] | diffutils | [] [] [] [] [] [] [] | e2fsprogs | | enscript | [] [] | error | [] [] [] [] | fetchmail | [] | fileutils | [] [] [] [] [] [] | findutils | [] [] [] [] [] [] [] [] [] [] [] | flex | [] [] [] | fslint | [] | gas | [] | gawk | [] [] [] | gbiff | [] | gcal | [] | gcc | [] | gettext | [] [] [] | gettext-examples | [] [] | gettext-runtime | [] [] [] [] [] | gettext-tools | [] [] [] | gimp-print | [] [] | gliv | () | glunarclock | [] [] [] [] | gnubiff | [] | gnucash | () [] | gnucash-glossary | [] | gnupg | [] [] [] [] [] [] [] | gpe-aerial | [] | gpe-beam | [] | gpe-calendar | [] [] [] | gpe-clock | [] | gpe-conf | [] | gpe-contacts | [] [] | gpe-edit | [] [] | gpe-go | [] | gpe-login | [] [] | gpe-ownerinfo | [] [] [] | gpe-sketchbook | [] | gpe-su | [] | gpe-taskmanager | [] | gpe-timesheet | [] [] [] | gpe-today | [] [] | gpe-todo | [] [] | gphoto2 | [] [] [] | gprof | [] [] | gpsdrive | () () () | gramadoir | [] [] | grep | [] [] [] [] [] [] [] [] [] [] [] | gretl | [] [] | gtick | [] [] [] | hello | [] [] [] [] [] [] [] [] [] [] [] [] [] | id-utils | [] [] [] [] | indent | [] [] [] [] [] [] [] [] [] | iso_3166 | [] [] [] [] [] [] [] | iso_3166_1 | [] [] [] [] [] | iso_3166_2 | | iso_3166_3 | | iso_4217 | [] [] [] [] [] [] | iso_639 | | jpilot | [] () | jtag | [] | jwhois | [] [] [] [] | kbd | [] | latrine | [] | ld | [] | libc | [] [] [] [] [] [] | libgpewidget | [] [] [] [] | libiconv | [] [] [] [] [] [] [] [] [] | lifelines | () | lilypond | [] | lingoteach | [] [] | lingoteach_lessons | | lynx | [] [] [] [] | m4 | [] [] [] [] | mailutils | | make | [] [] [] [] [] [] | man-db | () () | minicom | [] [] [] [] | mysecretdiary | [] [] | nano | [] [] [] [] | nano_1_0 | [] [] [] [] | opcodes | [] | parted | [] [] [] | ptx | [] [] [] [] [] [] [] | python | | radius | [] | recode | [] [] [] [] [] [] | rpm | [] [] | screem | | scrollkeeper | [] | sed | [] [] [] [] [] [] [] [] [] | sh-utils | [] [] [] [] [] [] [] | shared-mime-info | [] [] [] | sharutils | [] [] [] [] [] | silky | () [] () () | skencil | [] | sketch | [] | soundtracker | [] [] | sp | [] () | tar | [] [] [] [] [] [] [] [] [] | texinfo | [] [] [] [] | textutils | [] [] [] [] [] [] | tin | [] () | tp-robot | [] | tuxpaint | [] [] [] [] [] [] [] [] [] | unicode-han-tra... | | unicode-transla... | [] [] | util-linux | [] [] [] [] () [] | vorbis-tools | [] | wastesedge | () | wdiff | [] [] [] [] [] [] | wget | [] [] [] [] [] [] [] | xchat | [] [] [] | xfree86_xkb_xml | [] [] | xpad | [] [] | +-------------------------------------------------+ et eu fa fi fr ga gl he hr hu id is it ja ko lg 22 2 1 26 106 28 24 8 10 41 33 1 26 33 12 0 lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru +-----------------------------------------------------+ a2ps | [] [] () () [] [] [] | aegis | () () () | ant-phone | [] [] | anubis | [] [] [] [] [] [] | ap-utils | [] () [] | aspell | [] | bash | [] [] [] | batchelor | [] | bfd | [] | binutils | [] | bison | [] [] [] [] [] | bluez-pin | [] [] [] | clisp | | clisp | [] | console-tools | [] | coreutils | [] [] | cpio | [] [] [] [] [] | darkstat | [] [] [] [] | diffutils | [] [] [] [] [] [] | e2fsprogs | [] | enscript | [] [] [] [] | error | [] [] [] | fetchmail | [] [] () [] | fileutils | [] [] [] | findutils | [] [] [] [] [] | flex | [] [] [] [] | fslint | [] [] | gas | | gawk | [] [] [] | gbiff | [] [] | gcal | | gcc | | gettext | [] [] [] | gettext-examples | [] [] [] | gettext-runtime | [] [] [] [] | gettext-tools | [] [] | gimp-print | [] | gliv | [] [] [] | glunarclock | [] [] [] [] | gnubiff | [] | gnucash | [] [] () [] | gnucash-glossary | [] [] | gnupg | [] | gpe-aerial | [] [] [] [] | gpe-beam | [] [] [] [] | gpe-calendar | [] [] [] [] | gpe-clock | [] [] [] [] | gpe-conf | [] [] [] [] | gpe-contacts | [] [] [] [] | gpe-edit | [] [] [] [] | gpe-go | [] [] [] | gpe-login | [] [] [] [] | gpe-ownerinfo | [] [] [] [] | gpe-sketchbook | [] [] [] [] | gpe-su | [] [] [] [] | gpe-taskmanager | [] [] [] [] | gpe-timesheet | [] [] [] [] | gpe-today | [] [] [] [] | gpe-todo | [] [] [] [] | gphoto2 | [] | gprof | [] [] | gpsdrive | () () [] | gramadoir | () [] | grep | [] [] [] [] [] | gretl | | gtick | [] [] [] | hello | [] [] [] [] [] [] [] [] [] [] | id-utils | [] [] [] [] | indent | [] [] [] [] | iso_3166 | [] [] [] | iso_3166_1 | [] [] | iso_3166_2 | | iso_3166_3 | [] | iso_4217 | [] [] [] [] [] [] [] [] | iso_639 | [] | jpilot | () () | jtag | | jwhois | [] [] [] [] () | kbd | [] [] [] | latrine | [] | ld | | libc | [] [] [] [] | libgpewidget | [] [] [] | libiconv | [] [] [] [] [] | lifelines | | lilypond | | lingoteach | | lingoteach_lessons | | lynx | [] [] [] | m4 | [] [] [] [] [] | mailutils | [] [] [] | make | [] [] [] [] | man-db | [] | minicom | [] [] [] [] | mysecretdiary | [] [] [] | nano | [] [] [] [] [] | nano_1_0 | [] [] [] [] [] [] | opcodes | [] [] | parted | [] [] [] [] | ptx | [] [] [] [] [] [] [] [] | python | | radius | [] [] | recode | [] [] [] [] | rpm | [] [] [] | screem | | scrollkeeper | [] [] [] [] [] | sed | [] [] [] | sh-utils | [] [] | shared-mime-info | [] [] | sharutils | [] [] | silky | () | skencil | [] [] | sketch | [] [] | soundtracker | | sp | | tar | [] [] [] [] [] [] | texinfo | [] [] [] [] | textutils | [] [] | tin | | tp-robot | [] | tuxpaint | [] [] [] [] [] [] [] [] | unicode-han-tra... | | unicode-transla... | | util-linux | [] [] [] | vorbis-tools | [] [] [] | wastesedge | | wdiff | [] [] [] [] [] | wget | [] [] [] | xchat | [] [] [] | xfree86_xkb_xml | [] [] | xpad | [] [] | +-----------------------------------------------------+ lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru 1 2 0 3 12 0 10 69 6 7 1 40 26 36 76 63 sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu +-----------------------------------------------------+ a2ps | [] [] [] [] | 16 aegis | | 0 ant-phone | | 3 anubis | [] [] | 9 ap-utils | () | 3 aspell | | 4 bash | | 9 batchelor | | 3 bfd | [] [] | 6 binutils | [] [] [] | 8 bison | [] [] | 14 bluez-pin | [] [] [] | 14 clisp | | 0 clisp | | 5 console-tools | | 3 coreutils | [] [] [] [] | 16 cpio | [] [] | 14 darkstat | [] [] [] () () | 12 diffutils | [] [] [] | 23 e2fsprogs | [] [] | 6 enscript | [] [] | 12 error | [] [] [] | 15 fetchmail | [] [] | 11 fileutils | [] [] [] [] [] | 17 findutils | [] [] [] [] [] [] | 29 flex | [] [] | 13 fslint | | 3 gas | [] | 3 gawk | [] [] | 12 gbiff | | 4 gcal | [] [] | 4 gcc | [] | 4 gettext | [] [] [] [] [] | 16 gettext-examples | [] [] [] [] [] | 14 gettext-runtime | [] [] [] [] [] [] [] [] | 22 gettext-tools | [] [] [] [] [] [] | 14 gimp-print | [] [] | 10 gliv | | 3 glunarclock | [] [] [] | 13 gnubiff | | 3 gnucash | [] [] | 9 gnucash-glossary | [] [] [] | 8 gnupg | [] [] [] [] | 17 gpe-aerial | [] | 7 gpe-beam | [] | 8 gpe-calendar | [] [] [] [] | 13 gpe-clock | [] [] [] | 10 gpe-conf | [] [] | 9 gpe-contacts | [] [] [] | 11 gpe-edit | [] [] [] [] [] | 12 gpe-go | | 5 gpe-login | [] [] [] [] [] | 13 gpe-ownerinfo | [] [] [] [] | 13 gpe-sketchbook | [] [] | 9 gpe-su | [] [] [] | 10 gpe-taskmanager | [] [] [] | 10 gpe-timesheet | [] [] [] [] | 12 gpe-today | [] [] [] [] [] | 13 gpe-todo | [] [] [] [] | 12 gphoto2 | [] [] [] | 11 gprof | [] [] | 9 gpsdrive | [] [] | 3 gramadoir | [] | 5 grep | [] [] [] [] | 26 gretl | | 3 gtick | | 7 hello | [] [] [] [] [] | 34 id-utils | [] [] | 12 indent | [] [] [] [] | 21 iso_3166 | [] [] [] [] [] [] [] | 27 iso_3166_1 | [] [] [] | 16 iso_3166_2 | | 0 iso_3166_3 | | 2 iso_4217 | [] [] [] [] [] [] | 24 iso_639 | | 1 jpilot | [] [] [] [] [] | 9 jtag | [] | 2 jwhois | () [] [] | 11 kbd | [] [] | 11 latrine | | 2 ld | [] [] | 5 libc | [] [] [] [] | 20 libgpewidget | [] [] [] [] | 13 libiconv | [] [] [] [] [] [] [] [] | 27 lifelines | [] | 2 lilypond | [] | 3 lingoteach | | 2 lingoteach_lessons | () | 0 lynx | [] [] [] | 14 m4 | [] [] | 15 mailutils | | 5 make | [] [] [] | 16 man-db | [] | 5 minicom | | 11 mysecretdiary | [] [] | 10 nano | [] [] [] [] | 17 nano_1_0 | [] [] [] | 17 opcodes | [] [] | 6 parted | [] [] [] | 15 ptx | [] [] | 22 python | | 0 radius | | 4 recode | [] [] [] | 20 rpm | [] [] | 9 screem | [] [] | 2 scrollkeeper | [] [] [] | 15 sed | [] [] [] [] [] [] | 24 sh-utils | [] [] | 14 shared-mime-info | [] [] | 7 sharutils | [] [] [] [] | 17 silky | () | 3 skencil | [] | 6 sketch | [] | 6 soundtracker | [] [] | 7 sp | [] | 3 tar | [] [] [] [] [] | 24 texinfo | [] [] [] | 14 textutils | [] [] [] [] | 16 tin | | 1 tp-robot | | 2 tuxpaint | [] [] [] [] [] | 29 unicode-han-tra... | | 0 unicode-transla... | | 2 util-linux | [] [] | 15 vorbis-tools | | 8 wastesedge | | 0 wdiff | [] [] [] | 18 wget | [] [] [] [] [] [] [] [] | 24 xchat | [] [] [] [] [] | 15 xfree86_xkb_xml | [] [] [] [] [] | 11 xpad | | 5 +-----------------------------------------------------+ 63 teams sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu 131 domains 47 19 28 83 0 0 59 13 1 1 11 0 22 22 0 1373 Some counters in the preceding matrix are higher than the number of visible blocks let us expect. This is because a few extra PO files are used for implementing regional variants of languages, or language dialects. For a PO file in the matrix above to be effective, the package to which it applies should also have been internationalized and distributed as such by its maintainer. There might be an observable lag between the mere existence a PO file and its wide availability in a distribution. If January 2004 seems to be old, you may fetch a more recent copy of this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date matrix with full percentage details can be found at `http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'. Using `gettext' in new packages =============================== If you are writing a freely available program and want to internationalize it you are welcome to use GNU `gettext' in your package. Of course you have to respect the GNU Library General Public License which covers the use of the GNU `gettext' library. This means in particular that even non-free programs can use `libintl' as a shared library, whereas only free software can use `libintl' as a static library or use modified versions of `libintl'. Once the sources are changed appropriately and the setup can handle the use of `gettext' the only thing missing are the translations. The Free Translation Project is also available for packages which are not developed inside the GNU project. Therefore the information given above applies also for every other Free Software Project. Contact `translation@iro.umontreal.ca' to make the `.pot' files available to the translation teams. libsylph-1.1.0/AUTHORS0000644000175000017500000000410310457702571011336 00000000000000main-branch (http://sylpheed.good-day.net) Hiroyuki Yamamoto claws-branch (http://sylpheed-claws.sourceforge.net) Hoa viet Dinh Match Grun Melvin Hadasht Christoph Hohmann Alfons Hoogervorst Darko Koruga Paul Mangan Carsten Schurig Sergey Vlasov Hiroyuki Yamamoto sylpheed-w32 (http://www.gnupg.org/cvs-access.html) Werner Koch user manuals Yoichi Imai (Japanese) Paul Kater (English) application icon WAKAI Kazunao contributors (beside the above; based on Changelog) Alte Pierric Descamps Ohmasa Stephen Anthony HIRAMATSU Masami Jorge Van Hemelryck TAKANO Masahiro Tomita Mathias Intemann Chideok Hwang Marc Hoper David Mehrmann Setoh Yuuki NINOMIYA Suzuki Mio Ishihara Jason McCarver Martin Schaaf Sakamoto Hiramatu John E.P. Hynes Maki Takahashi Leandro Pereira Nishimura Yoichi Imai Tsutsui Yanase TOGAWA Higuchi Paul Rolland KUROSAWA NAKAGAWA HIROSHIMA Tanaka Hashimoto T. Yamamoto YAMAGUCHI Tomita Nishiyama Michihide Hotta Nishika shigeri Tajiri WAKAI Kazunao Rodrigo Dias Arruda Senra Fabio Junior Beneditto Satoshi Nagayasu Jens Oberender Ricardo Mones Lastra Henrik Carlqvist Don Quijote David Looney Eric Limpens Paul Evans wwp Jeroen Versteeg Ravemax Jens Jahnke Thierry Godefroy Matthieu Dazy Jonathan Ware Yasumatsu Stefaan A Eeckels OSHIRO Naoki KAJIWARA Hironori IWANE Manrat Chobchuen Shimamoto "Neko" Tatsuya Jesse Skinner Willem van Engen Tobias Sandhaas Thomas Link Martin Pool Fredrik Olofssen Gustavo Noronha Silva Yukihiro Nakai Watanabe Masaaki Noro Motonobu Ichimura Luca Rosellini Yasuzaki Masayoshi Shawn Houston Neill Miller IWAMOTO Kouichi Sergey Pinaev Hiroyuki Ikezoe mori Michael Schwendt libsylph-1.1.0/COPYING0000644000175000017500000006363710457702571011342 00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin St, 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. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, 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 and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, 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 library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete 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 distribute a copy of this License along with the Library. 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 Library or any portion of it, thus forming a work based on the Library, 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) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, 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 Library, 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 Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you 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. If distribution of 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 satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be 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. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library 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. 9. 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 Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library 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 with this License. 11. 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 Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library 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 Library. 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. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library 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. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser 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 Library 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 Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, 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 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "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 LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. 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 LIBRARY 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 LIBRARY (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 LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), 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 Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. 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 library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! libsylph-1.1.0/ChangeLog0000644000175000017500000001015410760421336012035 000000000000002008-02-25 * version 1.1.0 2008-02-15 * libsylph/socket.c: sock_connect_async_cb() sock_connect_address_list_async(): also watch for G_IO_ERR and G_IO_HUP (fixes busy loop when connection is immediately refused). 2007-12-27 * libsylph/recv.c: merged from trunk. 2007-12-27 * libsylph/pop.c: merged from trunk. * libsylph/pop.c: pop3_getauth_apop_send() pop3_session_recv_msg(): check for invalid APOP timestamp (CVE-2007-1558), and check for the functions' return value. 2007-12-27 * libsylph/utils.[ch]: merged from trunk (except for In-Reply-To). * libsylph/utils.[ch]: extract_parenthesis_with_escape() extract_quote_with_escape() strsplit_csv() uriencode_for_mailto(): added. 2007-12-27 * libsylph/codeconv.[ch]: merged from trunk. * libsylph/utils.c libsylph/codeconv.c: conv_encode_header(): handle quote correctly (fixes stray quote character appearing after encoding mail headers). * libsylph/codeconv.c: conv_encode_header(): force output of UTF-8 if code conversion failed. * libsylph/codeconv.c: conv_encode_header(): fixed wrong handling of quotation in continuing multi-byte strings. * libsylph/codeconv.c: conv_get_current_locale(): fixed the case when cur_locale = "" (thanks to Elohin Igor'). * libsylph/codeconv.c: conv_encode_header(): use outgoing encoding to determine B or Q encoding instead of MB_CUR_MAX. 2007-12-27 * libsylph/compose.c libsylph/sylmain.c: removed warnings. 2007-12-25 * libsylph/sylmain.c: MAKE_DIR_IF_NOT_EXIST(): fixed a bug that the macro always failed if directory already exist. 2007-11-08 * libsylph/procmime.c: procmime_parse_mime_parameter(): allow spaces around equals between name and value of MIME parameters. * libsylph/procmime.c: procmime_scan_multipart_message(): use heap memory instead of stack for read buffer, and increased the max recursion level to 64. * libsylph/procmime.[ch]: procmime_get_encoding_for_str(): added. 2006-11-29 * README README.ja: updated. 2006-11-28 * doc/*: completed reference manuals. 2006-11-27 * libsylph/uuencode.h: fixed the prototype of touufrombits(). 2006-11-22 * version 1.0.0beta1 2006-11-22 * examples/libsylph-pop.c: added. 2006-11-21 * examples/libsylph-send.c examples/README examples/README.ja doc/README.ja: added. 2006-11-21 * libsylph/utils.c: my_tmpfile(): guard against unset progname. * libsylph/session.c: check whether notify callback is set. * libsylph/smtp.h libsylph/session.h libsylph/socket.h: fixed the offset of struct members independent from configuration. 2006-11-20 * README README.ja INSTALL INSTALL.ja: updated. 2006-11-20 * configure.in: modified libtool version. * examples/libsylph-createmailbox.c: added. 2006-11-20 * libsylph/folder.[ch]: added folder_scan_tree() and folder_create_tree(). 2006-11-20 * libsylph/prefs_common.[ch]: added prefs_common_get(). * libsylph/filter.h: modified the prototype of filter_cond_new(). * libsylph/account.[ch]: added account_get_current_account(). * libsylph/mbox.c: use account_get_current_account(). * libsylph/procmime.[ch]: removed unused procmime_mimeinfo_replace(). 2006-11-02 * doc/*: added reference manuals. 2006-10-13 * libsylph/sylmain.c: syl_setup_rc_dir(): don't exit(). 2006-10-06 * version 0.3.0 2006-10-06 * libsylph/sylmain.[ch]: fixed linking problem. syl_setup_rc_dir(): Return -1 if error occurred. * examples/libsylph-template.c: added template source. 2006-10-04 * libsylph/*: synched with sylpheed-trunk. * libsylph/sylmain.[ch]: implemented syl_main(), syl_cleanup(). syl_setup_rc_dir(), syl_save_all_state(): added. 2006-09-28 * version 0.2.0 2006-09-25 * examples/*: updated. 2006-09-25 * libsylph/sylmain.[ch]: new initialization and cleanup API. 2006-09-22 * version 0.1.0: first alpha release. 2006-09-22 * example/libsylph-listprefs.c: new sample for PrefsCommon. 2006-09-19 * example: new directory for sample programs. * example/libsylph-listsummary.c example/libsylph-listfolder.c example/libsylph-compose.c: new samples. 2006-09-11 * libsylph/compose.[ch]: new message composition API. libsylph-1.1.0/INSTALL0000644000175000017500000000131410530257321011306 00000000000000Installation ============ This library requires GLib 2.4.0 or later to be compiled. Build it ======== Please make sure that and glib-devel (or similar) packages are installed before the compilation. To compile and install, just type: % ./configure % make % su Password: [Enter password] # make install Options for configure script ============================ --disable-ssl disable SSL support (requires OpenSSL) --disable-ipv6 disable IPv6 support For other options, refer to ./configure --help . If the installation of LibSylph failed, check whether all the required libraries are correctly installed. If it still failed, please send bug report to: Hiroyuki Yamamoto libsylph-1.1.0/Makefile.am0000644000175000017500000000056210530254737012325 00000000000000SUBDIRS = ac doc examples libsylph po EXTRA_DIST = config.rpath \ INSTALL.ja \ README.ja \ autogen.sh \ makewin32.sh \ mime.types BZIP2_ENV = release: distdir -chmod -R a+r $(distdir) GZIP=$(GZIP_ENV) $(TAR) chozf $(distdir).tar.gz $(distdir) BZIP2=$(BZIP2_ENV) $(TAR) --bzip2 -chof $(distdir).tar.bz2 $(distdir) -rm -rf $(distdir) ACLOCAL_AMFLAGS = -I m4 libsylph-1.1.0/NEWS0000644000175000017500000000264310760421253010764 00000000000000NEWS * 1.1.0 (stable) * The bugfixes and minor feature improvements were merged from Sylpheed trunk. - procmime_parse_mime_parameter(): spaces around equals between name and value of MIME parameters are allowed. - procmime_scan_multipart_message(): the max recursion level were increased. - conv_encode_header(): several bugs were fixed. - my_memmem(): the buffer overrun was fixed. - pop.c: invalid APOP timestamp is checked for now (CVE-2007-1558). - socket.c: the bug that caused busy loop when connection was immediately refused was fixed. - procmime_get_encoding_for_str() extract_parenthesis_with_escape() extract_quote_with_escape() strsplit_csv() uriencode_for_mailto(): new functions were added. * 1.0.0 (stable) * The reference manuals were mostly completed. * The libtool version was increased. * 1.0.0beta1 (beta) * The reference manuals were added. * The sample codes were added. * The new APIs were added to prefs_common, account, and folder. * Several bugs were fixed. * 0.3.0 (alpha) * The initialization and cleanup API was implemented, * The two new APIs were added. * 0.2.0 (alpha) * The initialization and cleanup APIs were added. * The codes are synched with Sylpheed trunk. * The sample codes are updated. * 0.1.0 (alpha) * Initial release of LibSylph. libsylph-1.1.0/TODO0000644000175000017500000000015010533170676010754 00000000000000TODO ==== * Make APIs more well-sorted. * Add sylphconfig.h. * Write tutorials. * Write more examples. libsylph-1.1.0/aclocal.m40000644000175000017500000112631710760422451012134 00000000000000dnl aclocal.m4 generated automatically by aclocal 1.4-p6 dnl Copyright (C) 1994, 1995-8, 1999, 2001 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY, to the extent permitted by law; without dnl even the implied warranty of MERCHANTABILITY or FITNESS FOR A dnl PARTICULAR PURPOSE. # lib-prefix.m4 serial 5 (gettext-0.15) dnl Copyright (C) 2001-2005 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't dnl require excessive bracketing. ifdef([AC_HELP_STRING], [AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])], [AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])]) dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed dnl to access previously installed libraries. The basic assumption is that dnl a user will want packages to use other packages he previously installed dnl with the same --prefix option. dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate dnl libraries, but is otherwise very convenient. AC_DEFUN([AC_LIB_PREFIX], [ AC_BEFORE([$0], [AC_LIB_LINKFLAGS]) AC_REQUIRE([AC_PROG_CC]) AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_LIB_ARG_WITH([lib-prefix], [ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib --without-lib-prefix don't search for libraries in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi ]) if test $use_additional = yes; then dnl Potentially add $additional_includedir to $CPPFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's already present in $CPPFLAGS, dnl 3. if it's /usr/local/include and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= for x in $CPPFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $CPPFLAGS. CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir" fi fi fi fi dnl Potentially add $additional_libdir to $LDFLAGS. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's already present in $LDFLAGS, dnl 3. if it's /usr/local/lib and we are using GCC on Linux, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= for x in $LDFLAGS; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux*) haveit=yes;; esac fi fi if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LDFLAGS. LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir" fi fi fi fi fi ]) dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix, dnl acl_final_exec_prefix, containing the values to which $prefix and dnl $exec_prefix will expand at the end of the configure script. AC_DEFUN([AC_LIB_PREPARE_PREFIX], [ dnl Unfortunately, prefix and exec_prefix get only finally determined dnl at the end of configure. if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" ]) dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the dnl variables prefix and exec_prefix bound to the values they will have dnl at the end of the configure script. AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX], [ acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" $1 exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" ]) dnl AC_LIB_PREPARE_MULTILIB creates a variable acl_libdirstem, containing dnl the basename of the libdir, either "lib" or "lib64". AC_DEFUN([AC_LIB_PREPARE_MULTILIB], [ dnl There is no formal standard regarding lib and lib64. The current dnl practice is that on a system supporting 32-bit and 64-bit instruction dnl sets or ABIs, 64-bit libraries go under $prefix/lib64 and 32-bit dnl libraries go under $prefix/lib. We determine the compiler's default dnl mode by looking at the compiler's library search path. If at least dnl of its elements ends in /lib64 or points to a directory whose absolute dnl pathname ends in /lib64, we assume a 64-bit ABI. Otherwise we use the dnl default, namely "lib". acl_libdirstem=lib searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi ]) # lib-link.m4 serial 9 (gettext-0.16) dnl Copyright (C) 2001-2006 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_PREREQ(2.50) dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and dnl augments the CPPFLAGS variable. AC_DEFUN([AC_LIB_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) define([Name],[translit([$1],[./-], [___])]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [ AC_LIB_LINKFLAGS_BODY([$1], [$2]) ac_cv_lib[]Name[]_libs="$LIB[]NAME" ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME" ac_cv_lib[]Name[]_cppflags="$INC[]NAME" ]) LIB[]NAME="$ac_cv_lib[]Name[]_libs" LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs" INC[]NAME="$ac_cv_lib[]Name[]_cppflags" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the dnl results of this search when this library appears as a dependency. HAVE_LIB[]NAME=yes undefine([Name]) undefine([NAME]) ]) dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode) dnl searches for libname and the libraries corresponding to explicit and dnl implicit dependencies, together with the specified include files and dnl the ability to compile and link the specified testcode. If found, it dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty. AC_DEFUN([AC_LIB_HAVE_LINKFLAGS], [ AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) define([Name],[translit([$1],[./-], [___])]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME dnl accordingly. AC_LIB_LINKFLAGS_BODY([$1], [$2]) dnl Add $INC[]NAME to CPPFLAGS before performing the following checks, dnl because if the user has installed lib[]Name and not disabled its use dnl via --without-lib[]Name-prefix, he wants to use it. ac_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME) AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [ ac_save_LIBS="$LIBS" LIBS="$LIBS $LIB[]NAME" AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no]) LIBS="$ac_save_LIBS" ]) if test "$ac_cv_lib[]Name" = yes; then HAVE_LIB[]NAME=yes AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.]) AC_MSG_CHECKING([how to link with lib[]$1]) AC_MSG_RESULT([$LIB[]NAME]) else HAVE_LIB[]NAME=no dnl If $LIB[]NAME didn't lead to a usable library, we don't need dnl $INC[]NAME either. CPPFLAGS="$ac_save_CPPFLAGS" LIB[]NAME= LTLIB[]NAME= fi AC_SUBST([HAVE_LIB]NAME) AC_SUBST([LIB]NAME) AC_SUBST([LTLIB]NAME) undefine([Name]) undefine([NAME]) ]) dnl Determine the platform dependent parameters needed to use rpath: dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator, dnl hardcode_direct, hardcode_minus_L. AC_DEFUN([AC_LIB_RPATH], [ dnl Tell automake >= 1.10 to complain if config.rpath is missing. m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([config.rpath])]) AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done ]) wl="$acl_cv_wl" libext="$acl_cv_libext" shlibext="$acl_cv_shlibext" hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" hardcode_direct="$acl_cv_hardcode_direct" hardcode_minus_L="$acl_cv_hardcode_minus_L" dnl Determine whether the user wants rpath handling at all. AC_ARG_ENABLE(rpath, [ --disable-rpath do not hardcode runtime library paths], :, enable_rpath=yes) ]) dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and dnl the libraries corresponding to explicit and implicit dependencies. dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables. AC_DEFUN([AC_LIB_LINKFLAGS_BODY], [ AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-], [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])]) dnl By default, look in $includedir and $libdir. use_additional=yes AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) AC_LIB_ARG_WITH([lib$1-prefix], [ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib --without-lib$1-prefix don't search for lib$1 in includedir and libdir], [ if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then AC_LIB_WITH_FINAL_PREFIX([ eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" ]) else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi ]) dnl Search the library and its dependencies in $additional_libdir and dnl $LDFLAGS. Using breadth-first-seach. LIB[]NAME= LTLIB[]NAME= INC[]NAME= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='$1 $2' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" dnl See if it was already located by an earlier AC_LIB_LINKFLAGS dnl or AC_LIB_HAVE_LINKFLAGS call. uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value" else dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined dnl that this library doesn't exist. So just drop it. : fi else dnl Search the library lib$name in $additional_libdir and $LDFLAGS dnl and the already constructed $LIBNAME/$LTLIBNAME. found_dir= found_la= found_so= found_a= if test $use_additional = yes; then if test -n "$shlibext" \ && { test -f "$additional_libdir/lib$name.$shlibext" \ || { test "$shlibext" = dll \ && test -f "$additional_libdir/lib$name.dll.a"; }; }; then found_dir="$additional_libdir" if test -f "$additional_libdir/lib$name.$shlibext"; then found_so="$additional_libdir/lib$name.$shlibext" else found_so="$additional_libdir/lib$name.dll.a" fi if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi else if test -f "$additional_libdir/lib$name.$libext"; then found_dir="$additional_libdir" found_a="$additional_libdir/lib$name.$libext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$shlibext" \ && { test -f "$dir/lib$name.$shlibext" \ || { test "$shlibext" = dll \ && test -f "$dir/lib$name.dll.a"; }; }; then found_dir="$dir" if test -f "$dir/lib$name.$shlibext"; then found_so="$dir/lib$name.$shlibext" else found_so="$dir/lib$name.dll.a" fi if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi else if test -f "$dir/lib$name.$libext"; then found_dir="$dir" found_a="$dir/lib$name.$libext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then dnl Found the library. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then dnl Linking with a shared library. We attempt to hardcode its dnl directory into the executable's runpath, unless it's the dnl standard /usr/lib. if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then dnl No hardcoding is needed. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl Use an explicit option to hardcode DIR into the resulting dnl binary. dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi dnl The hardcoding into $LIBNAME is system dependent. if test "$hardcode_direct" = yes; then dnl Using DIR/libNAME.so during linking hardcodes DIR into the dnl resulting binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then dnl Use an explicit option to hardcode DIR into the resulting dnl binary. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else dnl Rely on "-L$found_dir". dnl But don't add it if it's already contained in the LDFLAGS dnl or the already constructed $LIBNAME haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir" fi if test "$hardcode_minus_L" != no; then dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so" else dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH dnl here, because this doesn't fit in flags passed to the dnl compiler. So give up. No hardcoding. This affects only dnl very old systems. dnl FIXME: Not sure whether we should use dnl "-L$found_dir -l$name" or "-L$found_dir $found_so" dnl here. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then dnl Linking with a static library. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a" else dnl We shouldn't come here, but anyway it's good to have a dnl fallback. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name" fi fi dnl Assume the include files are nearby. additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then dnl Potentially add $additional_includedir to $INCNAME. dnl But don't add it dnl 1. if it's the standard /usr/include, dnl 2. if it's /usr/local/include and we are using GCC on Linux, dnl 3. if it's already present in $CPPFLAGS or the already dnl constructed $INCNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INC[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then dnl Really add $additional_includedir to $INCNAME. INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir" fi fi fi fi fi dnl Look for dependencies. if test -n "$found_la"; then dnl Read the .la file. It defines the variables dnl dlname, library_names, old_library, dependency_libs, current, dnl age, revision, installed, dlopen, dlpreopen, libdir. save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" dnl We use only dependency_libs. for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME. dnl But don't add it dnl 1. if it's the standard /usr/lib, dnl 2. if it's /usr/local/lib and we are using GCC on Linux, dnl 3. if it's already present in $LDFLAGS or the already dnl constructed $LIBNAME, dnl 4. if it doesn't exist as a directory. if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LIBNAME. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIB[]NAME; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then dnl Really add $additional_libdir to $LTLIBNAME. LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then dnl Potentially add DIR to rpathdirs. dnl The rpathdirs will be appended to $LIBNAME at the end. haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi dnl Potentially add DIR to ltrpathdirs. dnl The ltrpathdirs will be appended to $LTLIBNAME at the end. haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) dnl Handle this in the next round. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) dnl Handle this in the next round. Throw away the .la's dnl directory; it is already contained in a preceding -L dnl option. names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) dnl Most likely an immediate library name. LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep" ;; esac done fi else dnl Didn't find the library; assume it is in the system directories dnl known to the linker and runtime loader. (All the system dnl directories known to the linker should also be known to the dnl runtime loader, otherwise the system is severely misconfigured.) LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name" LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user must dnl pass all path elements in one option. We can arrange that for a dnl single library, but not when more than one $LIBNAMEs are used. alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" done dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl. acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" else dnl The -rpath options are cumulative. for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then dnl When using libtool, the option that works for both libraries and dnl executables is -R. The -R options are cumulative. for found_dir in $ltrpathdirs; do LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir" done fi ]) dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR, dnl unless already present in VAR. dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes dnl contains two or three consecutive elements that belong together. AC_DEFUN([AC_LIB_APPENDTOVAR], [ for element in [$2]; do haveit= for x in $[$1]; do AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"]) if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then [$1]="${[$1]}${[$1]:+ }$element" fi done ]) dnl For those cases where a variable contains several -L and -l options dnl referring to unknown libraries and directories, this macro determines the dnl necessary additional linker options for the runtime path. dnl AC_LIB_LINKFLAGS_FROM_LIBS([LDADDVAR], [LIBSVALUE], [USE-LIBTOOL]) dnl sets LDADDVAR to linker options needed together with LIBSVALUE. dnl If USE-LIBTOOL evaluates to non-empty, linking with libtool is assumed, dnl otherwise linking without libtool is assumed. AC_DEFUN([AC_LIB_LINKFLAGS_FROM_LIBS], [ AC_REQUIRE([AC_LIB_RPATH]) AC_REQUIRE([AC_LIB_PREPARE_MULTILIB]) $1= if test "$enable_rpath" != no; then if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then dnl Use an explicit option to hardcode directories into the resulting dnl binary. rpathdirs= next= for opt in $2; do if test -n "$next"; then dir="$next" dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem"; then rpathdirs="$rpathdirs $dir" fi next= else case $opt in -L) next=yes ;; -L*) dir=`echo "X$opt" | sed -e 's,^X-L,,'` dnl No need to hardcode the standard /usr/lib. if test "X$dir" != "X/usr/$acl_libdirstem"; then rpathdirs="$rpathdirs $dir" fi next= ;; *) next= ;; esac fi done if test "X$rpathdirs" != "X"; then if test -n ""$3""; then dnl libtool is used for linking. Use -R options. for dir in $rpathdirs; do $1="${$1}${$1:+ }-R$dir" done else dnl The linker is used for linking directly. if test -n "$hardcode_libdir_separator"; then dnl Weird platform: only the last -rpath option counts, the user dnl must pass all path elements in one option. alldirs= for dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="$flag" else dnl The -rpath options are cumulative. for dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$dir" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" $1="${$1}${$1:+ }$flag" done fi fi fi fi fi AC_SUBST([$1]) ]) # lib-ld.m4 serial 3 (gettext-0.13) dnl Copyright (C) 1996-2003 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl Subroutines of libtool.m4, dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision dnl with libtool.m4. dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no. AC_DEFUN([AC_LIB_PROG_LD_GNU], [AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld, [# I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by GCC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]* | [A-Za-z]:[\\/]*)] [re_direlt='/[^/][^/]*/\.\./'] # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(acl_cv_path_LD, [if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi]) LD="$acl_cv_path_LD" if test -n "$LD"; then AC_MSG_RESULT($LD) else AC_MSG_RESULT(no) fi test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH]) AC_LIB_PROG_LD_GNU ]) # Do all the work for Automake. 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. # serial 1 dnl Usage: dnl AM_INIT_AUTOMAKE(package,version, [no-define]) AC_DEFUN([AM_INIT_AUTOMAKE], [AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL]) PACKAGE=[$1] AC_SUBST(PACKAGE) VERSION=[$2] AC_SUBST(VERSION) dnl test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi ifelse([$3],, AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])) AC_REQUIRE([AM_SANITY_CHECK]) AC_REQUIRE([AC_ARG_PROGRAM]) dnl FIXME This is truly gross. missing_dir=`cd $ac_aux_dir && pwd` AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}, $missing_dir) AM_MISSING_PROG(AUTOCONF, autoconf, $missing_dir) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}, $missing_dir) AM_MISSING_PROG(AUTOHEADER, autoheader, $missing_dir) AM_MISSING_PROG(MAKEINFO, makeinfo, $missing_dir) AC_REQUIRE([AC_PROG_MAKE_SET])]) # Copyright 2002 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.4"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.4-p6])]) # # Check to make sure that the build environment is sane. # AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftestfile # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` if test "[$]*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftestfile` fi if test "[$]*" != "X $srcdir/configure conftestfile" \ && test "[$]*" != "X conftestfile $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "[$]2" = conftestfile ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi rm -f conftest* AC_MSG_RESULT(yes)]) dnl AM_MISSING_PROG(NAME, PROGRAM, DIRECTORY) dnl The program must properly implement --version. AC_DEFUN([AM_MISSING_PROG], [AC_MSG_CHECKING(for working $2) # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. if ($2 --version) < /dev/null > /dev/null 2>&1; then $1=$2 AC_MSG_RESULT(found) else $1="$3/missing $2" AC_MSG_RESULT(missing) fi AC_SUBST($1)]) # Like AC_CONFIG_HEADER, but automatically create stamp file. AC_DEFUN([AM_CONFIG_HEADER], [AC_PREREQ([2.12]) AC_CONFIG_HEADER([$1]) dnl When config.status generates a header, we must update the stamp-h file. dnl This file resides in the same directory as the config header dnl that is generated. We must strip everything past the first ":", dnl and everything past the last "/". AC_OUTPUT_COMMANDS(changequote(<<,>>)dnl ifelse(patsubst(<<$1>>, <<[^ ]>>, <<>>), <<>>, <>CONFIG_HEADERS" || echo timestamp > patsubst(<<$1>>, <<^\([^:]*/\)?.*>>, <<\1>>)stamp-h<<>>dnl>>, <>; do case " <<$>>CONFIG_HEADERS " in *" <<$>>am_file "*<<)>> echo timestamp > `echo <<$>>am_file | sed -e 's%:.*%%' -e 's%[^/]*$%%'`stamp-h$am_indx ;; esac am_indx=`expr "<<$>>am_indx" + 1` done<<>>dnl>>) changequote([,]))]) # Add --enable-maintainer-mode option to configure. # From Jim Meyering # serial 1 AC_DEFUN([AM_MAINTAINER_MODE], [AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles]) dnl maintainer-mode is disabled by default AC_ARG_ENABLE(maintainer-mode, [ --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer], USE_MAINTAINER_MODE=$enableval, USE_MAINTAINER_MODE=no) AC_MSG_RESULT($USE_MAINTAINER_MODE) AM_CONDITIONAL(MAINTAINER_MODE, test $USE_MAINTAINER_MODE = yes) MAINT=$MAINTAINER_MODE_TRUE AC_SUBST(MAINT)dnl ] ) # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_SUBST($1_TRUE) AC_SUBST($1_FALSE) if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi]) # serial 1 # @defmac AC_PROG_CC_STDC # @maindex PROG_CC_STDC # @ovindex CC # If the C compiler in not in ANSI C mode by default, try to add an option # to output variable @code{CC} to make it so. This macro tries various # options that select ANSI C on some system or another. It considers the # compiler to be in ANSI C mode if it handles function prototypes correctly. # # If you use this macro, you should check after calling it whether the C # compiler has been set to accept ANSI C; if not, the shell variable # @code{am_cv_prog_cc_stdc} is set to @samp{no}. If you wrote your source # code in ANSI C, you can make an un-ANSIfied copy of it by using the # program @code{ansi2knr}, which comes with Ghostscript. # @end defmac AC_DEFUN([AM_PROG_CC_STDC], [AC_REQUIRE([AC_PROG_CC]) AC_BEFORE([$0], [AC_C_INLINE]) AC_BEFORE([$0], [AC_C_CONST]) dnl Force this before AC_PROG_CPP. Some cpp's, eg on HPUX, require dnl a magic option to avoid problems with ANSI preprocessor commands dnl like #elif. dnl FIXME: can't do this because then AC_AIX won't work due to a dnl circular dependency. dnl AC_BEFORE([$0], [AC_PROG_CPP]) AC_MSG_CHECKING(for ${CC-cc} option to accept ANSI C) AC_CACHE_VAL(am_cv_prog_cc_stdc, [am_cv_prog_cc_stdc=no ac_save_CC="$CC" # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" AC_TRY_COMPILE( [#include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } 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; ], [ return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ], [am_cv_prog_cc_stdc="$ac_arg"; break]) done CC="$ac_save_CC" ]) if test -z "$am_cv_prog_cc_stdc"; then AC_MSG_RESULT([none needed]) else AC_MSG_RESULT($am_cv_prog_cc_stdc) fi case "x$am_cv_prog_cc_stdc" in x|xno) ;; *) CC="$CC $am_cv_prog_cc_stdc" ;; esac ]) dnl AM_PROG_LEX dnl Look for flex, lex or missing, then run AC_PROG_LEX and AC_DECL_YYTEXT AC_DEFUN([AM_PROG_LEX], [missing_dir=ifelse([$1],,`cd $ac_aux_dir && pwd`,$1) AC_CHECK_PROGS(LEX, flex lex, $missing_dir/missing flex) AC_PROG_LEX AC_DECL_YYTEXT]) # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # serial 48 Debian 1.5.22-4 AC_PROG_LIBTOOL # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) # ----------------------------------------------------------- # If this macro is not defined by Autoconf, define it here. m4_ifdef([AC_PROVIDE_IFELSE], [], [m4_define([AC_PROVIDE_IFELSE], [m4_ifdef([AC_PROVIDE_$1], [$2], [$3])])]) # AC_PROG_LIBTOOL # --------------- AC_DEFUN([AC_PROG_LIBTOOL], [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. AC_PROVIDE_IFELSE([AC_PROG_CXX], [AC_LIBTOOL_CXX], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX ])]) dnl And a similar setup for Fortran 77 support AC_PROVIDE_IFELSE([AC_PROG_F77], [AC_LIBTOOL_F77], [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 ])]) dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [ifdef([AC_PROG_GCJ], [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([A][M_PROG_GCJ], [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([LT_AC_PROG_GCJ], [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) ])])# AC_PROG_LIBTOOL # _AC_PROG_LIBTOOL # ---------------- AC_DEFUN([_AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl # Prevent multiple expansion define([AC_PROG_LIBTOOL], []) ])# _AC_PROG_LIBTOOL # AC_LIBTOOL_SETUP # ---------------- AC_DEFUN([AC_LIBTOOL_SETUP], [AC_PREREQ(2.50)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_LD])dnl AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl AC_REQUIRE([AC_PROG_NM])dnl AC_REQUIRE([AC_PROG_LN_S])dnl AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! AC_REQUIRE([AC_OBJEXT])dnl AC_REQUIRE([AC_EXEEXT])dnl dnl AC_LIBTOOL_SYS_MAX_CMD_LEN AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE AC_LIBTOOL_OBJDIR AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] # Same as above, but do not quote variable references. [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" AC_CHECK_TOOL(AR, ar, false) AC_CHECK_TOOL(RANLIB, ranlib, :) AC_CHECK_TOOL(STRIP, strip, :) old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then AC_PATH_MAGIC fi ;; esac AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], enable_win32_dll=yes, enable_win32_dll=no) AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes AC_ARG_WITH([pic], [AC_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= AC_LIBTOOL_LANG_C_CONFIG _LT_AC_TAGCONFIG ])# AC_LIBTOOL_SETUP # _LT_AC_SYS_COMPILER # ------------------- AC_DEFUN([_LT_AC_SYS_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_AC_SYS_COMPILER # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. AC_DEFUN([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` ]) # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. AC_DEFUN([_LT_COMPILER_BOILERPLATE], [ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. AC_DEFUN([_LT_LINKER_BOILERPLATE], [ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* ])# _LT_LINKER_BOILERPLATE # _LT_AC_SYS_LIBPATH_AIX # ---------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], [AC_LINK_IFELSE(AC_LANG_PROGRAM,[ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_AC_SYS_LIBPATH_AIX # _LT_AC_SHELL_INIT(ARG) # ---------------------- AC_DEFUN([_LT_AC_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_AC_SHELL_INIT # _LT_AC_PROG_ECHO_BACKSLASH # -------------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], [_LT_AC_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac echo=${ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "[$]0"' 'sed 20q "[$]0"' 'sed 10q "[$]0"' 'sed 2q "[$]0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(ECHO) ])])# _LT_AC_PROG_ECHO_BACKSLASH # _LT_AC_LOCK # ----------- AC_DEFUN([_LT_AC_LOCK], [AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) LD="${LD-ld} -64" ;; esac ;; esac fi rm -rf conftest* ;; AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw* | *-*-pw32*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; ]) esac need_locks="$enable_libtool_lock" ])# _LT_AC_LOCK # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_REQUIRE([LT_AC_PROG_SED]) AC_CACHE_CHECK([$1], [$2], [$2=no ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $rm conftest* ]) if test x"[$]$2" = xyes; then ifelse([$5], , :, [$5]) else ifelse([$6], , :, [$6]) fi ])# AC_LIBTOOL_COMPILER_OPTION # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ------------------------------------------------------------ # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then ifelse([$4], , :, [$4]) else ifelse([$5], , :, [$5]) fi ])# AC_LIBTOOL_LINKER_OPTION # AC_LIBTOOL_SYS_MAX_CMD_LEN # -------------------------- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [# find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL [$]0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi ])# AC_LIBTOOL_SYS_MAX_CMD_LEN # _LT_AC_CHECK_DLFCN # ------------------ AC_DEFUN([_LT_AC_CHECK_DLFCN], [AC_CHECK_HEADERS(dlfcn.h)dnl ])# _LT_AC_CHECK_DLFCN # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # --------------------------------------------------------------------- AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); }] EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_AC_TRY_DLOPEN_SELF # AC_LIBTOOL_DLOPEN_SELF # ---------------------- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi ])# AC_LIBTOOL_DLOPEN_SELF # AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) # --------------------------------- # Check to see if options -c and -o are simultaneously supported by compiler AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* ]) ])# AC_LIBTOOL_PROG_CC_C_O # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) # ----------------------------------------- # Check to see if we can do hard links to lock some files if needed AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_REQUIRE([_LT_AC_LOCK])dnl hard_links="nottested" if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS # AC_LIBTOOL_OBJDIR # ----------------- AC_DEFUN([AC_LIBTOOL_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir ])# AC_LIBTOOL_OBJDIR # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) # ---------------------------------------------- # Check hardcoding attributes. AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_AC_TAGVAR(hardcode_action, $1)= if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ test -n "$_LT_AC_TAGVAR(runpath_var, $1)" || \ test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existant directories. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_AC_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_AC_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_AC_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH # AC_LIBTOOL_SYS_LIB_STRIP # ------------------------ AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], [striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi ])# AC_LIBTOOL_SYS_LIB_STRIP # AC_LIBTOOL_SYS_DYNAMIC_LINKER # ----------------------------- # PORTME Fill in your ld.so characteristics AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_MSG_CHECKING([dynamic linker characteristics]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[123]]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; freebsd*) # from 4.6 on shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix3*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER # _LT_AC_TAGCONFIG # ---------------- AC_DEFUN([_LT_AC_TAGCONFIG], [AC_ARG_WITH([tags], [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], [include additional configurations @<:@automatic@:>@])], [tagnames="$withval"]) if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then AC_MSG_WARN([output file `$ofile' does not exist]) fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) else AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) fi fi if test -z "$LTCFLAGS"; then eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in "") ;; *) AC_MSG_ERROR([invalid tag name: $tagname]) ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then AC_MSG_ERROR([tag name \"$tagname\" already exists]) fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_LIBTOOL_LANG_CXX_CONFIG else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then AC_LIBTOOL_LANG_F77_CONFIG else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then AC_LIBTOOL_LANG_GCJ_CONFIG else tagname="" fi ;; RC) AC_LIBTOOL_LANG_RC_CONFIG ;; *) AC_MSG_ERROR([Unsupported tag name: $tagname]) ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" AC_MSG_ERROR([unable to update list of available tagged configurations.]) fi fi ])# _LT_AC_TAGCONFIG # AC_LIBTOOL_DLOPEN # ----------------- # enable checks for dlopen support AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_DLOPEN # AC_LIBTOOL_WIN32_DLL # -------------------- # declare package support for building win32 DLLs AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_WIN32_DLL # AC_ENABLE_SHARED([DEFAULT]) # --------------------------- # implement the --enable-shared flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_SHARED], [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([shared], [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]AC_ENABLE_SHARED_DEFAULT) ])# AC_ENABLE_SHARED # AC_DISABLE_SHARED # ----------------- # set the default shared flag to --disable-shared AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no) ])# AC_DISABLE_SHARED # AC_ENABLE_STATIC([DEFAULT]) # --------------------------- # implement the --enable-static flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_STATIC], [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([static], [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]AC_ENABLE_STATIC_DEFAULT) ])# AC_ENABLE_STATIC # AC_DISABLE_STATIC # ----------------- # set the default static flag to --disable-static AC_DEFUN([AC_DISABLE_STATIC], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_STATIC(no) ])# AC_DISABLE_STATIC # AC_ENABLE_FAST_INSTALL([DEFAULT]) # --------------------------------- # implement the --enable-fast-install flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_FAST_INSTALL], [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([fast-install], [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) ])# AC_ENABLE_FAST_INSTALL # AC_DISABLE_FAST_INSTALL # ----------------------- # set the default to --disable-fast-install AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_FAST_INSTALL(no) ])# AC_DISABLE_FAST_INSTALL # AC_LIBTOOL_PICMODE([MODE]) # -------------------------- # implement the --with-pic flag # MODE is either `yes' or `no'. If omitted, it defaults to `both'. AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl pic_mode=ifelse($#,1,$1,default) ])# AC_LIBTOOL_PICMODE # AC_PROG_EGREP # ------------- # This is predefined starting with Autoconf 2.54, so this conditional # definition can be removed once we require Autoconf 2.54 or later. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi]) EGREP=$ac_cv_prog_egrep AC_SUBST([EGREP]) ])]) # AC_PATH_TOOL_PREFIX # ------------------- # find a file program which can recognise shared library AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="ifelse([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi ])# AC_PATH_TOOL_PREFIX # AC_PATH_MAGIC # ------------- # find a file program which can recognise a shared library AC_DEFUN([AC_PATH_MAGIC], [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# AC_PATH_MAGIC # AC_PROG_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([AC_PROG_LD], [AC_ARG_WITH([gnu-ld], [AC_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no]) AC_REQUIRE([LT_AC_PROG_SED])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix3*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown ])# AC_DEPLIBS_CHECK_METHOD # AC_PROG_NM # ---------- # find the pathname to a BSD-compatible name lister AC_DEFUN([AC_PROG_NM], [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi]) NM="$lt_cv_path_NM" ])# AC_PROG_NM # AC_CHECK_LIBM # ------------- # check for math library AC_DEFUN([AC_CHECK_LIBM], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac ])# AC_CHECK_LIBM # AC_LIBLTDL_CONVENIENCE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl convenience library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-convenience to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # it is assumed to be `libltdl'. LIBLTDL will be prefixed with # '${top_builddir}/' and LTDLINCL will be prefixed with '${top_srcdir}/' # (note the single quotes!). If your package is not flat and you're not # using automake, define top_builddir and top_srcdir appropriately in # the Makefiles. AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case $enable_ltdl_convenience in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_CONVENIENCE # AC_LIBLTDL_INSTALLABLE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl installable library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-install to the configure arguments. Note that # AC_CONFIG_SUBDIRS is not called here. If DIRECTORY is not provided, # and an installed libltdl is not found, it is assumed to be `libltdl'. # LIBLTDL will be prefixed with '${top_builddir}/'# and LTDLINCL with # '${top_srcdir}/' (note the single quotes!). If your package is not # flat and you're not using automake, define top_builddir and top_srcdir # appropriately in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_CHECK_LIB(ltdl, lt_dlinit, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) else enable_ltdl_install=yes fi ]) if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" LTDLINCL= fi # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_INSTALLABLE # AC_LIBTOOL_CXX # -------------- # enable support for C++ libraries AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_LT_AC_LANG_CXX]) ])# AC_LIBTOOL_CXX # _LT_AC_LANG_CXX # --------------- AC_DEFUN([_LT_AC_LANG_CXX], [AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}CXX]) ])# _LT_AC_LANG_CXX # _LT_AC_PROG_CXXCPP # ------------------ AC_DEFUN([_LT_AC_PROG_CXXCPP], [ AC_REQUIRE([AC_PROG_CXX]) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP fi ])# _LT_AC_PROG_CXXCPP # AC_LIBTOOL_F77 # -------------- # enable support for Fortran 77 libraries AC_DEFUN([AC_LIBTOOL_F77], [AC_REQUIRE([_LT_AC_LANG_F77]) ])# AC_LIBTOOL_F77 # _LT_AC_LANG_F77 # --------------- AC_DEFUN([_LT_AC_LANG_F77], [AC_REQUIRE([AC_PROG_F77]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}F77]) ])# _LT_AC_LANG_F77 # AC_LIBTOOL_GCJ # -------------- # enable support for GCJ libraries AC_DEFUN([AC_LIBTOOL_GCJ], [AC_REQUIRE([_LT_AC_LANG_GCJ]) ])# AC_LIBTOOL_GCJ # _LT_AC_LANG_GCJ # --------------- AC_DEFUN([_LT_AC_LANG_GCJ], [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}GCJ]) ])# _LT_AC_LANG_GCJ # AC_LIBTOOL_RC # ------------- # enable support for Windows resource files AC_DEFUN([AC_LIBTOOL_RC], [AC_REQUIRE([LT_AC_PROG_RC]) _LT_AC_SHELL_INIT([tagnames=${tagnames+${tagnames},}RC]) ])# AC_LIBTOOL_RC # AC_LIBTOOL_LANG_C_CONFIG # ------------------------ # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) AC_DEFUN([_LT_AC_LANG_C_CONFIG], [lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}\n' _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_DLOPEN_SELF # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_C_CONFIG # AC_LIBTOOL_LANG_CXX_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], [AC_LANG_PUSH(C++) AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([_LT_AC_PROG_CXXCPP]) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Dependencies to place before and after the object being linked: _LT_AC_TAGVAR(predep_objects, $1)= _LT_AC_TAGVAR(postdep_objects, $1)= _LT_AC_TAGVAR(predeps, $1)= _LT_AC_TAGVAR(postdeps, $1)= _LT_AC_TAGVAR(compiler_lib_search_path, $1)= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration AC_PROG_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_AC_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=yes else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes ; then lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[[12]]*) # C++ shared libraries reported to be fairly broken before switch to ELF _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_AC_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[[-]]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' ;; *) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix3*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC*) # Portland Group C++ compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The C++ compiler is used as linker so we must use $wl # flag to pass the commands to the underlying system # linker. We must also pass each convience library through # to the system linker between allextract/defaultextract. # The C++ compiler will combine linker options so we # cannot just pass the convience library names through # without $wl. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. # So that behaviour is only enabled if SCOABSPATH is set to a # non-empty value in the environment. Most likely only useful for # creating official distributions of packages. # This is a hack until libtool officially supports absolute path # names for shared libraries. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_AC_TAGVAR(GCC, $1)="$GXX" _LT_AC_TAGVAR(LD, $1)="$LD" AC_LIBTOOL_POSTDEP_PREDEP($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld ])# AC_LIBTOOL_LANG_CXX_CONFIG # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) # ------------------------------------ # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <> "$cfgfile" ifelse([$1], [], [#! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 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 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. # # 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. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG], [# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) # Is the compiler the GNU C compiler? with_gcc=$_LT_AC_TAGVAR(GCC, $1) # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_[]_LT_AC_TAGVAR(LD, $1) # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) # Commands used to build and install a shared archive. archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) # Flag that forces no undefined symbols. no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" # Set to yes if exported symbols are required. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) # The commands to list exported symbols. export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) # Symbols that must always be exported. include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) ifelse([$1],[], [# ### END LIBTOOL CONFIG], [# ### END LIBTOOL TAG CONFIG: $tagname]) __EOF__ ifelse([$1],[], [ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ]) else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ])# AC_LIBTOOL_CONFIG # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # --------------------------------- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_PROG_NM]) AC_REQUIRE([AC_OBJEXT]) # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32*) symcode='[[ABCDGISTW]]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux* | k*bsd*-gnu) if test "$host_cpu" = ia64; then symcode='[[ABCDGIRSTW]]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[[]] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) # --------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) ifelse([$1],[CXX],[ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; interix3*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix4* | aix5*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; icpc* | ecpc*) # Intel C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC*) # Portland Group C++ compiler. _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; vxworks*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; interix3*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-qnocommon' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; esac ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; newsos6) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" ;; esac # # Check to make sure the static flag actually works. # wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_AC_TAGVAR(lt_prog_compiler_static, $1)\" AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) ]) # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) # ------------------------------------ # See if the linker supports building shared libraries. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix4* | aix5*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([[^ ]]*\) [[^ ]]*/\1 DATA/;/^I /d;/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' ;; linux* | k*bsd*-gnu) _LT_AC_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ],[ runpath_var= _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)= _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_AC_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. _LT_CC_BASENAME([$compiler]) case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac _LT_AC_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; interix3*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi _LT_AC_TAGVAR(link_all_deplibs, $1)=no else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=yes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=yes else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='$convenience' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # see comment about different semantics on the GNU ld section _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; bsdi[[45]]*) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' _LT_AC_TAGVAR(fix_srcfile_path, $1)='`cygpath -w "$srcfile"`' _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ;; dgux*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; openbsd*) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi ;; os2*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' if test "$GCC" = yes; then wlarc='${wl}' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine linker options so we # cannot just pass the convience library names through # without $wl, iff we do not link with $LD. # Luckily, gcc supports the same syntax we need for Sun Studio. # Supported since Solaris 2.6 (maybe 2.5.1?) case $wlarc in '') _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; *) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_AC_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_AC_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_AC_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_AC_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) _LT_AC_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac ])# AC_LIBTOOL_PROG_LD_SHLIBS # _LT_AC_FILE_LTDLL_C # ------------------- # Be careful that the start marker always follows a newline. AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ # /* ltdll.c starts here */ # #define WIN32_LEAN_AND_MEAN # #include # #undef WIN32_LEAN_AND_MEAN # #include # # #ifndef __CYGWIN__ # # ifdef __CYGWIN32__ # # define __CYGWIN__ __CYGWIN32__ # # endif # #endif # # #ifdef __cplusplus # extern "C" { # #endif # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); # #ifdef __cplusplus # } # #endif # # #ifdef __CYGWIN__ # #include # DECLARE_CYGWIN_DLL( DllMain ); # #endif # HINSTANCE __hDllInstance_base; # # BOOL APIENTRY # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) # { # __hDllInstance_base = hInst; # return TRUE; # } # /* ltdll.c ends here */ ])# _LT_AC_FILE_LTDLL_C # _LT_AC_TAGVAR(VARNAME, [TAGNAME]) # --------------------------------- AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) # old names AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) # This is just to silence aclocal about the macro not being used ifelse([AC_DISABLE_FAST_INSTALL]) AC_DEFUN([LT_AC_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj, no) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS) ]) AC_DEFUN([LT_AC_PROG_RC], [AC_CHECK_TOOL(RC, windres, no) ]) # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # # LT_AC_PROG_SED # -------------- # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. AC_DEFUN([LT_AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_MSG_RESULT([$SED]) ]) # aclocal-include.m4 # # This macro adds the name macrodir to the set of directories # that `aclocal' searches for macros. dnl SYLPHEED_ACLOCAL_INCLUDE(macrodir) AC_DEFUN([SYLPHEED_ACLOCAL_INCLUDE], [ test -n "$ACLOCAL_FLAGS" && ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" for k in $1 ; do ACLOCAL="$ACLOCAL -I $k" ; done ]) # Configure paths for GLIB # Owen Taylor 1997-2001 dnl AM_PATH_GLIB_2_0([MINIMUM-VERSION, [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND [, MODULES]]]]) dnl Test for GLIB, and define GLIB_CFLAGS and GLIB_LIBS, if gmodule, gobject or dnl gthread is specified in MODULES, pass to pkg-config dnl AC_DEFUN([AM_PATH_GLIB_2_0], [dnl dnl Get the cflags and libraries from pkg-config dnl AC_ARG_ENABLE(glibtest, [ --disable-glibtest do not try to compile and run a test GLIB program], , enable_glibtest=yes) pkg_config_args=glib-2.0 for module in . $4 do case "$module" in gmodule) pkg_config_args="$pkg_config_args gmodule-2.0" ;; gmodule-no-export) pkg_config_args="$pkg_config_args gmodule-no-export-2.0" ;; gobject) pkg_config_args="$pkg_config_args gobject-2.0" ;; gthread) pkg_config_args="$pkg_config_args gthread-2.0" ;; esac done PKG_PROG_PKG_CONFIG([0.7]) no_glib="" if test "x$PKG_CONFIG" = x ; then no_glib=yes PKG_CONFIG=no fi min_glib_version=ifelse([$1], ,2.0.0,$1) AC_MSG_CHECKING(for GLIB - version >= $min_glib_version) if test x$PKG_CONFIG != xno ; then ## don't try to run the test against uninstalled libtool libs if $PKG_CONFIG --uninstalled $pkg_config_args; then echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH" enable_glibtest=no fi if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then : else no_glib=yes fi fi if test x"$no_glib" = x ; then GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0` GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0` GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0` GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args` GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args` glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\1/'` glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\2/'` glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \ sed 's/\([[0-9]]*\).\([[0-9]]*\).\([[0-9]]*\)/\3/'` if test "x$enable_glibtest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$GLIB_LIBS $LIBS" dnl dnl Now check if the installed GLIB is sufficiently new. (Also sanity dnl checks the results of pkg-config to some extent) dnl rm -f conf.glibtest AC_TRY_RUN([ #include #include #include int main () { int major, minor, micro; char *tmp_version; system ("touch conf.glibtest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = g_strdup("$min_glib_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_glib_version"); exit(1); } if ((glib_major_version != $glib_config_major_version) || (glib_minor_version != $glib_config_minor_version) || (glib_micro_version != $glib_config_micro_version)) { printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version, glib_major_version, glib_minor_version, glib_micro_version); printf ("*** was found! If pkg-config was correct, then it is best\n"); printf ("*** to remove the old version of GLib. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); printf("*** to point to the correct configuration files\n"); } else if ((glib_major_version != GLIB_MAJOR_VERSION) || (glib_minor_version != GLIB_MINOR_VERSION) || (glib_micro_version != GLIB_MICRO_VERSION)) { printf("*** GLIB header files (version %d.%d.%d) do not match\n", GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION); printf("*** library (version %d.%d.%d)\n", glib_major_version, glib_minor_version, glib_micro_version); } else { if ((glib_major_version > major) || ((glib_major_version == major) && (glib_minor_version > minor)) || ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n", glib_major_version, glib_minor_version, glib_micro_version); printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n", major, minor, micro); printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n"); printf("*** correct copy of pkg-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } ],, no_glib=yes,[echo $ac_n "cross compiling; assumed OK... $ac_c"]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_glib" = x ; then AC_MSG_RESULT(yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)) ifelse([$2], , :, [$2]) else AC_MSG_RESULT(no) if test "$PKG_CONFIG" = "no" ; then echo "*** A new enough version of pkg-config was not found." echo "*** See http://www.freedesktop.org/software/pkgconfig/" else if test -f conf.glibtest ; then : else echo "*** Could not run GLIB test program, checking why..." ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS" AC_TRY_LINK([ #include #include ], [ return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ], [ echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GLIB or finding the wrong" echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" ], [ echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GLIB is incorrectly installed."]) CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi GLIB_CFLAGS="" GLIB_LIBS="" GLIB_GENMARSHAL="" GOBJECT_QUERY="" GLIB_MKENUMS="" ifelse([$3], , :, [$3]) fi AC_SUBST(GLIB_CFLAGS) AC_SUBST(GLIB_LIBS) AC_SUBST(GLIB_GENMARSHAL) AC_SUBST(GOBJECT_QUERY) AC_SUBST(GLIB_MKENUMS) rm -f conf.glibtest ]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # 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. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl 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 ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # # Similar to PKG_CHECK_MODULES, make sure that the first instance of # this or PKG_CHECK_MODULES is called, or make sure 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_ifval([$2], [$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$PKG_CONFIG"; then if test -n "$$1"; then pkg_cv_[]$1="$$1" else PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], [pkg_failed=yes]) fi else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- 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 ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # 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 _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "$2"` else $1[]_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "$2"` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD ifelse([$4], , [AC_MSG_ERROR(dnl [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 ])], [AC_MSG_RESULT([no]) $4]) elif test $pkg_failed = untried; then ifelse([$4], , [AC_MSG_FAILURE(dnl [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 .])], [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES # iconv.m4 serial AM4 (gettext-0.11.3) dnl Copyright (C) 2000-2002 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, dnl with or without modifications, as long as this notice is preserved. dnl From Bruno Haible. AC_DEFUN([AM_ICONV_LINKFLAGS_BODY], [ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_LIB_LINKFLAGS_BODY([iconv]) ]) AC_DEFUN([AM_ICONV_LINK], [ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and dnl those with the standalone portable GNU libiconv installed). dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV dnl accordingly. AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) dnl Add $INCICONV to CPPFLAGS before performing the following checks, dnl because if the user has installed libiconv and not disabled its use dnl via --without-libiconv-prefix, he wants to use it. The first dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed. am_save_CPPFLAGS="$CPPFLAGS" AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV]) AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [ am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], am_cv_func_iconv=yes) if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include #include ], [iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd);], am_cv_lib_iconv=yes am_cv_func_iconv=yes) LIBS="$am_save_LIBS" fi ]) if test "$am_cv_func_iconv" = yes; then AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.]) fi if test "$am_cv_lib_iconv" = yes; then AC_MSG_CHECKING([how to link with libiconv]) AC_MSG_RESULT([$LIBICONV]) else dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV dnl either. CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi AC_SUBST(LIBICONV) AC_SUBST(LTLIBICONV) ]) AC_DEFUN([AM_ICONV], [ AM_ICONV_LINK if test "$am_cv_func_iconv" = yes; then AC_MSG_CHECKING([for iconv declaration]) AC_CACHE_VAL(am_cv_proto_iconv, [ AC_TRY_COMPILE([ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif ], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const") am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"]) am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` AC_MSG_RESULT([$]{ac_t:- }[$]am_cv_proto_iconv) AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1, [Define as const if the declaration of iconv() needs const.]) fi ]) # Copyright (C) 1995-2002 Free Software Foundation, Inc. # Copyright (C) 2001-2003,2004 Red Hat, Inc. # # This file is free software, distributed under the terms of the GNU # General Public License. As a special exception to the GNU General # Public License, this file may be distributed as part of a program # that contains a configuration script generated by Autoconf, under # the same distribution terms as the rest of that program. # # This file can be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # # Macro to add for using GNU gettext. # Ulrich Drepper , 1995, 1996 # # Modified to never use included libintl. # Owen Taylor , 12/15/1998 # # Major rework to remove unused code # Owen Taylor , 12/11/2002 # # Added better handling of ALL_LINGUAS from GNU gettext version # written by Bruno Haible, Owen Taylor 5/30/3002 # # Modified to require ngettext # Matthias Clasen 08/06/2004 # # We need this here as well, since someone might use autoconf-2.5x # to configure GLib then an older version to configure a package # using AM_GLIB_GNU_GETTEXT AC_PREREQ(2.53) dnl dnl We go to great lengths to make sure that aclocal won't dnl try to pull in the installed version of these macros dnl when running aclocal in the glib directory. dnl m4_copy([AC_DEFUN],[glib_DEFUN]) m4_copy([AC_REQUIRE],[glib_REQUIRE]) dnl dnl At the end, if we're not within glib, we'll define the public dnl definitions in terms of our private definitions. dnl # GLIB_LC_MESSAGES #-------------------- glib_DEFUN([GLIB_LC_MESSAGES], [AC_CHECK_HEADERS([locale.h]) if test $ac_cv_header_locale_h = yes; then AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES, [AC_TRY_LINK([#include ], [return LC_MESSAGES], am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)]) if test $am_cv_val_LC_MESSAGES = yes; then AC_DEFINE(HAVE_LC_MESSAGES, 1, [Define if your file defines LC_MESSAGES.]) fi fi]) # GLIB_PATH_PROG_WITH_TEST #---------------------------- dnl GLIB_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR, dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]]) glib_DEFUN([GLIB_PATH_PROG_WITH_TEST], [# Extract the first word of "$2", so it can be a program name with args. set dummy $2; ac_word=[$]2 AC_MSG_CHECKING([for $ac_word]) AC_CACHE_VAL(ac_cv_path_$1, [case "[$]$1" in /*) ac_cv_path_$1="[$]$1" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in ifelse([$5], , $PATH, [$5]); do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if [$3]; then ac_cv_path_$1="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" dnl If no 4th arg is given, leave the cache variable unset, dnl so AC_PATH_PROGS will keep looking. ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4" ])dnl ;; esac])dnl $1="$ac_cv_path_$1" if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then AC_MSG_RESULT([$]$1) else AC_MSG_RESULT(no) fi AC_SUBST($1)dnl ]) # GLIB_WITH_NLS #----------------- glib_DEFUN([GLIB_WITH_NLS], dnl NLS is obligatory [AC_REQUIRE([AC_CANONICAL_HOST])dnl USE_NLS=yes AC_SUBST(USE_NLS) gt_cv_have_gettext=no CATOBJEXT=NONE XGETTEXT=: INTLLIBS= AC_CHECK_HEADER(libintl.h, [gt_cv_func_dgettext_libintl="no" libintl_extra_libs="" # # First check in libc # AC_CACHE_CHECK([for ngettext in libc], gt_cv_func_ngettext_libc, [AC_TRY_LINK([ #include ], [return !ngettext ("","", 1)], gt_cv_func_ngettext_libc=yes, gt_cv_func_ngettext_libc=no) ]) if test "$gt_cv_func_ngettext_libc" = "yes" ; then AC_CACHE_CHECK([for dgettext in libc], gt_cv_func_dgettext_libc, [AC_TRY_LINK([ #include ], [return !dgettext ("","")], gt_cv_func_dgettext_libc=yes, gt_cv_func_dgettext_libc=no) ]) fi if test "$gt_cv_func_ngettext_libc" = "yes" ; then AC_CHECK_FUNCS(bind_textdomain_codeset) fi # # If we don't have everything we want, check in libintl # if test "$gt_cv_func_dgettext_libc" != "yes" \ || test "$gt_cv_func_ngettext_libc" != "yes" \ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then AC_CHECK_LIB(intl, bindtextdomain, [AC_CHECK_LIB(intl, ngettext, [AC_CHECK_LIB(intl, dgettext, gt_cv_func_dgettext_libintl=yes)])]) if test "$gt_cv_func_dgettext_libintl" != "yes" ; then AC_MSG_CHECKING([if -liconv is needed to use gettext]) AC_MSG_RESULT([]) AC_CHECK_LIB(intl, ngettext, [AC_CHECK_LIB(intl, dcgettext, [gt_cv_func_dgettext_libintl=yes libintl_extra_libs=-liconv], :,-liconv)], :,-liconv) fi # # If we found libintl, then check in it for bind_textdomain_codeset(); # we'll prefer libc if neither have bind_textdomain_codeset(), # and both have dgettext and ngettext # if test "$gt_cv_func_dgettext_libintl" = "yes" ; then glib_save_LIBS="$LIBS" LIBS="$LIBS -lintl $libintl_extra_libs" unset ac_cv_func_bind_textdomain_codeset AC_CHECK_FUNCS(bind_textdomain_codeset) LIBS="$glib_save_LIBS" if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then gt_cv_func_dgettext_libc=no else if test "$gt_cv_func_dgettext_libc" = "yes" \ && test "$gt_cv_func_ngettext_libc" = "yes"; then gt_cv_func_dgettext_libintl=no fi fi fi fi if test "$gt_cv_func_dgettext_libc" = "yes" \ || test "$gt_cv_func_dgettext_libintl" = "yes"; then gt_cv_have_gettext=yes fi if test "$gt_cv_func_dgettext_libintl" = "yes"; then INTLLIBS="-lintl $libintl_extra_libs" fi if test "$gt_cv_have_gettext" = "yes"; then AC_DEFINE(HAVE_GETTEXT,1, [Define if the GNU gettext() function is already present or preinstalled.]) GLIB_PATH_PROG_WITH_TEST(MSGFMT, msgfmt, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl if test "$MSGFMT" != "no"; then glib_save_LIBS="$LIBS" LIBS="$LIBS $INTLLIBS" AC_CHECK_FUNCS(dcgettext) MSGFMT_OPTS= AC_MSG_CHECKING([if msgfmt accepts -c]) GLIB_RUN_PROG([msgfmt -c -o /dev/null],[ msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Project-Id-Version: test 1.0\n" "PO-Revision-Date: 2007-02-15 12:01+0100\n" "Last-Translator: test \n" "Language-Team: C \n" "MIME-Version: 1.0\n" "Content-Transfer-Encoding: 8bit\n" ], [MSGFMT_OPTS=-c; AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no])]) AC_SUBST(MSGFMT_OPTS) AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT) GLIB_PATH_PROG_WITH_TEST(XGETTEXT, xgettext, [test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :) AC_TRY_LINK(, [extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr], [CATOBJEXT=.gmo DATADIRNAME=share], [case $host in *-*-solaris*) dnl On Solaris, if bind_textdomain_codeset is in libc, dnl GNU format message catalog is always supported, dnl since both are added to the libc all together. dnl Hence, we'd like to go with DATADIRNAME=share and dnl and CATOBJEXT=.gmo in this case. AC_CHECK_FUNC(bind_textdomain_codeset, [CATOBJEXT=.gmo DATADIRNAME=share], [CATOBJEXT=.mo DATADIRNAME=lib]) ;; *) CATOBJEXT=.mo DATADIRNAME=lib ;; esac]) LIBS="$glib_save_LIBS" INSTOBJEXT=.mo else gt_cv_have_gettext=no fi fi ]) if test "$gt_cv_have_gettext" = "yes" ; then AC_DEFINE(ENABLE_NLS, 1, [always defined to indicate that i18n is enabled]) fi dnl Test whether we really found GNU xgettext. if test "$XGETTEXT" != ":"; then dnl If it is not GNU xgettext we define it as : so that the dnl Makefiles still can work. if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else AC_MSG_RESULT( [found xgettext program is not GNU xgettext; ignore it]) XGETTEXT=":" fi fi # We need to process the po/ directory. POSUB=po AC_OUTPUT_COMMANDS( [case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac]) dnl These rules are solely for the distribution goal. While doing this dnl we only have to keep exactly one list of the available catalogs dnl in configure.in. for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done dnl Make all variables we use known to autoconf. AC_SUBST(CATALOGS) AC_SUBST(CATOBJEXT) AC_SUBST(DATADIRNAME) AC_SUBST(GMOFILES) AC_SUBST(INSTOBJEXT) AC_SUBST(INTLLIBS) AC_SUBST(PO_IN_DATADIR_TRUE) AC_SUBST(PO_IN_DATADIR_FALSE) AC_SUBST(POFILES) AC_SUBST(POSUB) ]) # AM_GLIB_GNU_GETTEXT # ------------------- # Do checks necessary for use of gettext. If a suitable implementation # of gettext is found in either in libintl or in the C library, # it will set INTLLIBS to the libraries needed for use of gettext # and AC_DEFINE() HAVE_GETTEXT and ENABLE_NLS. (The shell variable # gt_cv_have_gettext will be set to "yes".) It will also call AC_SUBST() # on various variables needed by the Makefile.in.in installed by # glib-gettextize. dnl glib_DEFUN([GLIB_GNU_GETTEXT], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_HEADER_STDC])dnl GLIB_LC_MESSAGES GLIB_WITH_NLS if test "$gt_cv_have_gettext" = "yes"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else AC_MSG_CHECKING(for catalogs to be installed) NEW_LINGUAS= for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then NEW_LINGUAS="$NEW_LINGUAS $presentlang" fi done LINGUAS=$NEW_LINGUAS AC_MSG_RESULT($LINGUAS) fi dnl Construct list of names of catalog files to be constructed. if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly dnl find the mkinstalldirs script in another subdir but ($top_srcdir). dnl Try to locate is. MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi AC_SUBST(MKINSTALLDIRS) dnl Generate list of files to be processed by xgettext which will dnl be included in po/Makefile. test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES ]) # AM_GLIB_DEFINE_LOCALEDIR(VARIABLE) # ------------------------------- # Define VARIABLE to the location where catalog files will # be installed by po/Makefile. glib_DEFUN([GLIB_DEFINE_LOCALEDIR], [glib_REQUIRE([GLIB_GNU_GETTEXT])dnl glib_save_prefix="$prefix" glib_save_exec_prefix="$exec_prefix" glib_save_datarootdir="$datarootdir" test "x$prefix" = xNONE && prefix=$ac_default_prefix test "x$exec_prefix" = xNONE && exec_prefix=$prefix datarootdir=`eval echo "${datarootdir}"` if test "x$CATOBJEXT" = "x.mo" ; then localedir=`eval echo "${libdir}/locale"` else localedir=`eval echo "${datadir}/locale"` fi prefix="$glib_save_prefix" exec_prefix="$glib_save_exec_prefix" datarootdir="$glib_save_datarootdir" AC_DEFINE_UNQUOTED($1, "$localedir", [Define the location where the catalogs will be installed]) ]) dnl dnl Now the definitions that aclocal will find dnl ifdef(glib_configure_in,[],[ AC_DEFUN([AM_GLIB_GNU_GETTEXT],[GLIB_GNU_GETTEXT($@)]) AC_DEFUN([AM_GLIB_DEFINE_LOCALEDIR],[GLIB_DEFINE_LOCALEDIR($@)]) ])dnl # GLIB_RUN_PROG(PROGRAM, TEST-FILE, [ACTION-IF-PASS], [ACTION-IF-FAIL]) # # Create a temporary file with TEST-FILE as its contents and pass the # file name to PROGRAM. Perform ACTION-IF-PASS if PROGRAM exits with # 0 and perform ACTION-IF-FAIL for any other exit status. AC_DEFUN([GLIB_RUN_PROG], [cat >conftest.foo <<_ACEOF $2 _ACEOF if AC_RUN_LOG([$1 conftest.foo]); then m4_ifval([$3], [$3], [:]) m4_ifvaln([$4], [else $4])dnl echo "$as_me: failed input was:" >&AS_MESSAGE_LOG_FD sed 's/^/| /' conftest.foo >&AS_MESSAGE_LOG_FD fi]) libsylph-1.1.0/config.guess0000755000175000017500000012626010524305372012610 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # Inc. timestamp='2006-07-02' # 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 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. # # 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 Per Bothner . # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # This script attempts to guess a canonical system name similar to # config.sub. If it succeeds, it prints the system name on stdout, and # exits with 0. Otherwise, it exits with 1. # # The plan is that this can be called by configure scripts if you # don't specify an explicit build system type. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -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 (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 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 # 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 tupples: *-*-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=`(/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 ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep __ELF__ >/dev/null 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 # 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/[-_].*/\./'` ;; 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}" exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${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 ;; 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'` exit ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; 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 ;; 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:SunOS:5.*:*) echo i386-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:*:[45]) 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/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` 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:BSD:*) 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 __LP64__ >/dev/null 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:*:*) case ${UNAME_MACHINE} in pc98) echo i386-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; i*:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; x86:Interix*:[3456]*) echo i586-pc-interix${UNAME_RELEASE} exit ;; EM64T:Interix*:[3456]*) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-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-gnu`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 '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-gnu exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; arm*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; cris:Linux:*:*) echo cris-axis-linux-gnu exit ;; crisv32:Linux:*:*) echo crisv32-axis-linux-gnu exit ;; frv:Linux:*:*) echo frv-unknown-linux-gnu exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; mips:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips #undef mipsel #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mipsel #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef mips64 #undef mips64el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=mips64el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=mips64 #else CPU= #endif #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^CPU/{ s: ::g p }'`" test x"${CPU}" != x && { echo "${CPU}-unknown-linux-gnu"; exit; } ;; or32:Linux:*:*) echo or32-unknown-linux-gnu exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-gnu exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-gnu 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 ld.so.1 >/dev/null if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi echo ${UNAME_MACHINE}-unknown-linux-gnu${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-gnu ;; PA8*) echo hppa2.0-unknown-linux-gnu ;; *) echo hppa-unknown-linux-gnu ;; esac exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-gnu exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-gnu exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-gnu exit ;; x86_64:Linux:*:*) echo x86_64-unknown-linux-gnu exit ;; i*86:Linux:*:*) # The BFD linker knows what the default object file format is, so # first see if it will tell us. cd to the root directory to prevent # problems with other programs or directories called `ld' in the path. # Set LC_ALL=C to ensure ld outputs messages in English. ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \ | sed -ne '/supported targets:/!d s/[ ][ ]*/ /g s/.*supported targets: *// s/ .*// p'` case "$ld_supported_targets" in elf32-i386) TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu" ;; a.out-i386-linux) echo "${UNAME_MACHINE}-pc-linux-gnuaout" exit ;; coff-i386) echo "${UNAME_MACHINE}-pc-linux-gnucoff" exit ;; "") # Either a pre-BFD a.out linker (linux-gnuoldld) or # one that does not give us useful --help. echo "${UNAME_MACHINE}-pc-linux-gnuoldld" exit ;; esac # Determine whether the default compiler is a.out or elf eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include #ifdef __ELF__ # ifdef __GLIBC__ # if __GLIBC__ >= 2 LIBC=gnu # else LIBC=gnulibc1 # endif # else LIBC=gnulibc1 # endif #else #if defined(__INTEL_COMPILER) || defined(__PGI) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) LIBC=gnu #else LIBC=gnuaout #endif #endif #ifdef __dietlibc__ LIBC=dietlibc #endif EOF eval "`$CC_FOR_BUILD -E $dummy.c 2>/dev/null | sed -n ' /^LIBC/{ s: ::g p }'`" test x"${LIBC}" != x && { echo "${UNAME_MACHINE}-pc-linux-${LIBC}" exit } test x"${TENTATIVE}" != x && { echo "${TENTATIVE}"; 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.0*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V: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 i386. echo i386-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; } ;; 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.0*:*) 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 ;; 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 ;; 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 case $UNAME_PROCESSOR in unknown) UNAME_PROCESSOR=powerpc ;; esac 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 ;; NSE-?:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-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 ;; esac #echo '(No uname command or uname output not recognized.)' 1>&2 #echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2 eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp 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` /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-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: libsylph-1.1.0/config.h.in0000644000175000017500000001527510504714756012326 00000000000000/* config.h.in. Generated from configure.in by autoheader. */ /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP systems. This function is required for `alloca.c' support on those systems. */ #undef CRAY_STACKSEG_END /* Define to 1 if using `alloca.c'. */ #undef C_ALLOCA /* always defined to indicate that i18n is enabled */ #undef ENABLE_NLS /* Define text domain. */ #undef GETTEXT_PACKAGE /* Define to 1 if you have `alloca', as a function or macro. */ #undef HAVE_ALLOCA /* Define to 1 if you have and it should be used (not on Ultrix). */ #undef HAVE_ALLOCA_H /* Define to 1 if you have the `bind_textdomain_codeset' function. */ #undef HAVE_BIND_TEXTDOMAIN_CODESET /* Define to 1 if you have the `dcgettext' function. */ #undef HAVE_DCGETTEXT /* Define if `struct dirent' has `d_type' member. */ #undef HAVE_DIRENT_D_TYPE /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_DIRENT_H /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you have the `fchmod' function. */ #undef HAVE_FCHMOD /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the `flock' function. */ #undef HAVE_FLOCK /* Define to 1 if fseeko (and presumably ftello) exists and is declared. */ #undef HAVE_FSEEKO /* Define to 1 if you have the `gethostname' function. */ #undef HAVE_GETHOSTNAME /* Define if the GNU gettext() function is already present or preinstalled. */ #undef HAVE_GETTEXT /* Define to 1 if you have the `getuid' function. */ #undef HAVE_GETUID /* Define if you have the iconv() function. */ #undef HAVE_ICONV /* Define to 1 if you have the `inet_addr' function. */ #undef HAVE_INET_ADDR /* Define to 1 if you have the `inet_aton' function. */ #undef HAVE_INET_ATON /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define if your file defines LC_MESSAGES. */ #undef HAVE_LC_MESSAGES /* Define to 1 if you have the header file. */ #undef HAVE_LOCALE_H /* Define to 1 if you have the `lockf' function. */ #undef HAVE_LOCKF /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `mkdir' function. */ #undef HAVE_MKDIR /* Define to 1 if you have the `mktime' function. */ #undef HAVE_MKTIME /* Define to 1 if you have the `mlock' function. */ #undef HAVE_MLOCK /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_NDIR_H /* Define to 1 if you have the header file. */ #undef HAVE_NETDB_H /* Define to 1 if you have the header file. */ #undef HAVE_PATHS_H /* Define to 1 if you have the `regcomp' function. */ #undef HAVE_REGCOMP /* Define to 1 if you have the header file. */ #undef HAVE_REGEX_H /* Define to 1 if you have the `socket' function. */ #undef HAVE_SOCKET /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR /* Define to 1 if you have the 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 `strstr' function. */ #undef HAVE_STRSTR /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_DIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_FILE_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_MMAN_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_NDIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SELECT_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_SYS_UTSNAME_H /* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* Define to 1 if you have the `truncate' function. */ #undef HAVE_TRUNCATE /* Define to 1 if you have the `uname' function. */ #undef HAVE_UNAME /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define as const if the declaration of iconv() needs const. */ #undef ICONV_CONST /* Define if you want IPv6 support. */ #undef INET6 /* 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 version of this package. */ #undef PACKAGE_VERSION /* The size of `unsigned int', as computed by sizeof. */ #undef SIZEOF_UNSIGNED_INT /* The size of `unsigned long', as computed by sizeof. */ #undef SIZEOF_UNSIGNED_LONG /* The size of `unsigned short', as computed by sizeof. */ #undef SIZEOF_UNSIGNED_SHORT /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at runtime. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ #undef STACK_DIRECTION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if your declares `struct tm'. */ #undef TM_IN_SYS_TIME /* Define if you want to use Oniguruma. */ #undef USE_ONIGURUMA /* Define if you use OpenSSL to support SSL. */ #undef USE_SSL /* Whether to use multithread or not */ #undef USE_THREADS /* Version number of package */ #undef VERSION /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #undef YYTEXT_POINTER /* Number of bits in a file offset, on hosts where this is settable. */ #undef _FILE_OFFSET_BITS /* Define to 1 to make fseeko visible on some hosts (e.g. glibc 2.2). */ #undef _LARGEFILE_SOURCE /* Define for large files, on AIX-style hosts. */ #undef _LARGE_FILES /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `long int' if does not define. */ #undef off_t /* Define to `int' if does not define. */ #undef pid_t /* Define to `unsigned int' if does not define. */ #undef size_t libsylph-1.1.0/config.sub0000755000175000017500000007746010524305372012262 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, # 2000, 2001, 2002, 2003, 2004, 2005, 2006 Free Software Foundation, # Inc. timestamp='2006-09-20' # This file is (in principle) common to ALL GNU software. # The presence of a machine in this file suggests that SOME GNU software # can handle that machine. It does not imply ALL GNU software can. # # 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 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. # # 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. # Please send patches to . Submit a context # diff and a properly formatted ChangeLog entry. # # 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. # 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 $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -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 (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005 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-dietlibc | linux-newlib* | linux-uclibc* | \ uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | netbsd*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; *) 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) os= basic_machine=$1 ;; -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*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -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 \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr | avr32 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | mcore \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64vr | mips64vrel \ | mips64orion | mips64orionel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | mt \ | msp430 \ | nios | nios2 \ | ns16k | ns32k \ | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \ | pyramid \ | score \ | sh | sh[1234] | sh[24]a | 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 \ | spu | strongarm \ | tahoe | thumb | tic4x | tic80 | tron \ | v850 | v850e \ | we32k \ | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \ | z8k) basic_machine=$basic_machine-unknown ;; m6811 | m68hc11 | m6812 | m68hc12) # Motorola 68HC11/12. basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-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-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64vr-* | mips64vrel-* \ | mips64orion-* | mips64orionel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nios-* | nios2-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \ | pyramid-* \ | romp-* | rs6000-* \ | sh-* | sh[1234]-* | sh[24]a-* | 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-* | strongarm-* | sv1-* | sx?-* \ | tahoe-* | thumb-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tron-* \ | v850-* | v850e-* | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \ | xstormy16-* | xtensa-* \ | ymp-* \ | z8k-*) ;; # 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-unknown 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 ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; c90) basic_machine=c90-cray os=-unicos ;; 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 ;; cr16c) basic_machine=cr16c-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 ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; 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 ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; # I'm not sure what "Sysv32" means. Should this be sysv3.2? 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 ;; i386-vsta | 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 ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; 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 ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; mvs) basic_machine=i370-ibm os=-mvs ;; 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 ;; nsr-tandem) basic_machine=nsr-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 ;; 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) basic_machine=powerpc-unknown ;; ppc-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) 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 | ppc64-le | powerpc64-little) 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) 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 ;; sh) basic_machine=sh-hitachi os=-hms ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | 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 ;; 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 ;; tic54x | c54x*) basic_machine=tic54x-unknown os=-coff ;; tic55x | c55x*) basic_machine=tic55x-unknown os=-coff ;; tic6x | c6x*) basic_machine=tic6x-unknown os=-coff ;; 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 ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; 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 ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; 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. -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First 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* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -openbsd* | -solidbsd* \ | -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* \ | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers*) # 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 | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -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 ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -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 ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -kaos*) os=-kaos ;; -zvmoe) os=-zvmoe ;; -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 ;; # 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 # This also exists in the configure program, but was not the # default. # os=-sunos4 ;; m68*-cisco) os=-aout ;; 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 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-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 ;; *-next) os=-nextstep3 ;; *-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 ;; -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-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: libsylph-1.1.0/configure0000755000175000017500000320532210760422454012202 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.61. # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, # 2002, 2003, 2004, 2005, 2006 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=: # Zsh 3.x and 4.x performs 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 # PATH needs CR # 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 # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false 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.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. 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 # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH if test "x$CONFIG_SHELL" = x; then if (eval ":") 2>/dev/null; then as_have_required=yes else as_have_required=no fi if test $as_have_required = yes && (eval ": (as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=\$LINENO as_lineno_2=\$LINENO test \"x\$as_lineno_1\" != \"x\$as_lineno_2\" && test \"x\`expr \$as_lineno_1 + 1\`\" = \"x\$as_lineno_2\") || { (exit 1); exit 1; } ") 2> /dev/null; then : else as_candidate_shells= as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. case $as_dir in /*) for as_base in sh bash ksh sh5; do as_candidate_shells="$as_candidate_shells $as_dir/$as_base" done;; esac done IFS=$as_save_IFS for as_shell in $as_candidate_shells $SHELL; do # Try only shells that exist, to save several forks. if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { ("$as_shell") 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs 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 : _ASEOF }; then CONFIG_SHELL=$as_shell as_have_required=yes if { "$as_shell" 2> /dev/null <<\_ASEOF if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs 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_func_return () { (exit $1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = "$1" ); then : else exitcode=1 echo positional parameters were not saved. fi test $exitcode = 0) || { (exit 1); exit 1; } ( as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2") || { (exit 1); exit 1; } _ASEOF }; then break fi fi done if test "x$CONFIG_SHELL" != x; then for as_var in BASH_ENV ENV do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done export CONFIG_SHELL exec "$CONFIG_SHELL" "$as_myself" ${1+"$@"} fi if test $as_have_required = no; then echo This script requires a shell more modern than all the echo shells that I found on your system. Please install a echo modern shell, or manually run the script under such a echo shell if you do have one. { (exit 1); exit 1; } fi fi fi (eval "as_func_return () { (exit \$1) } as_func_success () { as_func_return 0 } as_func_failure () { as_func_return 1 } as_func_ret_success () { return 0 } as_func_ret_failure () { return 1 } exitcode=0 if as_func_success; then : else exitcode=1 echo as_func_success failed. fi if as_func_failure; then exitcode=1 echo as_func_failure succeeded. fi if as_func_ret_success; then : else exitcode=1 echo as_func_ret_success failed. fi if as_func_ret_failure; then exitcode=1 echo as_func_ret_failure succeeded. fi if ( set x; as_func_ret_success y && test x = \"\$1\" ); then : else exitcode=1 echo positional parameters were not saved. fi test \$exitcode = 0") || { echo No shell found that supports shell functions. echo Please tell autoconf@gnu.org about your system, echo including any error possibly output before this echo message } as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. 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" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi 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 fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi 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=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\$\\$0,'$0','` ;; esac echo=${ECHO-echo} if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "$0" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null 2>&1 && unset CDPATH if test -z "$ECHO"; then if test "X${echo_test_string+set}" != Xset; then # find a string as large as possible, as long as the shell can cope with it for cmd in 'sed 50q "$0"' 'sed 20q "$0"' 'sed 10q "$0"' 'sed 2q "$0"' 'echo test'; do # expected sizes: less than 2Kb, 1Kb, 512 bytes, 16 bytes, ... if (echo_test_string=`eval $cmd`) 2>/dev/null && echo_test_string=`eval $cmd` && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "$0" --no-reexec ${1+"$@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL $0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "$0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL $0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "$0"' 'sed 10q "$0"' 'sed 20q "$0"' 'sed 50q "$0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "$0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "$0" ${1+"$@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL $0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\$0 --fallback-echo" fi tagnames=${tagnames+${tagnames},}CXX tagnames=${tagnames+${tagnames},}F77 exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= SHELL=${CONFIG_SHELL-/bin/sh} # Identity of this package. PACKAGE_NAME= PACKAGE_TARNAME= PACKAGE_VERSION= PACKAGE_STRING= PACKAGE_BUGREPORT= ac_unique_file="libsylph/account.c" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir localstatedir includedir oldincludedir docdir infodir htmldir dvidir pdfdir psdir libdir localedir mandir DEFS ECHO_C ECHO_N ECHO_T LIBS build_alias host_alias target_alias build build_cpu build_vendor build_os host host_cpu host_vendor host_os target target_cpu target_vendor target_os INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO SET_MAKE MAJOR_VERSION MINOR_VERSION MICRO_VERSION BUILD_REVISION LT_RELEASE LT_CURRENT LT_REVISION LT_AGE MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT LN_S CPP LEX LEX_OUTPUT_ROOT LEXLIB YACC YFLAGS GREP EGREP ECHO AR RANLIB STRIP CXX CXXFLAGS ac_ct_CXX CXXCPP F77 FFLAGS ac_ct_F77 LIBTOOL WINDRES HAVE_WINDRES_TRUE HAVE_WINDRES_FALSE OS_WIN32_TRUE OS_WIN32_FALSE PKG_CONFIG GLIB_CFLAGS GLIB_LIBS GLIB_GENMARSHAL GOBJECT_QUERY GLIB_MKENUMS LIBICONV LTLIBICONV GETTEXT_PACKAGE USE_NLS MSGFMT MSGFMT_OPTS GMSGFMT XGETTEXT CATALOGS CATOBJEXT DATADIRNAME GMOFILES INSTOBJEXT INTLLIBS PO_IN_DATADIR_TRUE PO_IN_DATADIR_FALSE POFILES POSUB MKINSTALLDIRS OPENSSL_CFLAGS OPENSSL_LIBS ALLOCA LIBOBJS LTLIBOBJS' ac_subst_files='' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP YACC YFLAGS CXX CXXFLAGS CCC CXXCPP F77 FFLAGS PKG_CONFIG OPENSSL_CFLAGS OPENSSL_LIBS' # Initialize some variables set by options. ac_init_help= ac_init_version=false # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *) ac_optarg=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_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=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_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_feature" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid feature name: $ac_feature" >&2 { (exit 1); exit 1; }; } ac_feature=`echo $ac_feature | sed 's/[-.]/_/g'` eval enable_$ac_feature=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=\$ac_optarg ;; -without-* | --without-*) ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_package" : ".*[^-._$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid package name: $ac_package" >&2 { (exit 1); exit 1; }; } ac_package=`echo $ac_package | sed 's/[-.]/_/g'` eval with_$ac_package=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 ;; -*) { echo "$as_me: error: unrecognized option: $ac_option Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null && { echo "$as_me: error: invalid variable name: $ac_envvar" >&2 { (exit 1); exit 1; }; } eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && 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'` { echo "$as_me: error: missing argument to $ac_option" >&2 { (exit 1); exit 1; }; } fi # Be sure to have absolute directory names. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2 { (exit 1); exit 1; }; } 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 echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host. If a cross compiler is detected then cross compile mode will be used." >&2 elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || { echo "$as_me: error: Working directory cannot be determined" >&2 { (exit 1); exit 1; }; } test "X$ac_ls_di" = "X$ac_pwd_ls_di" || { echo "$as_me: error: pwd does not report name of working directory" >&2 { (exit 1); exit 1; }; } # 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 -- "$0" || $as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$0" : 'X\(//\)[^/]' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X"$0" | 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 .." { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2 { (exit 1); exit 1; }; } fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || { echo "$as_me: error: $ac_msg" >&2 { (exit 1); exit 1; }; } pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF 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 System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] --target=TARGET configure for building compilers for TARGET [HOST] _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-maintainer-mode enable make rules and dependencies not useful (and sometimes confusing) to the casual installer --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --disable-glibtest do not try to compile and run a test GLIB program --disable-rpath do not hardcode runtime library paths --disable-ssl Disable SSL support using OpenSSL --enable-oniguruma Use Oniguruma instead of system's regex [default=no] --disable-ipv6 Disable IPv6 support --disable-largefile omit support for large files Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-pic try to use only PIC/non-PIC objects [default=use both] --with-tags[=TAGS] include additional configurations [automatic] --with-gnu-ld assume the C compiler uses GNU ld default=no --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib --without-libiconv-prefix don't search for libiconv in includedir and libdir --with-localedir=DIR Locale directory 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 C/C++/Objective C preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor YACC The `Yet Another C Compiler' implementation to use. Defaults to the first program found out of: `bison -y', `byacc', `yacc'. YFLAGS The list of arguments that will be passed by default to $YACC. This script will default YFLAGS to the empty string to avoid a default value of `-d' given by some make applications. CXX C++ compiler command CXXFLAGS C++ compiler flags CXXCPP C++ preprocessor F77 Fortran 77 compiler command FFLAGS Fortran 77 compiler flags PKG_CONFIG path to pkg-config utility OPENSSL_CFLAGS C compiler flags for OPENSSL, overriding pkg-config OPENSSL_LIBS linker flags for OPENSSL, overriding pkg-config Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. _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" || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`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 echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.61 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006 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 cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.61. 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=. 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=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;; 2) ac_configure_args1="$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 ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac done done $as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; } $as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; } # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo cat <<\_ASBOX ## ---------------- ## ## Cache variables. ## ## ---------------- ## _ASBOX echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo cat <<\_ASBOX ## ----------------- ## ## Output variables. ## ## ----------------- ## _ASBOX echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then cat <<\_ASBOX ## ------------------- ## ## File substitutions. ## ## ------------------- ## _ASBOX echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then cat <<\_ASBOX ## ----------- ## ## confdefs.h. ## ## ----------- ## _ASBOX echo cat confdefs.h echo fi test "$ac_signal" != 0 && echo "$as_me: caught signal $ac_signal" 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'; { (exit 1); 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 # 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 # Let the site file select an alternate cache file if it wants to. # Prefer explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then set x "$CONFIG_SITE" elif test "x$prefix" != xNONE; then set x "$prefix/share/config.site" "$prefix/etc/config.site" else set x "$ac_default_prefix/share/config.site" \ "$ac_default_prefix/etc/config.site" fi shift for ac_site_file do if test -r "$ac_site_file"; then { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5 echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special # files actually), so we avoid doing that. if test -f "$cache_file"; then { echo "$as_me:$LINENO: loading cache $cache_file" >&5 echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { echo "$as_me:$LINENO: creating cache $cache_file" >&5 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,) { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5 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 { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5 echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} { echo "$as_me:$LINENO: former value: $ac_old_val" >&5 echo "$as_me: former value: $ac_old_val" >&2;} { echo "$as_me:$LINENO: current value: $ac_new_val" >&5 echo "$as_me: current value: $ac_new_val" >&2;} ac_cache_corrupted=: fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`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. *) ac_configure_args="$ac_configure_args '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5 echo "$as_me: error: changes in the environment can compromise the build" >&2;} { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5 echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;} { (exit 1); exit 1; }; } 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 PACKAGE=libsylph MAJOR_VERSION=1 MINOR_VERSION=1 MICRO_VERSION=0 INTERFACE_AGE=0 BINARY_AGE=0 EXTRA_VERSION= BUILD_REVISION=0 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION 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 { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&5 echo "$as_me: error: cannot find install-sh or install.sh in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" >&2;} { (exit 1); exit 1; }; } fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || { { echo "$as_me:$LINENO: error: cannot run $SHELL $ac_aux_dir/config.sub" >&5 echo "$as_me: error: cannot run $SHELL $ac_aux_dir/config.sub" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking build system type" >&5 echo $ECHO_N "checking build system type... $ECHO_C" >&6; } if test "${ac_cv_build+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 && { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5 echo "$as_me: error: cannot guess build type; you must specify one" >&2;} { (exit 1); exit 1; }; } ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&5 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $ac_build_alias failed" >&2;} { (exit 1); exit 1; }; } fi { echo "$as_me:$LINENO: result: $ac_cv_build" >&5 echo "${ECHO_T}$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) { { echo "$as_me:$LINENO: error: invalid value of canonical build" >&5 echo "$as_me: error: invalid value of canonical build" >&2;} { (exit 1); exit 1; }; };; 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 { echo "$as_me:$LINENO: checking host system type" >&5 echo $ECHO_N "checking host system type... $ECHO_C" >&6; } if test "${ac_cv_host+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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` || { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&5 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $host_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi { echo "$as_me:$LINENO: result: $ac_cv_host" >&5 echo "${ECHO_T}$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) { { echo "$as_me:$LINENO: error: invalid value of canonical host" >&5 echo "$as_me: error: invalid value of canonical host" >&2;} { (exit 1); exit 1; }; };; 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 { echo "$as_me:$LINENO: checking target system type" >&5 echo $ECHO_N "checking target system type... $ECHO_C" >&6; } if test "${ac_cv_target+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "x$target_alias" = x; then ac_cv_target=$ac_cv_host else ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || { { echo "$as_me:$LINENO: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&5 echo "$as_me: error: $SHELL $ac_aux_dir/config.sub $target_alias failed" >&2;} { (exit 1); exit 1; }; } fi fi { echo "$as_me:$LINENO: result: $ac_cv_target" >&5 echo "${ECHO_T}$ac_cv_target" >&6; } case $ac_cv_target in *-*-*) ;; *) { { echo "$as_me:$LINENO: error: invalid value of canonical target" >&5 echo "$as_me: error: invalid value of canonical target" >&2;} { (exit 1); exit 1; }; };; esac target=$ac_cv_target ac_save_IFS=$IFS; IFS='-' set x $ac_cv_target shift target_cpu=$1 target_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: target_os=$* IFS=$ac_save_IFS case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac # The aliases save the names the user supplied, while $host etc. # will get canonicalized. test -n "$target_alias" && test "$program_prefix$program_suffix$program_transform_name" = \ NONENONEs,x,x, && program_prefix=${target_alias}- am__api_version="1.4" # 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. { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done IFS=$as_save_IFS 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 { echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$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' { echo "$as_me:$LINENO: checking whether build environment is sane" >&5 echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6; } # Just in case sleep 1 echo timestamp > conftestfile # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftestfile 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftestfile` fi if test "$*" != "X $srcdir/configure conftestfile" \ && test "$*" != "X conftestfile $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". { { echo "$as_me:$LINENO: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&5 echo "$as_me: error: ls -t appears to fail. Make sure there is not a broken alias in your environment" >&2;} { (exit 1); exit 1; }; } fi test "$2" = conftestfile ) then # Ok. : else { { echo "$as_me:$LINENO: error: newly created file is older than distributed files! Check your system clock" >&5 echo "$as_me: error: newly created file is older than distributed files! Check your system clock" >&2;} { (exit 1); exit 1; }; } fi rm -f conftest* { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. echo might interpret backslashes. # By default was `s,x,x', remove it if useless. cat <<\_ACEOF >conftest.sed s/[\\$]/&&/g;s/;s,x,x,$// _ACEOF program_transform_name=`echo $program_transform_name | sed -f conftest.sed` rm -f conftest.sed { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&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 { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } SET_MAKE= else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi PACKAGE=$PACKAGE VERSION=$VERSION if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5 echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;} { (exit 1); exit 1; }; } fi missing_dir=`cd $ac_aux_dir && pwd` { echo "$as_me:$LINENO: checking for working aclocal-${am__api_version}" >&5 echo $ECHO_N "checking for working aclocal-${am__api_version}... $ECHO_C" >&6; } # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. if (aclocal-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then ACLOCAL=aclocal-${am__api_version} { echo "$as_me:$LINENO: result: found" >&5 echo "${ECHO_T}found" >&6; } else ACLOCAL="$missing_dir/missing aclocal-${am__api_version}" { echo "$as_me:$LINENO: result: missing" >&5 echo "${ECHO_T}missing" >&6; } fi { echo "$as_me:$LINENO: checking for working autoconf" >&5 echo $ECHO_N "checking for working autoconf... $ECHO_C" >&6; } # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. if (autoconf --version) < /dev/null > /dev/null 2>&1; then AUTOCONF=autoconf { echo "$as_me:$LINENO: result: found" >&5 echo "${ECHO_T}found" >&6; } else AUTOCONF="$missing_dir/missing autoconf" { echo "$as_me:$LINENO: result: missing" >&5 echo "${ECHO_T}missing" >&6; } fi { echo "$as_me:$LINENO: checking for working automake-${am__api_version}" >&5 echo $ECHO_N "checking for working automake-${am__api_version}... $ECHO_C" >&6; } # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. if (automake-${am__api_version} --version) < /dev/null > /dev/null 2>&1; then AUTOMAKE=automake-${am__api_version} { echo "$as_me:$LINENO: result: found" >&5 echo "${ECHO_T}found" >&6; } else AUTOMAKE="$missing_dir/missing automake-${am__api_version}" { echo "$as_me:$LINENO: result: missing" >&5 echo "${ECHO_T}missing" >&6; } fi { echo "$as_me:$LINENO: checking for working autoheader" >&5 echo $ECHO_N "checking for working autoheader... $ECHO_C" >&6; } # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. if (autoheader --version) < /dev/null > /dev/null 2>&1; then AUTOHEADER=autoheader { echo "$as_me:$LINENO: result: found" >&5 echo "${ECHO_T}found" >&6; } else AUTOHEADER="$missing_dir/missing autoheader" { echo "$as_me:$LINENO: result: missing" >&5 echo "${ECHO_T}missing" >&6; } fi { echo "$as_me:$LINENO: checking for working makeinfo" >&5 echo $ECHO_N "checking for working makeinfo... $ECHO_C" >&6; } # Run test in a subshell; some versions of sh will print an error if # an executable is not found, even if stderr is redirected. # Redirect stdin to placate older versions of autoconf. Sigh. if (makeinfo --version) < /dev/null > /dev/null 2>&1; then MAKEINFO=makeinfo { echo "$as_me:$LINENO: result: found" >&5 echo "${ECHO_T}found" >&6; } else MAKEINFO="$missing_dir/missing makeinfo" { echo "$as_me:$LINENO: result: missing" >&5 echo "${ECHO_T}missing" >&6; } fi LT_RELEASE=$MAJOR_VERSION.$MINOR_VERSION LT_CURRENT=2 LT_REVISION=0 LT_AGE=1 ac_config_headers="$ac_config_headers config.h" ac_config_commands="$ac_config_commands default-1" { echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5 echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6; } # Check whether --enable-maintainer-mode was given. if test "${enable_maintainer_mode+set}" = set; then enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval else USE_MAINTAINER_MODE=no fi { echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5 echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6; } if test $USE_MAINTAINER_MODE = yes; then MAINTAINER_MODE_TRUE= MAINTAINER_MODE_FALSE='#' else MAINTAINER_MODE_TRUE='#' MAINTAINER_MODE_FALSE= fi MAINT=$MAINTAINER_MODE_TRUE 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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}gcc" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="gcc" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="${ac_tool_prefix}cc" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $CC" >&5 echo "${ECHO_T}$CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CC="$ac_prog" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $ac_ct_CC" >&5 echo "${ECHO_T}$ac_ct_CC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&5 echo "$as_me: error: no acceptable C compiler found in \$PATH See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out 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. { echo "$as_me:$LINENO: checking for C compiler default output file name" >&5 echo $ECHO_N "checking for C compiler default output file name... $ECHO_C" >&6; } ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # # List of possible output files, starting from the most likely. # The algorithm is not robust to junk in `.', hence go to wildcards (a.*) # only as a last resort. b.out is created by i960 compilers. ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out' # # The IRIX 6 linker writes into existing files which may not be # executable, retaining their permissions. Remove them first so a # subsequent execution test works. ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link_default") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; 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 | *.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 { echo "$as_me:$LINENO: result: $ac_file" >&5 echo "${ECHO_T}$ac_file" >&6; } if test -z "$ac_file"; then echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: C compiler cannot create executables See \`config.log' for more details." >&5 echo "$as_me: error: C compiler cannot create executables See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } fi ac_exeext=$ac_cv_exeext # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether the C compiler works" >&5 echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6; } # FIXME: These cross compiler hacks should be removed for Autoconf 3.0 # If not cross compiling, check that we can run a simple program. if test "$cross_compiling" != yes; then if { ac_try='./$ac_file' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { echo "$as_me:$LINENO: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&5 echo "$as_me: error: cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi fi fi { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } rm -f a.out a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { echo "$as_me:$LINENO: checking whether we are cross compiling" >&5 echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $cross_compiling" >&5 echo "${ECHO_T}$cross_compiling" >&6; } { echo "$as_me:$LINENO: checking for suffix of executables" >&5 echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6; } if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; 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 | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of executables: cannot compile and link See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest$ac_cv_exeext { echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5 echo "${ECHO_T}$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT { echo "$as_me:$LINENO: checking for suffix of object files" >&5 echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6; } if test "${ac_cv_objext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; 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 ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute suffix of object files: cannot compile See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_objext" >&5 echo "${ECHO_T}$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6; } if test "${ac_cv_c_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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 { echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6; } GCC=`test $ac_compiler_gnu = yes && echo yes` ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5 echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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 { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5 echo "${ECHO_T}$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 { echo "$as_me:$LINENO: checking for $CC option to accept ISO C89" >&5 echo $ECHO_N "checking for $CC option to accept ISO C89... $ECHO_C" >&6; } if test "${ac_cv_prog_cc_c89+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cc_c89=$ac_arg else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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) { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } ;; xno) { echo "$as_me:$LINENO: result: unsupported" >&5 echo "${ECHO_T}unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { echo "$as_me:$LINENO: result: $ac_cv_prog_cc_c89" >&5 echo "${ECHO_T}$ac_cv_prog_cc_c89" >&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 { echo "$as_me:$LINENO: checking for library containing strerror" >&5 echo $ECHO_N "checking for library containing strerror... $ECHO_C" >&6; } if test "${ac_cv_search_strerror+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char strerror (); int main () { return strerror (); ; return 0; } _ACEOF for ac_lib in '' cposix; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_search_strerror=$ac_res else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_strerror+set}" = set; then break fi done if test "${ac_cv_search_strerror+set}" = set; then : else ac_cv_search_strerror=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_search_strerror" >&5 echo "${ECHO_T}$ac_cv_search_strerror" >&6; } ac_res=$ac_cv_search_strerror if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi { echo "$as_me:$LINENO: checking for ${CC-cc} option to accept ANSI C" >&5 echo $ECHO_N "checking for ${CC-cc} option to accept ANSI C... $ECHO_C" >&6; } if test "${am_cv_prog_cc_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else am_cv_prog_cc_stdc=no ac_save_CC="$CC" # Don't try gcc -ansi; that turns off useful extensions and # breaks some systems' header files. # AIX -qlanglvl=ansi # Ultrix and OSF/1 -std1 # HP-UX -Aa -D_HPUX_SOURCE # SVR4 -Xc -D__EXTENSIONS__ for ac_arg in "" -qlanglvl=ansi -std1 "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } 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 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then am_cv_prog_cc_stdc="$ac_arg"; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done CC="$ac_save_CC" fi if test -z "$am_cv_prog_cc_stdc"; then { echo "$as_me:$LINENO: result: none needed" >&5 echo "${ECHO_T}none needed" >&6; } else { echo "$as_me:$LINENO: result: $am_cv_prog_cc_stdc" >&5 echo "${ECHO_T}$am_cv_prog_cc_stdc" >&6; } fi case "x$am_cv_prog_cc_stdc" in x|xno) ;; *) CC="$CC $am_cv_prog_cc_stdc" ;; esac # 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. { echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5 echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6; } if test -z "$INSTALL"; then if test "${ac_cv_path_install+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in ./ | .// | /cC/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:\\/os2\\/install\\/* | ?:\\/OS2\\/INSTALL\\/* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi done done ;; esac done IFS=$as_save_IFS 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 { echo "$as_me:$LINENO: result: $INSTALL" >&5 echo "${ECHO_T}$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' { echo "$as_me:$LINENO: checking whether ln -s works" >&5 echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no, using $LN_S" >&5 echo "${ECHO_T}no, using $LN_S" >&6; } fi { echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5 echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6; } set x ${MAKE-make}; ac_make=`echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&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 { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } SET_MAKE= else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } SET_MAKE="MAKE=${MAKE-make}" 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 { echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5 echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if test "${ac_cv_prog_CPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { echo "$as_me:$LINENO: result: $CPP" >&5 echo "${ECHO_T}$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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } 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 missing_dir=`cd $ac_aux_dir && pwd` for ac_prog in flex lex do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_LEX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$LEX"; then ac_cv_prog_LEX="$LEX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LEX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LEX=$ac_cv_prog_LEX if test -n "$LEX"; then { echo "$as_me:$LINENO: result: $LEX" >&5 echo "${ECHO_T}$LEX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$LEX" && break done test -n "$LEX" || LEX="$missing_dir/missing flex" for ac_prog in flex lex do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_LEX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$LEX"; then ac_cv_prog_LEX="$LEX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_LEX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LEX=$ac_cv_prog_LEX if test -n "$LEX"; then { echo "$as_me:$LINENO: result: $LEX" >&5 echo "${ECHO_T}$LEX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$LEX" && break done test -n "$LEX" || LEX=":" if test "x$LEX" != "x:"; then cat >conftest.l <<_ACEOF %% a { ECHO; } b { REJECT; } c { yymore (); } d { yyless (1); } e { yyless (input () != 0); } f { unput (yytext[0]); } . { BEGIN INITIAL; } %% #ifdef YYTEXT_POINTER extern char *yytext; #endif int main (void) { return ! yylex () + ! yywrap (); } _ACEOF { (ac_try="$LEX conftest.l" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$LEX conftest.l") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: checking lex output file root" >&5 echo $ECHO_N "checking lex output file root... $ECHO_C" >&6; } if test "${ac_cv_prog_lex_root+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -f lex.yy.c; then ac_cv_prog_lex_root=lex.yy elif test -f lexyy.c; then ac_cv_prog_lex_root=lexyy else { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5 echo "$as_me: error: cannot find output from $LEX; giving up" >&2;} { (exit 1); exit 1; }; } fi fi { echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5 echo "${ECHO_T}$ac_cv_prog_lex_root" >&6; } LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root if test -z "${LEXLIB+set}"; then { echo "$as_me:$LINENO: checking lex library" >&5 echo $ECHO_N "checking lex library... $ECHO_C" >&6; } if test "${ac_cv_lib_lex+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_LIBS=$LIBS ac_cv_lib_lex='none needed' for ac_lib in '' -lfl -ll; do LIBS="$ac_lib $ac_save_LIBS" cat >conftest.$ac_ext <<_ACEOF `cat $LEX_OUTPUT_ROOT.c` _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_lex=$ac_lib else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext test "$ac_cv_lib_lex" != 'none needed' && break done LIBS=$ac_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_lex" >&5 echo "${ECHO_T}$ac_cv_lib_lex" >&6; } test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex fi { echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5 echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6; } if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # POSIX says lex can declare yytext either as a pointer or an array; the # default is implementation-dependent. Figure out which it is, since # not all implementations provide the %pointer and %array declarations. ac_cv_prog_lex_yytext_pointer=no ac_save_LIBS=$LIBS LIBS="$LEXLIB $ac_save_LIBS" cat >conftest.$ac_ext <<_ACEOF #define YYTEXT_POINTER 1 `cat $LEX_OUTPUT_ROOT.c` _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_prog_lex_yytext_pointer=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5 echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6; } if test $ac_cv_prog_lex_yytext_pointer = yes; then cat >>confdefs.h <<\_ACEOF #define YYTEXT_POINTER 1 _ACEOF fi rm -f conftest.l $LEX_OUTPUT_ROOT.c fi for ac_prog in 'bison -y' byacc do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_YACC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$YACC"; then ac_cv_prog_YACC="$YACC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_YACC="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi YACC=$ac_cv_prog_YACC if test -n "$YACC"; then { echo "$as_me:$LINENO: result: $YACC" >&5 echo "${ECHO_T}$YACC" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$YACC" && break done test -n "$YACC" || YACC="yacc" # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi { echo "$as_me:$LINENO: checking for a sed that does not truncate output" >&5 echo $ECHO_N "checking for a sed that does not truncate output... $ECHO_C" >&6; } if test "${lt_cv_path_SED+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done fi SED=$lt_cv_path_SED { echo "$as_me:$LINENO: result: $SED" >&5 echo "${ECHO_T}$SED" >&6; } { echo "$as_me:$LINENO: checking for grep that handles long lines and -e" >&5 echo $ECHO_N "checking for grep that handles long lines and -e... $ECHO_C" >&6; } if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Extract the first word of "grep ggrep" to use in msg output if test -z "$GREP"; then set dummy grep ggrep; ac_prog_name=$2 if test "${ac_cv_path_GREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" 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 ac_count=`expr $ac_count + 1` 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 fi GREP="$ac_cv_path_GREP" if test -z "$GREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_GREP=$GREP fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_GREP" >&5 echo "${ECHO_T}$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { echo "$as_me:$LINENO: checking for egrep" >&5 echo $ECHO_N "checking for egrep... $ECHO_C" >&6; } if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else # Extract the first word of "egrep" to use in msg output if test -z "$EGREP"; then set dummy egrep; ac_prog_name=$2 if test "${ac_cv_path_EGREP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" 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 ac_count=`expr $ac_count + 1` 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 fi EGREP="$ac_cv_path_EGREP" if test -z "$EGREP"; then { { echo "$as_me:$LINENO: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&5 echo "$as_me: error: no acceptable $ac_prog_name could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" >&2;} { (exit 1); exit 1; }; } fi else ac_cv_path_EGREP=$EGREP fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_path_EGREP" >&5 echo "${ECHO_T}$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } else { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 echo "${ECHO_T}$LD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { echo "$as_me:$LINENO: checking for $LD option to reload object files" >&5 echo $ECHO_N "checking for $LD option to reload object files... $ECHO_C" >&6; } if test "${lt_cv_ld_reload_flag+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_ld_reload_flag='-r' fi { echo "$as_me:$LINENO: result: $lt_cv_ld_reload_flag" >&5 echo "${ECHO_T}$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac { echo "$as_me:$LINENO: checking for BSD-compatible nm" >&5 echo $ECHO_N "checking for BSD-compatible nm... $ECHO_C" >&6; } if test "${lt_cv_path_NM+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi fi { echo "$as_me:$LINENO: result: $lt_cv_path_NM" >&5 echo "${ECHO_T}$lt_cv_path_NM" >&6; } NM="$lt_cv_path_NM" { echo "$as_me:$LINENO: checking how to recognise dependent libraries" >&5 echo $ECHO_N "checking how to recognise dependent libraries... $ECHO_C" >&6; } if test "${lt_cv_deplibs_check_method+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix4* | aix5*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump'. lt_cv_deplibs_check_method='file_magic file format pei*-i386(.*architecture: i386)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9].[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix3*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux* | k*bsd*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx*) lt_cv_deplibs_check_method=unknown ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac fi { echo "$as_me:$LINENO: result: $lt_cv_deplibs_check_method" >&5 echo "${ECHO_T}$lt_cv_deplibs_check_method" >&6; } file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line 4904 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { echo "$as_me:$LINENO: checking whether the C compiler needs -belf" >&5 echo $ECHO_N "checking whether the C compiler needs -belf... $ECHO_C" >&6; } if test "${lt_cv_cc_needs_belf+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then lt_cv_cc_needs_belf=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext 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 fi { echo "$as_me:$LINENO: result: $lt_cv_cc_needs_belf" >&5 echo "${ECHO_T}$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; sparc*-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) LD="${LD-ld} -m elf64_sparc" ;; *) LD="${LD-ld} -64" ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" { echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF 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=`echo "ac_cv_header_$ac_header" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { echo "$as_me:$LINENO: result: $CXX" >&5 echo "${ECHO_T}$CXX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_CXX="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5 echo "${ECHO_T}$ac_ct_CXX" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. echo "$as_me:$LINENO: checking for C++ compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5 echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6; } if test "${ac_cv_cxx_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6; } GXX=`test $ac_compiler_gnu = yes && echo yes` ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5 echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_cxx_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 CXXFLAGS="" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_cxx_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5 echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5 echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6; } if test -z "$CXXCPP"; then if test "${ac_cv_prog_CXXCPP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { echo "$as_me:$LINENO: result: $CXXCPP" >&5 echo "${ECHO_T}$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Broken: fails on valid input. continue fi rm -f conftest.err conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then # Broken: success on invalid input. continue else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&5 echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details." >&2;} { (exit 1); exit 1; }; } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu fi ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu if test -n "$ac_tool_prefix"; then for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn 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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$F77"; then ac_cv_prog_F77="$F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_F77="$ac_tool_prefix$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi F77=$ac_cv_prog_F77 if test -n "$F77"; then { echo "$as_me:$LINENO: result: $F77" >&5 echo "${ECHO_T}$F77" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$F77" && break done fi if test -z "$F77"; then ac_ct_F77=$F77 for ac_prog in g77 xlf f77 frt pgf77 cf77 fort77 fl32 af77 xlf90 f90 pgf90 pghpf epcf90 gfortran g95 xlf95 f95 fort ifort ifc efc pgf95 lf95 ftn do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_F77"; then ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_F77="$ac_prog" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_F77=$ac_cv_prog_ac_ct_F77 if test -n "$ac_ct_F77"; then { echo "$as_me:$LINENO: result: $ac_ct_F77" >&5 echo "${ECHO_T}$ac_ct_F77" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -n "$ac_ct_F77" && break done if test "x$ac_ct_F77" = x; then F77="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac F77=$ac_ct_F77 fi fi # Provide some information about the compiler. echo "$as_me:$LINENO: checking for Fortran 77 compiler version" >&5 ac_compiler=`set X $ac_compile; echo $2` { (ac_try="$ac_compiler --version >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler --version >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -v >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -v >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { (ac_try="$ac_compiler -V >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compiler -V >&5") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -f a.out # If we don't use `.F' as extension, the preprocessor is not run on the # input file. (Note that this only needs to work for GNU compilers.) ac_save_ext=$ac_ext ac_ext=F { echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5 echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6; } if test "${ac_cv_f77_compiler_gnu+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF program main #ifndef __GNUC__ choke me #endif end _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_compiler_gnu=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_f77_compiler_gnu=$ac_compiler_gnu fi { echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5 echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6; } ac_ext=$ac_save_ext ac_test_FFLAGS=${FFLAGS+set} ac_save_FFLAGS=$FFLAGS FFLAGS= { echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5 echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6; } if test "${ac_cv_prog_f77_g+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else FFLAGS=-g cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_prog_f77_g=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_prog_f77_g=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5 echo "${ECHO_T}$ac_cv_prog_f77_g" >&6; } if test "$ac_test_FFLAGS" = set; then FFLAGS=$ac_save_FFLAGS elif test $ac_cv_prog_f77_g = yes; then if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-g -O2" else FFLAGS="-g" fi else if test "x$ac_cv_f77_compiler_gnu" = xyes; then FFLAGS="-O2" else FFLAGS= fi fi G77=`test $ac_compiler_gnu = yes && echo yes` 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 # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! # find the maximum length of command line arguments { echo "$as_me:$LINENO: checking the maximum length of command line arguments" >&5 echo $ECHO_N "checking the maximum length of command line arguments... $ECHO_C" >&6; } if test "${lt_cv_sys_max_cmd_len+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} while (test "X"`$SHELL $0 --fallback-echo "X$teststring" 2>/dev/null` \ = "XX$teststring") >/dev/null 2>&1 && new_result=`expr "X$teststring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done teststring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { echo "$as_me:$LINENO: result: $lt_cv_sys_max_cmd_len" >&5 echo "${ECHO_T}$lt_cv_sys_max_cmd_len" >&6; } else { echo "$as_me:$LINENO: result: none" >&5 echo "${ECHO_T}none" >&6; } fi # Check for command to grab the raw symbol name followed by C symbol from nm. { echo "$as_me:$LINENO: checking command to parse $NM output from $compiler object" >&5 echo $ECHO_N "checking command to parse $NM output from $compiler object... $ECHO_C" >&6; } if test "${lt_cv_sys_global_symbol_pipe+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32*) symcode='[ABCDGISTW]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; linux* | k*bsd*-gnu) if test "$host_cpu" = ia64; then symcode='[ABCDGIRSTW]' lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Now try to grab the symbols. nlist=conftest.nm if { (eval echo "$as_me:$LINENO: \"$NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist\"") >&5 (eval $NM conftest.$ac_objext \| $lt_cv_sys_global_symbol_pipe \> $nlist) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { echo "$as_me:$LINENO: result: failed" >&5 echo "${ECHO_T}failed" >&6; } else { echo "$as_me:$LINENO: result: ok" >&5 echo "${ECHO_T}ok" >&6; } fi { echo "$as_me:$LINENO: checking for objdir" >&5 echo $ECHO_N "checking for objdir... $ECHO_C" >&6; } if test "${lt_cv_objdir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { echo "$as_me:$LINENO: result: $lt_cv_objdir" >&5 echo "${ECHO_T}$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e 1s/^X//' sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. set dummy ${ac_tool_prefix}ar; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_AR="${ac_tool_prefix}ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { echo "$as_me:$LINENO: result: $AR" >&5 echo "${ECHO_T}$AR" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi fi if test -z "$ac_cv_prog_AR"; then ac_ct_AR=$AR # Extract the first word of "ar", so it can be a program name with args. set dummy ar; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_AR+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_AR="ar" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { echo "$as_me:$LINENO: result: $ac_ct_AR" >&5 echo "${ECHO_T}$ac_ct_AR" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi else AR="$ac_cv_prog_AR" 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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $RANLIB" >&5 echo "${ECHO_T}$RANLIB" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_RANLIB="ranlib" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5 echo "${ECHO_T}$ac_ct_RANLIB" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi 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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $STRIP" >&5 echo "${ECHO_T}$STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_ac_ct_STRIP="strip" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5 echo "${ECHO_T}$ac_ct_STRIP" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { echo "$as_me:$LINENO: checking for ${ac_tool_prefix}file" >&5 echo $ECHO_N "checking for ${ac_tool_prefix}file... $ECHO_C" >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { echo "$as_me:$LINENO: checking for file" >&5 echo $ECHO_N "checking for file... $ECHO_C" >&6; } if test "${lt_cv_path_MAGIC_CMD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { echo "$as_me:$LINENO: result: $MAGIC_CMD" >&5 echo "${ECHO_T}$MAGIC_CMD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac enable_dlopen=no enable_win32_dll=no # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Check whether --with-pic was given. if test "${with_pic+set}" = set; then withval=$with_pic; pic_mode="$withval" else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= lt_save_CC="$CC" 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 # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}\n' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag=' -fno-builtin' { echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7292: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:7296: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; interix3*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; *) lt_prog_compiler_pic='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic='-qnocommon' lt_prog_compiler_wl='-Wl,' ;; esac ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic" >&5 echo "${ECHO_T}$lt_prog_compiler_pic" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic works... $ECHO_C" >&6; } if test "${lt_prog_compiler_pic_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7560: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:7564: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works" >&6; } if test x"$lt_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } if test "${lt_prog_compiler_static_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_static_works=yes fi else lt_prog_compiler_static_works=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works" >&6; } if test x"$lt_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:7664: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:7668: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } runpath_var= allow_undefined_flag= enable_shared_with_static_runtimes=no archive_cmds= archive_expsym_cmds= old_archive_From_new_cmds= old_archive_from_expsyms_cmds= export_dynamic_flag_spec= whole_archive_flag_spec= thread_safe_flag_spec= hardcode_libdir_flag_spec= hardcode_libdir_flag_spec_ld= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no hardcode_shlibpath_var=unsupported link_all_deplibs=unknown hardcode_automatic=no module_cmds= module_expsym_cmds= always_export_symbols=no export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; interix3*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac archive_cmds='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi link_all_deplibs=no else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_libdir_separator=':' link_all_deplibs=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct=yes else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported whole_archive_flag_spec='' link_all_deplibs=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs=no ;; esac fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; freebsd1*) ld_shlibs=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld='+b $libdir' hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld='-rpath $libdir' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: link_all_deplibs=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; openbsd*) hardcode_direct=yes hardcode_shlibpath_var=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine linker options so we # cannot just pass the convience library names through # without $wl, iff we do not link with $LD. # Luckily, gcc supports the same syntax we need for Sun Studio. # Supported since Solaris 2.6 (maybe 2.5.1?) case $wlarc in '') whole_archive_flag_spec='-z allextract$convenience -z defaultextract' ;; *) whole_archive_flag_spec='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac fi { echo "$as_me:$LINENO: result: $ld_shlibs" >&5 echo "${ECHO_T}$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { (eval echo "$as_me:$LINENO: \"$archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc=no else archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc" >&5 echo "${ECHO_T}$archive_cmds_need_lc" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; freebsd*) # from 4.6 on shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix3*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || \ test -n "$runpath_var" || \ test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { echo "$as_me:$LINENO: result: $hardcode_action" >&5 echo "${ECHO_T}$hardcode_action" >&6; } if test "$hardcode_action" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi striplib= old_striplib= { echo "$as_me:$LINENO: checking whether stripping libraries is possible" >&5 echo $ECHO_N "checking whether stripping libraries is possible... $ECHO_C" >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi ;; *) { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } ;; esac fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) { echo "$as_me:$LINENO: checking for shl_load" >&5 echo $ECHO_N "checking for shl_load... $ECHO_C" >&6; } if test "${ac_cv_func_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define shl_load to an innocuous variant, in case declares shl_load. For example, HP-UX 11i declares gettimeofday. */ #define shl_load innocuous_shl_load /* System header to define __stub macros and hopefully few prototypes, which can conflict with char shl_load (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef shl_load /* 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 shl_load (); /* 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_shl_load || defined __stub___shl_load choke me #endif int main () { return shl_load (); ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_func_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_shl_load=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_shl_load" >&5 echo "${ECHO_T}$ac_cv_func_shl_load" >&6; } if test $ac_cv_func_shl_load = yes; then lt_cv_dlopen="shl_load" else { echo "$as_me:$LINENO: checking for shl_load in -ldld" >&5 echo $ECHO_N "checking for shl_load in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_shl_load+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_shl_load=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_shl_load" >&5 echo "${ECHO_T}$ac_cv_lib_dld_shl_load" >&6; } if test $ac_cv_lib_dld_shl_load = yes; then lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld" else { echo "$as_me:$LINENO: checking for dlopen" >&5 echo $ECHO_N "checking for dlopen... $ECHO_C" >&6; } if test "${ac_cv_func_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define dlopen to an innocuous variant, in case declares dlopen. For example, HP-UX 11i declares gettimeofday. */ #define dlopen innocuous_dlopen /* System header to define __stub macros and hopefully few prototypes, which can conflict with char dlopen (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef dlopen /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); /* 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_dlopen || defined __stub___dlopen choke me #endif int main () { return dlopen (); ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_func_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_dlopen" >&5 echo "${ECHO_T}$ac_cv_func_dlopen" >&6; } if test $ac_cv_func_dlopen = yes; then lt_cv_dlopen="dlopen" else { echo "$as_me:$LINENO: checking for dlopen in -ldl" >&5 echo $ECHO_N "checking for dlopen in -ldl... $ECHO_C" >&6; } if test "${ac_cv_lib_dl_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dl_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dl_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_dl_dlopen" >&6; } if test $ac_cv_lib_dl_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { echo "$as_me:$LINENO: checking for dlopen in -lsvld" >&5 echo $ECHO_N "checking for dlopen in -lsvld... $ECHO_C" >&6; } if test "${ac_cv_lib_svld_dlopen+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_svld_dlopen=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_svld_dlopen" >&5 echo "${ECHO_T}$ac_cv_lib_svld_dlopen" >&6; } if test $ac_cv_lib_svld_dlopen = yes; then lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { echo "$as_me:$LINENO: checking for dld_link in -ldld" >&5 echo $ECHO_N "checking for dld_link in -ldld... $ECHO_C" >&6; } if test "${ac_cv_lib_dld_dld_link+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_dld_dld_link=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_dld_dld_link" >&5 echo "${ECHO_T}$ac_cv_lib_dld_dld_link" >&6; } if test $ac_cv_lib_dld_dld_link = yes; then lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { echo "$as_me:$LINENO: checking whether a program can dlopen itself" >&5 echo $ECHO_N "checking whether a program can dlopen itself... $ECHO_C" >&6; } if test "${lt_cv_dlopen_self+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self" >&5 echo "${ECHO_T}$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { echo "$as_me:$LINENO: checking whether a statically linked program can dlopen itself" >&5 echo $ECHO_N "checking whether a statically linked program can dlopen itself... $ECHO_C" >&6; } if test "${lt_cv_dlopen_self_static+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } else puts (dlerror ()); exit (status); } EOF if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 (eval $ac_link) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_dlopen_self_static" >&5 echo "${ECHO_T}$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi # Report which library types will actually be built { echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6; } # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler \ CC \ LD \ lt_prog_compiler_wl \ lt_prog_compiler_pic \ lt_prog_compiler_static \ lt_prog_compiler_no_builtin_flag \ export_dynamic_flag_spec \ thread_safe_flag_spec \ whole_archive_flag_spec \ enable_shared_with_static_runtimes \ old_archive_cmds \ old_archive_from_new_cmds \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ archive_cmds \ archive_expsym_cmds \ postinstall_cmds \ postuninstall_cmds \ old_archive_from_expsyms_cmds \ allow_undefined_flag \ no_undefined_flag \ export_symbols_cmds \ hardcode_libdir_flag_spec \ hardcode_libdir_flag_spec_ld \ hardcode_libdir_separator \ hardcode_automatic \ module_cmds \ module_expsym_cmds \ lt_cv_prog_compiler_c_o \ exclude_expsyms \ include_expsyms; do case $var in old_archive_cmds | \ old_archive_from_new_cmds | \ archive_cmds | \ archive_expsym_cmds | \ module_cmds | \ module_expsym_cmds | \ old_archive_from_expsyms_cmds | \ export_symbols_cmds | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="${ofile}T" trap "$rm \"$cfgfile\"; exit 1" 1 2 15 $rm -f "$cfgfile" { echo "$as_me:$LINENO: creating $ofile" >&5 echo "$as_me: creating $ofile" >&6;} cat <<__EOF__ >> "$cfgfile" #! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 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 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. # # 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. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e 1s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler # Is the compiler the GNU C compiler? with_gcc=$GCC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # ### END LIBTOOL CONFIG __EOF__ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" # Check whether --with-tags was given. if test "${with_tags+set}" = set; then withval=$with_tags; tagnames="$withval" fi if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not exist" >&5 echo "$as_me: WARNING: output file \`$ofile' does not exist" >&2;} fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then { echo "$as_me:$LINENO: WARNING: output file \`$ofile' does not look like a libtool script" >&5 echo "$as_me: WARNING: output file \`$ofile' does not look like a libtool script" >&2;} else { echo "$as_me:$LINENO: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&5 echo "$as_me: WARNING: using \`LTCC=$LTCC', extracted from \`$ofile'" >&2;} fi fi if test -z "$LTCFLAGS"; then eval "`$SHELL ${ofile} --config | grep '^LTCFLAGS='`" fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]::g'` in "") ;; *) { { echo "$as_me:$LINENO: error: invalid tag name: $tagname" >&5 echo "$as_me: error: invalid tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then { { echo "$as_me:$LINENO: error: tag name \"$tagname\" already exists" >&5 echo "$as_me: error: tag name \"$tagname\" already exists" >&2;} { (exit 1); exit 1; }; } fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_flag_spec_ld_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC compiler_CXX=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { echo "$as_me:$LINENO: checking for ld used by $CC" >&5 echo $ECHO_N "checking for ld used by $CC... $ECHO_C" >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } else { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } fi if test "${lt_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 echo "${ECHO_T}$LD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } if test "${lt_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct_CXX=yes else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_CXX=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_CXX='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_CXX='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_CXX='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' ${wl}-bernotok' allow_undefined_flag_CXX=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' archive_cmds_need_lc_CXX=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_CXX='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_CXX='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_CXX='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_CXX='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported whole_archive_flag_spec_CXX='' link_all_deplibs_CXX=yes if test "$GXX" = yes ; then lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | $EGREP 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_cmds_CXX='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else archive_cmds_CXX='$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds if test "X$lt_int_apple_cc_single_mod" = Xyes ; then archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_CXX='$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_CXX='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj ${wl}-single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_CXX='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_CXX=no ;; esac fi ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd[12]*) # C++ shared libraries reported to be fairly broken before switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; gnu*) ;; hpux9*) hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='${wl}-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "[-]L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then archive_cmds_CXX='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then hardcode_libdir_flag_spec_CXX='${wl}+b ${wl}$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_CXX='+b $libdir' ;; *) export_dynamic_flag_spec_CXX='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix3*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' hardcode_libdir_flag_spec_CXX='${wl}--rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc*) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC*) # Portland Group C++ compiler archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_CXX='${wl}--export-dynamic' whole_archive_flag_spec_CXX='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; openbsd2*) # C++ shared libraries are fairly broken ld_shlibs_CXX=no ;; openbsd*) hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='${wl}-E' whole_archive_flag_spec_CXX="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd='echo' ;; osf3*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~ $rm $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then allow_undefined_flag_CXX=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_CXX='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The C++ compiler is used as linker so we must use $wl # flag to pass the commands to the underlying system # linker. We must also pass each convience library through # to the system linker between allextract/defaultextract. # The C++ compiler will combine linker options so we # cannot just pass the convience library names through # without $wl. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='echo' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then no_undefined_flag_CXX=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' archive_expsym_cmds_CXX='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi hardcode_libdir_flag_spec_CXX='${wl}-R $wl$libdir' fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='${wl}-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. # So that behaviour is only enabled if SCOABSPATH is set to a # non-empty value in the environment. Most likely only useful for # creating official distributions of packages. # This is a hack until libtool officially supports absolute path # names for shared libraries. no_undefined_flag_CXX='${wl}-z,text' allow_undefined_flag_CXX='${wl}-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no GCC_CXX="$GXX" LD_CXX="$LD" cat > conftest.$ac_ext <&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no # The `*' in the case matches for architectures that use `case' in # $output_verbose_cmd can trigger glob expansion during the loop # eval without this substitution. output_verbose_link_cmd=`$echo "X$output_verbose_link_cmd" | $Xsed -e "$no_glob_subst"` for p in `eval $output_verbose_link_cmd`; do case $p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" \ || test $p = "-R"; then prev=$p continue else prev= fi if test "$pre_test_object_deps_done" = no; then case $p in -L* | -R*) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX="${prev}${p}" else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX="${prev}${p}" else postdeps_CXX="${postdeps_CXX} ${prev}${p}" fi fi ;; *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$predep_objects_CXX"; then predep_objects_CXX="$p" else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX="$p" else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $rm -f confest.$objext # PORTME: override above test on systems where it is broken case $host_os in interix3*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; solaris*) case $cc_basename in CC*) # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. postdeps_CXX='-lCstd -lCrun' ;; esac ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; interix3*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix4* | aix5*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_CXX='-qnocommon' lt_prog_compiler_wl_CXX='-Wl,' ;; esac ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; icpc* | ecpc*) # Intel C++ lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC*) # Portland Group C++ compiler. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_CXX" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... $ECHO_C" >&6; } if test "${lt_prog_compiler_pic_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:12397: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:12401: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_CXX=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_CXX" >&6; } if test x"$lt_prog_compiler_pic_works_CXX" = xyes; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } if test "${lt_prog_compiler_static_works_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works_CXX=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_static_works_CXX=yes fi else lt_prog_compiler_static_works_CXX=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_CXX" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works_CXX" >&6; } if test x"$lt_prog_compiler_static_works_CXX" = xyes; then : else lt_prog_compiler_static_CXX= fi { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o_CXX+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_CXX=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:12501: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:12505: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_CXX" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_CXX" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix4* | aix5*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX="$ltdll_cmds" ;; cygwin* | mingw*) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/;/^.* __nm__/s/^.* __nm__\([^ ]*\) [^ ]*/\1 DATA/;/^I /d;/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' ;; linux* | k*bsd*-gnu) link_all_deplibs_CXX=no ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac { echo "$as_me:$LINENO: result: $ld_shlibs_CXX" >&5 echo "${ECHO_T}$ld_shlibs_CXX" >&6; } test "$ld_shlibs_CXX" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_CXX 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_CXX=no else archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_CXX" >&5 echo "${ECHO_T}$archive_cmds_need_lc_CXX" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; freebsd*) # from 4.6 on shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix3*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || \ test -n "$runpath_var_CXX" || \ test "X$hardcode_automatic_CXX" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_CXX" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, CXX)" != no && test "$hardcode_minus_L_CXX" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { echo "$as_me:$LINENO: result: $hardcode_action_CXX" >&5 echo "${ECHO_T}$hardcode_action_CXX" >&6; } if test "$hardcode_action_CXX" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_CXX \ CC_CXX \ LD_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_static_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ export_dynamic_flag_spec_CXX \ thread_safe_flag_spec_CXX \ whole_archive_flag_spec_CXX \ enable_shared_with_static_runtimes_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ postinstall_cmds_CXX \ postuninstall_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ export_symbols_cmds_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_flag_spec_ld_CXX \ hardcode_libdir_separator_CXX \ hardcode_automatic_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ lt_cv_prog_compiler_c_o_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX; do case $var in old_archive_cmds_CXX | \ old_archive_from_new_cmds_CXX | \ archive_cmds_CXX | \ archive_expsym_cmds_CXX | \ module_cmds_CXX | \ module_expsym_cmds_CXX | \ old_archive_from_expsyms_cmds_CXX | \ export_symbols_cmds_CXX | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU C compiler? with_gcc=$GCC_CXX # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_CXX # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_CXX # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_CXX old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_CXX # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_CXX # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_CXX # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_CXX # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_CXX # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_CXX" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then ac_ext=f ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5' ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_f77_compiler_gnu archive_cmds_need_lc_F77=no allow_undefined_flag_F77= always_export_symbols_F77=no archive_expsym_cmds_F77= export_dynamic_flag_spec_F77= hardcode_direct_F77=no hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_minus_L_F77=no hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= link_all_deplibs_F77=unknown old_archive_cmds_F77=$old_archive_cmds no_undefined_flag_F77= whole_archive_flag_spec_F77= enable_shared_with_static_runtimes_F77=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o objext_F77=$objext # Code to be used in simple compile tests lt_simple_compile_test_code=" subroutine t\n return\n end\n" # Code to be used in simple link tests lt_simple_link_test_code=" program t\n end\n" # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${F77-"f77"} compiler=$CC compiler_F77=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` { echo "$as_me:$LINENO: checking if libtool supports shared libraries" >&5 echo $ECHO_N "checking if libtool supports shared libraries... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $can_build_shared" >&5 echo "${ECHO_T}$can_build_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build shared libraries" >&5 echo $ECHO_N "checking whether to build shared libraries... $ECHO_C" >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4* | aix5*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { echo "$as_me:$LINENO: result: $enable_shared" >&5 echo "${ECHO_T}$enable_shared" >&6; } { echo "$as_me:$LINENO: checking whether to build static libraries" >&5 echo $ECHO_N "checking whether to build static libraries... $ECHO_C" >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { echo "$as_me:$LINENO: result: $enable_static" >&5 echo "${ECHO_T}$enable_static" >&6; } GCC_F77="$G77" LD_F77="$LD" lt_prog_compiler_wl_F77= lt_prog_compiler_pic_F77= lt_prog_compiler_static_F77= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_static_F77='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_F77='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_F77='-fno-common' ;; interix3*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_F77=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_F77=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_F77='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_F77='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_F77='-Bstatic' else lt_prog_compiler_static_F77='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_F77='-qnocommon' lt_prog_compiler_wl_F77='-Wl,' ;; esac ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_F77='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_F77='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_F77='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_F77='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_F77='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_F77='-non_shared' ;; newsos6) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-fpic' lt_prog_compiler_static_F77='-Bstatic' ;; ccc*) lt_prog_compiler_wl_F77='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_F77='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_F77='-non_shared' ;; solaris*) lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_F77='-Qoption ld ';; *) lt_prog_compiler_wl_F77='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_F77='-Qoption ld ' lt_prog_compiler_pic_F77='-PIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_F77='-Kconform_pic' lt_prog_compiler_static_F77='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_pic_F77='-KPIC' lt_prog_compiler_static_F77='-Bstatic' ;; unicos*) lt_prog_compiler_wl_F77='-Wl,' lt_prog_compiler_can_build_shared_F77=no ;; uts4*) lt_prog_compiler_pic_F77='-pic' lt_prog_compiler_static_F77='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_F77=no ;; esac fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_F77" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_F77"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_F77 works... $ECHO_C" >&6; } if test "${lt_prog_compiler_pic_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_F77=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_F77" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:14062: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:14066: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_F77=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_F77" >&6; } if test x"$lt_prog_compiler_pic_works_F77" = xyes; then case $lt_prog_compiler_pic_F77 in "" | " "*) ;; *) lt_prog_compiler_pic_F77=" $lt_prog_compiler_pic_F77" ;; esac else lt_prog_compiler_pic_F77= lt_prog_compiler_can_build_shared_F77=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_F77= ;; *) lt_prog_compiler_pic_F77="$lt_prog_compiler_pic_F77" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_F77 eval lt_tmp_static_flag=\"$lt_prog_compiler_static_F77\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } if test "${lt_prog_compiler_static_works_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works_F77=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_static_works_F77=yes fi else lt_prog_compiler_static_works_F77=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_F77" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works_F77" >&6; } if test x"$lt_prog_compiler_static_works_F77" = xyes; then : else lt_prog_compiler_static_F77= fi { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o_F77+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_F77=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:14166: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:14170: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_F77=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_F77" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_F77" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_F77" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } runpath_var= allow_undefined_flag_F77= enable_shared_with_static_runtimes_F77=no archive_cmds_F77= archive_expsym_cmds_F77= old_archive_From_new_cmds_F77= old_archive_from_expsyms_cmds_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= thread_safe_flag_spec_F77= hardcode_libdir_flag_spec_F77= hardcode_libdir_flag_spec_ld_F77= hardcode_libdir_separator_F77= hardcode_direct_F77=no hardcode_minus_L_F77=no hardcode_shlibpath_var_F77=unsupported link_all_deplibs_F77=unknown hardcode_automatic_F77=no module_cmds_F77= module_expsym_cmds_F77= always_export_symbols_F77=no export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_F77= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_F77="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_F77=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_F77='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_F77='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_F77="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_F77= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_F77=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_F77=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_F77=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_F77='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_F77=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, F77) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_F77='-L$libdir' allow_undefined_flag_F77=unsupported always_export_symbols_F77=no enable_shared_with_static_runtimes_F77=yes export_symbols_cmds_F77='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_F77='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_F77=no fi ;; interix3*) hardcode_direct_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_F77='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_F77='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_F77='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac archive_cmds_F77='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_F77='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi link_all_deplibs_F77=no else ld_shlibs_F77=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_F77=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs_F77=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac ;; sunos4*) archive_cmds_F77='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_F77=no fi ;; esac if test "$ld_shlibs_F77" = no; then runpath_var= hardcode_libdir_flag_spec_F77= export_dynamic_flag_spec_F77= whole_archive_flag_spec_F77= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_F77=unsupported always_export_symbols_F77=yes archive_expsym_cmds_F77='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_F77=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_F77=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_F77='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_F77='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_F77='' hardcode_direct_F77=yes hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct_F77=yes else # We have old collect2 hardcode_direct_F77=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_F77=yes hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_libdir_separator_F77= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_F77=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_F77='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_F77="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_F77='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_F77="-z nodefs" archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF program main end _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_f77_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_F77='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_F77=' ${wl}-bernotok' allow_undefined_flag_F77=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_F77='$convenience' archive_cmds_need_lc_F77=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_F77="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_F77='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes # see comment about different semantics on the GNU ld section ld_shlibs_F77=no ;; bsdi[45]*) export_dynamic_flag_spec_F77=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_F77=' ' allow_undefined_flag_F77=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_F77='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_F77='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_F77='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_F77='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_F77=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_F77='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_F77='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_F77='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_F77=no hardcode_direct_F77=no hardcode_automatic_F77=yes hardcode_shlibpath_var_F77=unsupported whole_archive_flag_spec_F77='' link_all_deplibs_F77=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_F77='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_F77='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_F77='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_F77='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_F77=no ;; esac fi ;; dgux*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; freebsd1*) ld_shlibs_F77=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds_F77='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_F77='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_F77='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes export_dynamic_flag_spec_F77='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_F77='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_F77='${wl}+b ${wl}$libdir' hardcode_libdir_separator_F77=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_F77='+b $libdir' hardcode_direct_F77=no hardcode_shlibpath_var_F77=no ;; *) hardcode_direct_F77=yes export_dynamic_flag_spec_F77='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_F77=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_F77='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_F77='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_F77='-rpath $libdir' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: link_all_deplibs_F77=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_F77='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no ;; newsos6) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: hardcode_shlibpath_var_F77=no ;; openbsd*) hardcode_direct_F77=yes hardcode_shlibpath_var_F77=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' export_dynamic_flag_spec_F77='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_F77='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-R$libdir' ;; *) archive_cmds_F77='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_F77='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_minus_L_F77=yes allow_undefined_flag_F77=unsupported archive_cmds_F77='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_F77='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_F77=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_F77=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_F77='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_F77='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_F77=' -expect_unresolved \*' archive_cmds_F77='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_F77='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_F77='-rpath $libdir' fi hardcode_libdir_separator_F77=: ;; solaris*) no_undefined_flag_F77=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_F77='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_F77='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_F77='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_F77='-R$libdir' hardcode_shlibpath_var_F77=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine linker options so we # cannot just pass the convience library names through # without $wl, iff we do not link with $LD. # Luckily, gcc supports the same syntax we need for Sun Studio. # Supported since Solaris 2.6 (maybe 2.5.1?) case $wlarc in '') whole_archive_flag_spec_F77='-z allextract$convenience -z defaultextract' ;; *) whole_archive_flag_spec_F77='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac ;; esac link_all_deplibs_F77=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_F77='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_direct_F77=yes hardcode_minus_L_F77=yes hardcode_shlibpath_var_F77=no ;; sysv4) case $host_vendor in sni) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_F77='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_F77='$CC -r -o $output$reload_objs' hardcode_direct_F77=no ;; motorola) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_F77=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_F77=no ;; sysv4.3*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no export_dynamic_flag_spec_F77='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_F77=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_F77=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) no_undefined_flag_F77='${wl}-z,text' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_F77='${wl}-z,text' allow_undefined_flag_F77='${wl}-z,nodefs' archive_cmds_need_lc_F77=no hardcode_shlibpath_var_F77=no hardcode_libdir_flag_spec_F77='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_F77=':' link_all_deplibs_F77=yes export_dynamic_flag_spec_F77='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_F77='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_F77='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_F77='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds_F77='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_F77='-L$libdir' hardcode_shlibpath_var_F77=no ;; *) ld_shlibs_F77=no ;; esac fi { echo "$as_me:$LINENO: result: $ld_shlibs_F77" >&5 echo "${ECHO_T}$ld_shlibs_F77" >&6; } test "$ld_shlibs_F77" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_F77" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_F77=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_F77 in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_F77 pic_flag=$lt_prog_compiler_pic_F77 compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_F77 allow_undefined_flag_F77= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_F77 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_F77=no else archive_cmds_need_lc_F77=yes fi allow_undefined_flag_F77=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_F77" >&5 echo "${ECHO_T}$archive_cmds_need_lc_F77" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; freebsd*) # from 4.6 on shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix3*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action_F77= if test -n "$hardcode_libdir_flag_spec_F77" || \ test -n "$runpath_var_F77" || \ test "X$hardcode_automatic_F77" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_F77" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, F77)" != no && test "$hardcode_minus_L_F77" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_F77=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_F77=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_F77=unsupported fi { echo "$as_me:$LINENO: result: $hardcode_action_F77" >&5 echo "${ECHO_T}$hardcode_action_F77" >&6; } if test "$hardcode_action_F77" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_F77 \ CC_F77 \ LD_F77 \ lt_prog_compiler_wl_F77 \ lt_prog_compiler_pic_F77 \ lt_prog_compiler_static_F77 \ lt_prog_compiler_no_builtin_flag_F77 \ export_dynamic_flag_spec_F77 \ thread_safe_flag_spec_F77 \ whole_archive_flag_spec_F77 \ enable_shared_with_static_runtimes_F77 \ old_archive_cmds_F77 \ old_archive_from_new_cmds_F77 \ predep_objects_F77 \ postdep_objects_F77 \ predeps_F77 \ postdeps_F77 \ compiler_lib_search_path_F77 \ archive_cmds_F77 \ archive_expsym_cmds_F77 \ postinstall_cmds_F77 \ postuninstall_cmds_F77 \ old_archive_from_expsyms_cmds_F77 \ allow_undefined_flag_F77 \ no_undefined_flag_F77 \ export_symbols_cmds_F77 \ hardcode_libdir_flag_spec_F77 \ hardcode_libdir_flag_spec_ld_F77 \ hardcode_libdir_separator_F77 \ hardcode_automatic_F77 \ module_cmds_F77 \ module_expsym_cmds_F77 \ lt_cv_prog_compiler_c_o_F77 \ exclude_expsyms_F77 \ include_expsyms_F77; do case $var in old_archive_cmds_F77 | \ old_archive_from_new_cmds_F77 | \ archive_cmds_F77 | \ archive_expsym_cmds_F77 | \ module_cmds_F77 | \ module_expsym_cmds_F77 | \ old_archive_from_expsyms_cmds_F77 | \ export_symbols_cmds_F77 | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_F77 # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_F77 # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_F77 # Is the compiler the GNU C compiler? with_gcc=$GCC_F77 # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_F77 # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_F77 # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_F77 pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_F77 # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_F77 # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_F77 # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_F77 # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_F77 # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_F77 # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_F77 old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_F77 # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_F77 # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_F77 archive_expsym_cmds=$lt_archive_expsym_cmds_F77 postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_F77 module_expsym_cmds=$lt_module_expsym_cmds_F77 # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_F77 # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_F77 # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_F77 # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_F77 # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_F77 # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_F77 # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_F77 # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_F77 # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_F77 # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_F77 # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_F77 # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_F77 # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_F77 # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_F77 # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_F77 # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_F77 # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_F77" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_F77 # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_F77 # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_F77 # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_F77 # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o objext_GCJ=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}\n" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[] argv) {}; }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${GCJ-"gcj"} compiler=$CC compiler_GCJ=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` # GCJ did not exist at the time GCC didn't implicitly link libc in. archive_cmds_need_lc_GCJ=no old_archive_cmds_GCJ=$old_archive_cmds lt_prog_compiler_no_builtin_flag_GCJ= if test "$GCC" = yes; then lt_prog_compiler_no_builtin_flag_GCJ=' -fno-builtin' { echo "$as_me:$LINENO: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 echo $ECHO_N "checking if $compiler supports -fno-rtti -fno-exceptions... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_rtti_exceptions+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:16353: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:16357: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag_GCJ="$lt_prog_compiler_no_builtin_flag_GCJ -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl_GCJ= lt_prog_compiler_pic_GCJ= lt_prog_compiler_static_GCJ= { echo "$as_me:$LINENO: checking for $compiler option to produce PIC" >&5 echo $ECHO_N "checking for $compiler option to produce PIC... $ECHO_C" >&6; } if test "$GCC" = yes; then lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_static_GCJ='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic_GCJ='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_GCJ='-fno-common' ;; interix3*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared_GCJ=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_GCJ=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac ;; *) lt_prog_compiler_pic_GCJ='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl_GCJ='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_GCJ='-Bstatic' else lt_prog_compiler_static_GCJ='-bnso -bI:/lib/syscalls.exp' fi ;; darwin*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files case $cc_basename in xlc*) lt_prog_compiler_pic_GCJ='-qnocommon' lt_prog_compiler_wl_GCJ='-Wl,' ;; esac ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_GCJ='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_GCJ='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static_GCJ='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl_GCJ='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static_GCJ='-non_shared' ;; newsos6) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; linux* | k*bsd*-gnu) case $cc_basename in icc* | ecc*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-static' ;; pgcc* | pgf77* | pgf90* | pgf95*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-fpic' lt_prog_compiler_static_GCJ='-Bstatic' ;; ccc*) lt_prog_compiler_wl_GCJ='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl_GCJ='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static_GCJ='-non_shared' ;; solaris*) lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' case $cc_basename in f77* | f90* | f95*) lt_prog_compiler_wl_GCJ='-Qoption ld ';; *) lt_prog_compiler_wl_GCJ='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl_GCJ='-Qoption ld ' lt_prog_compiler_pic_GCJ='-PIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic_GCJ='-Kconform_pic' lt_prog_compiler_static_GCJ='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_pic_GCJ='-KPIC' lt_prog_compiler_static_GCJ='-Bstatic' ;; unicos*) lt_prog_compiler_wl_GCJ='-Wl,' lt_prog_compiler_can_build_shared_GCJ=no ;; uts4*) lt_prog_compiler_pic_GCJ='-pic' lt_prog_compiler_static_GCJ='-Bstatic' ;; *) lt_prog_compiler_can_build_shared_GCJ=no ;; esac fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_GCJ" >&6; } # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_GCJ"; then { echo "$as_me:$LINENO: checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works" >&5 echo $ECHO_N "checking if $compiler PIC flag $lt_prog_compiler_pic_GCJ works... $ECHO_C" >&6; } if test "${lt_prog_compiler_pic_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_pic_works_GCJ=no ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_GCJ" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:16621: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:16625: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_pic_works_GCJ=yes fi fi $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_pic_works_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_pic_works_GCJ" >&6; } if test x"$lt_prog_compiler_pic_works_GCJ" = xyes; then case $lt_prog_compiler_pic_GCJ in "" | " "*) ;; *) lt_prog_compiler_pic_GCJ=" $lt_prog_compiler_pic_GCJ" ;; esac else lt_prog_compiler_pic_GCJ= lt_prog_compiler_can_build_shared_GCJ=no fi fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_GCJ= ;; *) lt_prog_compiler_pic_GCJ="$lt_prog_compiler_pic_GCJ" ;; esac # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_GCJ eval lt_tmp_static_flag=\"$lt_prog_compiler_static_GCJ\" { echo "$as_me:$LINENO: checking if $compiler static flag $lt_tmp_static_flag works" >&5 echo $ECHO_N "checking if $compiler static flag $lt_tmp_static_flag works... $ECHO_C" >&6; } if test "${lt_prog_compiler_static_works_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_prog_compiler_static_works_GCJ=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $echo "X$_lt_linker_boilerplate" | $Xsed -e '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_prog_compiler_static_works_GCJ=yes fi else lt_prog_compiler_static_works_GCJ=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" fi { echo "$as_me:$LINENO: result: $lt_prog_compiler_static_works_GCJ" >&5 echo "${ECHO_T}$lt_prog_compiler_static_works_GCJ" >&6; } if test x"$lt_prog_compiler_static_works_GCJ" = xyes; then : else lt_prog_compiler_static_GCJ= fi { echo "$as_me:$LINENO: checking if $compiler supports -c -o file.$ac_objext" >&5 echo $ECHO_N "checking if $compiler supports -c -o file.$ac_objext... $ECHO_C" >&6; } if test "${lt_cv_prog_compiler_c_o_GCJ+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else lt_cv_prog_compiler_c_o_GCJ=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:16725: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:16729: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $echo "X$_lt_compiler_boilerplate" | $Xsed -e '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_GCJ=yes fi fi chmod u+w . 2>&5 $rm conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $rm out/ii_files/* && rmdir out/ii_files $rm out/* && rmdir out cd .. rmdir conftest $rm conftest* fi { echo "$as_me:$LINENO: result: $lt_cv_prog_compiler_c_o_GCJ" >&5 echo "${ECHO_T}$lt_cv_prog_compiler_c_o_GCJ" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o_GCJ" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { echo "$as_me:$LINENO: checking if we can lock with hard links" >&5 echo $ECHO_N "checking if we can lock with hard links... $ECHO_C" >&6; } hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { echo "$as_me:$LINENO: result: $hard_links" >&5 echo "${ECHO_T}$hard_links" >&6; } if test "$hard_links" = no; then { echo "$as_me:$LINENO: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { echo "$as_me:$LINENO: checking whether the $compiler linker ($LD) supports shared libraries" >&5 echo $ECHO_N "checking whether the $compiler linker ($LD) supports shared libraries... $ECHO_C" >&6; } runpath_var= allow_undefined_flag_GCJ= enable_shared_with_static_runtimes_GCJ=no archive_cmds_GCJ= archive_expsym_cmds_GCJ= old_archive_From_new_cmds_GCJ= old_archive_from_expsyms_cmds_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= thread_safe_flag_spec_GCJ= hardcode_libdir_flag_spec_GCJ= hardcode_libdir_flag_spec_ld_GCJ= hardcode_libdir_separator_GCJ= hardcode_direct_GCJ=no hardcode_minus_L_GCJ=no hardcode_shlibpath_var_GCJ=unsupported link_all_deplibs_GCJ=unknown hardcode_automatic_GCJ=no module_cmds_GCJ= module_expsym_cmds_GCJ= always_export_symbols_GCJ=no export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms_GCJ= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms_GCJ="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= # Just being paranoid about ensuring that cc_basename is set. for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs_GCJ=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_GCJ='${wl}--rpath ${wl}$libdir' export_dynamic_flag_spec_GCJ='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_GCJ="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec_GCJ= fi supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs_GCJ=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. ld_shlibs_GCJ=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_GCJ=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_GCJ='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs_GCJ=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, GCJ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_GCJ='-L$libdir' allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=no enable_shared_with_static_runtimes_GCJ=yes export_symbols_cmds_GCJ='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS] /s/.* \([^ ]*\)/\1 DATA/'\'' | $SED -e '\''/^[AITW] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds_GCJ='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_GCJ=no fi ;; interix3*) hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_GCJ='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_GCJ='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; linux* | k*bsd*-gnu) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then tmp_addflag= case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95*) # Portland Group f77 and f90 compilers whole_archive_flag_spec_GCJ='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; esac archive_cmds_GCJ='$CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test $supports_anon_versioning = yes; then archive_expsym_cmds_GCJ='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared'"$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi link_all_deplibs_GCJ=no else ld_shlibs_GCJ=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs_GCJ=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs_GCJ=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-rpath,$libdir`' archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname,\${SCOABSPATH:+${install_libdir}/}$soname,-retain-symbols-file,$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac ;; sunos4*) archive_cmds_GCJ='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs_GCJ=no fi ;; esac if test "$ld_shlibs_GCJ" = no; then runpath_var= hardcode_libdir_flag_spec_GCJ= export_dynamic_flag_spec_GCJ= whole_archive_flag_spec_GCJ= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag_GCJ=unsupported always_export_symbols_GCJ=yes archive_expsym_cmds_GCJ='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L_GCJ=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct_GCJ=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then export_symbols_cmds_GCJ='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_GCJ='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$2 == "T") || (\$2 == "D") || (\$2 == "B")) && (substr(\$3,1,1) != ".")) { print \$3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_GCJ='' hardcode_direct_GCJ=yes hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct_GCJ=yes else # We have old collect2 hardcode_direct_GCJ=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_GCJ=yes hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_libdir_separator_GCJ= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols_GCJ=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag_GCJ='-berok' # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_GCJ="\$CC"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec_GCJ='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag_GCJ="-z nodefs" archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi hardcode_libdir_flag_spec_GCJ='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_GCJ=' ${wl}-bernotok' allow_undefined_flag_GCJ=' ${wl}-berok' # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_GCJ='$convenience' archive_cmds_need_lc_GCJ=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds_GCJ="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) archive_cmds_GCJ='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes # see comment about different semantics on the GNU ld section ld_shlibs_GCJ=no ;; bsdi[45]*) export_dynamic_flag_spec_GCJ=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_GCJ=' ' allow_undefined_flag_GCJ=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds_GCJ='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_From_new_cmds_GCJ='true' # FIXME: Should let the user specify the lib program. old_archive_cmds_GCJ='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path_GCJ='`cygpath -w "$srcfile"`' enable_shared_with_static_runtimes_GCJ=yes ;; darwin* | rhapsody*) case $host_os in rhapsody* | darwin1.[012]) allow_undefined_flag_GCJ='${wl}-undefined ${wl}suppress' ;; *) # Darwin 1.3 on if test -z ${MACOSX_DEPLOYMENT_TARGET} ; then allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' else case ${MACOSX_DEPLOYMENT_TARGET} in 10.[012]) allow_undefined_flag_GCJ='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) allow_undefined_flag_GCJ='${wl}-undefined ${wl}dynamic_lookup' ;; esac fi ;; esac archive_cmds_need_lc_GCJ=no hardcode_direct_GCJ=no hardcode_automatic_GCJ=yes hardcode_shlibpath_var_GCJ=unsupported whole_archive_flag_spec_GCJ='' link_all_deplibs_GCJ=yes if test "$GCC" = yes ; then output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else case $cc_basename in xlc*) output_verbose_link_cmd='echo' archive_cmds_GCJ='$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}`echo $rpath/$soname` $verstring' module_cmds_GCJ='$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin lds archive_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -qmkshrobj $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-install_name ${wl}$rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' module_expsym_cmds_GCJ='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC $allow_undefined_flag -o $lib -bundle $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' ;; *) ld_shlibs_GCJ=no ;; esac fi ;; dgux*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; freebsd1*) ld_shlibs_GCJ=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds_GCJ='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds_GCJ='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds_GCJ='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' ;; hpux10*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes fi ;; hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_GCJ='$CC -shared ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_GCJ='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec_GCJ='${wl}+b ${wl}$libdir' hardcode_libdir_separator_GCJ=: case $host_cpu in hppa*64*|ia64*) hardcode_libdir_flag_spec_ld_GCJ='+b $libdir' hardcode_direct_GCJ=no hardcode_shlibpath_var_GCJ=no ;; *) hardcode_direct_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L_GCJ=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else archive_cmds_GCJ='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_ld_GCJ='-rpath $libdir' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: link_all_deplibs_GCJ=yes ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds_GCJ='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; newsos6) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: hardcode_shlibpath_var_GCJ=no ;; openbsd*) hardcode_direct_GCJ=yes hardcode_shlibpath_var_GCJ=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' export_dynamic_flag_spec_GCJ='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds_GCJ='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-R$libdir' ;; *) archive_cmds_GCJ='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec_GCJ='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_minus_L_GCJ=yes allow_undefined_flag_GCJ=unsupported archive_cmds_GCJ='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_From_new_cmds_GCJ='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator_GCJ=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag_GCJ=' ${wl}-expect_unresolved ${wl}\*' archive_cmds_GCJ='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec_GCJ='${wl}-rpath ${wl}$libdir' else allow_undefined_flag_GCJ=' -expect_unresolved \*' archive_cmds_GCJ='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds_GCJ='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec_GCJ='-rpath $libdir' fi hardcode_libdir_separator_GCJ=: ;; solaris*) no_undefined_flag_GCJ=' -z text' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds_GCJ='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else wlarc='' archive_cmds_GCJ='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds_GCJ='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi hardcode_libdir_flag_spec_GCJ='-R$libdir' hardcode_shlibpath_var_GCJ=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine linker options so we # cannot just pass the convience library names through # without $wl, iff we do not link with $LD. # Luckily, gcc supports the same syntax we need for Sun Studio. # Supported since Solaris 2.6 (maybe 2.5.1?) case $wlarc in '') whole_archive_flag_spec_GCJ='-z allextract$convenience -z defaultextract' ;; *) whole_archive_flag_spec_GCJ='${wl}-z ${wl}allextract`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; $echo \"$new_convenience\"` ${wl}-z ${wl}defaultextract' ;; esac ;; esac link_all_deplibs_GCJ=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds_GCJ='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_direct_GCJ=yes hardcode_minus_L_GCJ=yes hardcode_shlibpath_var_GCJ=no ;; sysv4) case $host_vendor in sni) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds_GCJ='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds_GCJ='$CC -r -o $output$reload_objs' hardcode_direct_GCJ=no ;; motorola) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct_GCJ=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var_GCJ=no ;; sysv4.3*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no export_dynamic_flag_spec_GCJ='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var_GCJ=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs_GCJ=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7*) no_undefined_flag_GCJ='${wl}-z,text' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_GCJ='${wl}-z,text' allow_undefined_flag_GCJ='${wl}-z,nodefs' archive_cmds_need_lc_GCJ=no hardcode_shlibpath_var_GCJ=no hardcode_libdir_flag_spec_GCJ='`test -z "$SCOABSPATH" && echo ${wl}-R,$libdir`' hardcode_libdir_separator_GCJ=':' link_all_deplibs_GCJ=yes export_dynamic_flag_spec_GCJ='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds_GCJ='$CC -shared ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds_GCJ='$CC -G ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_GCJ='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,\${SCOABSPATH:+${install_libdir}/}$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds_GCJ='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec_GCJ='-L$libdir' hardcode_shlibpath_var_GCJ=no ;; *) ld_shlibs_GCJ=no ;; esac fi { echo "$as_me:$LINENO: result: $ld_shlibs_GCJ" >&5 echo "${ECHO_T}$ld_shlibs_GCJ" >&6; } test "$ld_shlibs_GCJ" = no && can_build_shared=no # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_GCJ" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_GCJ=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds_GCJ in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { echo "$as_me:$LINENO: checking whether -lc should be explicitly linked in" >&5 echo $ECHO_N "checking whether -lc should be explicitly linked in... $ECHO_C" >&6; } $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_GCJ pic_flag=$lt_prog_compiler_pic_GCJ compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_GCJ allow_undefined_flag_GCJ= if { (eval echo "$as_me:$LINENO: \"$archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1\"") >&5 (eval $archive_cmds_GCJ 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } then archive_cmds_need_lc_GCJ=no else archive_cmds_need_lc_GCJ=yes fi allow_undefined_flag_GCJ=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* { echo "$as_me:$LINENO: result: $archive_cmds_need_lc_GCJ" >&5 echo "${ECHO_T}$archive_cmds_need_lc_GCJ" >&6; } ;; esac fi ;; esac { echo "$as_me:$LINENO: checking dynamic linker characteristics" >&5 echo $ECHO_N "checking dynamic linker characteristics... $ECHO_C" >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/usr/lib /lib/w32api /lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` else sys_lib_search_path_spec='/lib /usr/lib /usr/local/lib' fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[123]*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; freebsd*) # from 4.6 on shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; interix3*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux* | k*bsd*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' shlibpath_overrides_runpath=no else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' shlibpath_overrides_runpath=yes case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { echo "$as_me:$LINENO: result: $dynamic_linker" >&5 echo "${ECHO_T}$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi { echo "$as_me:$LINENO: checking how to hardcode library paths into programs" >&5 echo $ECHO_N "checking how to hardcode library paths into programs... $ECHO_C" >&6; } hardcode_action_GCJ= if test -n "$hardcode_libdir_flag_spec_GCJ" || \ test -n "$runpath_var_GCJ" || \ test "X$hardcode_automatic_GCJ" = "Xyes" ; then # We can hardcode non-existant directories. if test "$hardcode_direct_GCJ" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, GCJ)" != no && test "$hardcode_minus_L_GCJ" != no; then # Linking always hardcodes the temporary library directory. hardcode_action_GCJ=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_GCJ=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_GCJ=unsupported fi { echo "$as_me:$LINENO: result: $hardcode_action_GCJ" >&5 echo "${ECHO_T}$hardcode_action_GCJ" >&6; } if test "$hardcode_action_GCJ" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_GCJ \ CC_GCJ \ LD_GCJ \ lt_prog_compiler_wl_GCJ \ lt_prog_compiler_pic_GCJ \ lt_prog_compiler_static_GCJ \ lt_prog_compiler_no_builtin_flag_GCJ \ export_dynamic_flag_spec_GCJ \ thread_safe_flag_spec_GCJ \ whole_archive_flag_spec_GCJ \ enable_shared_with_static_runtimes_GCJ \ old_archive_cmds_GCJ \ old_archive_from_new_cmds_GCJ \ predep_objects_GCJ \ postdep_objects_GCJ \ predeps_GCJ \ postdeps_GCJ \ compiler_lib_search_path_GCJ \ archive_cmds_GCJ \ archive_expsym_cmds_GCJ \ postinstall_cmds_GCJ \ postuninstall_cmds_GCJ \ old_archive_from_expsyms_cmds_GCJ \ allow_undefined_flag_GCJ \ no_undefined_flag_GCJ \ export_symbols_cmds_GCJ \ hardcode_libdir_flag_spec_GCJ \ hardcode_libdir_flag_spec_ld_GCJ \ hardcode_libdir_separator_GCJ \ hardcode_automatic_GCJ \ module_cmds_GCJ \ module_expsym_cmds_GCJ \ lt_cv_prog_compiler_c_o_GCJ \ exclude_expsyms_GCJ \ include_expsyms_GCJ; do case $var in old_archive_cmds_GCJ | \ old_archive_from_new_cmds_GCJ | \ archive_cmds_GCJ | \ archive_expsym_cmds_GCJ | \ module_cmds_GCJ | \ module_expsym_cmds_GCJ | \ old_archive_from_expsyms_cmds_GCJ | \ export_symbols_cmds_GCJ | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_GCJ # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_GCJ # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_GCJ # Is the compiler the GNU C compiler? with_gcc=$GCC_GCJ # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_GCJ # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_GCJ # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_GCJ pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_GCJ # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_GCJ # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_GCJ # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_GCJ # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_GCJ # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_GCJ # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_GCJ old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_GCJ # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_GCJ # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_GCJ archive_expsym_cmds=$lt_archive_expsym_cmds_GCJ postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_GCJ module_expsym_cmds=$lt_module_expsym_cmds_GCJ # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_GCJ # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_GCJ # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_GCJ # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_GCJ # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_GCJ # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_GCJ # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_GCJ # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_GCJ # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_GCJ # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_GCJ # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_GCJ # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_GCJ # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_GCJ # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_GCJ # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_GCJ # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_GCJ" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_GCJ # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_GCJ # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_GCJ # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_GCJ # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" else tagname="" fi ;; RC) # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o objext_RC=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }\n' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext printf "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $rm conftest* ac_outfile=conftest.$ac_objext printf "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $rm conftest* # Allow CC to be a program name with arguments. lt_save_CC="$CC" CC=${RC-"windres"} compiler=$CC compiler_RC=$CC for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$echo "X$cc_temp" | $Xsed -e 's%.*/%%' -e "s%^$host_alias-%%"` lt_cv_prog_compiler_c_o_RC=yes # The else clause should only fire when bootstrapping the # libtool distribution, otherwise you forgot to ship ltmain.sh # with your package, and you will get complaints that there are # no rules to generate ltmain.sh. if test -f "$ltmain"; then # See if we are running on zsh, and set the options which allow our commands through # without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Now quote all the things that may contain metacharacters while being # careful not to overquote the AC_SUBSTed values. We take copies of the # variables and quote the copies for generation of the libtool script. for var in echo old_CC old_CFLAGS AR AR_FLAGS EGREP RANLIB LN_S LTCC LTCFLAGS NM \ SED SHELL STRIP \ libname_spec library_names_spec soname_spec extract_expsyms_cmds \ old_striplib striplib file_magic_cmd finish_cmds finish_eval \ deplibs_check_method reload_flag reload_cmds need_locks \ lt_cv_sys_global_symbol_pipe lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ sys_lib_search_path_spec sys_lib_dlsearch_path_spec \ old_postinstall_cmds old_postuninstall_cmds \ compiler_RC \ CC_RC \ LD_RC \ lt_prog_compiler_wl_RC \ lt_prog_compiler_pic_RC \ lt_prog_compiler_static_RC \ lt_prog_compiler_no_builtin_flag_RC \ export_dynamic_flag_spec_RC \ thread_safe_flag_spec_RC \ whole_archive_flag_spec_RC \ enable_shared_with_static_runtimes_RC \ old_archive_cmds_RC \ old_archive_from_new_cmds_RC \ predep_objects_RC \ postdep_objects_RC \ predeps_RC \ postdeps_RC \ compiler_lib_search_path_RC \ archive_cmds_RC \ archive_expsym_cmds_RC \ postinstall_cmds_RC \ postuninstall_cmds_RC \ old_archive_from_expsyms_cmds_RC \ allow_undefined_flag_RC \ no_undefined_flag_RC \ export_symbols_cmds_RC \ hardcode_libdir_flag_spec_RC \ hardcode_libdir_flag_spec_ld_RC \ hardcode_libdir_separator_RC \ hardcode_automatic_RC \ module_cmds_RC \ module_expsym_cmds_RC \ lt_cv_prog_compiler_c_o_RC \ exclude_expsyms_RC \ include_expsyms_RC; do case $var in old_archive_cmds_RC | \ old_archive_from_new_cmds_RC | \ archive_cmds_RC | \ archive_expsym_cmds_RC | \ module_cmds_RC | \ module_expsym_cmds_RC | \ old_archive_from_expsyms_cmds_RC | \ export_symbols_cmds_RC | \ extract_expsyms_cmds | reload_cmds | finish_cmds | \ postinstall_cmds | postuninstall_cmds | \ old_postinstall_cmds | old_postuninstall_cmds | \ sys_lib_search_path_spec | sys_lib_dlsearch_path_spec) # Double-quote double-evaled strings. eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$double_quote_subst\" -e \"\$sed_quote_subst\" -e \"\$delay_variable_subst\"\`\\\"" ;; *) eval "lt_$var=\\\"\`\$echo \"X\$$var\" | \$Xsed -e \"\$sed_quote_subst\"\`\\\"" ;; esac done case $lt_echo in *'\$0 --fallback-echo"') lt_echo=`$echo "X$lt_echo" | $Xsed -e 's/\\\\\\\$0 --fallback-echo"$/$0 --fallback-echo"/'` ;; esac cfgfile="$ofile" cat <<__EOF__ >> "$cfgfile" # ### BEGIN LIBTOOL TAG CONFIG: $tagname # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_RC # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_RC # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # LTCC compiler flags. LTCFLAGS=$lt_LTCFLAGS # A language-specific compiler. CC=$lt_compiler_RC # Is the compiler the GNU C compiler? with_gcc=$GCC_RC # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_LD_RC # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$lt_STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_RC # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext_cmds='$shrext_cmds' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_RC pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_RC # Must we lock files when doing compilation? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_RC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_RC # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_RC # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_RC # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_thread_safe_flag_spec_RC # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_old_archive_cmds_RC old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_RC # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_RC # Commands used to build and install a shared archive. archive_cmds=$lt_archive_cmds_RC archive_expsym_cmds=$lt_archive_expsym_cmds_RC postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_module_cmds_RC module_expsym_cmds=$lt_module_expsym_cmds_RC # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_predep_objects_RC # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_postdep_objects_RC # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_predeps_RC # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_postdeps_RC # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_RC # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_RC # Flag that forces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_RC # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_RC # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_RC # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_hardcode_libdir_flag_spec_ld_RC # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_RC # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$hardcode_direct_RC # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$hardcode_minus_L_RC # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_RC # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$hardcode_automatic_RC # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_RC # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$fix_srcfile_path_RC" # Set to yes if exported symbols are required. always_export_symbols=$always_export_symbols_RC # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_RC # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_RC # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_RC # ### END LIBTOOL TAG CONFIG: $tagname __EOF__ else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. ltmain_in=`echo $ltmain | sed -e 's/\.sh$/.in/'` if test -f "$ltmain_in"; then test -f Makefile && make "$ltmain" fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ;; *) { { echo "$as_me:$LINENO: error: Unsupported tag name: $tagname" >&5 echo "$as_me: error: Unsupported tag name: $tagname" >&2;} { (exit 1); exit 1; }; } ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" { { echo "$as_me:$LINENO: error: unable to update list of available tagged configurations." >&5 echo "$as_me: error: unable to update list of available tagged configurations." >&2;} { (exit 1); exit 1; }; } fi fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' # Prevent multiple expansion # Extract the first word of "windres", so it can be a program name with args. set dummy windres; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_prog_WINDRES+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -n "$WINDRES"; then ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_prog_WINDRES="windres" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi WINDRES=$ac_cv_prog_WINDRES if test -n "$WINDRES"; then { echo "$as_me:$LINENO: result: $WINDRES" >&5 echo "${ECHO_T}$WINDRES" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test x"$WINDRES" != x; then HAVE_WINDRES_TRUE= HAVE_WINDRES_FALSE='#' else HAVE_WINDRES_TRUE='#' HAVE_WINDRES_FALSE= fi test -n "$ACLOCAL_FLAGS" && ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" for k in ac ; do ACLOCAL="$ACLOCAL -I $k" ; done native_win32=no case "$target" in *-darwin*) CFLAGS="$CFLAGS -no-cpp-precomp -fno-common" ;; *-*-mingw*) native_win32=yes CFLAGS="$CFLAGS -mms-bitfields -mwindows" LIBS="$LIBS -lws2_32" ;; esac if test "$native_win32" = "yes"; then OS_WIN32_TRUE= OS_WIN32_FALSE='#' else OS_WIN32_TRUE='#' OS_WIN32_FALSE= fi # Check whether --enable-glibtest was given. if test "${enable_glibtest+set}" = set; then enableval=$enable_glibtest; else enable_glibtest=yes fi pkg_config_args=glib-2.0 for module in . do case "$module" in gmodule) pkg_config_args="$pkg_config_args gmodule-2.0" ;; gmodule-no-export) pkg_config_args="$pkg_config_args gmodule-no-export-2.0" ;; gobject) pkg_config_args="$pkg_config_args gobject-2.0" ;; gthread) pkg_config_args="$pkg_config_args gthread-2.0" ;; esac done 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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $PKG_CONFIG" >&5 echo "${ECHO_T}$PKG_CONFIG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}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 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&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 { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$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 { echo "$as_me:$LINENO: result: $ac_pt_PKG_CONFIG" >&5 echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { echo "$as_me:$LINENO: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&5 echo "$as_me: WARNING: In the future, Autoconf will not detect cross-tools whose name does not start with the host triplet. If you think this configuration is useful to you, please write to autoconf@gnu.org." >&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.7 { echo "$as_me:$LINENO: checking pkg-config is at least version $_pkg_min_version" >&5 echo $ECHO_N "checking pkg-config is at least version $_pkg_min_version... $ECHO_C" >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } PKG_CONFIG="" fi fi no_glib="" if test "x$PKG_CONFIG" = x ; then no_glib=yes PKG_CONFIG=no fi min_glib_version=2.4.0 { echo "$as_me:$LINENO: checking for GLIB - version >= $min_glib_version" >&5 echo $ECHO_N "checking for GLIB - version >= $min_glib_version... $ECHO_C" >&6; } if test x$PKG_CONFIG != xno ; then ## don't try to run the test against uninstalled libtool libs if $PKG_CONFIG --uninstalled $pkg_config_args; then echo "Will use uninstalled version of GLib found in PKG_CONFIG_PATH" enable_glibtest=no fi if $PKG_CONFIG --atleast-version $min_glib_version $pkg_config_args; then : else no_glib=yes fi fi if test x"$no_glib" = x ; then GLIB_GENMARSHAL=`$PKG_CONFIG --variable=glib_genmarshal glib-2.0` GOBJECT_QUERY=`$PKG_CONFIG --variable=gobject_query glib-2.0` GLIB_MKENUMS=`$PKG_CONFIG --variable=glib_mkenums glib-2.0` GLIB_CFLAGS=`$PKG_CONFIG --cflags $pkg_config_args` GLIB_LIBS=`$PKG_CONFIG --libs $pkg_config_args` glib_config_major_version=`$PKG_CONFIG --modversion glib-2.0 | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\1/'` glib_config_minor_version=`$PKG_CONFIG --modversion glib-2.0 | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\2/'` glib_config_micro_version=`$PKG_CONFIG --modversion glib-2.0 | \ sed 's/\([0-9]*\).\([0-9]*\).\([0-9]*\)/\3/'` if test "x$enable_glibtest" = "xyes" ; then ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$GLIB_LIBS $LIBS" rm -f conf.glibtest if test "$cross_compiling" = yes; then echo $ac_n "cross compiling; assumed OK... $ac_c" else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include int main () { int major, minor, micro; char *tmp_version; system ("touch conf.glibtest"); /* HP/UX 9 (%@#!) writes to sscanf strings */ tmp_version = g_strdup("$min_glib_version"); if (sscanf(tmp_version, "%d.%d.%d", &major, &minor, µ) != 3) { printf("%s, bad version string\n", "$min_glib_version"); exit(1); } if ((glib_major_version != $glib_config_major_version) || (glib_minor_version != $glib_config_minor_version) || (glib_micro_version != $glib_config_micro_version)) { printf("\n*** 'pkg-config --modversion glib-2.0' returned %d.%d.%d, but GLIB (%d.%d.%d)\n", $glib_config_major_version, $glib_config_minor_version, $glib_config_micro_version, glib_major_version, glib_minor_version, glib_micro_version); printf ("*** was found! If pkg-config was correct, then it is best\n"); printf ("*** to remove the old version of GLib. You may also be able to fix the error\n"); printf("*** by modifying your LD_LIBRARY_PATH enviroment variable, or by editing\n"); printf("*** /etc/ld.so.conf. Make sure you have run ldconfig if that is\n"); printf("*** required on your system.\n"); printf("*** If pkg-config was wrong, set the environment variable PKG_CONFIG_PATH\n"); printf("*** to point to the correct configuration files\n"); } else if ((glib_major_version != GLIB_MAJOR_VERSION) || (glib_minor_version != GLIB_MINOR_VERSION) || (glib_micro_version != GLIB_MICRO_VERSION)) { printf("*** GLIB header files (version %d.%d.%d) do not match\n", GLIB_MAJOR_VERSION, GLIB_MINOR_VERSION, GLIB_MICRO_VERSION); printf("*** library (version %d.%d.%d)\n", glib_major_version, glib_minor_version, glib_micro_version); } else { if ((glib_major_version > major) || ((glib_major_version == major) && (glib_minor_version > minor)) || ((glib_major_version == major) && (glib_minor_version == minor) && (glib_micro_version >= micro))) { return 0; } else { printf("\n*** An old version of GLIB (%d.%d.%d) was found.\n", glib_major_version, glib_minor_version, glib_micro_version); printf("*** You need a version of GLIB newer than %d.%d.%d. The latest version of\n", major, minor, micro); printf("*** GLIB is always available from ftp://ftp.gtk.org.\n"); printf("***\n"); printf("*** If you have already installed a sufficiently new version, this error\n"); printf("*** probably means that the wrong copy of the pkg-config shell script is\n"); printf("*** being found. The easiest way to fix this is to remove the old version\n"); printf("*** of GLIB, but you can also set the PKG_CONFIG environment to point to the\n"); printf("*** correct copy of pkg-config. (In this case, you will have to\n"); printf("*** modify your LD_LIBRARY_PATH enviroment variable, or edit /etc/ld.so.conf\n"); printf("*** so that the correct libraries are found at run-time))\n"); } } return 1; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) no_glib=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi if test "x$no_glib" = x ; then { echo "$as_me:$LINENO: result: yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)" >&5 echo "${ECHO_T}yes (version $glib_config_major_version.$glib_config_minor_version.$glib_config_micro_version)" >&6; } : else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } if test "$PKG_CONFIG" = "no" ; then echo "*** A new enough version of pkg-config was not found." echo "*** See http://www.freedesktop.org/software/pkgconfig/" else if test -f conf.glibtest ; then : else echo "*** Could not run GLIB test program, checking why..." ac_save_CFLAGS="$CFLAGS" ac_save_LIBS="$LIBS" CFLAGS="$CFLAGS $GLIB_CFLAGS" LIBS="$LIBS $GLIB_LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { return ((glib_major_version) || (glib_minor_version) || (glib_micro_version)); ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then echo "*** The test program compiled, but did not run. This usually means" echo "*** that the run-time linker is not finding GLIB or finding the wrong" echo "*** version of GLIB. If it is not finding GLIB, you'll need to set your" echo "*** LD_LIBRARY_PATH environment variable, or edit /etc/ld.so.conf to point" echo "*** to the installed location Also, make sure you have run ldconfig if that" echo "*** is required on your system" echo "***" echo "*** If you have an old version installed, it is best to remove it, although" echo "*** you may also be able to get things to work by modifying LD_LIBRARY_PATH" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 echo "*** The test program failed to compile or link. See the file config.log for the" echo "*** exact error that occured. This usually means GLIB is incorrectly installed." fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext CFLAGS="$ac_save_CFLAGS" LIBS="$ac_save_LIBS" fi fi GLIB_CFLAGS="" GLIB_LIBS="" GLIB_GENMARSHAL="" GOBJECT_QUERY="" GLIB_MKENUMS="" { { echo "$as_me:$LINENO: error: Test for GLib failed. See the 'INSTALL' for help." >&5 echo "$as_me: error: Test for GLib failed. See the 'INSTALL' for help." >&2;} { (exit 1); exit 1; }; } fi rm -f conf.glibtest # Extract the first word of "glib-genmarshal", so it can be a program name with args. set dummy glib-genmarshal; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_GLIB_GENMARSHAL+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $GLIB_GENMARSHAL in [\\/]* | ?:[\\/]*) ac_cv_path_GLIB_GENMARSHAL="$GLIB_GENMARSHAL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GLIB_GENMARSHAL="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GLIB_GENMARSHAL=$ac_cv_path_GLIB_GENMARSHAL if test -n "$GLIB_GENMARSHAL"; then { echo "$as_me:$LINENO: result: $GLIB_GENMARSHAL" >&5 echo "${ECHO_T}$GLIB_GENMARSHAL" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "X$prefix" = "XNONE"; then acl_final_prefix="$ac_default_prefix" else acl_final_prefix="$prefix" fi if test "X$exec_prefix" = "XNONE"; then acl_final_exec_prefix='${prefix}' else acl_final_exec_prefix="$exec_prefix" fi acl_save_prefix="$prefix" prefix="$acl_final_prefix" eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" prefix="$acl_save_prefix" # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi # Prepare PATH_SEPARATOR. # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { echo "$as_me:$LINENO: checking for ld used by GCC" >&5 echo $ECHO_N "checking for ld used by GCC... $ECHO_C" >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | [A-Za-z]:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the path of ld ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { echo "$as_me:$LINENO: checking for GNU ld" >&5 echo $ECHO_N "checking for GNU ld... $ECHO_C" >&6; } else { echo "$as_me:$LINENO: checking for non-GNU ld" >&5 echo $ECHO_N "checking for non-GNU ld... $ECHO_C" >&6; } fi if test "${acl_cv_path_LD+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test -z "$LD"; then IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then acl_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in *GNU* | *'with BFD'*) test "$with_gnu_ld" != no && break ;; *) test "$with_gnu_ld" != yes && break ;; esac fi done IFS="$ac_save_ifs" else acl_cv_path_LD="$LD" # Let the user override the test with a path. fi fi LD="$acl_cv_path_LD" if test -n "$LD"; then { echo "$as_me:$LINENO: result: $LD" >&5 echo "${ECHO_T}$LD" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi test -z "$LD" && { { echo "$as_me:$LINENO: error: no acceptable ld found in \$PATH" >&5 echo "$as_me: error: no acceptable ld found in \$PATH" >&2;} { (exit 1); exit 1; }; } { echo "$as_me:$LINENO: checking if the linker ($LD) is GNU ld" >&5 echo $ECHO_N "checking if the linker ($LD) is GNU ld... $ECHO_C" >&6; } if test "${acl_cv_prog_gnu_ld+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else # I'd rather use --version here, but apparently some GNU ld's only accept -v. case `$LD -v 2>&1 &5 echo "${ECHO_T}$acl_cv_prog_gnu_ld" >&6; } with_gnu_ld=$acl_cv_prog_gnu_ld { echo "$as_me:$LINENO: checking for shared library run path origin" >&5 echo $ECHO_N "checking for shared library run path origin... $ECHO_C" >&6; } if test "${acl_cv_rpath+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh . ./conftest.sh rm -f ./conftest.sh acl_cv_rpath=done fi { echo "$as_me:$LINENO: result: $acl_cv_rpath" >&5 echo "${ECHO_T}$acl_cv_rpath" >&6; } wl="$acl_cv_wl" libext="$acl_cv_libext" shlibext="$acl_cv_shlibext" hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" hardcode_direct="$acl_cv_hardcode_direct" hardcode_minus_L="$acl_cv_hardcode_minus_L" # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then enableval=$enable_rpath; : else enable_rpath=yes fi acl_libdirstem=lib searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` if test -n "$searchpath"; then acl_save_IFS="${IFS= }"; IFS=":" for searchdir in $searchpath; do if test -d "$searchdir"; then case "$searchdir" in */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; *) searchdir=`cd "$searchdir" && pwd` case "$searchdir" in */lib64 ) acl_libdirstem=lib64 ;; esac ;; esac fi done IFS="$acl_save_IFS" fi use_additional=yes acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" # Check whether --with-libiconv-prefix was given. if test "${with_libiconv_prefix+set}" = set; then withval=$with_libiconv_prefix; if test "X$withval" = "Xno"; then use_additional=no else if test "X$withval" = "X"; then acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval additional_includedir=\"$includedir\" eval additional_libdir=\"$libdir\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" else additional_includedir="$withval/include" additional_libdir="$withval/$acl_libdirstem" fi fi fi LIBICONV= LTLIBICONV= INCICONV= rpathdirs= ltrpathdirs= names_already_handled= names_next_round='iconv ' while test -n "$names_next_round"; do names_this_round="$names_next_round" names_next_round= for name in $names_this_round; do already_handled= for n in $names_already_handled; do if test "$n" = "$name"; then already_handled=yes break fi done if test -z "$already_handled"; then names_already_handled="$names_already_handled $name" uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` eval value=\"\$HAVE_LIB$uppername\" if test -n "$value"; then if test "$value" = yes; then eval value=\"\$LIB$uppername\" test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" eval value=\"\$LTLIB$uppername\" test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" else : fi else found_dir= found_la= found_so= found_a= if test $use_additional = yes; then if test -n "$shlibext" \ && { test -f "$additional_libdir/lib$name.$shlibext" \ || { test "$shlibext" = dll \ && test -f "$additional_libdir/lib$name.dll.a"; }; }; then found_dir="$additional_libdir" if test -f "$additional_libdir/lib$name.$shlibext"; then found_so="$additional_libdir/lib$name.$shlibext" else found_so="$additional_libdir/lib$name.dll.a" fi if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi else if test -f "$additional_libdir/lib$name.$libext"; then found_dir="$additional_libdir" found_a="$additional_libdir/lib$name.$libext" if test -f "$additional_libdir/lib$name.la"; then found_la="$additional_libdir/lib$name.la" fi fi fi fi if test "X$found_dir" = "X"; then for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" case "$x" in -L*) dir=`echo "X$x" | sed -e 's/^X-L//'` if test -n "$shlibext" \ && { test -f "$dir/lib$name.$shlibext" \ || { test "$shlibext" = dll \ && test -f "$dir/lib$name.dll.a"; }; }; then found_dir="$dir" if test -f "$dir/lib$name.$shlibext"; then found_so="$dir/lib$name.$shlibext" else found_so="$dir/lib$name.dll.a" fi if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi else if test -f "$dir/lib$name.$libext"; then found_dir="$dir" found_a="$dir/lib$name.$libext" if test -f "$dir/lib$name.la"; then found_la="$dir/lib$name.la" fi fi fi ;; esac if test "X$found_dir" != "X"; then break fi done fi if test "X$found_dir" != "X"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" if test "X$found_so" != "X"; then if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/$acl_libdirstem"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else haveit= for x in $ltrpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $found_dir" fi if test "$hardcode_direct" = yes; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" haveit= for x in $rpathdirs; do if test "X$x" = "X$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $found_dir" fi else haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$found_dir"; then haveit=yes break fi done if test -z "$haveit"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" fi if test "$hardcode_minus_L" != no; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" fi fi fi fi else if test "X$found_a" != "X"; then LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" else LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" fi fi additional_includedir= case "$found_dir" in */$acl_libdirstem | */$acl_libdirstem/) basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` additional_includedir="$basedir/include" ;; esac if test "X$additional_includedir" != "X"; then if test "X$additional_includedir" != "X/usr/include"; then haveit= if test "X$additional_includedir" = "X/usr/local/include"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then for x in $CPPFLAGS $INCICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-I$additional_includedir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_includedir"; then INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" fi fi fi fi fi if test -n "$found_la"; then save_libdir="$libdir" case "$found_la" in */* | *\\*) . "$found_la" ;; *) . "./$found_la" ;; esac libdir="$save_libdir" for dep in $dependency_libs; do case "$dep" in -L*) additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` if test "X$additional_libdir" != "X/usr/$acl_libdirstem"; then haveit= if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem"; then if test -n "$GCC"; then case $host_os in linux* | gnu* | k*bsd*-gnu) haveit=yes;; esac fi fi if test -z "$haveit"; then haveit= for x in $LDFLAGS $LIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" fi fi haveit= for x in $LDFLAGS $LTLIBICONV; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X-L$additional_libdir"; then haveit=yes break fi done if test -z "$haveit"; then if test -d "$additional_libdir"; then LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" fi fi fi fi ;; -R*) dir=`echo "X$dep" | sed -e 's/^X-R//'` if test "$enable_rpath" != no; then haveit= for x in $rpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then rpathdirs="$rpathdirs $dir" fi haveit= for x in $ltrpathdirs; do if test "X$x" = "X$dir"; then haveit=yes break fi done if test -z "$haveit"; then ltrpathdirs="$ltrpathdirs $dir" fi fi ;; -l*) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` ;; *.la) names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` ;; *) LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" ;; esac done fi else LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" fi fi fi done done if test "X$rpathdirs" != "X"; then if test -n "$hardcode_libdir_separator"; then alldirs= for found_dir in $rpathdirs; do alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" done acl_save_libdir="$libdir" libdir="$alldirs" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" else for found_dir in $rpathdirs; do acl_save_libdir="$libdir" libdir="$found_dir" eval flag=\"$hardcode_libdir_flag_spec\" libdir="$acl_save_libdir" LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" done fi fi if test "X$ltrpathdirs" != "X"; then for found_dir in $ltrpathdirs; do LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" done fi am_save_CPPFLAGS="$CPPFLAGS" for element in $INCICONV; do haveit= for x in $CPPFLAGS; do acl_save_prefix="$prefix" prefix="$acl_final_prefix" acl_save_exec_prefix="$exec_prefix" exec_prefix="$acl_final_exec_prefix" eval x=\"$x\" exec_prefix="$acl_save_exec_prefix" prefix="$acl_save_prefix" if test "X$x" = "X$element"; then haveit=yes break fi done if test -z "$haveit"; then CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" fi done { echo "$as_me:$LINENO: checking for iconv" >&5 echo $ECHO_N "checking for iconv... $ECHO_C" >&6; } if test "${am_cv_func_iconv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else am_cv_func_iconv="no, consider installing GNU libiconv" am_cv_lib_iconv=no cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then am_cv_func_iconv=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext if test "$am_cv_func_iconv" != yes; then am_save_LIBS="$LIBS" LIBS="$LIBS $LIBICONV" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { iconv_t cd = iconv_open("",""); iconv(cd,NULL,NULL,NULL,NULL); iconv_close(cd); ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then am_cv_lib_iconv=yes am_cv_func_iconv=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$am_save_LIBS" fi fi { echo "$as_me:$LINENO: result: $am_cv_func_iconv" >&5 echo "${ECHO_T}$am_cv_func_iconv" >&6; } if test "$am_cv_func_iconv" = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ICONV 1 _ACEOF fi if test "$am_cv_lib_iconv" = yes; then { echo "$as_me:$LINENO: checking how to link with libiconv" >&5 echo $ECHO_N "checking how to link with libiconv... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: $LIBICONV" >&5 echo "${ECHO_T}$LIBICONV" >&6; } else CPPFLAGS="$am_save_CPPFLAGS" LIBICONV= LTLIBICONV= fi if test "$am_cv_func_iconv" = yes; then { echo "$as_me:$LINENO: checking for iconv declaration" >&5 echo $ECHO_N "checking for iconv declaration... $ECHO_C" >&6; } if test "${am_cv_proto_iconv+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include extern #ifdef __cplusplus "C" #endif #if defined(__STDC__) || defined(__cplusplus) size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); #else size_t iconv(); #endif int main () { ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then am_cv_proto_iconv_arg1="" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 am_cv_proto_iconv_arg1="const" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" fi am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` { echo "$as_me:$LINENO: result: ${ac_t:- }$am_cv_proto_iconv" >&5 echo "${ECHO_T}${ac_t:- }$am_cv_proto_iconv" >&6; } cat >>confdefs.h <<_ACEOF #define ICONV_CONST $am_cv_proto_iconv_arg1 _ACEOF fi for ac_func in bind_textdomain_codeset do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* 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_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ALL_LINGUAS="bg cs da de el es et fr gl hr hu it ja ko lt nl pl pt_BR ro ru sk sl sr sv tr uk vi zh_CN zh_TW" GETTEXT_PACKAGE=libsylph cat >>confdefs.h <<_ACEOF #define GETTEXT_PACKAGE "$GETTEXT_PACKAGE" _ACEOF for ac_header in locale.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done if test $ac_cv_header_locale_h = yes; then { echo "$as_me:$LINENO: checking for LC_MESSAGES" >&5 echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6; } if test "${am_cv_val_LC_MESSAGES+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { return LC_MESSAGES ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then am_cv_val_LC_MESSAGES=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 am_cv_val_LC_MESSAGES=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $am_cv_val_LC_MESSAGES" >&5 echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6; } if test $am_cv_val_LC_MESSAGES = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_LC_MESSAGES 1 _ACEOF fi fi USE_NLS=yes gt_cv_have_gettext=no CATOBJEXT=NONE XGETTEXT=: INTLLIBS= if test "${ac_cv_header_libintl_h+set}" = set; then { echo "$as_me:$LINENO: checking for libintl.h" >&5 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; } if test "${ac_cv_header_libintl_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi { echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking libintl.h usability" >&5 echo $ECHO_N "checking libintl.h usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking libintl.h presence" >&5 echo $ECHO_N "checking libintl.h presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: libintl.h: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: libintl.h: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: libintl.h: present but cannot be compiled" >&5 echo "$as_me: WARNING: libintl.h: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: libintl.h: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: libintl.h: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: libintl.h: see the Autoconf documentation" >&5 echo "$as_me: WARNING: libintl.h: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: libintl.h: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: libintl.h: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: libintl.h: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: libintl.h: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: libintl.h: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for libintl.h" >&5 echo $ECHO_N "checking for libintl.h... $ECHO_C" >&6; } if test "${ac_cv_header_libintl_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_header_libintl_h=$ac_header_preproc fi { echo "$as_me:$LINENO: result: $ac_cv_header_libintl_h" >&5 echo "${ECHO_T}$ac_cv_header_libintl_h" >&6; } fi if test $ac_cv_header_libintl_h = yes; then gt_cv_func_dgettext_libintl="no" libintl_extra_libs="" # # First check in libc # { echo "$as_me:$LINENO: checking for ngettext in libc" >&5 echo $ECHO_N "checking for ngettext in libc... $ECHO_C" >&6; } if test "${gt_cv_func_ngettext_libc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { return !ngettext ("","", 1) ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then gt_cv_func_ngettext_libc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_func_ngettext_libc=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $gt_cv_func_ngettext_libc" >&5 echo "${ECHO_T}$gt_cv_func_ngettext_libc" >&6; } if test "$gt_cv_func_ngettext_libc" = "yes" ; then { echo "$as_me:$LINENO: checking for dgettext in libc" >&5 echo $ECHO_N "checking for dgettext in libc... $ECHO_C" >&6; } if test "${gt_cv_func_dgettext_libc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { return !dgettext ("","") ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then gt_cv_func_dgettext_libc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 gt_cv_func_dgettext_libc=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $gt_cv_func_dgettext_libc" >&5 echo "${ECHO_T}$gt_cv_func_dgettext_libc" >&6; } fi if test "$gt_cv_func_ngettext_libc" = "yes" ; then for ac_func in bind_textdomain_codeset do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* 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_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done fi # # If we don't have everything we want, check in libintl # if test "$gt_cv_func_dgettext_libc" != "yes" \ || test "$gt_cv_func_ngettext_libc" != "yes" \ || test "$ac_cv_func_bind_textdomain_codeset" != "yes" ; then { echo "$as_me:$LINENO: checking for bindtextdomain in -lintl" >&5 echo $ECHO_N "checking for bindtextdomain in -lintl... $ECHO_C" >&6; } if test "${ac_cv_lib_intl_bindtextdomain+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 bindtextdomain (); int main () { return bindtextdomain (); ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_intl_bindtextdomain=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_bindtextdomain=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_bindtextdomain" >&5 echo "${ECHO_T}$ac_cv_lib_intl_bindtextdomain" >&6; } if test $ac_cv_lib_intl_bindtextdomain = yes; then { echo "$as_me:$LINENO: checking for ngettext in -lintl" >&5 echo $ECHO_N "checking for ngettext in -lintl... $ECHO_C" >&6; } if test "${ac_cv_lib_intl_ngettext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 ngettext (); int main () { return ngettext (); ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_intl_ngettext=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_ngettext=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_ngettext" >&5 echo "${ECHO_T}$ac_cv_lib_intl_ngettext" >&6; } if test $ac_cv_lib_intl_ngettext = yes; then { echo "$as_me:$LINENO: checking for dgettext in -lintl" >&5 echo $ECHO_N "checking for dgettext in -lintl... $ECHO_C" >&6; } if test "${ac_cv_lib_intl_dgettext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 dgettext (); int main () { return dgettext (); ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_intl_dgettext=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_dgettext=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dgettext" >&5 echo "${ECHO_T}$ac_cv_lib_intl_dgettext" >&6; } if test $ac_cv_lib_intl_dgettext = yes; then gt_cv_func_dgettext_libintl=yes fi fi fi if test "$gt_cv_func_dgettext_libintl" != "yes" ; then { echo "$as_me:$LINENO: checking if -liconv is needed to use gettext" >&5 echo $ECHO_N "checking if -liconv is needed to use gettext... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: " >&5 echo "${ECHO_T}" >&6; } { echo "$as_me:$LINENO: checking for ngettext in -lintl" >&5 echo $ECHO_N "checking for ngettext in -lintl... $ECHO_C" >&6; } if test "${ac_cv_lib_intl_ngettext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl -liconv $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 ngettext (); int main () { return ngettext (); ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_intl_ngettext=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_ngettext=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_ngettext" >&5 echo "${ECHO_T}$ac_cv_lib_intl_ngettext" >&6; } if test $ac_cv_lib_intl_ngettext = yes; then { echo "$as_me:$LINENO: checking for dcgettext in -lintl" >&5 echo $ECHO_N "checking for dcgettext in -lintl... $ECHO_C" >&6; } if test "${ac_cv_lib_intl_dcgettext+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lintl -liconv $LIBS" cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 dcgettext (); int main () { return dcgettext (); ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_lib_intl_dcgettext=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_lib_intl_dcgettext=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_lib_intl_dcgettext" >&5 echo "${ECHO_T}$ac_cv_lib_intl_dcgettext" >&6; } if test $ac_cv_lib_intl_dcgettext = yes; then gt_cv_func_dgettext_libintl=yes libintl_extra_libs=-liconv else : fi else : fi fi # # If we found libintl, then check in it for bind_textdomain_codeset(); # we'll prefer libc if neither have bind_textdomain_codeset(), # and both have dgettext and ngettext # if test "$gt_cv_func_dgettext_libintl" = "yes" ; then glib_save_LIBS="$LIBS" LIBS="$LIBS -lintl $libintl_extra_libs" unset ac_cv_func_bind_textdomain_codeset for ac_func in bind_textdomain_codeset do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* 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_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done LIBS="$glib_save_LIBS" if test "$ac_cv_func_bind_textdomain_codeset" = "yes" ; then gt_cv_func_dgettext_libc=no else if test "$gt_cv_func_dgettext_libc" = "yes" \ && test "$gt_cv_func_ngettext_libc" = "yes"; then gt_cv_func_dgettext_libintl=no fi fi fi fi if test "$gt_cv_func_dgettext_libc" = "yes" \ || test "$gt_cv_func_dgettext_libintl" = "yes"; then gt_cv_have_gettext=yes fi if test "$gt_cv_func_dgettext_libintl" = "yes"; then INTLLIBS="-lintl $libintl_extra_libs" fi if test "$gt_cv_have_gettext" = "yes"; then cat >>confdefs.h <<\_ACEOF #define HAVE_GETTEXT 1 _ACEOF # Extract the first word of "msgfmt", so it can be a program name with args. set dummy msgfmt; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_MSGFMT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case "$MSGFMT" in /*) ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"; then ac_cv_path_MSGFMT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT="no" ;; esac fi MSGFMT="$ac_cv_path_MSGFMT" if test "$MSGFMT" != "no"; then { echo "$as_me:$LINENO: result: $MSGFMT" >&5 echo "${ECHO_T}$MSGFMT" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi if test "$MSGFMT" != "no"; then glib_save_LIBS="$LIBS" LIBS="$LIBS $INTLLIBS" for ac_func in dcgettext do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* 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_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done MSGFMT_OPTS= { echo "$as_me:$LINENO: checking if msgfmt accepts -c" >&5 echo $ECHO_N "checking if msgfmt accepts -c... $ECHO_C" >&6; } cat >conftest.foo <<_ACEOF msgid "" msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Project-Id-Version: test 1.0\n" "PO-Revision-Date: 2007-02-15 12:01+0100\n" "Last-Translator: test \n" "Language-Team: C \n" "MIME-Version: 1.0\n" "Content-Transfer-Encoding: 8bit\n" _ACEOF if { (echo "$as_me:$LINENO: msgfmt -c -o /dev/null conftest.foo") >&5 (msgfmt -c -o /dev/null conftest.foo) 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then MSGFMT_OPTS=-c; { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } echo "$as_me: failed input was:" >&5 sed 's/^/| /' conftest.foo >&5 fi # Extract the first word of "gmsgfmt", so it can be a program name with args. set dummy gmsgfmt; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_GMSGFMT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case $GMSGFMT in [\\/]* | ?:[\\/]*) ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" ;; esac fi GMSGFMT=$ac_cv_path_GMSGFMT if test -n "$GMSGFMT"; then { echo "$as_me:$LINENO: result: $GMSGFMT" >&5 echo "${ECHO_T}$GMSGFMT" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Extract the first word of "xgettext", so it can be a program name with args. set dummy xgettext; ac_word=$2 { echo "$as_me:$LINENO: checking for $ac_word" >&5 echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6; } if test "${ac_cv_path_XGETTEXT+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else case "$XGETTEXT" in /*) ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. ;; *) IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}:" for ac_dir in $PATH; do test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$ac_word; then if test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"; then ac_cv_path_XGETTEXT="$ac_dir/$ac_word" break fi fi done IFS="$ac_save_ifs" test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" ;; esac fi XGETTEXT="$ac_cv_path_XGETTEXT" if test "$XGETTEXT" != ":"; then { echo "$as_me:$LINENO: result: $XGETTEXT" >&5 echo "${ECHO_T}$XGETTEXT" >&6; } else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { extern int _nl_msg_cat_cntr; return _nl_msg_cat_cntr ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then CATOBJEXT=.gmo DATADIRNAME=share else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 case $host in *-*-solaris*) { echo "$as_me:$LINENO: checking for bind_textdomain_codeset" >&5 echo $ECHO_N "checking for bind_textdomain_codeset... $ECHO_C" >&6; } if test "${ac_cv_func_bind_textdomain_codeset+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define bind_textdomain_codeset to an innocuous variant, in case declares bind_textdomain_codeset. For example, HP-UX 11i declares gettimeofday. */ #define bind_textdomain_codeset innocuous_bind_textdomain_codeset /* System header to define __stub macros and hopefully few prototypes, which can conflict with char bind_textdomain_codeset (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef bind_textdomain_codeset /* 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 bind_textdomain_codeset (); /* 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_bind_textdomain_codeset || defined __stub___bind_textdomain_codeset choke me #endif int main () { return bind_textdomain_codeset (); ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_func_bind_textdomain_codeset=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_bind_textdomain_codeset=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_bind_textdomain_codeset" >&5 echo "${ECHO_T}$ac_cv_func_bind_textdomain_codeset" >&6; } if test $ac_cv_func_bind_textdomain_codeset = yes; then CATOBJEXT=.gmo DATADIRNAME=share else CATOBJEXT=.mo DATADIRNAME=lib fi ;; *) CATOBJEXT=.mo DATADIRNAME=lib ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext LIBS="$glib_save_LIBS" INSTOBJEXT=.mo else gt_cv_have_gettext=no fi fi fi if test "$gt_cv_have_gettext" = "yes" ; then cat >>confdefs.h <<\_ACEOF #define ENABLE_NLS 1 _ACEOF fi if test "$XGETTEXT" != ":"; then if $XGETTEXT --omit-header /dev/null 2> /dev/null; then : ; else { echo "$as_me:$LINENO: result: found xgettext program is not GNU xgettext; ignore it" >&5 echo "${ECHO_T}found xgettext program is not GNU xgettext; ignore it" >&6; } XGETTEXT=":" fi fi # We need to process the po/ directory. POSUB=po ac_config_commands="$ac_config_commands default-2" for lang in $ALL_LINGUAS; do GMOFILES="$GMOFILES $lang.gmo" POFILES="$POFILES $lang.po" done if test "$gt_cv_have_gettext" = "yes"; then if test "x$ALL_LINGUAS" = "x"; then LINGUAS= else { echo "$as_me:$LINENO: checking for catalogs to be installed" >&5 echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6; } NEW_LINGUAS= for presentlang in $ALL_LINGUAS; do useit=no if test "%UNSET%" != "${LINGUAS-%UNSET%}"; then desiredlanguages="$LINGUAS" else desiredlanguages="$ALL_LINGUAS" fi for desiredlang in $desiredlanguages; do # Use the presentlang catalog if desiredlang is # a. equal to presentlang, or # b. a variant of presentlang (because in this case, # presentlang can be used as a fallback for messages # which are not translated in the desiredlang catalog). case "$desiredlang" in "$presentlang"*) useit=yes;; esac done if test $useit = yes; then NEW_LINGUAS="$NEW_LINGUAS $presentlang" fi done LINGUAS=$NEW_LINGUAS { echo "$as_me:$LINENO: result: $LINGUAS" >&5 echo "${ECHO_T}$LINGUAS" >&6; } fi if test -n "$LINGUAS"; then for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done fi fi MKINSTALLDIRS= if test -n "$ac_aux_dir"; then MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" fi if test -z "$MKINSTALLDIRS"; then MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs" fi test -d po || mkdir po if test "x$srcdir" != "x."; then if test "x`echo $srcdir | sed 's@/.*@@'`" = "x"; then posrcprefix="$srcdir/" else posrcprefix="../$srcdir/" fi else posrcprefix="../" fi rm -f po/POTFILES sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \ < $srcdir/po/POTFILES.in > po/POTFILES if test "x$DATADIRNAME" != "x"; then localedir='${prefix}/${DATADIRNAME}/locale' else localedir='${datadir}/locale' fi # Check whether --with-localedir was given. if test "${with_localedir+set}" = set; then withval=$with_localedir; localedir="$withval" fi # Check whether --enable-ssl was given. if test "${enable_ssl+set}" = set; then enableval=$enable_ssl; ac_cv_enable_ssl=$enableval else ac_cv_enable_ssl=yes fi { echo "$as_me:$LINENO: checking whether to use OpenSSL" >&5 echo $ECHO_N "checking whether to use OpenSSL... $ECHO_C" >&6; } if test $ac_cv_enable_ssl = yes; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } pkg_failed=no { echo "$as_me:$LINENO: checking for OPENSSL" >&5 echo $ECHO_N "checking for OPENSSL... $ECHO_C" >&6; } if test -n "$PKG_CONFIG"; then if test -n "$OPENSSL_CFLAGS"; then pkg_cv_OPENSSL_CFLAGS="$OPENSSL_CFLAGS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"openssl\"") >&5 ($PKG_CONFIG --exists --print-errors "openssl") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_OPENSSL_CFLAGS=`$PKG_CONFIG --cflags "openssl" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test -n "$PKG_CONFIG"; then if test -n "$OPENSSL_LIBS"; then pkg_cv_OPENSSL_LIBS="$OPENSSL_LIBS" else if test -n "$PKG_CONFIG" && \ { (echo "$as_me:$LINENO: \$PKG_CONFIG --exists --print-errors \"openssl\"") >&5 ($PKG_CONFIG --exists --print-errors "openssl") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then pkg_cv_OPENSSL_LIBS=`$PKG_CONFIG --libs "openssl" 2>/dev/null` else pkg_failed=yes fi fi else pkg_failed=untried fi if test $pkg_failed = yes; then 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 OPENSSL_PKG_ERRORS=`$PKG_CONFIG --short-errors --errors-to-stdout --print-errors "openssl"` else OPENSSL_PKG_ERRORS=`$PKG_CONFIG --errors-to-stdout --print-errors "openssl"` fi # Put the nasty error message in config.log where it belongs echo "$OPENSSL_PKG_ERRORS" >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } : elif test $pkg_failed = untried; then : else OPENSSL_CFLAGS=$pkg_cv_OPENSSL_CFLAGS OPENSSL_LIBS=$pkg_cv_OPENSSL_LIBS { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } : fi if test "x$OPENSSL_LIBS" != "x"; then CFLAGS="$CFLAGS $OPENSSL_CFLAGS" LIBS="$LIBS $OPENSSL_LIBS" { echo "$as_me:$LINENO: checking if openssl is available" >&5 echo $ECHO_N "checking if openssl is available... $ECHO_C" >&6; } { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } cat >>confdefs.h <<\_ACEOF #define USE_SSL 1 _ACEOF else { echo "$as_me:$LINENO: checking if openssl is available" >&5 echo $ECHO_N "checking if openssl is available... $ECHO_C" >&6; } ac_save_LIBS="$LIBS" if test "$native_win32" = yes; then LIBS="$LIBS -lssl32 -leay32" else LIBS="$LIBS -lssl -lcrypto" fi cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { return OPENSSL_VERSION_NUMBER; ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } cat >>confdefs.h <<\_ACEOF #define USE_SSL 1 _ACEOF else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } LIBS="$ac_save_LIBS" ac_cv_enable_ssl=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Check whether --enable-oniguruma was given. if test "${enable_oniguruma+set}" = set; then enableval=$enable_oniguruma; ac_cv_enable_oniguruma=$enableval else ac_cv_enable_oniguruma=no fi { echo "$as_me:$LINENO: checking whether to use Oniguruma" >&5 echo $ECHO_N "checking whether to use Oniguruma... $ECHO_C" >&6; } if test "$ac_cv_enable_oniguruma" = yes; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } { echo "$as_me:$LINENO: checking whether Oniguruma is available" >&5 echo $ECHO_N "checking whether Oniguruma is available... $ECHO_C" >&6; } ONIG_CONFIG=onig-config ONIG_VERSION=`$ONIG_CONFIG --version 2>/dev/null` if test "x$ONIG_VERSION" != "x"; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } CFLAGS="$CFLAGS `$ONIG_CONFIG --cflags`" LIBS="$LIBS `$ONIG_CONFIG --libs`" cat >>confdefs.h <<\_ACEOF #define USE_ONIGURUMA 1 _ACEOF else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } ac_cv_enable_oniguruma=no fi else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi { echo "$as_me:$LINENO: checking whether to use threads" >&5 echo $ECHO_N "checking whether to use threads... $ECHO_C" >&6; } if test x"$use_threads" = xyes ; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } if test ! -z `$PKG_CONFIG --help 2>&1 |grep 'gthread-2.0'` ; then CFLAGS="$CFLAGS `$PKG_CONFIG --cflags gthread-2.0`" LIBS="$LIBS `$PKG_CONFIG --libs gthread-2.0`" cat >>confdefs.h <<\_ACEOF #define USE_THREADS 1 _ACEOF else { { echo "$as_me:$LINENO: error: LibSylph requires GThread from GLib to use threading." >&5 echo "$as_me: error: LibSylph requires GThread from GLib to use threading." >&2;} { (exit 1); exit 1; }; } fi else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi # Check whether --enable-ipv6 was given. if test "${enable_ipv6+set}" = set; then enableval=$enable_ipv6; ac_cv_enable_ipv6=$enableval else ac_cv_enable_ipv6=yes fi { echo "$as_me:$LINENO: checking whether to use IPv6" >&5 echo $ECHO_N "checking whether to use IPv6... $ECHO_C" >&6; } if test x"$ac_cv_enable_ipv6" = xyes; then { echo "$as_me:$LINENO: result: yes" >&5 echo "${ECHO_T}yes" >&6; } { echo "$as_me:$LINENO: checking for IPv6 support" >&5 echo $ECHO_N "checking for IPv6 support... $ECHO_C" >&6; } if test "$native_win32" = yes; then if test "${ac_cv_ipv6+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define INET6 #include #include #include int main () { int x = IPPROTO_IPV6; struct in6_addr a; ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_ipv6=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_ipv6=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi else if test "${ac_cv_ipv6+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define INET6 #include #include int main () { int x = IPPROTO_IPV6; struct in6_addr a; ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_ipv6=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_ipv6=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $ac_cv_ipv6" >&5 echo "${ECHO_T}$ac_cv_ipv6" >&6; } if test $ac_cv_ipv6 = yes; then cat >>confdefs.h <<\_ACEOF #define INET6 1 _ACEOF else { echo "$as_me:$LINENO: WARNING: *** IPv6 will not be supported ***" >&5 echo "$as_me: WARNING: *** IPv6 will not be supported ***" >&2;} ac_cv_enable_ipv6=no fi else { echo "$as_me:$LINENO: result: no" >&5 echo "${ECHO_T}no" >&6; } fi { echo "$as_me:$LINENO: checking whether struct dirent has d_type member" >&5 echo $ECHO_N "checking whether struct dirent has d_type member... $ECHO_C" >&6; } if test "${ac_cv_dirent_d_type+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { struct dirent d; d.d_type = DT_REG; ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_dirent_d_type=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_dirent_d_type=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_dirent_d_type" >&5 echo "${ECHO_T}$ac_cv_dirent_d_type" >&6; } if test $ac_cv_dirent_d_type = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_DIRENT_D_TYPE 1 _ACEOF fi ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_hdr that defines DIR" >&5 echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include <$ac_hdr> int main () { if ((DIR *) 0) return 0; ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then eval "$as_ac_Header=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then { echo "$as_me:$LINENO: checking for library containing opendir" >&5 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } if test "${ac_cv_search_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' dir; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_search_opendir=$ac_res else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_opendir+set}" = set; then break fi done if test "${ac_cv_search_opendir+set}" = set; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 echo "${ECHO_T}$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi else { echo "$as_me:$LINENO: checking for library containing opendir" >&5 echo $ECHO_N "checking for library containing opendir... $ECHO_C" >&6; } if test "${ac_cv_search_opendir+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_func_search_save_LIBS=$LIBS cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' x; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_search_opendir=$ac_res else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext if test "${ac_cv_search_opendir+set}" = set; then break fi done if test "${ac_cv_search_opendir+set}" = set; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { echo "$as_me:$LINENO: result: $ac_cv_search_opendir" >&5 echo "${ECHO_T}$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi fi { echo "$as_me:$LINENO: checking for ANSI C header files" >&5 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6; } if test "${ac_cv_header_stdc+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_stdc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* 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 rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then : else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi fi { echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5 echo "${ECHO_T}$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then cat >>confdefs.h <<\_ACEOF #define STDC_HEADERS 1 _ACEOF fi { echo "$as_me:$LINENO: checking for sys/wait.h that is POSIX.1 compatible" >&5 echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6; } if test "${ac_cv_header_sys_wait_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main () { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_header_sys_wait_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_header_sys_wait_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_header_sys_wait_h" >&5 echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6; } if test $ac_cv_header_sys_wait_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_SYS_WAIT_H 1 _ACEOF fi for ac_header in fcntl.h sys/file.h unistd.h paths.h \ sys/param.h sys/utsname.h sys/select.h \ netdb.h regex.h sys/mman.h do as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh` if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } else # Is the header compilable? { echo "$as_me:$LINENO: checking $ac_header usability" >&5 echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default #include <$ac_header> _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_header_compiler=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_compiler" >&5 echo "${ECHO_T}$ac_header_compiler" >&6; } # Is the header present? { echo "$as_me:$LINENO: checking $ac_header presence" >&5 echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6; } cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include <$ac_header> _ACEOF if { (ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } >/dev/null && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then ac_header_preproc=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_header_preproc=no fi rm -f conftest.err conftest.$ac_ext { echo "$as_me:$LINENO: result: $ac_header_preproc" >&5 echo "${ECHO_T}$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in yes:no: ) { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5 echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the compiler's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the compiler's result" >&2;} ac_header_preproc=yes ;; no:yes:* ) { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5 echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5 echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: see the Autoconf documentation" >&5 echo "$as_me: WARNING: $ac_header: see the Autoconf documentation" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&5 echo "$as_me: WARNING: $ac_header: section \"Present But Cannot Be Compiled\"" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5 echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;} { echo "$as_me:$LINENO: WARNING: $ac_header: in the future, the compiler will take precedence" >&5 echo "$as_me: WARNING: $ac_header: in the future, the compiler will take precedence" >&2;} ;; esac { echo "$as_me:$LINENO: checking for $ac_header" >&5 echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6; } if { as_var=$as_ac_Header; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else eval "$as_ac_Header=\$ac_header_preproc" fi ac_res=`eval echo '${'$as_ac_Header'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } fi if test `eval echo '${'$as_ac_Header'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { echo "$as_me:$LINENO: checking for an ANSI C-conforming const" >&5 echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6; } if test "${ac_cv_c_const+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ int main () { /* FIXME: Include the comments suggested by Paul. */ #ifndef __cplusplus /* Ultrix mips cc rejects this. */ typedef int charset[2]; const charset cs; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this. */ char *t; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; }; struct s *b; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_c_const=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_c_const" >&5 echo "${ECHO_T}$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then cat >>confdefs.h <<\_ACEOF #define const _ACEOF fi { echo "$as_me:$LINENO: checking for off_t" >&5 echo $ECHO_N "checking for off_t... $ECHO_C" >&6; } if test "${ac_cv_type_off_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef off_t ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_off_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_off_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_off_t" >&5 echo "${ECHO_T}$ac_cv_type_off_t" >&6; } if test $ac_cv_type_off_t = yes; then : else cat >>confdefs.h <<_ACEOF #define off_t long int _ACEOF fi { echo "$as_me:$LINENO: checking for pid_t" >&5 echo $ECHO_N "checking for pid_t... $ECHO_C" >&6; } if test "${ac_cv_type_pid_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef pid_t ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_pid_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_pid_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_pid_t" >&5 echo "${ECHO_T}$ac_cv_type_pid_t" >&6; } if test $ac_cv_type_pid_t = yes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi { echo "$as_me:$LINENO: checking for size_t" >&5 echo $ECHO_N "checking for size_t... $ECHO_C" >&6; } if test "${ac_cv_type_size_t+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef size_t ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_size_t=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_size_t=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_size_t" >&5 echo "${ECHO_T}$ac_cv_type_size_t" >&6; } if test $ac_cv_type_size_t = yes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi { echo "$as_me:$LINENO: checking whether struct tm is in sys/time.h or time.h" >&5 echo $ECHO_N "checking whether struct tm is in sys/time.h or time.h... $ECHO_C" >&6; } if test "${ac_cv_struct_tm+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include #include int main () { struct tm tm; int *p = &tm.tm_sec; return !p; ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_struct_tm=time.h else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_struct_tm=sys/time.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_struct_tm" >&5 echo "${ECHO_T}$ac_cv_struct_tm" >&6; } if test $ac_cv_struct_tm = sys/time.h; then cat >>confdefs.h <<\_ACEOF #define TM_IN_SYS_TIME 1 _ACEOF fi # Check whether --enable-largefile was given. if test "${enable_largefile+set}" = set; then enableval=$enable_largefile; fi if test "$enable_largefile" != no; then { echo "$as_me:$LINENO: checking for special C compiler options needed for large files" >&5 echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6; } if test "${ac_cv_sys_largefile_CC+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else ac_cv_sys_largefile_CC=no if test "$GCC" != yes; then ac_save_CC=$CC while :; do # IRIX 6.2 and later do not support large files by default, # so use the C compiler's -n32 option if that helps. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext CC="$CC -n32" 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_sys_largefile_CC=' -n32'; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext break done CC=$ac_save_CC rm -f conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_CC" >&5 echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6; } if test "$ac_cv_sys_largefile_CC" != no; then CC=$CC$ac_cv_sys_largefile_CC fi { echo "$as_me:$LINENO: checking for _FILE_OFFSET_BITS value needed for large files" >&5 echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6; } if test "${ac_cv_sys_file_offset_bits+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_sys_file_offset_bits=no; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _FILE_OFFSET_BITS 64 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_sys_file_offset_bits=64; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_file_offset_bits=unknown break done fi { echo "$as_me:$LINENO: result: $ac_cv_sys_file_offset_bits" >&5 echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6; } case $ac_cv_sys_file_offset_bits in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits _ACEOF ;; esac rm -f conftest* if test $ac_cv_sys_file_offset_bits = unknown; then { echo "$as_me:$LINENO: checking for _LARGE_FILES value needed for large files" >&5 echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6; } if test "${ac_cv_sys_large_files+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_sys_large_files=no; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _LARGE_FILES 1 #include /* Check that off_t can represent 2**63 - 1 correctly. We can't simply define LARGE_OFF_T to be 9223372036854775807, since some C++ compilers masquerading as C compilers incorrectly reject 9223372036854775807. */ #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 && LARGE_OFF_T % 2147483647 == 1) ? 1 : -1]; int main () { ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_sys_large_files=1; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_sys_large_files=unknown break done fi { echo "$as_me:$LINENO: result: $ac_cv_sys_large_files" >&5 echo "${ECHO_T}$ac_cv_sys_large_files" >&6; } case $ac_cv_sys_large_files in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _LARGE_FILES $ac_cv_sys_large_files _ACEOF ;; esac rm -f conftest* fi fi { echo "$as_me:$LINENO: checking for _LARGEFILE_SOURCE value needed for large files" >&5 echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6; } if test "${ac_cv_sys_largefile_source+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include /* for off_t */ #include int main () { int (*fp) (FILE *, off_t, int) = fseeko; return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_sys_largefile_source=no; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #define _LARGEFILE_SOURCE 1 #include /* for off_t */ #include int main () { int (*fp) (FILE *, off_t, int) = fseeko; return fseeko (stdin, 0, 0) && fp (stdin, 0, 0); ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_sys_largefile_source=1; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext ac_cv_sys_largefile_source=unknown break done fi { echo "$as_me:$LINENO: result: $ac_cv_sys_largefile_source" >&5 echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6; } case $ac_cv_sys_largefile_source in #( no | unknown) ;; *) cat >>confdefs.h <<_ACEOF #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source _ACEOF ;; esac rm -f conftest* # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug # in glibc 2.1.3, but that breaks too many other things. # If you want fseeko and ftello with glibc, upgrade to a fixed glibc. if test $ac_cv_sys_largefile_source != unknown; then cat >>confdefs.h <<\_ACEOF #define HAVE_FSEEKO 1 _ACEOF fi { echo "$as_me:$LINENO: checking for unsigned short" >&5 echo $ECHO_N "checking for unsigned short... $ECHO_C" >&6; } if test "${ac_cv_type_unsigned_short+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef unsigned short ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_unsigned_short=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_unsigned_short=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_short" >&5 echo "${ECHO_T}$ac_cv_type_unsigned_short" >&6; } # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { echo "$as_me:$LINENO: checking size of unsigned short" >&5 echo $ECHO_N "checking size of unsigned short... $ECHO_C" >&6; } if test "${ac_cv_sizeof_unsigned_short+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef unsigned short ac__type_sizeof_; int main () { static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef unsigned short ac__type_sizeof_; int main () { static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef unsigned short ac__type_sizeof_; int main () { static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef unsigned short ac__type_sizeof_; int main () { static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef unsigned short ac__type_sizeof_; int main () { static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_unsigned_short=$ac_lo;; '') if test "$ac_cv_type_unsigned_short" = yes; then { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned short) See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (unsigned short) See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } else ac_cv_sizeof_unsigned_short=0 fi ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef unsigned short ac__type_sizeof_; static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; fprintf (f, "%lu\n", i); } return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_unsigned_short=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) if test "$ac_cv_type_unsigned_short" = yes; then { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned short) See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (unsigned short) See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } else ac_cv_sizeof_unsigned_short=0 fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi { echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_short" >&5 echo "${ECHO_T}$ac_cv_sizeof_unsigned_short" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_UNSIGNED_SHORT $ac_cv_sizeof_unsigned_short _ACEOF { echo "$as_me:$LINENO: checking for unsigned int" >&5 echo $ECHO_N "checking for unsigned int... $ECHO_C" >&6; } if test "${ac_cv_type_unsigned_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef unsigned int ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_unsigned_int=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_unsigned_int=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_int" >&5 echo "${ECHO_T}$ac_cv_type_unsigned_int" >&6; } # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { echo "$as_me:$LINENO: checking size of unsigned int" >&5 echo $ECHO_N "checking size of unsigned int... $ECHO_C" >&6; } if test "${ac_cv_sizeof_unsigned_int+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef unsigned int ac__type_sizeof_; int main () { static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef unsigned int ac__type_sizeof_; int main () { static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef unsigned int ac__type_sizeof_; int main () { static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef unsigned int ac__type_sizeof_; int main () { static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef unsigned int ac__type_sizeof_; int main () { static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_unsigned_int=$ac_lo;; '') if test "$ac_cv_type_unsigned_int" = yes; then { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned int) See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (unsigned int) See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } else ac_cv_sizeof_unsigned_int=0 fi ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef unsigned int ac__type_sizeof_; static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; fprintf (f, "%lu\n", i); } return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_unsigned_int=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) if test "$ac_cv_type_unsigned_int" = yes; then { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned int) See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (unsigned int) See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } else ac_cv_sizeof_unsigned_int=0 fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi { echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_int" >&5 echo "${ECHO_T}$ac_cv_sizeof_unsigned_int" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_UNSIGNED_INT $ac_cv_sizeof_unsigned_int _ACEOF { echo "$as_me:$LINENO: checking for unsigned long" >&5 echo $ECHO_N "checking for unsigned long... $ECHO_C" >&6; } if test "${ac_cv_type_unsigned_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef unsigned long ac__type_new_; int main () { if ((ac__type_new_ *) 0) return 0; if (sizeof (ac__type_new_)) return 0; ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_cv_type_unsigned_long=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_type_unsigned_long=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_type_unsigned_long" >&5 echo "${ECHO_T}$ac_cv_type_unsigned_long" >&6; } # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. # This bug is HP SR number 8606223364. { echo "$as_me:$LINENO: checking size of unsigned long" >&5 echo $ECHO_N "checking size of unsigned long... $ECHO_C" >&6; } if test "${ac_cv_sizeof_unsigned_long+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then # Depending upon the size, compute the lo and hi bounds. cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef unsigned long ac__type_sizeof_; int main () { static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= 0)]; test_array [0] = 0 ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=0 ac_mid=0 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef unsigned long ac__type_sizeof_; int main () { static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr $ac_mid + 1` if test $ac_lo -le $ac_mid; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef unsigned long ac__type_sizeof_; int main () { static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) < 0)]; test_array [0] = 0 ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=-1 ac_mid=-1 while :; do cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef unsigned long ac__type_sizeof_; int main () { static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) >= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_lo=$ac_mid; break else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_hi=`expr '(' $ac_mid ')' - 1` if test $ac_mid -le $ac_hi; then ac_lo= ac_hi= break fi ac_mid=`expr 2 '*' $ac_mid` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo= ac_hi= fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext # Binary search between lo and hi bounds. while test "x$ac_lo" != "x$ac_hi"; do ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo` cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef unsigned long ac__type_sizeof_; int main () { static int test_array [1 - 2 * !(((long int) (sizeof (ac__type_sizeof_))) <= $ac_mid)]; test_array [0] = 0 ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_compile") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then ac_hi=$ac_mid else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_lo=`expr '(' $ac_mid ')' + 1` fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done case $ac_lo in ?*) ac_cv_sizeof_unsigned_long=$ac_lo;; '') if test "$ac_cv_type_unsigned_long" = yes; then { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long) See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (unsigned long) See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } else ac_cv_sizeof_unsigned_long=0 fi ;; esac else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default typedef unsigned long ac__type_sizeof_; static long int longval () { return (long int) (sizeof (ac__type_sizeof_)); } static unsigned long int ulongval () { return (long int) (sizeof (ac__type_sizeof_)); } #include #include int main () { FILE *f = fopen ("conftest.val", "w"); if (! f) return 1; if (((long int) (sizeof (ac__type_sizeof_))) < 0) { long int i = longval (); if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; fprintf (f, "%ld\n", i); } else { unsigned long int i = ulongval (); if (i != ((long int) (sizeof (ac__type_sizeof_)))) return 1; fprintf (f, "%lu\n", i); } return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_sizeof_unsigned_long=`cat conftest.val` else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) if test "$ac_cv_type_unsigned_long" = yes; then { { echo "$as_me:$LINENO: error: cannot compute sizeof (unsigned long) See \`config.log' for more details." >&5 echo "$as_me: error: cannot compute sizeof (unsigned long) See \`config.log' for more details." >&2;} { (exit 77); exit 77; }; } else ac_cv_sizeof_unsigned_long=0 fi fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi rm -f conftest.val fi { echo "$as_me:$LINENO: result: $ac_cv_sizeof_unsigned_long" >&5 echo "${ECHO_T}$ac_cv_sizeof_unsigned_long" >&6; } cat >>confdefs.h <<_ACEOF #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long _ACEOF # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { echo "$as_me:$LINENO: checking for working alloca.h" >&5 echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6; } if test "${ac_cv_working_alloca_h+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #include int main () { char *p = (char *) alloca (2 * sizeof (int)); if (p) return 0; ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_working_alloca_h=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_working_alloca_h=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_working_alloca_h" >&5 echo "${ECHO_T}$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ALLOCA_H 1 _ACEOF fi { echo "$as_me:$LINENO: checking for alloca" >&5 echo $ECHO_N "checking for alloca... $ECHO_C" >&6; } if test "${ac_cv_func_alloca_works+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #ifdef __GNUC__ # define alloca __builtin_alloca #else # ifdef _MSC_VER # include # define alloca _alloca # else # ifdef HAVE_ALLOCA_H # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ char *alloca (); # endif # endif # endif # endif #endif int main () { char *p = (char *) alloca (1); if (p) return 0; ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then ac_cv_func_alloca_works=yes else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_cv_func_alloca_works=no fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi { echo "$as_me:$LINENO: result: $ac_cv_func_alloca_works" >&5 echo "${ECHO_T}$ac_cv_func_alloca_works" >&6; } if test $ac_cv_func_alloca_works = yes; then cat >>confdefs.h <<\_ACEOF #define HAVE_ALLOCA 1 _ACEOF else # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. ALLOCA=\${LIBOBJDIR}alloca.$ac_objext cat >>confdefs.h <<\_ACEOF #define C_ALLOCA 1 _ACEOF { echo "$as_me:$LINENO: checking whether \`alloca.c' needs Cray hooks" >&5 echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6; } if test "${ac_cv_os_cray+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ #if defined CRAY && ! defined CRAY2 webecray #else wenotbecray #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "webecray" >/dev/null 2>&1; then ac_cv_os_cray=yes else ac_cv_os_cray=no fi rm -f conftest* fi { echo "$as_me:$LINENO: result: $ac_cv_os_cray" >&5 echo "${ECHO_T}$ac_cv_os_cray" >&6; } if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* 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_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func _ACEOF break fi done fi { echo "$as_me:$LINENO: checking stack direction for C alloca" >&5 echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6; } if test "${ac_cv_c_stack_direction+set}" = set; then echo $ECHO_N "(cached) $ECHO_C" >&6 else if test "$cross_compiling" = yes; then ac_cv_c_stack_direction=0 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ $ac_includes_default int find_stack_direction () { static char *addr = 0; auto char dummy; if (addr == 0) { addr = &dummy; return find_stack_direction (); } else return (&dummy > addr) ? 1 : -1; } int main () { return find_stack_direction () < 0; } _ACEOF rm -f conftest$ac_exeext if { (ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { ac_try='./conftest$ac_exeext' { (case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_try") 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; }; then ac_cv_c_stack_direction=1 else echo "$as_me: program exited with status $ac_status" >&5 echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ( exit $ac_status ) ac_cv_c_stack_direction=-1 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext fi fi { echo "$as_me:$LINENO: result: $ac_cv_c_stack_direction" >&5 echo "${ECHO_T}$ac_cv_c_stack_direction" >&6; } cat >>confdefs.h <<_ACEOF #define STACK_DIRECTION $ac_cv_c_stack_direction _ACEOF fi for ac_func in gethostname mkdir mktime socket strstr strchr \ uname flock lockf inet_aton inet_addr \ fchmod truncate getuid regcomp mlock do as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh` { echo "$as_me:$LINENO: checking for $ac_func" >&5 echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6; } if { as_var=$as_ac_var; eval "test \"\${$as_var+set}\" = set"; }; then echo $ECHO_N "(cached) $ECHO_C" >&6 else cat >conftest.$ac_ext <<_ACEOF /* confdefs.h. */ _ACEOF cat confdefs.h >>conftest.$ac_ext cat >>conftest.$ac_ext <<_ACEOF /* end confdefs.h. */ /* Define $ac_func to an innocuous variant, in case declares $ac_func. For example, HP-UX 11i declares gettimeofday. */ #define $ac_func innocuous_$ac_func /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $ac_func (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $ac_func /* 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 $ac_func (); /* 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_$ac_func || defined __stub___$ac_func choke me #endif int main () { return $ac_func (); ; return 0; } _ACEOF 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 "echo \"\$as_me:$LINENO: $ac_try_echo\"") >&5 (eval "$ac_link") 2>conftest.er1 ac_status=$? grep -v '^ *+' conftest.er1 >conftest.err rm -f conftest.er1 cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && $as_test_x conftest$ac_exeext; then eval "$as_ac_var=yes" else echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 eval "$as_ac_var=no" fi rm -f core conftest.err conftest.$ac_objext conftest_ipa8_conftest.oo \ conftest$ac_exeext conftest.$ac_ext fi ac_res=`eval echo '${'$as_ac_var'}'` { echo "$as_me:$LINENO: result: $ac_res" >&5 echo "${ECHO_T}$ac_res" >&6; } if test `eval echo '${'$as_ac_var'}'` = yes; then cat >>confdefs.h <<_ACEOF #define `echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done ac_config_files="$ac_config_files Makefile ac/Makefile doc/Makefile examples/Makefile libsylph/Makefile po/Makefile.in" 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_*) { echo "$as_me:$LINENO: WARNING: Cache variable $ac_var contains a newline." >&5 echo "$as_me: WARNING: Cache variable $ac_var contains a newline." >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( *) $as_unset $ac_var ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes (double-quote # substitution turns \\\\ into \\, and sed turns \\ into \). sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then test "x$cache_file" != "x/dev/null" && { echo "$as_me:$LINENO: updating cache $cache_file" >&5 echo "$as_me: updating cache $cache_file" >&6;} cat confcache >$cache_file else { echo "$as_me:$LINENO: not updating unwritable cache $cache_file" >&5 echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`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. ac_libobjs="$ac_libobjs \${LIBOBJDIR}$ac_i\$U.$ac_objext" ac_ltlibobjs="$ac_ltlibobjs \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : ${CONFIG_STATUS=./config.status} ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5 echo "$as_me: creating $CONFIG_STATUS" >&6;} cat >$CONFIG_STATUS <<_ACEOF #! $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} _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF ## --------------------- ## ## 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=: # Zsh 3.x and 4.x performs 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 # PATH needs CR # 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 # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then echo "#! /bin/sh" >conf$$.sh echo "exit 0" >>conf$$.sh chmod +x conf$$.sh if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then PATH_SEPARATOR=';' else PATH_SEPARATOR=: fi rm -f conf$$.sh fi # Support unset when possible. if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then as_unset=unset else as_unset=false 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.) as_nl=' ' IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. case $0 in *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 { (exit 1); exit 1; } fi # Work around bugs in pre-3.0 UWIN ksh. for as_var in ENV MAIL MAILPATH do ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. for as_var in \ LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \ LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \ LC_TELEPHONE LC_TIME do if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then eval $as_var=C; export $as_var else ($as_unset $as_var) >/dev/null 2>&1 && $as_unset $as_var fi done # Required to use basename. 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 # Name of the executable. as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # CDPATH. $as_unset CDPATH as_lineno_1=$LINENO as_lineno_2=$LINENO test "x$as_lineno_1" != "x$as_lineno_2" && test "x`expr $as_lineno_1 + 1`" = "x$as_lineno_2" || { # Create $as_me.lineno as a copy of $as_myself, but with $LINENO # uniformly replaced by the line number. The first 'sed' inserts a # line-number line after each line using $LINENO; the second 'sed' # does the real work. The second script uses 'N' to pair each # line-number line with the line containing $LINENO, and appends # trailing '-' during substitution so that $LINENO is not a special # case at line end. # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the # scripts with optimization help from Paolo Bonzini. 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" || { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2 { (exit 1); exit 1; }; } # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in -n*) case `echo 'x\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. *) ECHO_C='\c';; esac;; *) ECHO_N='-n';; esac if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi 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 fi echo >conf$$.file if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -p'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -p' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -p' fi 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=: else test -d ./-p && rmdir ./-p as_mkdir_p=false fi if test -x / >/dev/null 2>&1; then as_test_x='test -x' else if ls -dL / >/dev/null 2>&1; then as_ls_L_option=L else as_ls_L_option= fi as_test_x=' eval sh -c '\'' if test -d "$1"; then test -d "$1/."; else case $1 in -*)set "./$1";; esac; case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in ???[sx]*):;;*)false;;esac;fi '\'' sh ' fi as_executable_p=$as_test_x # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 # Save the log message, to keep $[0] and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.61. 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 cat >>$CONFIG_STATUS <<_ACEOF # 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_cs_usage="\ \`$as_me' instantiates files from templates according to the current configuration. Usage: $0 [OPTIONS] [FILE]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit -q, --quiet 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_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.61, with options \\"`echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`\\" Copyright (C) 2006 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' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # If no file are specified by the user, then we need to provide default # value. By we need to know if files were specified by the user. ac_need_defaults=: while test $# != 0 do case $1 in --*=*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) echo "$ac_cs_version"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift CONFIG_FILES="$CONFIG_FILES $ac_optarg" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header { echo "$as_me: error: ambiguous option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; };; --help | --hel | -h ) 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. -*) { echo "$as_me: error: unrecognized option: $1 Try \`$0 --help' for more information." >&2 { (exit 1); exit 1; }; } ;; *) ac_config_targets="$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 if \$ac_cs_recheck; then echo "running CONFIG_SHELL=$SHELL $SHELL $0 "$ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6 CONFIG_SHELL=$SHELL export CONFIG_SHELL exec $SHELL "$0"$ac_configure_args \$ac_configure_extra_args --no-create --no-recursion fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF # # INIT-COMMANDS # _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # 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" ;; "default-1") CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;; "default-2") CONFIG_COMMANDS="$CONFIG_COMMANDS default-2" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "ac/Makefile") CONFIG_FILES="$CONFIG_FILES ac/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; "libsylph/Makefile") CONFIG_FILES="$CONFIG_FILES libsylph/Makefile" ;; "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5 echo "$as_me: error: invalid argument: $ac_config_target" >&2;} { (exit 1); exit 1; }; };; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= trap 'exit_status=$? { test -z "$tmp" || test ! -d "$tmp" || rm -fr "$tmp"; } && exit $exit_status ' 0 trap '{ (exit 1); exit 1; }' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || { echo "$me: cannot create a temporary directory in ." >&2 { (exit 1); exit 1; } } # # Set up the sed scripts for CONFIG_FILES section. # # No need to generate the scripts if there are no CONFIG_FILES. # This happens for instance when ./config.status config.h if test -n "$CONFIG_FILES"; then _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF SHELL!$SHELL$ac_delim PATH_SEPARATOR!$PATH_SEPARATOR$ac_delim PACKAGE_NAME!$PACKAGE_NAME$ac_delim PACKAGE_TARNAME!$PACKAGE_TARNAME$ac_delim PACKAGE_VERSION!$PACKAGE_VERSION$ac_delim PACKAGE_STRING!$PACKAGE_STRING$ac_delim PACKAGE_BUGREPORT!$PACKAGE_BUGREPORT$ac_delim exec_prefix!$exec_prefix$ac_delim prefix!$prefix$ac_delim program_transform_name!$program_transform_name$ac_delim bindir!$bindir$ac_delim sbindir!$sbindir$ac_delim libexecdir!$libexecdir$ac_delim datarootdir!$datarootdir$ac_delim datadir!$datadir$ac_delim sysconfdir!$sysconfdir$ac_delim sharedstatedir!$sharedstatedir$ac_delim localstatedir!$localstatedir$ac_delim includedir!$includedir$ac_delim oldincludedir!$oldincludedir$ac_delim docdir!$docdir$ac_delim infodir!$infodir$ac_delim htmldir!$htmldir$ac_delim dvidir!$dvidir$ac_delim pdfdir!$pdfdir$ac_delim psdir!$psdir$ac_delim libdir!$libdir$ac_delim localedir!$localedir$ac_delim mandir!$mandir$ac_delim DEFS!$DEFS$ac_delim ECHO_C!$ECHO_C$ac_delim ECHO_N!$ECHO_N$ac_delim ECHO_T!$ECHO_T$ac_delim LIBS!$LIBS$ac_delim build_alias!$build_alias$ac_delim host_alias!$host_alias$ac_delim target_alias!$target_alias$ac_delim build!$build$ac_delim build_cpu!$build_cpu$ac_delim build_vendor!$build_vendor$ac_delim build_os!$build_os$ac_delim host!$host$ac_delim host_cpu!$host_cpu$ac_delim host_vendor!$host_vendor$ac_delim host_os!$host_os$ac_delim target!$target$ac_delim target_cpu!$target_cpu$ac_delim target_vendor!$target_vendor$ac_delim target_os!$target_os$ac_delim INSTALL_PROGRAM!$INSTALL_PROGRAM$ac_delim INSTALL_SCRIPT!$INSTALL_SCRIPT$ac_delim INSTALL_DATA!$INSTALL_DATA$ac_delim PACKAGE!$PACKAGE$ac_delim VERSION!$VERSION$ac_delim ACLOCAL!$ACLOCAL$ac_delim AUTOCONF!$AUTOCONF$ac_delim AUTOMAKE!$AUTOMAKE$ac_delim AUTOHEADER!$AUTOHEADER$ac_delim MAKEINFO!$MAKEINFO$ac_delim SET_MAKE!$SET_MAKE$ac_delim MAJOR_VERSION!$MAJOR_VERSION$ac_delim MINOR_VERSION!$MINOR_VERSION$ac_delim MICRO_VERSION!$MICRO_VERSION$ac_delim BUILD_REVISION!$BUILD_REVISION$ac_delim LT_RELEASE!$LT_RELEASE$ac_delim LT_CURRENT!$LT_CURRENT$ac_delim LT_REVISION!$LT_REVISION$ac_delim LT_AGE!$LT_AGE$ac_delim MAINTAINER_MODE_TRUE!$MAINTAINER_MODE_TRUE$ac_delim MAINTAINER_MODE_FALSE!$MAINTAINER_MODE_FALSE$ac_delim MAINT!$MAINT$ac_delim CC!$CC$ac_delim CFLAGS!$CFLAGS$ac_delim LDFLAGS!$LDFLAGS$ac_delim CPPFLAGS!$CPPFLAGS$ac_delim ac_ct_CC!$ac_ct_CC$ac_delim EXEEXT!$EXEEXT$ac_delim OBJEXT!$OBJEXT$ac_delim LN_S!$LN_S$ac_delim CPP!$CPP$ac_delim LEX!$LEX$ac_delim LEX_OUTPUT_ROOT!$LEX_OUTPUT_ROOT$ac_delim LEXLIB!$LEXLIB$ac_delim YACC!$YACC$ac_delim YFLAGS!$YFLAGS$ac_delim GREP!$GREP$ac_delim EGREP!$EGREP$ac_delim ECHO!$ECHO$ac_delim AR!$AR$ac_delim RANLIB!$RANLIB$ac_delim STRIP!$STRIP$ac_delim CXX!$CXX$ac_delim CXXFLAGS!$CXXFLAGS$ac_delim ac_ct_CXX!$ac_ct_CXX$ac_delim CXXCPP!$CXXCPP$ac_delim F77!$F77$ac_delim FFLAGS!$FFLAGS$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-1.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF CEOF$ac_eof _ACEOF ac_delim='%!_!# ' for ac_last_try in false false false false false :; do cat >conf$$subs.sed <<_ACEOF ac_ct_F77!$ac_ct_F77$ac_delim LIBTOOL!$LIBTOOL$ac_delim WINDRES!$WINDRES$ac_delim HAVE_WINDRES_TRUE!$HAVE_WINDRES_TRUE$ac_delim HAVE_WINDRES_FALSE!$HAVE_WINDRES_FALSE$ac_delim OS_WIN32_TRUE!$OS_WIN32_TRUE$ac_delim OS_WIN32_FALSE!$OS_WIN32_FALSE$ac_delim PKG_CONFIG!$PKG_CONFIG$ac_delim GLIB_CFLAGS!$GLIB_CFLAGS$ac_delim GLIB_LIBS!$GLIB_LIBS$ac_delim GLIB_GENMARSHAL!$GLIB_GENMARSHAL$ac_delim GOBJECT_QUERY!$GOBJECT_QUERY$ac_delim GLIB_MKENUMS!$GLIB_MKENUMS$ac_delim LIBICONV!$LIBICONV$ac_delim LTLIBICONV!$LTLIBICONV$ac_delim GETTEXT_PACKAGE!$GETTEXT_PACKAGE$ac_delim USE_NLS!$USE_NLS$ac_delim MSGFMT!$MSGFMT$ac_delim MSGFMT_OPTS!$MSGFMT_OPTS$ac_delim GMSGFMT!$GMSGFMT$ac_delim XGETTEXT!$XGETTEXT$ac_delim CATALOGS!$CATALOGS$ac_delim CATOBJEXT!$CATOBJEXT$ac_delim DATADIRNAME!$DATADIRNAME$ac_delim GMOFILES!$GMOFILES$ac_delim INSTOBJEXT!$INSTOBJEXT$ac_delim INTLLIBS!$INTLLIBS$ac_delim PO_IN_DATADIR_TRUE!$PO_IN_DATADIR_TRUE$ac_delim PO_IN_DATADIR_FALSE!$PO_IN_DATADIR_FALSE$ac_delim POFILES!$POFILES$ac_delim POSUB!$POSUB$ac_delim MKINSTALLDIRS!$MKINSTALLDIRS$ac_delim OPENSSL_CFLAGS!$OPENSSL_CFLAGS$ac_delim OPENSSL_LIBS!$OPENSSL_LIBS$ac_delim ALLOCA!$ALLOCA$ac_delim LIBOBJS!$LIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim _ACEOF if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 37; then break elif $ac_last_try; then { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 echo "$as_me: error: could not make $CONFIG_STATUS" >&2;} { (exit 1); exit 1; }; } else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done ac_eof=`sed -n '/^CEOF[0-9]*$/s/CEOF/0/p' conf$$subs.sed` if test -n "$ac_eof"; then ac_eof=`echo "$ac_eof" | sort -nru | sed 1q` ac_eof=`expr $ac_eof + 1` fi cat >>$CONFIG_STATUS <<_ACEOF cat >"\$tmp/subs-2.sed" <<\CEOF$ac_eof /@[a-zA-Z_][a-zA-Z_0-9]*@/!b end _ACEOF sed ' s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g s/^/s,@/; s/!/@,|#_!!_#|/ :n t n s/'"$ac_delim"'$/,g/; t s/$/\\/; p N; s/^.*\n//; s/[,\\&]/\\&/g; s/@/@|#_!!_#|/g; b n ' >>$CONFIG_STATUS >$CONFIG_STATUS <<_ACEOF :end s/|#_!!_#|//g CEOF$ac_eof _ACEOF # VPATH may cause trouble with some makes, so we remove $(srcdir), # ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=/{ s/:*\$(srcdir):*/:/ s/:*\${srcdir}:*/:/ s/:*@srcdir@:*/:/ s/^\([^=]*=[ ]*\):*/\1/ s/:*$// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF fi # test -n "$CONFIG_FILES" for ac_tag in :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) { { echo "$as_me:$LINENO: error: Invalid tag $ac_tag." >&5 echo "$as_me: error: Invalid tag $ac_tag." >&2;} { (exit 1); exit 1; }; };; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || { { echo "$as_me:$LINENO: error: cannot find input file: $ac_f" >&5 echo "$as_me: error: cannot find input file: $ac_f" >&2;} { (exit 1); exit 1; }; };; esac ac_file_inputs="$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 "`IFS=: echo $* | sed 's|^[^:]*/||;s|:[^:]*/|, |g'`" by configure." if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { echo "$as_me:$LINENO: creating $ac_file" >&5 echo "$as_me: creating $ac_file" >&6;} fi case $ac_tag in *:-:* | *:-) cat >"$tmp/stdin";; 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 || 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" case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || { $as_mkdir_p && mkdir -p "$as_dir"; } || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`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 || 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" || { { echo "$as_me:$LINENO: error: cannot create directory $as_dir" >&5 echo "$as_me: error: cannot create directory $as_dir" >&2;} { (exit 1); exit 1; }; }; } ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,/..,g;s,/,,'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF # 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= case `sed -n '/datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p ' $ac_file_inputs` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { echo "$as_me:$LINENO: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF 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 sed "$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s&@configure_input@&$configure_input&;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t $ac_datarootdir_hack " $ac_file_inputs | sed -f "$tmp/subs-1.sed" | sed -f "$tmp/subs-2.sed" >$tmp/out test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } && { echo "$as_me:$LINENO: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&5 echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined." >&2;} rm -f "$tmp/stdin" case $ac_file in -) cat "$tmp/out"; rm -f "$tmp/out";; *) rm -f "$ac_file"; mv "$tmp/out" $ac_file;; esac ;; :H) # # CONFIG_HEADER # _ACEOF # Transform confdefs.h into a sed script `conftest.defines', that # substitutes the proper values into config.h.in to produce config.h. rm -f conftest.defines conftest.tail # First, append a space to every undef/define line, to ease matching. echo 's/$/ /' >conftest.defines # Then, protect against being on the right side of a sed subst, or in # an unquoted here document, in config.status. If some macros were # called several times there might be several #defines for the same # symbol, which is useless. But do not sort them, since the last # AC_DEFINE must be honored. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* # These sed commands are passed to sed as "A NAME B PARAMS C VALUE D", where # NAME is the cpp macro being defined, VALUE is the value it is being given. # PARAMS is the parameter list in the macro definition--in most cases, it's # just an empty string. ac_dA='s,^\\([ #]*\\)[^ ]*\\([ ]*' ac_dB='\\)[ (].*,\\1define\\2' ac_dC=' ' ac_dD=' ,' uniq confdefs.h | sed -n ' t rset :rset s/^[ ]*#[ ]*define[ ][ ]*// t ok d :ok s/[\\&,]/\\&/g s/^\('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/ '"$ac_dA"'\1'"$ac_dB"'\2'"${ac_dC}"'\3'"$ac_dD"'/p s/^\('"$ac_word_re"'\)[ ]*\(.*\)/'"$ac_dA"'\1'"$ac_dB$ac_dC"'\2'"$ac_dD"'/p ' >>conftest.defines # Remove the space that was appended to ease matching. # Then 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. # (The regexp can be short, since the line contains either #define or #undef.) echo 's/ $// s,^[ #]*u.*,/* & */,' >>conftest.defines # Break up conftest.defines: ac_max_sed_lines=50 # First sed command is: sed -f defines.sed $ac_file_inputs >"$tmp/out1" # Second one is: sed -f defines.sed "$tmp/out1" >"$tmp/out2" # Third one will be: sed -f defines.sed "$tmp/out2" >"$tmp/out1" # et cetera. ac_in='$ac_file_inputs' ac_out='"$tmp/out1"' ac_nxt='"$tmp/out2"' while : do # Write a here document: cat >>$CONFIG_STATUS <<_ACEOF # First, check the format of the line: cat >"\$tmp/defines.sed" <<\\CEOF /^[ ]*#[ ]*undef[ ][ ]*$ac_word_re[ ]*\$/b def /^[ ]*#[ ]*define[ ][ ]*$ac_word_re[( ]/b def b :def _ACEOF sed ${ac_max_sed_lines}q conftest.defines >>$CONFIG_STATUS echo 'CEOF sed -f "$tmp/defines.sed"' "$ac_in >$ac_out" >>$CONFIG_STATUS ac_in=$ac_out; ac_out=$ac_nxt; ac_nxt=$ac_in sed 1,${ac_max_sed_lines}d conftest.defines >conftest.tail grep . conftest.tail >/dev/null || break rm -f conftest.defines mv conftest.tail conftest.defines done rm -f conftest.defines conftest.tail echo "ac_result=$ac_in" >>$CONFIG_STATUS cat >>$CONFIG_STATUS <<\_ACEOF if test x"$ac_file" != x-; then echo "/* $configure_input */" >"$tmp/config.h" cat "$ac_result" >>"$tmp/config.h" if diff $ac_file "$tmp/config.h" >/dev/null 2>&1; then { echo "$as_me:$LINENO: $ac_file is unchanged" >&5 echo "$as_me: $ac_file is unchanged" >&6;} else rm -f $ac_file mv "$tmp/config.h" $ac_file fi else echo "/* $configure_input */" cat "$ac_result" fi rm -f "$tmp/out12" ;; :C) { echo "$as_me:$LINENO: executing $ac_file commands" >&5 echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "default-1":C) test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h ;; "default-2":C) case "$CONFIG_FILES" in *po/Makefile.in*) sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile esac ;; esac done # for ac_tag { (exit 0); exit 0; } _ACEOF chmod +x $CONFIG_STATUS ac_clean_files=$ac_clean_files_save # 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 || { (exit 1); exit 1; } fi echo "" echo "$PACKAGE $VERSION" echo "" echo "OpenSSL : $ac_cv_enable_ssl" echo "iconv : $am_cv_func_iconv" echo "IPv6 : $ac_cv_enable_ipv6" echo "Oniguruma : $ac_cv_enable_oniguruma" echo "" echo "The binary will be installed in $prefix/lib" echo "" echo "Configure finished, type 'make' to build." libsylph-1.1.0/configure.in0000644000175000017500000001657010734640121012600 00000000000000dnl Process this file with autoconf to produce a configure script. AC_PREREQ(2.50) AC_INIT(libsylph/account.c) PACKAGE=libsylph dnl version number MAJOR_VERSION=1 MINOR_VERSION=1 MICRO_VERSION=0 INTERFACE_AGE=0 BINARY_AGE=0 EXTRA_VERSION= BUILD_REVISION=0 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION dnl set $target AC_CANONICAL_SYSTEM dnl AM_INIT_AUTOMAKE($PACKAGE, $VERSION, no-define) dnl AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE") dnl AC_DEFINE_UNQUOTED(VERSION, "$VERSION") AC_SUBST(PACKAGE) AC_SUBST(VERSION) AC_SUBST(MAJOR_VERSION) AC_SUBST(MINOR_VERSION) AC_SUBST(MICRO_VERSION) AC_SUBST(BUILD_REVISION) dnl libtool versioning LT_RELEASE=$MAJOR_VERSION.$MINOR_VERSION LT_CURRENT=2 LT_REVISION=0 LT_AGE=1 AC_SUBST(LT_RELEASE) AC_SUBST(LT_CURRENT) AC_SUBST(LT_REVISION) AC_SUBST(LT_AGE) dnl Specify a header configuration file AM_CONFIG_HEADER(config.h) AM_MAINTAINER_MODE dnl Checks for programs. dnl AC_ARG_PROGRAM AC_PROG_CC AC_ISC_POSIX AM_PROG_CC_STDC AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET AC_PROG_CPP dnl AC_PROG_RANLIB AM_PROG_LEX AC_PROG_YACC AM_PROG_LIBTOOL AC_CHECK_PROG(WINDRES, windres, windres) AM_CONDITIONAL(HAVE_WINDRES, test x"$WINDRES" != x) SYLPHEED_ACLOCAL_INCLUDE(ac) native_win32=no case "$target" in *-darwin*) CFLAGS="$CFLAGS -no-cpp-precomp -fno-common" ;; *-*-mingw*) native_win32=yes CFLAGS="$CFLAGS -mms-bitfields -mwindows" LIBS="$LIBS -lws2_32" ;; esac AM_CONDITIONAL(OS_WIN32, [test "$native_win32" = "yes"]) dnl Checks for libraries. AM_PATH_GLIB_2_0(2.4.0,, AC_MSG_ERROR(Test for GLib failed. See the 'INSTALL' for help.)) AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal) dnl checks for iconv AM_ICONV AC_CHECK_FUNCS(bind_textdomain_codeset) dnl for gettext ALL_LINGUAS="bg cs da de el es et fr gl hr hu it ja ko lt nl pl pt_BR ro ru sk sl sr sv tr uk vi zh_CN zh_TW" GETTEXT_PACKAGE=libsylph AC_SUBST(GETTEXT_PACKAGE) AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE,"$GETTEXT_PACKAGE", [Define text domain.]) AM_GLIB_GNU_GETTEXT dnl AM_GNU_GETTEXT dnl AC_CHECK_FUNC(gettext, AC_CHECK_LIB(intl, gettext)) if test "x$DATADIRNAME" != "x"; then localedir='${prefix}/${DATADIRNAME}/locale' else localedir='${datadir}/locale' fi AC_ARG_WITH(localedir, [ --with-localedir=DIR Locale directory], [localedir="$withval"]) AC_SUBST(localedir) dnl Check for OpenSSL AC_ARG_ENABLE(ssl, [ --disable-ssl Disable SSL support using OpenSSL], [ac_cv_enable_ssl=$enableval], [ac_cv_enable_ssl=yes]) AC_MSG_CHECKING([whether to use OpenSSL]) if test $ac_cv_enable_ssl = yes; then AC_MSG_RESULT(yes) dnl First check with pkg-config PKG_CHECK_MODULES(OPENSSL, openssl, [:], [:]) if test "x$OPENSSL_LIBS" != "x"; then CFLAGS="$CFLAGS $OPENSSL_CFLAGS" LIBS="$LIBS $OPENSSL_LIBS" AC_MSG_CHECKING([if openssl is available]) AC_MSG_RESULT(yes) AC_DEFINE(USE_SSL, 1, Define if you use OpenSSL to support SSL.) else dnl If pkg-config fails, run compile/link test. AC_MSG_CHECKING([if openssl is available]) ac_save_LIBS="$LIBS" if test "$native_win32" = yes; then LIBS="$LIBS -lssl32 -leay32" else LIBS="$LIBS -lssl -lcrypto" fi AC_TRY_LINK([ #include ], [ return OPENSSL_VERSION_NUMBER; ], [ AC_MSG_RESULT(yes) AC_DEFINE(USE_SSL, 1, Define if you use OpenSSL to support SSL.) ], [ AC_MSG_RESULT(no) LIBS="$ac_save_LIBS" ac_cv_enable_ssl=no ]) fi else AC_MSG_RESULT(no) fi dnl Check for Oniguruma support in message filtering AC_ARG_ENABLE(oniguruma, [ --enable-oniguruma Use Oniguruma instead of system's regex [[default=no]]], [ac_cv_enable_oniguruma=$enableval], [ac_cv_enable_oniguruma=no]) AC_MSG_CHECKING([whether to use Oniguruma]) if test "$ac_cv_enable_oniguruma" = yes; then AC_MSG_RESULT(yes) AC_MSG_CHECKING([whether Oniguruma is available]) dnl AC_CHECK_PROG(ONIG_CONFIG, onig-config, onig-config) ONIG_CONFIG=onig-config ONIG_VERSION=`$ONIG_CONFIG --version 2>/dev/null` if test "x$ONIG_VERSION" != "x"; then AC_MSG_RESULT(yes) CFLAGS="$CFLAGS `$ONIG_CONFIG --cflags`" LIBS="$LIBS `$ONIG_CONFIG --libs`" AC_DEFINE(USE_ONIGURUMA, 1, Define if you want to use Oniguruma.) else AC_MSG_RESULT(no) ac_cv_enable_oniguruma=no fi else AC_MSG_RESULT(no) fi dnl for GThread support (currently disabled) dnl AC_ARG_ENABLE(threads, dnl [ --enable-threads Enable multithread support [[default=no]]], dnl [use_threads=$enableval], [use_threads=no]) AC_MSG_CHECKING([whether to use threads]) if test x"$use_threads" = xyes ; then AC_MSG_RESULT(yes) if test ! -z `$PKG_CONFIG --help 2>&1 |grep 'gthread-2.0'` ; then CFLAGS="$CFLAGS `$PKG_CONFIG --cflags gthread-2.0`" LIBS="$LIBS `$PKG_CONFIG --libs gthread-2.0`" AC_DEFINE(USE_THREADS, 1, Whether to use multithread or not) else AC_MSG_ERROR([LibSylph requires GThread from GLib to use threading.]) fi else AC_MSG_RESULT(no) fi dnl check for IPv6 option AC_ARG_ENABLE(ipv6, [ --disable-ipv6 Disable IPv6 support], [ac_cv_enable_ipv6=$enableval], [ac_cv_enable_ipv6=yes]) dnl automated checks for IPv6 support. AC_MSG_CHECKING([whether to use IPv6]) if test x"$ac_cv_enable_ipv6" = xyes; then AC_MSG_RESULT(yes) AC_MSG_CHECKING([for IPv6 support]) if test "$native_win32" = yes; then AC_CACHE_VAL(ac_cv_ipv6,[ AC_TRY_COMPILE([#define INET6 #include #include #include ], [int x = IPPROTO_IPV6; struct in6_addr a;], ac_cv_ipv6=yes, ac_cv_ipv6=no) ]) else AC_CACHE_VAL(ac_cv_ipv6,[ AC_TRY_COMPILE([#define INET6 #include #include ], [int x = IPPROTO_IPV6; struct in6_addr a;], ac_cv_ipv6=yes, ac_cv_ipv6=no) ]) fi AC_MSG_RESULT($ac_cv_ipv6) if test $ac_cv_ipv6 = yes; then AC_DEFINE(INET6, 1, Define if you want IPv6 support.) else AC_MSG_WARN(*** IPv6 will not be supported ***) ac_cv_enable_ipv6=no fi else AC_MSG_RESULT(no) fi dnl Check for d_type member in struct dirent AC_MSG_CHECKING([whether struct dirent has d_type member]) AC_CACHE_VAL(ac_cv_dirent_d_type,[ AC_TRY_COMPILE([#include ], [struct dirent d; d.d_type = DT_REG;], ac_cv_dirent_d_type=yes, ac_cv_dirent_d_type=no) ]) AC_MSG_RESULT($ac_cv_dirent_d_type) if test $ac_cv_dirent_d_type = yes; then AC_DEFINE(HAVE_DIRENT_D_TYPE, 1, Define if `struct dirent' has `d_type' member.) fi dnl Checks for header files. AC_HEADER_DIRENT AC_HEADER_STDC AC_HEADER_SYS_WAIT AC_CHECK_HEADERS(fcntl.h sys/file.h unistd.h paths.h \ sys/param.h sys/utsname.h sys/select.h \ netdb.h regex.h sys/mman.h) dnl Checks for typedefs, structures, and compiler characteristics. AC_C_CONST AC_TYPE_OFF_T AC_TYPE_PID_T AC_TYPE_SIZE_T AC_STRUCT_TM AC_SYS_LARGEFILE AC_FUNC_FSEEKO AC_CHECK_SIZEOF(unsigned short, 2) AC_CHECK_SIZEOF(unsigned int, 4) AC_CHECK_SIZEOF(unsigned long, 4) dnl Checks for library functions. AC_FUNC_ALLOCA AC_CHECK_FUNCS(gethostname mkdir mktime socket strstr strchr \ uname flock lockf inet_aton inet_addr \ fchmod truncate getuid regcomp mlock) AC_OUTPUT([ Makefile ac/Makefile doc/Makefile examples/Makefile libsylph/Makefile po/Makefile.in ]) dnl Output the configuration summary echo "" echo "$PACKAGE $VERSION" echo "" echo "OpenSSL : $ac_cv_enable_ssl" echo "iconv : $am_cv_func_iconv" echo "IPv6 : $ac_cv_enable_ipv6" echo "Oniguruma : $ac_cv_enable_oniguruma" echo "" echo "The binary will be installed in $prefix/lib" echo "" echo "Configure finished, type 'make' to build." libsylph-1.1.0/install-sh0000755000175000017500000001273710457702571012306 00000000000000#!/bin/sh # # install - install a program, script, or datafile # This comes from X11R5 (mit/util/scripts/install.sh). # # Copyright 1991 by the Massachusetts Institute of Technology # # Permission to use, copy, modify, distribute, and sell this software and its # documentation for any purpose is hereby granted without fee, provided that # the above copyright notice appear in all copies and that both that # copyright notice and this permission notice appear in supporting # documentation, and that the name of M.I.T. not be used in advertising or # publicity pertaining to distribution of the software without specific, # written prior permission. M.I.T. makes no representations about the # suitability of this software for any purpose. It is provided "as is" # without express or implied warranty. # # 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. It can only install one file at a time, a restriction # shared with many OS's install programs. # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit="${DOITPROG-}" # put in absolute paths if you don't have them in your path; or use env. vars. mvprog="${MVPROG-mv}" cpprog="${CPPROG-cp}" chmodprog="${CHMODPROG-chmod}" chownprog="${CHOWNPROG-chown}" chgrpprog="${CHGRPPROG-chgrp}" stripprog="${STRIPPROG-strip}" rmprog="${RMPROG-rm}" mkdirprog="${MKDIRPROG-mkdir}" transformbasename="" transform_arg="" instcmd="$mvprog" chmodcmd="$chmodprog 0755" chowncmd="" chgrpcmd="" stripcmd="" rmcmd="$rmprog -f" mvcmd="$mvprog" src="" dst="" dir_arg="" while [ x"$1" != x ]; do case $1 in -c) instcmd="$cpprog" shift continue;; -d) dir_arg=true shift continue;; -m) chmodcmd="$chmodprog $2" shift shift continue;; -o) chowncmd="$chownprog $2" shift shift continue;; -g) chgrpcmd="$chgrpprog $2" shift shift continue;; -s) stripcmd="$stripprog" shift continue;; -t=*) transformarg=`echo $1 | sed 's/-t=//'` shift continue;; -b=*) transformbasename=`echo $1 | sed 's/-b=//'` shift continue;; *) if [ x"$src" = x ] then src=$1 else # this colon is to work around a 386BSD /bin/sh bug : dst=$1 fi shift continue;; esac done if [ x"$src" = x ] then echo "install: no input file specified" exit 1 else true fi if [ x"$dir_arg" != x ]; then dst=$src src="" if [ -d $dst ]; then instcmd=: chmodcmd="" else instcmd=mkdir fi else # Waiting for this to be detected by the "$instcmd $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if [ -f $src -o -d $src ] then true else echo "install: $src does not exist" exit 1 fi if [ x"$dst" = x ] then echo "install: no destination specified" exit 1 else true fi # If destination is a directory, append the input filename; if your system # does not like double slashes in filenames, you may need to add some logic if [ -d $dst ] then dst="$dst"/`basename $src` else true fi fi ## this sed command emulates the dirname command dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'` # Make sure that the destination directory exists. # this part is taken from Noah Friedman's mkinstalldirs script # Skip lots of stat calls in the usual case. if [ ! -d "$dstdir" ]; then defaultIFS=' ' IFS="${IFS-${defaultIFS}}" oIFS="${IFS}" # Some sh's can't handle IFS=/ for some reason. IFS='%' set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'` IFS="${oIFS}" pathcomp='' while [ $# -ne 0 ] ; do pathcomp="${pathcomp}${1}" shift if [ ! -d "${pathcomp}" ] ; then $mkdirprog "${pathcomp}" else true fi pathcomp="${pathcomp}/" done fi if [ x"$dir_arg" != x ] then $doit $instcmd $dst && if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi else # If we're going to rename the final executable, determine the name now. if [ x"$transformarg" = x ] then dstfile=`basename $dst` else dstfile=`basename $dst $transformbasename | sed $transformarg`$transformbasename fi # don't allow the sed command to completely eliminate the filename if [ x"$dstfile" = x ] then dstfile=`basename $dst` else true fi # Make a temp file name in the proper directory. dsttmp=$dstdir/#inst.$$# # Move or copy the file name to the temp name $doit $instcmd $src $dsttmp && trap "rm -f ${dsttmp}" 0 && # and set any options; do chmod last to preserve setuid bits # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $instcmd $src $dsttmp" command. if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi && if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi && if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi && if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi && # Now rename the file to the real destination. $doit $rmcmd -f $dstdir/$dstfile && $doit $mvcmd $dsttmp $dstdir/$dstfile fi && exit 0 libsylph-1.1.0/ltmain.sh0000644000175000017500000060015710404615640012111 00000000000000# ltmain.sh - Provide generalized library-building support services. # NOTE: Changing this file will not affect anything until you rerun configure. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005 # Free Software Foundation, Inc. # Originally by Gordon Matzigkeit , 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 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. # # 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. basename="s,^.*/,,g" # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" # The name of this program: progname=`echo "$progpath" | $SED $basename` modename="$progname" # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 PROGRAM=ltmain.sh PACKAGE=libtool VERSION="1.5.22 Debian 1.5.22-4" TIMESTAMP=" (1.1220.2.365 2005/12/18 22:14:06)" # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi # Check that we have a working $echo. if test "X$1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X$1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t'; then # Yippee, $echo works! : else # Restart under the correct shell, and then maybe $echo will work. exec $SHELL "$progpath" --no-reexec ${1+"$@"} fi if test "X$1" = X--fallback-echo; then # used as fallback echo shift cat <&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE fi # Global variables. mode=$default_mode nonopt= prev= prevopt= run= show="$echo" show_help= execute_dlfiles= duplicate_deps=no preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" ##################################### # Shell function definitions: # This seems to be the best place for them # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $mkdir "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || { $echo "cannot create temporary directory \`$my_tmpdir'" 1>&2 exit $EXIT_FAILURE } fi $echo "X$my_tmpdir" | $Xsed } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. func_win32_libid () { win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | \ $EGREP -e 'file format pe-i386(.*architecture: i386)?' >/dev/null ; then win32_nmres=`eval $NM -f posix -A $1 | \ $SED -n -e '1,100{/ I /{s,.*,import,;p;q;};}'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $echo $win32_libid_type } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac CC_quoted="$CC_quoted $arg" done case "$@ " in " $CC "* | "$CC "* | " `$echo $CC` "* | "`$echo $CC` "* | " $CC_quoted"* | "$CC_quoted "* | " `$echo $CC_quoted` "* | "`$echo $CC_quoted` "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then $echo "$modename: unable to infer tagged configuration" $echo "$modename: specify a tag with \`--tag'" 1>&2 exit $EXIT_FAILURE # else # $echo "$modename: using $tagname tagged configuration" fi ;; esac fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" $show "(cd $f_ex_an_ar_dir && $AR x $f_ex_an_ar_oldlib)" $run eval "(cd \$f_ex_an_ar_dir && $AR x \$f_ex_an_ar_oldlib)" || exit $? if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else $echo "$modename: ERROR: object name conflicts: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" 1>&2 exit $EXIT_FAILURE fi } # func_extract_archives gentop oldlib ... func_extract_archives () { my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" my_status="" $show "${rm}r $my_gentop" $run ${rm}r "$my_gentop" $show "$mkdir $my_gentop" $run $mkdir "$my_gentop" my_status=$? if test "$my_status" -ne 0 && test ! -d "$my_gentop"; then exit $my_status fi for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac my_xlib=`$echo "X$my_xlib" | $Xsed -e 's%^.*/%%'` my_xdir="$my_gentop/$my_xlib" $show "${rm}r $my_xdir" $run ${rm}r "$my_xdir" $show "$mkdir $my_xdir" $run $mkdir "$my_xdir" exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$my_xdir"; then exit $exit_status fi case $host in *-darwin*) $show "Extracting $my_xabs" # Do not bother doing anything if just a dry run if test -z "$run"; then darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`$echo "X$darwin_archive" | $Xsed -e 's%^.*/%%'` darwin_arches=`lipo -info "$darwin_archive" 2>/dev/null | $EGREP Architectures 2>/dev/null` if test -n "$darwin_arches"; then darwin_arches=`echo "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= $show "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do mkdir -p "unfat-$$/${darwin_base_archive}-${darwin_arch}" lipo -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $rm "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we have a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print| xargs basename | sort -u | $NL2SP` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | $NL2SP` lipo -create -output "$darwin_file" $darwin_files done # $darwin_filelist ${rm}r unfat-$$ cd "$darwin_orig_dir" else cd "$darwin_orig_dir" func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches fi # $run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # End of Shell function definitions ##################################### # Darwin sucks eval std_shrext=\"$shrext_cmds\" disable_libs=no # Parse our command line options once, thoroughly. while test "$#" -gt 0 do arg="$1" shift case $arg in -*=*) optarg=`$echo "X$arg" | $Xsed -e 's/[-_a-zA-Z0-9]*=//'` ;; *) optarg= ;; esac # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in execute_dlfiles) execute_dlfiles="$execute_dlfiles $arg" ;; tag) tagname="$arg" preserve_args="${preserve_args}=$arg" # Check whether tagname contains only valid characters case $tagname in *[!-_A-Za-z0-9,/]*) $echo "$progname: invalid tag name: $tagname" 1>&2 exit $EXIT_FAILURE ;; esac case $tagname in CC) # Don't test for the "default" C tag, as we know, it's there, but # not specially marked. ;; *) if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "$progpath" > /dev/null; then taglist="$taglist $tagname" # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$tagname'$/,/^# ### END LIBTOOL TAG CONFIG: '$tagname'$/p' < $progpath`" else $echo "$progname: ignoring unknown tag $tagname" 1>&2 fi ;; esac ;; *) eval "$prev=\$arg" ;; esac prev= prevopt= continue fi # Have we seen a non-optional argument yet? case $arg in --help) show_help=yes ;; --version) $echo "$PROGRAM (GNU $PACKAGE) $VERSION$TIMESTAMP" $echo $echo "Copyright (C) 2005 Free Software Foundation, Inc." $echo "This is free software; see the source for copying conditions. There is NO" $echo "warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." exit $? ;; --config) ${SED} -e '1,/^# ### BEGIN LIBTOOL CONFIG/d' -e '/^# ### END LIBTOOL CONFIG/,$d' $progpath # Now print the configurations for the tags. for tagname in $taglist; do ${SED} -n -e "/^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$/,/^# ### END LIBTOOL TAG CONFIG: $tagname$/p" < "$progpath" done exit $? ;; --debug) $echo "$progname: enabling shell trace mode" set -x preserve_args="$preserve_args $arg" ;; --dry-run | -n) run=: ;; --features) $echo "host: $host" if test "$build_libtool_libs" = yes; then $echo "enable shared libraries" else $echo "disable shared libraries" fi if test "$build_old_libs" = yes; then $echo "enable static libraries" else $echo "disable static libraries" fi exit $? ;; --finish) mode="finish" ;; --mode) prevopt="--mode" prev=mode ;; --mode=*) mode="$optarg" ;; --preserve-dup-deps) duplicate_deps="yes" ;; --quiet | --silent) show=: preserve_args="$preserve_args $arg" ;; --tag) prevopt="--tag" prev=tag preserve_args="$preserve_args --tag" ;; --tag=*) set tag "$optarg" ${1+"$@"} shift prev=tag preserve_args="$preserve_args --tag" ;; -dlopen) prevopt="-dlopen" prev=execute_dlfiles ;; -*) $echo "$modename: unrecognized option \`$arg'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *) nonopt="$arg" break ;; esac done if test -n "$prevopt"; then $echo "$modename: option \`$prevopt' requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi case $disable_libs in no) ;; shared) build_libtool_libs=no build_old_libs=yes ;; static) build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` ;; esac # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= if test -z "$show_help"; then # Infer the operation mode. if test -z "$mode"; then $echo "*** Warning: inferring the mode of operation is deprecated." 1>&2 $echo "*** Future versions of Libtool will require --mode=MODE be specified." 1>&2 case $nonopt in *cc | cc* | *++ | gcc* | *-gcc* | g++* | xlc*) mode=link for arg do case $arg in -c) mode=compile break ;; esac done ;; *db | *dbx | *strace | *truss) mode=execute ;; *install*|cp|mv) mode=install ;; *rm) mode=uninstall ;; *) # If we have no mode, but dlfiles were specified, then do execute mode. test -n "$execute_dlfiles" && mode=execute # Just use the default operation mode. if test -z "$mode"; then if test -n "$nonopt"; then $echo "$modename: warning: cannot infer operation mode from \`$nonopt'" 1>&2 else $echo "$modename: warning: cannot infer operation mode without MODE-ARGS" 1>&2 fi fi ;; esac fi # Only execute mode is allowed to have -dlopen flags. if test -n "$execute_dlfiles" && test "$mode" != execute; then $echo "$modename: unrecognized option \`-dlopen'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$modename --help --mode=$mode' for more information." # These modes are in order of execution frequency so that they run quickly. case $mode in # libtool compile mode compile) modename="$modename: compile" # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) if test -n "$libobj" ; then $echo "$modename: you cannot specify \`-o' more than once" 1>&2 exit $EXIT_FAILURE fi arg_mode=target continue ;; -static | -prefer-pic | -prefer-non-pic) later="$later $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) args=`$echo "X$arg" | $Xsed -e "s/^-Wc,//"` lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac lastarg="$lastarg $arg" done IFS="$save_ifs" lastarg=`$echo "X$lastarg" | $Xsed -e "s/^ //"` # Add the arguments to base_compile. base_compile="$base_compile $lastarg" continue ;; * ) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. lastarg=`$echo "X$lastarg" | $Xsed -e "$sed_quote_subst"` case $lastarg in # Double-quote args containing other shell metacharacters. # Many Bourne shells cannot handle close brackets correctly # in scan sets, and some SunOS ksh mistreat backslash-escaping # in scan sets (worked around with variable expansion), # and furthermore cannot handle '|' '&' '(' ')' in scan sets # at all, so we specify them separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") lastarg="\"$lastarg\"" ;; esac base_compile="$base_compile $lastarg" done # for arg case $arg_mode in arg) $echo "$modename: you must specify an argument for -Xcompile" exit $EXIT_FAILURE ;; target) $echo "$modename: you must specify a target with \`-o'" 1>&2 exit $EXIT_FAILURE ;; *) # Get the name of the library object. [ -z "$libobj" ] && libobj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%'` ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo xform='[cCFSifmso]' case $libobj in *.ada) xform=ada ;; *.adb) xform=adb ;; *.ads) xform=ads ;; *.asm) xform=asm ;; *.c++) xform=c++ ;; *.cc) xform=cc ;; *.ii) xform=ii ;; *.class) xform=class ;; *.cpp) xform=cpp ;; *.cxx) xform=cxx ;; *.f90) xform=f90 ;; *.for) xform=for ;; *.java) xform=java ;; esac libobj=`$echo "X$libobj" | $Xsed -e "s/\.$xform$/.lo/"` case $libobj in *.lo) obj=`$echo "X$libobj" | $Xsed -e "$lo2o"` ;; *) $echo "$modename: cannot determine name of library object from \`$libobj'" 1>&2 exit $EXIT_FAILURE ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -static) build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done qlibobj=`$echo "X$libobj" | $Xsed -e "$sed_quote_subst"` case $qlibobj in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qlibobj="\"$qlibobj\"" ;; esac test "X$libobj" != "X$qlibobj" \ && $echo "X$libobj" | grep '[]~#^*{};<>?"'"'"' &()|`$[]' \ && $echo "$modename: libobj name \`$libobj' may not contain shell special characters." objname=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` xdir=`$echo "X$obj" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$obj"; then xdir= else xdir=$xdir/ fi lobj=${xdir}$objdir/$objname if test -z "$base_compile"; then $echo "$modename: you must specify a compilation command" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi $run $rm $removelist trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$echo "X$srcfile" | $Xsed -e 's%^.*/%%' -e 's%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" removelist="$removelist $output_obj $lockfile" trap "$run $rm $removelist; exit $EXIT_FAILURE" 1 2 15 else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $run ln "$progpath" "$lockfile" 2>/dev/null; do $show "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $echo "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi $echo "$srcfile" > "$lockfile" fi if test -n "$fix_srcfile_path"; then eval srcfile=\"$fix_srcfile_path\" fi qsrcfile=`$echo "X$srcfile" | $Xsed -e "$sed_quote_subst"` case $qsrcfile in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qsrcfile="\"$qsrcfile\"" ;; esac $run $rm "$libobj" "${libobj}T" # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. test -z "$run" && cat > ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then $show "$mv $output_obj $lobj" if $run $mv $output_obj $lobj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the PIC object to the libtool object file. test -z "$run" && cat >> ${libobj}T <> ${libobj}T </dev/null`" != "X$srcfile"; then $echo "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $run $rm $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then $show "$mv $output_obj $obj" if $run $mv $output_obj $obj; then : else error=$? $run $rm $removelist exit $error fi fi # Append the name of the non-PIC object the libtool object file. # Only append if the libtool object file exists. test -z "$run" && cat >> ${libobj}T <> ${libobj}T <&2 fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes else if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built fi build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") qarg=\"`$echo "X$arg" | $Xsed -e "$sed_quote_subst"`\" ### testsuite: skip nested quoting test ;; *) qarg=$arg ;; esac libtool_args="$libtool_args $qarg" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) compile_command="$compile_command @OUTPUT@" finalize_command="$finalize_command @OUTPUT@" ;; esac case $prev in dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. compile_command="$compile_command @SYMFILE@" finalize_command="$finalize_command @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then dlfiles="$dlfiles $arg" else dlprefiles="$dlprefiles $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" if test ! -f "$arg"; then $echo "$modename: symbol file \`$arg' does not exist" exit $EXIT_FAILURE fi prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat $save_arg` do # moreargs="$moreargs $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi done else $echo "$modename: link input file \`$save_arg' does not exist" exit $EXIT_FAILURE fi arg=$save_arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) rpath="$rpath $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) xrpath="$xrpath $arg" ;; esac fi prev= continue ;; xcompiler) compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; xlinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $wl$qarg" prev= compile_command="$compile_command $wl$qarg" finalize_command="$finalize_command $wl$qarg" continue ;; xcclinker) linker_flags="$linker_flags $qarg" compiler_flags="$compiler_flags $qarg" prev= compile_command="$compile_command $qarg" finalize_command="$finalize_command $qarg" continue ;; shrext) shrext_cmds="$arg" prev= continue ;; darwin_framework|darwin_framework_skip) test "$prev" = "darwin_framework" && compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" prev= continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then compile_command="$compile_command $link_static_flag" finalize_command="$finalize_command $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. $echo "$modename: \`-allow-undefined' is deprecated because it is the default" 1>&2 continue ;; -avoid-version) avoid_version=yes continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: more than one -exported-symbols argument is not allowed" exit $EXIT_FAILURE fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework|-arch|-isysroot) case " $CC " in *" ${arg} ${1} "* | *" ${arg} ${1} "*) prev=darwin_framework_skip ;; *) compiler_flags="$compiler_flags $arg" prev=darwin_framework ;; esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" ;; esac continue ;; -L*) dir=`$echo "X$arg" | $Xsed -e 's/^-L//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" notinst_path="$notinst_path $dir" fi dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "*) ;; *) deplibs="$deplibs -L$dir" lib_search_path="$lib_search_path $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) testbindir=`$echo "X$dir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; *) dllsearchpath="$dllsearchpath:$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework deplibs="$deplibs -framework System" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi deplibs="$deplibs $arg" continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. -model) compile_command="$compile_command $arg" compiler_flags="$compiler_flags $arg" finalize_command="$finalize_command $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) compiler_flags="$compiler_flags $arg" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" continue ;; -module) module=yes continue ;; # -64, -mips[0-9] enable 64-bit mode on the SGI compiler # -r[0-9][0-9]* specifies the processor on the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode on the Sun compiler # +DA*, +DD* enable 64-bit mode on the HP compiler # -q* pass through compiler args for the IBM compiler # -m* pass through architecture-specific compiler args for GCC # -m*, -t[45]*, -txscale* pass through architecture-specific # compiler args for GCC # -pg pass through profiling flag for GCC # @file GCC response files -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*|-pg| \ -t[45]*|-txscale*|@*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" compiler_flags="$compiler_flags $arg" continue ;; -shrext) prev=shrext continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) # The PATH hackery in wrapper scripts is required on Windows # in order for the loader to find any dlls it needs. $echo "$modename: warning: \`-no-install' is ignored for $host" 1>&2 $echo "$modename: warning: assuming \`-no-fast-install' instead" 1>&2 fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) dir=`$echo "X$arg" | $Xsed -e 's/^-R//'` # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) $echo "$modename: only absolute run-paths are allowed" 1>&2 exit $EXIT_FAILURE ;; esac case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac continue ;; -static) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -Wc,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wc,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Wl,*) args=`$echo "X$arg" | $Xsed -e "$sed_quote_subst" -e 's/^-Wl,//'` arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" case $flag in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") flag="\"$flag\"" ;; esac arg="$arg $wl$flag" compiler_flags="$compiler_flags $wl$flag" linker_flags="$linker_flags $flag" done IFS="$save_ifs" arg=`$echo "X$arg" | $Xsed -e "s/^ //"` ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # Some other compiler flag. -* | +*) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; *.$objext) # A standard object. objs="$objs $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if (${SED} -e '2q' $arg | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then pic_object= non_pic_object= # Read the .lo file # If there is no directory component, then add one. case $arg in */* | *\\*) . $arg ;; *) . ./$arg ;; esac if test -z "$pic_object" || \ test -z "$non_pic_object" || test "$pic_object" = none && \ test "$non_pic_object" = none; then $echo "$modename: cannot find name of object for \`$arg'" 1>&2 exit $EXIT_FAILURE fi # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then dlfiles="$dlfiles $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. dlprefiles="$dlprefiles $pic_object" prev= fi # A PIC object. libobjs="$libobjs $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object non_pic_objects="$non_pic_objects $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi else # Only an error if not doing a dry-run. if test -z "$run"; then $echo "$modename: \`$arg' is not a valid libtool object" 1>&2 exit $EXIT_FAILURE else # Dry-run case. # Extract subdirectory from the argument. xdir=`$echo "X$arg" | $Xsed -e 's%/[^/]*$%%'` if test "X$xdir" = "X$arg"; then xdir= else xdir="$xdir/" fi pic_object=`$echo "X${xdir}${objdir}/${arg}" | $Xsed -e "$lo2o"` non_pic_object=`$echo "X${xdir}${arg}" | $Xsed -e "$lo2o"` libobjs="$libobjs $pic_object" non_pic_objects="$non_pic_objects $non_pic_object" fi fi ;; *.$libext) # An archive. deplibs="$deplibs $arg" old_deplibs="$old_deplibs $arg" continue ;; *.la) # A libtool-controlled library. if test "$prev" = dlfiles; then # This library was specified with -dlopen. dlfiles="$dlfiles $arg" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. dlprefiles="$dlprefiles $arg" prev= else deplibs="$deplibs $arg" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi done # argument parsing loop if test -n "$prev"; then $echo "$modename: the \`$prevarg' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" compile_command="$compile_command $arg" finalize_command="$finalize_command $arg" fi oldlibs= # calculate the name of the file, without its directory outputname=`$echo "X$output" | $Xsed -e 's%^.*/%%'` libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$echo \"X\${$shlibpath_var}\" \| \$Xsed -e \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" output_objdir=`$echo "X$output" | $Xsed -e 's%/[^/]*$%%'` if test "X$output_objdir" = "X$output"; then output_objdir="$objdir" else output_objdir="$output_objdir/$objdir" fi # Create the object directory. if test ! -d "$output_objdir"; then $show "$mkdir $output_objdir" $run $mkdir $output_objdir exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$output_objdir"; then exit $exit_status fi fi # Determine the type of output case $output in "") $echo "$modename: you must specify an output file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac case $host in *cygwin* | *mingw* | *pw32*) # don't eliminate duplications in $postdeps and $predeps duplicate_compiler_generated_deps=yes ;; *) duplicate_compiler_generated_deps=$duplicate_deps ;; esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if test "X$duplicate_deps" = "Xyes" ; then case "$libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi libs="$libs $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if test "X$duplicate_compiler_generated_deps" = "Xyes" ; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) specialdeplibs="$specialdeplibs $pre_post_deps" ;; esac pre_post_deps="$pre_post_deps $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries case $linkmode in lib) passes="conv link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) $echo "$modename: libraries can \`-dlopen' only libtool libraries: $file" 1>&2 exit $EXIT_FAILURE ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else compiler_flags="$compiler_flags $deplib" fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then $echo "$modename: warning: \`-l' is ignored for archives/objects" 1>&2 continue fi name=`$echo "X$deplib" | $Xsed -e 's/^-l//'` for searchdir in $newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then library_names= old_library= case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'` ;; *) $echo "$modename: warning: \`-L' is ignored for archives/objects" 1>&2 ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then dir=`$echo "X$deplib" | $Xsed -e 's/^-R//'` # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) xrpath="$xrpath $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) lib="$deplib" ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` if eval $echo \"$deplib\" 2>/dev/null \ | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then $echo $echo "*** Warning: Trying to link with static lib archive $deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because the file extensions .$libext of this argument makes me believe" $echo "*** that it is just a static archive that I should not used here." else $echo $echo "*** Warning: Linking the shared library $output against the" $echo "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. newdlprefiles="$newdlprefiles $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else newdlfiles="$newdlfiles $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else $echo "$modename: cannot find the library \`$lib' or unhandled argument \`$deplib'" 1>&2 exit $EXIT_FAILURE fi # Check to see that this really is a libtool archive. if (${SED} -e '2q' $lib | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi ladir=`$echo "X$lib" | $Xsed -e 's%/[^/]*$%%'` test "X$ladir" = "X$lib" && ladir="." dlname= dlopen= dlpreopen= libdir= library_names= old_library= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && dlfiles="$dlfiles $dlopen" test -n "$dlpreopen" && dlprefiles="$dlprefiles $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # It is a libtool convenience library, so add in its objects. convenience="$convenience $ladir/$objdir/$old_library" old_convenience="$old_convenience $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done elif test "$linkmode" != prog && test "$linkmode" != lib; then $echo "$modename: \`$lib' is not a convenience library" 1>&2 exit $EXIT_FAILURE fi continue fi # $pass = conv # Get the name of the library we link against. linklib= for l in $old_library $library_names; do linklib="$l" done if test -z "$linklib"; then $echo "$modename: cannot find name of link library for \`$lib'" 1>&2 exit $EXIT_FAILURE fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. dlprefiles="$dlprefiles $lib $dependency_libs" else newdlfiles="$newdlfiles $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$ladir'" 1>&2 $echo "$modename: passing it literally to the linker, although it might fail" 1>&2 abs_ladir="$ladir" fi ;; esac laname=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then $echo "$modename: warning: library \`$lib' was moved." 1>&2 dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$libdir" absdir="$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later notinst_path="$notinst_path $abs_ladir" fi fi # $installed = yes name=`$echo "X$laname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir"; then $echo "$modename: cannot -dlpreopen a convenience library: \`$lib'" 1>&2 exit $EXIT_FAILURE fi # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then newdlprefiles="$newdlprefiles $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then newdlprefiles="$newdlprefiles $dir/$dlname" else newdlprefiles="$newdlprefiles $dir/$linklib" fi fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then newlib_search_path="$newlib_search_path $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) newlib_search_path="$newlib_search_path "`$echo "X$deplib" | $Xsed -e 's/^-L//'`;; ### testsuite: skip nested quoting test esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { test "$prefer_static_libs" = no || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath " in *" $dir "*) ;; *" $absdir "*) ;; *) temp_rpath="$temp_rpath $absdir" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes ; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then if test "$installed" = no; then notinst_deplibs="$notinst_deplibs $lib" need_relink=yes fi # This is a shared library # Warn about portability, can't link against -module's on # some systems (darwin) if test "$shouldnotlink" = yes && test "$pass" = link ; then $echo if test "$linkmode" = prog; then $echo "*** Warning: Linking the executable $output against the loadable module" else $echo "*** Warning: Linking the shared library $output against the loadable module" fi $echo "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) compile_rpath="$compile_rpath $absdir" esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names realname="$2" shift; shift libname=`eval \\$echo \"$libname_spec\"` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw*) major=`expr $current - $age` versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" soname=`$echo $soroot | ${SED} -e 's/^.*\///'` newlib="libimp-`$echo $soname | ${SED} 's/^lib//;s/\.dll$//'`.a" # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else $show "extracting exported symbol list from \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$extract_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else $show "generating import library for \`$soname'" save_ifs="$IFS"; IFS='~' cmds=$old_archive_from_expsyms_cmds for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a module then we can not link against # it, someone is ignoring the new warnings I added if /usr/bin/file -L $add 2> /dev/null | $EGREP ": [^:]* bundle" >/dev/null ; then $echo "** Warning, lib $linklib is a module, not a shared library" if test -z "$old_library" ; then $echo $echo "** And there doesn't seem to be a static archive available" $echo "** The link will probably fail, sorry" else add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$dir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then $echo "$modename: configuration error: unsupported hardcode properties" exit $EXIT_FAILURE fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) compile_shlibpath="$compile_shlibpath$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && \ test "$hardcode_minus_L" != yes && \ test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) finalize_shlibpath="$finalize_shlibpath$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) add_dir="$add_dir -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. $echo $echo "*** Warning: This system can not link to static lib archive $lib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then $echo "*** But as you try to build a module library, libtool will still create " $echo "*** a static module, that should work as long as the dlopening application" $echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) temp_xrpath=`$echo "X$libdir" | $Xsed -e 's/^-R//'` case " $xrpath " in *" $temp_xrpath "*) ;; *) xrpath="$xrpath $temp_xrpath";; esac;; *) temp_deplibs="$temp_deplibs $libdir";; esac done dependency_libs="$temp_deplibs" fi newlib_search_path="$newlib_search_path $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" if test "X$duplicate_deps" = "Xyes" ; then case "$tmp_libs " in *" $deplib "*) specialdeplibs="$specialdeplibs $deplib" ;; esac fi tmp_libs="$tmp_libs $deplib" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do case $deplib in -L*) path="$deplib" ;; *.la) dir=`$echo "X$deplib" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$deplib" && dir="." # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then $echo "$modename: warning: cannot determine absolute directory name of \`$dir'" 1>&2 absdir="$dir" fi ;; esac if grep "^installed=no" $deplib > /dev/null; then path="$absdir/$objdir" else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi if test "$absdir" != "$libdir"; then $echo "$modename: warning: \`$deplib' seems to be moved" 1>&2 fi path="$absdir" fi depdepl= case $host in *-*-darwin*) # we do not want to link against static libs, # but need to link against shared eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$path/$depdepl" ; then depdepl="$path/$depdepl" fi # do not add paths which are already there case " $newlib_search_path " in *" $path "*) ;; *) newlib_search_path="$newlib_search_path $path";; esac fi path="" ;; *) path="-L$path" ;; esac ;; -l*) case $host in *-*-darwin*) # Again, we only want to link against shared libraries eval tmp_libs=`$echo "X$deplib" | $Xsed -e "s,^\-l,,"` for tmp in $newlib_search_path ; do if test -f "$tmp/lib$tmp_libs.dylib" ; then eval depdepl="$tmp/lib$tmp_libs.dylib" break fi done path="" ;; *) continue ;; esac ;; *) continue ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac case " $deplibs " in *" $depdepl "*) ;; *) deplibs="$depdepl $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) lib_search_path="$lib_search_path $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) tmp_libs="$tmp_libs $deplib" ;; esac ;; *) tmp_libs="$tmp_libs $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then tmp_libs="$tmp_libs $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for archives" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for archives" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for archives" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for archives" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for archives" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for archives" 1>&2 fi if test -n "$export_symbols" || test -n "$export_symbols_regex"; then $echo "$modename: warning: \`-export-symbols' is ignored for archives" 1>&2 fi # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" objs="$objs$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) name=`$echo "X$outputname" | $Xsed -e 's/\.la$//' -e 's/^lib//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) if test "$module" = no; then $echo "$modename: libtool library \`$output' must begin with \`lib'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required name=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else libname=`$echo "X$outputname" | $Xsed -e 's/\.la$//'` fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then $echo "$modename: cannot build libtool library \`$output' from non-libtool objects on this host:$objs" 2>&1 exit $EXIT_FAILURE else $echo $echo "*** Warning: Linking the shared library $output against the non-libtool" $echo "*** objects $objs is not portable!" libobjs="$libobjs $objs" fi fi if test "$dlself" != no; then $echo "$modename: warning: \`-dlopen self' is ignored for libtool libraries" 1>&2 fi set dummy $rpath if test "$#" -gt 2; then $echo "$modename: warning: ignoring multiple \`-rpath's for a libtool library" 1>&2 fi install_libdir="$2" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info/-version-number' is ignored for convenience libraries" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for convenience libraries" 1>&2 fi else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 IFS="$save_ifs" if test -n "$8"; then $echo "$modename: too many parameters to \`-version-info'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$2" number_minor="$3" number_revision="$4" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in darwin|linux|osf|windows) current=`expr $number_major + $number_minor` age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) current=`expr $number_major + $number_minor - 1` age="$number_minor" revision="$number_minor" ;; *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE ;; esac ;; no) current="$2" revision="$3" age="$4" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: CURRENT \`$current' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: REVISION \`$revision' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) $echo "$modename: AGE \`$age' must be a nonnegative integer" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE ;; esac if test "$age" -gt "$current"; then $echo "$modename: AGE \`$age' is greater than the current interface number \`$current'" 1>&2 $echo "$modename: \`$vinfo' is not valid version information" 1>&2 exit $EXIT_FAILURE fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header major=.`expr $current - $age` versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... minor_current=`expr $current + 1` verstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current"; ;; irix | nonstopux) major=`expr $current - $age + 1` case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do iface=`expr $revision - $loop` loop=`expr $loop - 1` verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) major=.`expr $current - $age` versuffix="$major.$age.$revision" ;; osf) major=.`expr $current - $age` versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do iface=`expr $current - $loop` loop=`expr $loop - 1` verstring="$verstring:${iface}.0" done # Make executables depend on our current version. verstring="$verstring:${current}.0" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. major=`expr $current - $age` versuffix="-$major" ;; *) $echo "$modename: unknown library version type \`$version_type'" 1>&2 $echo "Fatal configuration error. See the $PACKAGE docs for more information." 1>&2 exit $EXIT_FAILURE ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then $echo "$modename: warning: undefined symbols not allowed in $host shared libraries" 1>&2 build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi if test "$mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$echo "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if echo $p | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi removelist="$removelist $p" ;; *) ;; esac done if test -n "$removelist"; then $show "${rm}r $removelist" $run ${rm}r $removelist fi fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then oldlibs="$oldlibs $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}'$/d' -e "$lo2o" | $NL2SP` fi # Eliminate all temporary directories. for path in $notinst_path; do lib_search_path=`$echo "$lib_search_path " | ${SED} -e "s% $path % %g"` deplibs=`$echo "$deplibs " | ${SED} -e "s% -L$path % %g"` dependency_libs=`$echo "$dependency_libs " | ${SED} -e "s% -L$path % %g"` done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do temp_xrpath="$temp_xrpath -R$libdir" case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) dlfiles="$dlfiles $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) dlprefiles="$dlprefiles $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework deplibs="$deplibs -framework System" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then deplibs="$deplibs -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $rm conftest.c cat > conftest.c </dev/null` for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null \ | grep " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$echo "X$potlib" | $Xsed -e 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$file_magic_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for file magic test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a file magic. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method match_pattern_regex=`expr "$deplibs_check_method" : "$2 \(.*\)"` for a_deplib in $deplibs; do name=`expr $a_deplib : '-l\(.*\)'` # If $name is empty we are operating on a -L argument. if test -n "$name" && test "$name" != "0"; then if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) newdeplibs="$newdeplibs $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval \\$echo \"$libname_spec\"` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval $echo \"$potent_lib\" 2>/dev/null \ | ${SED} 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then newdeplibs="$newdeplibs $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes $echo $echo "*** Warning: linker path does not have real file for library $a_deplib." $echo "*** I have the capability to make that library automatically link in when" $echo "*** you link to this library. But I can only do this if you have a" $echo "*** shared version of the library, which you do not appear to have" $echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $echo "*** with $libname but no candidates were found. (...for regex pattern test)" else $echo "*** with $libname and none of the candidates passed a file format test" $echo "*** using a regex pattern. Last file checked: $potlib" fi fi else # Add a -L argument. newdeplibs="$newdeplibs $a_deplib" fi done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$echo "X $deplibs" | $Xsed -e 's/ -lc$//' \ -e 's/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$echo "X $tmp_deplibs" | ${SED} -e "1s,^X,," -e "s,$i,,"` done fi if $echo "X $tmp_deplibs" | $Xsed -e 's/[ ]//g' \ | grep . >/dev/null; then $echo if test "X$deplibs_check_method" = "Xnone"; then $echo "*** Warning: inter-library dependencies are not supported in this platform." else $echo "*** Warning: inter-library dependencies are not known to be supported." fi $echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes fi ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework newdeplibs=`$echo "X $newdeplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then $echo $echo "*** Warning: libtool could not satisfy all declared inter-library" $echo "*** dependencies of module $libname. Therefore, libtool will create" $echo "*** a static module, that should work as long as the dlopening" $echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then $echo $echo "*** However, this would only work if libtool was able to extract symbol" $echo "*** lists from a program, using \`nm' or equivalent, but libtool could" $echo "*** not find such a program. So, this module is probably useless." $echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else $echo "*** The inter-library dependencies that have been dropped here will be" $echo "*** automatically added whenever a program is linked with this library" $echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then $echo $echo "*** Since this library must not contain undefined symbols," $echo "*** because either the platform does not support them or" $echo "*** it was explicitly requested with -no-undefined," $echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" dep_rpath="$dep_rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" if test -n "$hardcode_libdir_flag_spec_ld"; then eval dep_rpath=\"$hardcode_libdir_flag_spec_ld\" else eval dep_rpath=\"$hardcode_libdir_flag_spec\" fi fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names realname="$2" shift; shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do linknames="$linknames $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$echo "X$libobjs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" if len=`expr "X$cmd" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then $show "$cmd" $run eval "$cmd" || exit $? skipped_export=false else # The command line is too long to execute in one step. $show "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex"; then $show "$EGREP -e \"$export_symbols_regex\" \"$export_symbols\" > \"${export_symbols}T\"" $run eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' $show "$mv \"${export_symbols}T\" \"$export_symbols\"" $run eval '$mv "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then $run eval '$echo "X$include_expsyms" | $SP2NL >> "$export_symbols"' fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) tmp_deplibs="$tmp_deplibs $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" else gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $convenience libobjs="$libobjs $func_extract_archives_result" fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" linker_flags="$linker_flags $flag" fi # Make a backup of the uninstalled library when relinking if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}U && $mv $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise. $echo "creating reloadable object files..." # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output output_la=`$echo "X$output" | $Xsed -e "$basename"` # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= delfiles= last_robj= k=1 output=$output_objdir/$output_la-${k}.$objext # Loop over the list of objects to be linked. for obj in $save_libobjs do eval test_cmds=\"$reload_cmds $objlist $last_robj\" if test "X$objlist" = X || { len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len"; }; then objlist="$objlist $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. eval concat_cmds=\"$reload_cmds $objlist $last_robj\" else # All subsequent reloadable object files will link in # the last one created. eval concat_cmds=\"\$concat_cmds~$reload_cmds $objlist $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext k=`expr $k + 1` output=$output_objdir/$output_la-${k}.$objext objlist=$obj len=1 fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$reload_cmds $objlist $last_robj\" if ${skipped_export-false}; then $show "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $run $rm $export_symbols libobjs=$output # Append the command to create the export file. eval concat_cmds=\"\$concat_cmds~$export_symbols_cmds\" fi # Set up a command to remove the reloadable object files # after they are used. i=0 while test "$i" -lt "$k" do i=`expr $i + 1` delfiles="$delfiles $output_objdir/$output_la-${i}.$objext" done $echo "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi # Append the command to remove the reloadable object files # to the just-reset $cmds. eval cmds=\"\$cmds~\$rm $delfiles\" fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv $realname ${realname}T && $mv "$realname"U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then $show "${rm}r $gentop" $run ${rm}r "$gentop" fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then $show "(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)" $run eval '(cd $output_objdir && $rm $linkname && $LN_S $realname $linkname)' || exit $? fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$deplibs"; then $echo "$modename: warning: \`-l' and \`-L' are ignored for objects" 1>&2 fi if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then $echo "$modename: warning: \`-dlopen' is ignored for objects" 1>&2 fi if test -n "$rpath"; then $echo "$modename: warning: \`-rpath' is ignored for objects" 1>&2 fi if test -n "$xrpath"; then $echo "$modename: warning: \`-R' is ignored for objects" 1>&2 fi if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for objects" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for objects" 1>&2 fi case $output in *.lo) if test -n "$objs$old_deplibs"; then $echo "$modename: cannot build library object \`$output' from non-libtool objects" 1>&2 exit $EXIT_FAILURE fi libobj="$output" obj=`$echo "X$output" | $Xsed -e "$lo2o"` ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $run $rm $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval reload_conv_objs=\"\$reload_objs $whole_archive_flag_spec\" else gentop="$output_objdir/${obj}x" generated="$generated $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # Create the old-style object. reload_objs="$objs$old_deplibs "`$echo "X$libobjs" | $SP2NL | $Xsed -e '/\.'${libext}$'/d' -e '/\.lib$/d' -e "$lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $run eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" cmds=$reload_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" fi if test -n "$gentop"; then $show "${rm}r $gentop" $run ${rm}r $gentop fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) output=`$echo $output | ${SED} -e 's,.exe$,,;s,$,.exe,'` ;; esac if test -n "$vinfo"; then $echo "$modename: warning: \`-version-info' is ignored for programs" 1>&2 fi if test -n "$release"; then $echo "$modename: warning: \`-release' is ignored for programs" 1>&2 fi if test "$preload" = yes; then if test "$dlopen_support" = unknown && test "$dlopen_self" = unknown && test "$dlopen_self_static" = unknown; then $echo "$modename: warning: \`AC_LIBTOOL_DLOPEN' not used. Assuming no dlopen support." fi fi case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$echo "X $compile_deplibs" | $Xsed -e 's/ -lc / -framework System /'` finalize_deplibs=`$echo "X $finalize_deplibs" | $Xsed -e 's/ -lc / -framework System /'` ;; esac case $host in *darwin*) # Don't allow lazy linking, it breaks C++ global constructors if test "$tagname" = CXX ; then compile_command="$compile_command ${wl}-bind_at_load" finalize_command="$finalize_command ${wl}-bind_at_load" fi ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) new_libs="$new_libs -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$new_libs $deplib" ;; esac ;; *) new_libs="$new_libs $deplib" ;; esac done compile_deplibs="$new_libs" compile_command="$compile_command $compile_deplibs" finalize_command="$finalize_command $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) finalize_rpath="$finalize_rpath $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) perm_rpath="$perm_rpath $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*) testbindir=`$echo "X$libdir" | $Xsed -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; *) dllsearchpath="$dllsearchpath:$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; *) dllsearchpath="$dllsearchpath:$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) hardcode_libdirs="$hardcode_libdirs$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" rpath="$rpath $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) finalize_perm_rpath="$finalize_perm_rpath $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$echo "X$compile_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` finalize_command=`$echo "X$finalize_command" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` fi dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then dlsyms="${outputname}S.c" else $echo "$modename: not configured to extract global symbols from dlpreopened files" 1>&2 fi fi if test -n "$dlsyms"; then case $dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${outputname}.nm" $show "$rm $nlist ${nlist}S ${nlist}T" $run $rm "$nlist" "${nlist}S" "${nlist}T" # Parse the name list into a source file. $show "creating $output_objdir/$dlsyms" test -z "$run" && $echo > "$output_objdir/$dlsyms" "\ /* $dlsyms - symbol resolution table for \`$outputname' dlsym emulation. */ /* Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP */ #ifdef __cplusplus extern \"C\" { #endif /* Prevent the only kind of declaration conflicts we can make. */ #define lt_preloaded_symbols some_other_symbol /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then $show "generating symbol list for \`$output'" test -z "$run" && $echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$echo "X$objs$old_deplibs" | $SP2NL | $Xsed -e "$lo2o" | $NL2SP` for arg in $progfiles; do $show "extracting global C symbols from \`$arg'" $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $run eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi if test -n "$export_symbols_regex"; then $run eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' $run eval '$mv "$nlist"T "$nlist"' fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $run $rm $export_symbols $run eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* ) $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' $run eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac else $run eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' $run eval 'grep -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' $run eval 'mv "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* ) $run eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' $run eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac fi fi for arg in $dlprefiles; do $show "extracting global C symbols from \`$arg'" name=`$echo "$arg" | ${SED} -e 's%^.*/%%'` $run eval '$echo ": $name " >> "$nlist"' $run eval "$NM $arg | $global_symbol_pipe >> '$nlist'" done if test -z "$run"; then # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $mv "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if grep -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else grep -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$dlsyms"' else $echo '/* NONE */' >> "$output_objdir/$dlsyms" fi $echo >> "$output_objdir/$dlsyms" "\ #undef lt_preloaded_symbols #if defined (__STDC__) && __STDC__ # define lt_ptr void * #else # define lt_ptr char * # define const #endif /* The mapping between symbol names and symbols. */ " case $host in *cygwin* | *mingw* ) $echo >> "$output_objdir/$dlsyms" "\ /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs */ struct { " ;; * ) $echo >> "$output_objdir/$dlsyms" "\ const struct { " ;; esac $echo >> "$output_objdir/$dlsyms" "\ const char *name; lt_ptr address; } lt_preloaded_symbols[] = {\ " eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$dlsyms" $echo >> "$output_objdir/$dlsyms" "\ {0, (lt_ptr) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " fi pic_flag_for_symtable= case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND";; esac;; *-*-hpux*) case "$compile_command " in *" -static "*) ;; *) pic_flag_for_symtable=" $pic_flag";; esac esac # Now compile the dynamic symbol file. $show "(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable \"$dlsyms\")" $run eval '(cd $output_objdir && $LTCC $LTCFLAGS -c$no_builtin_flag$pic_flag_for_symtable "$dlsyms")' || exit $? # Clean up the generated files. $show "$rm $output_objdir/$dlsyms $nlist ${nlist}S ${nlist}T" $run $rm "$output_objdir/$dlsyms" "$nlist" "${nlist}S" "${nlist}T" # Transform the symbol file into the correct name. case $host in *cygwin* | *mingw* ) if test -f "$output_objdir/${outputname}.def" ; then compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}.def $output_objdir/${outputname}S.${objext}%"` else compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` fi ;; * ) compile_command=`$echo "X$compile_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s%@SYMFILE@%$output_objdir/${outputname}S.${objext}%"` ;; esac ;; *) $echo "$modename: unknown suffix for \`$dlsyms'" 1>&2 exit $EXIT_FAILURE ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$echo "X$compile_command" | $Xsed -e "s% @SYMFILE@%%"` finalize_command=`$echo "X$finalize_command" | $Xsed -e "s% @SYMFILE@%%"` fi if test "$need_relink" = no || test "$build_libtool_libs" != yes; then # Replace the output file specification. compile_command=`$echo "X$compile_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. $show "$link_command" $run eval "$link_command" exit_status=$? # Delete the generated files. if test -n "$dlsyms"; then $show "$rm $output_objdir/${outputname}S.${objext}" $run $rm "$output_objdir/${outputname}S.${objext}" fi exit $exit_status fi if test -n "$shlibpath_var"; then # We should set the shlibpath_var rpath= for dir in $temp_rpath; do case $dir in [\\/]* | [A-Za-z]:[\\/]*) # Absolute path. rpath="$rpath$dir:" ;; *) # Relative path: add a thisdir entry. rpath="$rpath\$thisdir/$dir:" ;; esac done temp_rpath="$rpath" fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do rpath="$rpath$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do rpath="$rpath$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $run $rm $output # Link the executable and exit $show "$link_command" $run eval "$link_command" || exit $? exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" $echo "$modename: warning: this platform does not like uninstalled shared libraries" 1>&2 $echo "$modename: \`$output' will be relinked during installation" 1>&2 else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$echo "X$compile_var$compile_command$compile_rpath" | $Xsed -e 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$echo "X$link_command" | $Xsed -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $run $rm $output $output_objdir/$outputname $output_objdir/lt-$outputname $show "$link_command" $run eval "$link_command" || exit $? # Now create the wrapper script. $show "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` fi # Quote $echo for shipping. if test "X$echo" = "X$SHELL $progpath --fallback-echo"; then case $progpath in [\\/]* | [A-Za-z]:[\\/]*) qecho="$SHELL $progpath --fallback-echo";; *) qecho="$SHELL `pwd`/$progpath --fallback-echo";; esac qecho=`$echo "X$qecho" | $Xsed -e "$sed_quote_subst"` else qecho=`$echo "X$echo" | $Xsed -e "$sed_quote_subst"` fi # Only actually do things if our run command is non-null. if test -z "$run"; then # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) output=`$echo $output|${SED} 's,.exe$,,'` ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe outputname=`$echo $outputname|${SED} 's,.exe$,,'` ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) output_name=`basename $output` output_path=`dirname $output` cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $rm $cwrappersource $cwrapper trap "$rm $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 cat > $cwrappersource <> $cwrappersource<<"EOF" #include #include #include #include #include #include #include #include #include #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) /* -DDEBUG is fairly common in CFLAGS. */ #undef DEBUG #if defined DEBUGWRAPPER # define DEBUG(format, ...) fprintf(stderr, format, __VA_ARGS__) #else # define DEBUG(format, ...) #endif const char *program_name = NULL; void * xmalloc (size_t num); char * xstrdup (const char *string); const char * base_name (const char *name); char * find_executable(const char *wrapper); int check_executable(const char *path); char * strendzap(char *str, const char *pat); void lt_fatal (const char *message, ...); int main (int argc, char *argv[]) { char **newargz; int i; program_name = (char *) xstrdup (base_name (argv[0])); DEBUG("(main) argv[0] : %s\n",argv[0]); DEBUG("(main) program_name : %s\n",program_name); newargz = XMALLOC(char *, argc+2); EOF cat >> $cwrappersource <> $cwrappersource <<"EOF" newargz[1] = find_executable(argv[0]); if (newargz[1] == NULL) lt_fatal("Couldn't find %s", argv[0]); DEBUG("(main) found exe at : %s\n",newargz[1]); /* we know the script has the same name, without the .exe */ /* so make sure newargz[1] doesn't end in .exe */ strendzap(newargz[1],".exe"); for (i = 1; i < argc; i++) newargz[i+1] = xstrdup(argv[i]); newargz[argc+1] = NULL; for (i=0; i> $cwrappersource <> $cwrappersource <> $cwrappersource <<"EOF" return 127; } void * xmalloc (size_t num) { void * p = (void *) malloc (num); if (!p) lt_fatal ("Memory exhausted"); return p; } char * xstrdup (const char *string) { return string ? strcpy ((char *) xmalloc (strlen (string) + 1), string) : NULL ; } const char * base_name (const char *name) { const char *base; #if defined (HAVE_DOS_BASED_FILE_SYSTEM) /* Skip over the disk name in MSDOS pathnames. */ if (isalpha ((unsigned char)name[0]) && name[1] == ':') name += 2; #endif for (base = name; *name; name++) if (IS_DIR_SEPARATOR (*name)) base = name + 1; return base; } int check_executable(const char * path) { struct stat st; DEBUG("(check_executable) : %s\n", path ? (*path ? path : "EMPTY!") : "NULL!"); if ((!path) || (!*path)) return 0; if ((stat (path, &st) >= 0) && ( /* MinGW & native WIN32 do not support S_IXOTH or S_IXGRP */ #if defined (S_IXOTH) ((st.st_mode & S_IXOTH) == S_IXOTH) || #endif #if defined (S_IXGRP) ((st.st_mode & S_IXGRP) == S_IXGRP) || #endif ((st.st_mode & S_IXUSR) == S_IXUSR)) ) return 1; else return 0; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise */ char * find_executable (const char* wrapper) { int has_slash = 0; const char* p; const char* p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char* concat_name; DEBUG("(find_executable) : %s\n", wrapper ? (*wrapper ? wrapper : "EMPTY!") : "NULL!"); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char)wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char* path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char* q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR(*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen(tmp); concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC(char, p_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable(concat_name)) return concat_name; XFREE(concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal ("getcwd failed"); tmp_len = strlen(tmp); concat_name = XMALLOC(char, tmp_len + 1 + strlen(wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable(concat_name)) return concat_name; XFREE(concat_name); return NULL; } char * strendzap(char *str, const char *pat) { size_t len, patlen; assert(str != NULL); assert(pat != NULL); len = strlen(str); patlen = strlen(pat); if (patlen <= len) { str += len - patlen; if (strcmp(str, pat) == 0) *str = '\0'; } return str; } static void lt_error_core (int exit_status, const char * mode, const char * message, va_list ap) { fprintf (stderr, "%s: %s: ", program_name, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, "FATAL", message, ap); va_end (ap); } EOF # we should really use a build-platform specific compiler # here, but OTOH, the wrappers (shell script and this C one) # are only useful if you want to execute the "real" binary. # Since the "real" binary is built for $host, then this # wrapper might as well be built for $host, too. $run $LTCC $LTCFLAGS -s -o $cwrapper $cwrappersource ;; esac $rm $output trap "$rm $output; exit $EXIT_FAILURE" 1 2 15 $echo > $output "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='${SED} -e 1s/^X//' sed_quote_subst='$sed_quote_subst' # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variable: notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$echo are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then echo=\"$qecho\" file=\"\$0\" # Make sure echo works. if test \"X\$1\" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test \"X\`(\$echo '\t') 2>/dev/null\`\" = 'X\t'; then # Yippee, \$echo works! : else # Restart under the correct shell, and then maybe \$echo will work. exec $SHELL \"\$0\" --no-reexec \${1+\"\$@\"} fi fi\ " $echo >> $output "\ # Find the directory that this script lives in. thisdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | ${SED} -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$echo \"X\$file\" | \$Xsed -e 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$echo \"X\$file\" | \$Xsed -e 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | ${SED} -n 's/.*-> //p'\` done # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $echo >> $output "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || \\ { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $mkdir \"\$progdir\" else $rm \"\$progdir/\$file\" fi" $echo >> $output "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $echo \"\$relink_command_output\" >&2 $rm \"\$progdir/\$file\" exit $EXIT_FAILURE fi fi $mv \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $rm \"\$progdir/\$program\"; $mv \"\$progdir/\$file\" \"\$progdir/\$program\"; } $rm \"\$progdir/\$file\" fi" else $echo >> $output "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $echo >> $output "\ if test -f \"\$progdir/\$program\"; then" # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $echo >> $output "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$echo \"X\$$shlibpath_var\" | \$Xsed -e 's/::*\$//'\` export $shlibpath_var " fi # fixup the dll searchpath if we need to. if test -n "$dllsearchpath"; then $echo >> $output "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi $echo >> $output "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2*) $echo >> $output "\ exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $echo >> $output "\ exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $echo >> $output "\ \$echo \"\$0: cannot exec \$program \${1+\"\$@\"}\" exit $EXIT_FAILURE fi else # The program doesn't exist. \$echo \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$echo \"This script is just a wrapper for \$program.\" 1>&2 $echo \"See the $PACKAGE documentation for more information.\" 1>&2 exit $EXIT_FAILURE fi fi\ " chmod +x $output fi exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" func_extract_archives $gentop $addlibs oldobjs="$oldobjs $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do $echo "X$obj" | $Xsed -e 's%^.*/%%' done | sort | sort -uc >/dev/null 2>&1); then : else $echo "copying selected object files to avoid basename conflicts..." if test -z "$gentop"; then gentop="$output_objdir/${outputname}x" generated="$generated $gentop" $show "${rm}r $gentop" $run ${rm}r "$gentop" $show "$mkdir $gentop" $run $mkdir "$gentop" exit_status=$? if test "$exit_status" -ne 0 && test ! -d "$gentop"; then exit $exit_status fi fi save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do objbase=`$echo "X$obj" | $Xsed -e 's%^.*/%%'` case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase counter=`expr $counter + 1` case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done $show "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" $run ln "$obj" "$gentop/$newobj" || $run cp "$obj" "$gentop/$newobj" oldobjs="$oldobjs $gentop/$newobj" ;; *) oldobjs="$oldobjs $obj" ;; esac done fi eval cmds=\"$old_archive_cmds\" if len=`expr "X$cmds" : ".*"` && test "$len" -le "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts $echo "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done for obj in $save_oldobjs do oldobjs="$objlist $obj" objlist="$objlist $obj" eval test_cmds=\"$old_archive_cmds\" if len=`expr "X$test_cmds" : ".*" 2>/dev/null` && test "$len" -le "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do eval cmd=\"$cmd\" IFS="$save_ifs" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$generated"; then $show "${rm}r$generated" $run ${rm}r$generated fi # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" $show "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else var_value=`$echo "X$var_value" | $Xsed -e "$sed_quote_subst"` relink_command="$var=\"$var_value\"; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$echo "X$relink_command" | $Xsed -e "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. if test -z "$run"; then for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) name=`$echo "X$deplib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` if test -z "$libdir"; then $echo "$modename: \`$deplib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdependency_libs="$newdependency_libs $libdir/$name" ;; *) newdependency_libs="$newdependency_libs $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlfiles="$newdlfiles $libdir/$name" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do name=`$echo "X$lib" | $Xsed -e 's%^.*/%%'` eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` if test -z "$libdir"; then $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 exit $EXIT_FAILURE fi newdlprefiles="$newdlprefiles $libdir/$name" done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlfiles="$newdlfiles $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac newdlprefiles="$newdlprefiles $abs" done dlprefiles="$newdlprefiles" fi $rm $output # place dlname in correct position for cygwin tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll) tdlname=../bin/$dlname ;; esac $echo > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM - GNU $PACKAGE $VERSION$TIMESTAMP # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $echo >> $output "\ relink_command=\"$relink_command\"" fi done fi # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. $show "(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)" $run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $? ;; esac exit $EXIT_SUCCESS ;; # libtool install mode install) modename="$modename: install" # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. $echo "X$nonopt" | grep shtool > /dev/null; then # Aesthetically quote it. arg=`$echo "X$nonopt" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$arg " arg="$1" shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$install_prog$arg" # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= for arg do if test -n "$dest"; then files="$files $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) case " $install_prog " in *[\\\ /]cp\ *) ;; *) prev=$arg ;; esac ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. arg=`$echo "X$arg" | $Xsed -e "$sed_quote_subst"` case $arg in *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") arg="\"$arg\"" ;; esac install_prog="$install_prog $arg" done if test -z "$install_prog"; then $echo "$modename: you must specify an install program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -n "$prev"; then $echo "$modename: the \`$prev' option requires an argument" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi if test -z "$files"; then if test -z "$dest"; then $echo "$modename: no file or destination specified" 1>&2 else $echo "$modename: you must specify a destination" 1>&2 fi $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Strip any trailing slash from the destination. dest=`$echo "X$dest" | $Xsed -e 's%/$%%'` # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else destdir=`$echo "X$dest" | $Xsed -e 's%/[^/]*$%%'` test "X$destdir" = "X$dest" && destdir=. destname=`$echo "X$dest" | $Xsed -e 's%^.*/%%'` # Not a directory, so check to see that there is only one file specified. set dummy $files if test "$#" -gt 2; then $echo "$modename: \`$dest' is not a directory" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) $echo "$modename: \`$destdir' must be an absolute directory name" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. staticlibs="$staticlibs $file" ;; *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$file' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi library_names= old_library= relink_command= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) current_libdirs="$current_libdirs $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) future_libdirs="$future_libdirs $libdir" ;; esac fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`/ test "X$dir" = "X$file/" && dir= dir="$dir$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$echo "$destdir" | $SED "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. if test "$inst_prefix_dir" = "$destdir"; then $echo "$modename: error: cannot install \`$file' to a directory not ending in $libdir" 1>&2 exit $EXIT_FAILURE fi if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$echo "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi $echo "$modename: warning: relinking \`$file'" 1>&2 $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 exit $EXIT_FAILURE fi fi # See the names of the shared library. set dummy $library_names if test -n "$2"; then realname="$2" shift shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. $show "$install_prog $dir/$srcname $destdir/$realname" $run eval "$install_prog $dir/$srcname $destdir/$realname" || exit $? if test -n "$stripme" && test -n "$striplib"; then $show "$striplib $destdir/$realname" $run eval "$striplib $destdir/$realname" || exit $? fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do if test "$linkname" != "$realname"; then $show "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" $run eval "(cd $destdir && { $LN_S -f $realname $linkname || { $rm $linkname && $LN_S $realname $linkname; }; })" fi done fi # Do each command in the postinstall commands. lib="$destdir/$realname" cmds=$postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$mode" = relink; then $run eval '(cd $output_objdir && $rm ${realname}T && $mv ${realname}U $realname)' fi exit $lt_exit } done IFS="$save_ifs" fi # Install the pseudo-library for information purposes. name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` instname="$dir/$name"i $show "$install_prog $instname $destdir/$name" $run eval "$install_prog $instname $destdir/$name" || exit $? # Maybe install the static library, too. test -n "$old_library" && staticlibs="$staticlibs $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) staticdest=`$echo "X$destfile" | $Xsed -e "$lo2o"` ;; *.$objext) staticdest="$destfile" destfile= ;; *) $echo "$modename: cannot copy a libtool object to \`$destfile'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac # Install the libtool object if requested. if test -n "$destfile"; then $show "$install_prog $file $destfile" $run eval "$install_prog $file $destfile" || exit $? fi # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. staticobj=`$echo "X$file" | $Xsed -e "$lo2o"` $show "$install_prog $staticobj $staticdest" $run eval "$install_prog \$staticobj \$staticdest" || exit $? fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else destfile=`$echo "X$file" | $Xsed -e 's%^.*/%%'` destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then file=`$echo $file|${SED} 's,.exe$,,'` stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin*|*mingw*) wrapper=`$echo $file | ${SED} -e 's,.exe$,,'` ;; *) wrapper=$file ;; esac if (${SED} -e '4q' $wrapper | grep "^# Generated by .*$PACKAGE")>/dev/null 2>&1; then notinst_deplibs= relink_command= # Note that it is not necessary on cygwin/mingw to append a dot to # foo even if both foo and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. # # If there is no directory component, then add one. case $wrapper in */* | *\\*) . ${wrapper} ;; *) . ./${wrapper} ;; esac # Check the variables that should have been set. if test -z "$notinst_deplibs"; then $echo "$modename: invalid libtool wrapper script \`$wrapper'" 1>&2 exit $EXIT_FAILURE fi finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then # If there is no directory component, then add one. case $lib in */* | *\\*) . $lib ;; *) . ./$lib ;; esac fi libfile="$libdir/"`$echo "X$lib" | $Xsed -e 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then $echo "$modename: warning: \`$lib' has not been installed in \`$libdir'" 1>&2 finalize=no fi done relink_command= # Note that it is not necessary on cygwin/mingw to append a dot to # foo even if both foo and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. # # If there is no directory component, then add one. case $wrapper in */* | *\\*) . ${wrapper} ;; *) . ./${wrapper} ;; esac outputname= if test "$fast_install" = no && test -n "$relink_command"; then if test "$finalize" = yes && test -z "$run"; then tmpdir=`func_mktempdir` file=`$echo "X$file$stripped_ext" | $Xsed -e 's%^.*/%%'` outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$echo "X$relink_command" | $Xsed -e 's%@OUTPUT@%'"$outputname"'%g'` $show "$relink_command" if $run eval "$relink_command"; then : else $echo "$modename: error: relink \`$file' with the above command before installing it" 1>&2 ${rm}r "$tmpdir" continue fi file="$outputname" else $echo "$modename: warning: cannot relink \`$file'" 1>&2 fi else # Install the binary that we compiled earlier. file=`$echo "X$file$stripped_ext" | $Xsed -e "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) destfile=`$echo $destfile | ${SED} -e 's,.exe$,,'` ;; esac ;; esac $show "$install_prog$stripme $file $destfile" $run eval "$install_prog\$stripme \$file \$destfile" || exit $? test -n "$outputname" && ${rm}r "$tmpdir" ;; esac done for file in $staticlibs; do name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` # Set up the ranlib parameters. oldlib="$destdir/$name" $show "$install_prog $file $oldlib" $run eval "$install_prog \$file \$oldlib" || exit $? if test -n "$stripme" && test -n "$old_striplib"; then $show "$old_striplib $oldlib" $run eval "$old_striplib $oldlib" || exit $? fi # Do each command in the postinstall commands. cmds=$old_postinstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || exit $? done IFS="$save_ifs" done if test -n "$future_libdirs"; then $echo "$modename: warning: remember to run \`$progname --finish$future_libdirs'" 1>&2 fi if test -n "$current_libdirs"; then # Maybe just do a dry run. test -n "$run" && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi ;; # libtool finish mode finish) modename="$modename: finish" libdirs="$nonopt" admincmds= if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for dir do libdirs="$libdirs $dir" done for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. cmds=$finish_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" || admincmds="$admincmds $cmd" done IFS="$save_ifs" fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $run eval "$cmds" || admincmds="$admincmds $cmds" fi done fi # Exit here if they wanted silent mode. test "$show" = : && exit $EXIT_SUCCESS $echo "X----------------------------------------------------------------------" | $Xsed $echo "Libraries have been installed in:" for libdir in $libdirs; do $echo " $libdir" done $echo $echo "If you ever happen to want to link against installed libraries" $echo "in a given directory, LIBDIR, you must either use libtool, and" $echo "specify the full pathname of the library, or use the \`-LLIBDIR'" $echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then $echo " - add LIBDIR to the \`$shlibpath_var' environment variable" $echo " during execution" fi if test -n "$runpath_var"; then $echo " - add LIBDIR to the \`$runpath_var' environment variable" $echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $echo " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $echo " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then $echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi $echo $echo "See any operating system documentation about shared libraries for" $echo "more information, such as the ld(1) and ld.so(8) manual pages." $echo "X----------------------------------------------------------------------" | $Xsed exit $EXIT_SUCCESS ;; # libtool execute mode execute) modename="$modename: execute" # The first argument is the command name. cmd="$nonopt" if test -z "$cmd"; then $echo "$modename: you must specify a COMMAND" 1>&2 $echo "$help" exit $EXIT_FAILURE fi # Handle -dlopen flags immediately. for file in $execute_dlfiles; do if test ! -f "$file"; then $echo "$modename: \`$file' is not a file" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi dir= case $file in *.la) # Check to see that this really is a libtool archive. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then : else $echo "$modename: \`$lib' is not a valid libtool archive" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi # Read the libtool library. dlname= library_names= # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && $echo "$modename: warning: \`$file' was not linked with \`-export-dynamic'" continue fi dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. if test -f "$dir/$objdir/$dlname"; then dir="$dir/$objdir" else $echo "$modename: cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" 1>&2 exit $EXIT_FAILURE fi ;; *.lo) # Just add the directory containing the .lo file. dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` test "X$dir" = "X$file" && dir=. ;; *) $echo "$modename: warning \`-dlopen' is ignored for non-libtool libraries and objects" 1>&2 continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -*) ;; *) # Do a test to see if this is really a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # If there is no directory component, then add one. case $file in */* | *\\*) . $file ;; *) . ./$file ;; esac # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). file=`$echo "X$file" | $Xsed -e "$sed_quote_subst"` args="$args \"$file\"" done if test -z "$run"; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables if test "${save_LC_ALL+set}" = set; then LC_ALL="$save_LC_ALL"; export LC_ALL fi if test "${save_LANG+set}" = set; then LANG="$save_LANG"; export LANG fi # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$echo \"\$shlibpath_var=\$$shlibpath_var\"" $echo "export $shlibpath_var" fi $echo "$cmd$args" exit $EXIT_SUCCESS fi ;; # libtool clean and uninstall mode clean | uninstall) modename="$modename: $mode" rm="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) rm="$rm $arg"; rmforce=yes ;; -*) rm="$rm $arg" ;; *) files="$files $arg" ;; esac done if test -z "$rm"; then $echo "$modename: you must specify an RM program" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE fi rmdirs= origobjdir="$objdir" for file in $files; do dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'` if test "X$dir" = "X$file"; then dir=. objdir="$origobjdir" else objdir="$dir/$origobjdir" fi name=`$echo "X$file" | $Xsed -e 's%^.*/%%'` test "$mode" = uninstall && objdir="$dir" # Remember objdir for removal later, being careful to avoid duplicates if test "$mode" = clean; then case " $rmdirs " in *" $objdir "*) ;; *) rmdirs="$rmdirs $objdir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if (test -L "$file") >/dev/null 2>&1 \ || (test -h "$file") >/dev/null 2>&1 \ || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then . $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do rmfiles="$rmfiles $objdir/$n" done test -n "$old_library" && rmfiles="$rmfiles $objdir/$old_library" case "$mode" in clean) case " $library_names " in # " " in the beginning catches empty $dlname *" $dlname "*) ;; *) rmfiles="$rmfiles $objdir/$dlname" ;; esac test -n "$libdir" && rmfiles="$rmfiles $objdir/$name $objdir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. cmds=$postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. cmds=$old_postuninstall_cmds save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $show "$cmd" $run eval "$cmd" if test "$?" -ne 0 && test "$rmforce" != yes; then exit_status=1 fi done IFS="$save_ifs" fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if (${SED} -e '2q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then # Read the .lo file . $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" \ && test "$pic_object" != none; then rmfiles="$rmfiles $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" \ && test "$non_pic_object" != none; then rmfiles="$rmfiles $dir/$non_pic_object" fi fi ;; *) if test "$mode" = clean ; then noexename=$name case $file in *.exe) file=`$echo $file|${SED} 's,.exe$,,'` noexename=`$echo $name|${SED} 's,.exe$,,'` # $file with .exe has already been added to rmfiles, # add $file without .exe rmfiles="$rmfiles $file" ;; esac # Do a test to see if this is a libtool program. if (${SED} -e '4q' $file | grep "^# Generated by .*$PACKAGE") >/dev/null 2>&1; then relink_command= . $dir/$noexename # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles rmfiles="$rmfiles $objdir/$name $objdir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then rmfiles="$rmfiles $objdir/lt-$name" fi if test "X$noexename" != "X$name" ; then rmfiles="$rmfiles $objdir/lt-${noexename}.c" fi fi fi ;; esac $show "$rm $rmfiles" $run $rm $rmfiles || exit_status=1 done objdir="$origobjdir" # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then $show "rmdir $dir" $run rmdir $dir >/dev/null 2>&1 fi done exit $exit_status ;; "") $echo "$modename: you must specify a MODE" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE ;; esac if test -z "$exec_cmd"; then $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$generic_help" 1>&2 exit $EXIT_FAILURE fi fi # test -z "$show_help" if test -n "$exec_cmd"; then eval exec $exec_cmd exit $EXIT_FAILURE fi # We need to display help for each of the modes. case $mode in "") $echo \ "Usage: $modename [OPTION]... [MODE-ARG]... Provide generalized library-building support services. --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --finish same as \`--mode=finish' --help display this help message and exit --mode=MODE use operation mode MODE [default=inferred from MODE-ARGS] --quiet same as \`--silent' --silent don't print informational messages --tag=TAG use configuration variables from tag TAG --version print version information MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. Try \`$modename --help --mode=MODE' for a more detailed description of MODE. Report bugs to ." exit $EXIT_SUCCESS ;; clean) $echo \ "Usage: $modename [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $echo \ "Usage: $modename [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -prefer-pic try to building PIC objects only -prefer-non-pic try to building non-PIC objects only -static always build a \`.o' file suitable for static linking COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $echo \ "Usage: $modename [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $echo \ "Usage: $modename [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $echo \ "Usage: $modename [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $echo \ "Usage: $modename [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -static do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $echo \ "Usage: $modename [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) $echo "$modename: invalid operation mode \`$mode'" 1>&2 $echo "$help" 1>&2 exit $EXIT_FAILURE ;; esac $echo $echo "Try \`$modename --help' for more information about other modes." exit $? # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared disable_libs=shared # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static disable_libs=static # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: libsylph-1.1.0/missing0000755000175000017500000001452010457702571011671 00000000000000#! /bin/sh # Common stub for a few missing GNU programs while installing. # Copyright (C) 1996, 1997, 2001, 2002 Free Software Foundation, Inc. # Franc,ois 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, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. if test $# -eq 0; then echo 1>&2 "Try \`$0 --help' for more information" exit 1 fi # In the cases where this matters, `missing' is being run in the # srcdir already. if test -f configure.in; then configure_ac=configure.ac else configure_ac=configure.in fi case "$1" in -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an error status if there is no known handling for PROGRAM. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal touch file \`aclocal.m4' autoconf touch file \`configure' autoheader touch file \`config.h.in' automake touch all \`Makefile.in' files bison create \`y.tab.[ch]', if possible, from existing .[ch] flex create \`lex.yy.c', if possible, from existing .c lex create \`lex.yy.c', if possible, from existing .c makeinfo touch the output file yacc create \`y.tab.[ch]', if possible, from existing .[ch]" ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing - GNU libit 0.0" ;; -*) echo 1>&2 "$0: Unknown \`$1' option" echo 1>&2 "Try \`$0 --help' for more information" exit 1 ;; aclocal*) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acinclude.m4' or \`$configure_ac'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." touch aclocal.m4 ;; autoconf) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`$configure_ac'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." touch configure ;; autoheader) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`acconfig.h' or \`$configure_ac'. You might want to install the \`Autoconf' and \`GNU m4' packages. Grab them from any GNU archive site." files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' $configure_ac` test -z "$files" && files="config.h" touch_files= for f in $files; do case "$f" in *:*) touch_files="$touch_files "`echo "$f" | sed -e 's/^[^:]*://' -e 's/:.*//'`;; *) touch_files="$touch_files $f.in";; esac done touch $touch_files ;; automake*) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified \`Makefile.am', \`acinclude.m4' or \`$configure_ac'. You might want to install the \`Automake' and \`Perl' packages. Grab them from any GNU archive site." find . -type f -name Makefile.am -print | sed 's/\.am$/.in/' | while read f; do touch "$f"; done ;; bison|yacc) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.y' file. You may need the \`Bison' package in order for those modifications to take effect. You can get \`Bison' from any GNU archive site." rm -f y.tab.c y.tab.h if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.y) SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.c fi SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" y.tab.h fi ;; esac fi if [ ! -f y.tab.h ]; then echo >y.tab.h fi if [ ! -f y.tab.c ]; then echo 'main() { return 0; }' >y.tab.c fi ;; lex|flex) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.l' file. You may need the \`Flex' package in order for those modifications to take effect. You can get \`Flex' from any GNU archive site." rm -f lex.yy.c if [ $# -ne 1 ]; then eval LASTARG="\${$#}" case "$LASTARG" in *.l) SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'` if [ -f "$SRCFILE" ]; then cp "$SRCFILE" lex.yy.c fi ;; esac fi if [ ! -f lex.yy.c ]; then echo 'main() { return 0; }' >lex.yy.c fi ;; makeinfo) echo 1>&2 "\ WARNING: \`$1' is missing on your system. You should only need it if you modified a \`.texi' or \`.texinfo' file, or any other file indirectly affecting the aspect of the manual. The spurious call might also be the consequence of using a buggy \`make' (AIX, DU, IRIX). You might want to install the \`Texinfo' package or the \`GNU make' package. Grab either from any GNU archive site." file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'` if test -z "$file"; then file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'` file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file` fi touch $file ;; *) echo 1>&2 "\ WARNING: \`$1' is needed, and you do not seem to have it handy on your system. You might have modified some files without having the proper tools for further handling them. Check the \`README' file, it often tells you about the needed prerequirements for installing this package. You may also peek at any GNU archive site, in case some other package would contain this missing \`$1' program." exit 1 ;; esac exit 0 libsylph-1.1.0/mkinstalldirs0000755000175000017500000000370410457702571013102 00000000000000#! /bin/sh # mkinstalldirs --- make directory hierarchy # Author: Noah Friedman # Created: 1993-05-16 # Public domain errstatus=0 dirmode="" usage="\ Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..." # process command line arguments while test $# -gt 0 ; do case $1 in -h | --help | --h*) # -h for help echo "$usage" 1>&2 exit 0 ;; -m) # -m PERM arg shift test $# -eq 0 && { echo "$usage" 1>&2; exit 1; } dirmode=$1 shift ;; --) # stop option processing shift break ;; -*) # unknown option echo "$usage" 1>&2 exit 1 ;; *) # first non-opt arg break ;; esac done for file do if test -d "$file"; then shift else break fi done case $# in 0) exit 0 ;; esac case $dirmode in '') if mkdir -p -- . 2>/dev/null; then echo "mkdir -p -- $*" exec mkdir -p -- "$@" fi ;; *) if mkdir -m "$dirmode" -p -- . 2>/dev/null; then echo "mkdir -m $dirmode -p -- $*" exec mkdir -m "$dirmode" -p -- "$@" fi ;; esac for file do set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'` shift pathcomp= for d do pathcomp="$pathcomp$d" case $pathcomp in -*) pathcomp=./$pathcomp ;; esac if test ! -d "$pathcomp"; then echo "mkdir $pathcomp" mkdir "$pathcomp" || lasterr=$? if test ! -d "$pathcomp"; then errstatus=$lasterr else if test ! -z "$dirmode"; then echo "chmod $dirmode $pathcomp" lasterr="" chmod "$dirmode" "$pathcomp" || lasterr=$? if test ! -z "$lasterr"; then errstatus=$lasterr fi fi fi fi pathcomp="$pathcomp/" done done exit $errstatus # Local Variables: # mode: shell-script # sh-indentation: 2 # End: # mkinstalldirs ends here libsylph-1.1.0/config.rpath0000755000175000017500000003521310457702571012604 00000000000000#! /bin/sh # Output a system dependent set of variables, describing how to set the # run time search path of shared libraries in an executable. # # Copyright 1996-2003 Free Software Foundation, Inc. # Taken from GNU libtool, 2001 # Originally by Gordon Matzigkeit , 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 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # 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. # # The first argument passed to this file is the canonical host specification, # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld # should be set by the caller. # # The set of defined variables is at the end of this script. # Known limitations: # - On IRIX 6.5 with CC="cc", the run time search patch must not be longer # than 256 bytes, otherwise the compiler driver will dump core. The only # known workaround is to choose shorter directory names for the build # directory and/or the installation directory. # All known linkers require a `.a' archive for static linking (except M$VC, # which needs '.lib'). libext=a shrext=.so host="$1" host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'` host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'` host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'` # Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC. wl= if test "$GCC" = yes; then wl='-Wl,' else case "$host_os" in aix*) wl='-Wl,' ;; mingw* | pw32* | os2*) ;; hpux9* | hpux10* | hpux11*) wl='-Wl,' ;; irix5* | irix6* | nonstopux*) wl='-Wl,' ;; newsos6) ;; linux*) case $CC in icc|ecc) wl='-Wl,' ;; ccc) wl='-Wl,' ;; esac ;; osf3* | osf4* | osf5*) wl='-Wl,' ;; sco3.2v5*) ;; solaris*) wl='-Wl,' ;; sunos4*) wl='-Qoption ld ' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) wl='-Wl,' ;; sysv4*MP*) ;; uts4*) ;; esac fi # Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS. hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_direct=no hardcode_minus_L=no case "$host_os" in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes if test "$with_gnu_ld" = yes; then case "$host_os" in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no fi ;; amigaos*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can use # them. ld_shlibs=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; cygwin* | mingw* | pw32*) # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then : else ld_shlibs=no fi ;; netbsd*) ;; solaris* | sysv5*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then ld_shlibs=no elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; sunos4*) hardcode_direct=yes ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then : else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = yes; then # Unlike libtool, we use -rpath here, not --rpath, since the documented # option of GNU ld is called -rpath, not --rpath. hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' fi else case "$host_os" in aix3*) # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac fi hardcode_direct=yes hardcode_libdir_separator=':' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 hardcode_direct=yes else # We have old collect2 hardcode_direct=unsupported hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi esac fi # Begin _LT_AC_SYS_LIBPATH_AIX. echo 'int main () { return 0; }' > conftest.c ${CC} ${LDFLAGS} conftest.c -o conftest aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` fi if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib" fi rm -f conftest.c conftest # End _LT_AC_SYS_LIBPATH_AIX. if test "$aix_use_runtimelinking" = yes; then hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' else hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" fi fi ;; amigaos*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes # see comment about different semantics on the GNU ld section ld_shlibs=no ;; bsdi4*) ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec=' ' libext=lib ;; darwin* | rhapsody*) if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then hardcode_direct=no fi ;; dgux*) hardcode_libdir_flag_spec='-L$libdir' ;; freebsd1*) ld_shlibs=no ;; freebsd2.2*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; freebsd2*) hardcode_direct=yes hardcode_minus_L=yes ;; freebsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; hpux9*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; hpux10* | hpux11*) if test "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=no ;; ia64*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; *) hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; netbsd*) hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes ;; newsos6) hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; openbsd*) hardcode_direct=yes if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then hardcode_libdir_flag_spec='${wl}-rpath,$libdir' else case "$host_os" in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) hardcode_libdir_flag_spec='-R$libdir' ;; *) hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; osf3*) hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) if test "$GCC" = yes; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else # Both cc and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi hardcode_libdir_separator=: ;; sco3.2v5*) ;; solaris*) hardcode_libdir_flag_spec='-R$libdir' ;; sunos4*) hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes ;; sysv4) case $host_vendor in sni) hardcode_direct=yes # is this really true??? ;; siemens) hardcode_direct=no ;; motorola) hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac ;; sysv4.3*) ;; sysv4*MP*) if test -d /usr/nec; then ld_shlibs=yes fi ;; sysv4.2uw2*) hardcode_direct=yes hardcode_minus_L=no ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*) ;; sysv5*) hardcode_libdir_flag_spec= ;; uts4*) hardcode_libdir_flag_spec='-L$libdir' ;; *) ld_shlibs=no ;; esac fi # Check dynamic linker characteristics # Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER. libname_spec='lib$name' case "$host_os" in aix3*) ;; aix4* | aix5*) ;; amigaos*) ;; beos*) ;; bsdi4*) ;; cygwin* | mingw* | pw32*) shrext=.dll ;; darwin* | rhapsody*) shrext=.dylib ;; dgux*) ;; freebsd1*) ;; freebsd*) ;; gnu*) ;; hpux9* | hpux10* | hpux11*) case "$host_cpu" in ia64*) shrext=.so ;; hppa*64*) shrext=.sl ;; *) shrext=.sl ;; esac ;; irix5* | irix6* | nonstopux*) case "$host_os" in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;; *) libsuff= shlibsuff= ;; esac ;; esac ;; linux*oldld* | linux*aout* | linux*coff*) ;; linux*) ;; netbsd*) ;; newsos6) ;; nto-qnx) ;; openbsd*) ;; os2*) libname_spec='$name' shrext=.dll ;; osf3* | osf4* | osf5*) ;; sco3.2v5*) ;; solaris*) ;; sunos4*) ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) ;; sysv4*MP*) ;; uts4*) ;; esac sed_quote_subst='s/\(["`$\\]\)/\\\1/g' escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"` shlibext=`echo "$shrext" | sed -e 's,^\.,,'` escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"` sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' < libsylph-1.1.0/README.ja0000644000175000017500000001317210760422024011532 00000000000000 LibSylph - 電子メールクライアントライブラリ Copyright(C) 1999-2008 Hiroyuki Yamamoto This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library 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 Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA For more details see the file COPYING. What's Sylpheed =============== LibSylph は Sylpheed から派生した電子メールクライアントライブラリです。 LibSylph は軽量かつ多機能なライブラリです。多くの一般的な電子メール関連の 機能やその他の便利な機能をもち、アプリケーションから利用することができます。 さらに任意の UI で LibSylph をラップすることで新たな電子メールクライアントを 作成することもできます。 LibSylph は GNU LGPL に従って配布されているフリーソフトウェアです。 現在実装されている主な機能 ========================== 対応プロトコル o POP3 対応 o IMAP4rev1 対応 o SMTP o NNTP o SSL/TLSv1 (POP3, SMTP, IMAP4rev1, NNTP) o IPv6 機能 o オブジェクト指向ライクなメッセージ操作 o 複数アカウント o 強力なフィルタリング o 強力な検索機能(クエリ検索、検索フォルダ) o MIME 処理 o SMTP AUTH 対応 (PLAIN / LOGIN / CRAM-MD5) o CRAM-MD5 認証 (SMTP AUTH / IMAP4rev1) o APOP 認証 (POP3) o 複数の MH フォルダ対応 o フォルダ毎の設定 o autoconf, automake 対応 o gettext によるメッセージの国際化対応 o m17n (multilingualization, 多言語化)対応 等です。 インストール方法 ================ インストールの説明は INSTALL を参照してください。 使用方法 ======== 起動前の準備 ------------ Unix 系 OS の場合、ファイル名に UTF-8 以外の文字コードを使用している場合は 以下の環境変数を指定する必要があります。指定していない場合は正常に動作 しません。 (ロケール依存のエンコーディングを使用) % export G_FILENAME_ENCODING=@locale または (直接エンコーディングを指定) % export G_FILENAME_ENCODING=ISO-8859-1 日本語に翻訳されたメッセージを表示したい場合、 ロケールに関連する環境変数 を指定しなければなりません(日本語 Linux ディストリビューションの場合は 大抵すでに設定されています)。例えば、 % export LANG=ja_JP.eucJP (ja_JP.eucJP は実際のロケール名に置き換えてください。) 翻訳されたメッセージが必要なければ、 LC_MESSAGES を "C" に指定して ください(LC_ALL が指定されていれば外してください)。 使用方法 -------- 最も簡単なリンク方法: gcc -o foo foo.c `pkg-config glib-2.0 --cflags --libs` -lsylph configure スクリプトから LibSylph を自動検出したい場合は、以下を configure.ac 内で使用してください: AC_ARG_WITH(libsylph, [AC_HELP_STRING([--with-libsylph=DIR], [search for LibSylph in DIR/include and DIR/lib])], [if test "x$with_libsylph" != x; then CPPFLAGS="$CPPFLAGS -I$with_libsylph/include" LDFLAGS="$LDFLAGS -L$with_libsylph/lib" fi]) AC_CHECK_LIB(sylph, syl_init,, AC_MSG_ERROR(Test for LibSylph failed.)) 配布パッケージの examples ディレクトリ以下にサンプルプログラムがあります。 ソースの先頭にコメントの形でコンパイル方法が記述されています。 これらのサンプルプログラムのライセンスはパブリックドメインとします。 詳細は examples/README.ja を参照してください。 ドキュメント ------------ doc ディレクトリ以下にリファレンスマニュアルがあります(日本語)。 詳細は doc/README.ja を参照してください。 情報 ==== 最新バージョンや Sylpheed または LibSylph に関する情報は http://sylpheed.sraoss.jp/ でチェックできます。 フィードバック ============== 意見、アイデア、バグレポート(これが一番重要)(と、特にパッチ)は 大変歓迎します。 Subversion ========== Subversion のリポジトリから最新のソースを取得することができます。 Sylpheed の trunk ツリーを取得するには、適当なディレクトリに移動し、 以下のコマンドを実行します。 svn checkout svn://sylpheed.sraoss.jp/sylpheed/trunk カレントディレクトリ以下に 'trunk' というソースツリーが作成されます。 sylpheed ディレクトリ以下は次のように分かれています。 * trunk/ メインのツリー * branches/ 各種実験用ブランチ * tags/ リリースタグを付けたブランチ 最新のソースツリーにアップデートするには、対象のディレクトリで、 svn update を実行して下さい。 libsylph ブランチは branches/libsylph にあります。 -- 山本 博之 / Hiroyuki Yamamoto libsylph-1.1.0/autogen.sh0000755000175000017500000000024110457702571012266 00000000000000#!/bin/sh aclocal -I ac \ && libtoolize --force --copy \ && autoheader \ && automake --add-missing --foreign --copy \ && autoconf \ && ./configure $@ libsylph-1.1.0/makewin32.sh0000755000175000017500000000026510513565567012437 00000000000000#!/bin/sh ./configure --with-localedir=lib/locale --enable-oniguruma --disable-ipv6 \ 'CC=gcc -mtune=pentium3' CFLAGS=-O3 \ && make \ && make install-strip prefix=$HOME/dist libsylph-1.1.0/mime.types0000644000175000017500000002224510457702571012312 00000000000000# This file is based on the "mime-support" package of Debian GNU/Linux. application/andrew-inset ez application/cu-seeme cu application/dsptype tsp application/futuresplash spl application/hta hta application/java-archive jar application/java-serialized-object ser application/java-vm class application/mac-binhex40 hqx application/mac-compactpro cpt application/mathematica nb application/msaccess mdb application/msword doc dot application/octet-stream bin application/oda oda application/ogg ogg application/pdf pdf application/pgp-keys key application/pgp-signature pgp application/pics-rules prf application/postscript ps ai eps application/rar rar application/rdf+xml rdf application/rss+xml rss application/smil smi smil application/wordperfect wpd application/wordperfect5.1 wp5 application/xhtml+xml xhtml xht application/xml xml xsl application/zip zip application/vnd.cinderella cdy application/vnd.mozilla.xul+xml xul application/vnd.ms-excel xls xlb xlt application/vnd.ms-pki.seccat cat application/vnd.ms-pki.stl stl application/vnd.ms-powerpoint ppt pps application/vnd.oasis.opendocument.chart odc application/vnd.oasis.opendocument.database odb application/vnd.oasis.opendocument.formula odf application/vnd.oasis.opendocument.graphics odg application/vnd.oasis.opendocument.image odi application/vnd.oasis.opendocument.presentation odp application/vnd.oasis.opendocument.spreadsheet ods application/vnd.oasis.opendocument.text odt application/vnd.oasis.opendocument.text-master odm application/vnd.oasis.opendocument.text-web oth application/vnd.rim.cod cod application/vnd.smaf mmf application/vnd.stardivision.calc sdc application/vnd.stardivision.draw sda application/vnd.stardivision.impress sdd sdp application/vnd.stardivision.math smf application/vnd.stardivision.writer sdw vor application/vnd.stardivision.writer-global sgl application/vnd.sun.xml.calc sxc application/vnd.sun.xml.calc.template stc application/vnd.sun.xml.draw sxd application/vnd.sun.xml.draw.template std application/vnd.sun.xml.impress sxi application/vnd.sun.xml.impress.template sti application/vnd.sun.xml.math sxm application/vnd.sun.xml.writer sxw application/vnd.sun.xml.writer.global sxg application/vnd.sun.xml.writer.template stw application/vnd.symbian.install sis application/vnd.visio vsd application/vnd.wap.wbxml wbxml application/vnd.wap.wmlc wmlc application/vnd.wap.wmlscriptc wmlsc application/x-123 wk application/x-abiword abw application/x-apple-diskimage dmg application/x-bcpio bcpio application/x-bittorrent torrent application/x-cdf cdf application/x-cdlink vcd application/x-chess-pgn pgn application/x-cpio cpio application/x-csh csh application/x-debian-package deb udeb application/x-director dcr dir dxr application/x-dms dms application/x-doom wad application/x-dvi dvi application/x-flac flac application/x-font pfa pfb gsf pcf pcf.Z application/x-freemind mm application/x-futuresplash spl application/x-gnumeric gnumeric application/x-go-sgf sgf application/x-graphing-calculator gcf application/x-gtar gtar tgz taz application/x-hdf hdf application/x-httpd-php phtml pht php application/x-httpd-php-source phps application/x-httpd-php3 php3 application/x-httpd-php3-preprocessed php3p application/x-httpd-php4 php4 application/x-ica ica application/x-internet-signup ins isp application/x-iphone iii application/x-iso9660-image iso application/x-java-jnlp-file jnlp application/x-javascript js application/x-jmol jmz application/x-kchart chrt application/x-killustrator kil application/x-koan skp skd skt skm application/x-kpresenter kpr kpt application/x-kspread ksp application/x-kword kwd kwt application/x-latex latex application/x-lha lha application/x-lzh lzh application/x-lzx lzx application/x-maker frm maker frame fm fb book fbdoc application/x-mif mif application/x-ms-wmd wmd application/x-ms-wmz wmz application/x-msdos-program com exe bat dll application/x-msi msi application/x-netcdf nc application/x-ns-proxy-autoconfig pac application/x-nwc nwc application/x-object o application/x-oz-application oza application/x-pkcs7-certreqresp p7r application/x-pkcs7-crl crl application/x-python-code pyc pyo application/x-quicktimeplayer qtl application/x-redhat-package-manager rpm application/x-sh sh application/x-shar shar application/x-shockwave-flash swf swfl application/x-stuffit sit application/x-sv4cpio sv4cpio application/x-sv4crc sv4crc application/x-tar tar application/x-tcl tcl application/x-tex-gf gf application/x-tex-pk pk application/x-texinfo texinfo texi application/x-trash ~ % bak old sik application/x-troff t tr roff application/x-troff-man man application/x-troff-me me application/x-troff-ms ms application/x-ustar ustar application/x-wais-source src application/x-wingz wz application/x-x509-ca-cert crt application/x-xcf xcf application/x-xfig fig application/x-xpinstall xpi audio/basic au snd audio/midi mid midi kar audio/mpeg mpga mpega mp2 mp3 m4a audio/mpegurl m3u audio/prs.sid sid audio/x-aiff aif aiff aifc audio/x-gsm gsm audio/x-mpegurl m3u audio/x-ms-wma wma audio/x-ms-wax wax audio/x-pn-realaudio ra rm ram audio/x-realaudio ra audio/x-scpls pls audio/x-sd2 sd2 audio/x-wav wav chemical/x-alchemy alc chemical/x-cache cac cache chemical/x-cache-csf csf chemical/x-cactvs-binary cbin cascii ctab chemical/x-cdx cdx chemical/x-cerius cer chemical/x-chem3d c3d chemical/x-chemdraw chm chemical/x-cif cif chemical/x-cmdf cmdf chemical/x-cml cml chemical/x-compass cpa chemical/x-crossfire bsd chemical/x-csml csml csm chemical/x-ctx ctx chemical/x-cxf cxf cef #chemical/x-daylight-smiles smi chemical/x-embl-dl-nucleotide emb embl chemical/x-galactic-spc spc chemical/x-gamess-input inp gam gamin chemical/x-gaussian-checkpoint fch fchk chemical/x-gaussian-cube cub chemical/x-gaussian-input gau gjc gjf chemical/x-gaussian-log gal chemical/x-gcg8-sequence gcg chemical/x-genbank gen chemical/x-hin hin chemical/x-isostar istr ist chemical/x-jcamp-dx jdx dx chemical/x-kinemage kin chemical/x-macmolecule mcm chemical/x-macromodel-input mmd mmod chemical/x-mdl-molfile mol chemical/x-mdl-rdfile rd chemical/x-mdl-rxnfile rxn chemical/x-mdl-sdfile sd sdf chemical/x-mdl-tgf tgf #chemical/x-mif mif chemical/x-mmcif mcif chemical/x-mol2 mol2 chemical/x-molconn-Z b chemical/x-mopac-graph gpt chemical/x-mopac-input mop mopcrt mpc dat zmt chemical/x-mopac-out moo chemical/x-mopac-vib mvb chemical/x-ncbi-asn1 asn chemical/x-ncbi-asn1-ascii prt ent chemical/x-ncbi-asn1-binary val aso chemical/x-ncbi-asn1-spec asn chemical/x-pdb pdb ent chemical/x-rosdal ros chemical/x-swissprot sw chemical/x-vamas-iso14976 vms chemical/x-vmd vmd chemical/x-xtel xtel chemical/x-xyz xyz image/gif gif image/ief ief image/jpeg jpeg jpg jpe image/pcx pcx image/png png image/svg+xml svg svgz image/tiff tiff tif image/vnd.djvu djvu djv image/vnd.wap.wbmp wbmp image/x-cmu-raster ras image/x-coreldraw cdr image/x-coreldrawpattern pat image/x-coreldrawtemplate cdt image/x-corelphotopaint cpt image/x-icon ico image/x-jg art image/x-jng jng image/x-ms-bmp bmp image/x-photoshop psd image/x-portable-anymap pnm image/x-portable-bitmap pbm image/x-portable-graymap pgm image/x-portable-pixmap ppm image/x-rgb rgb image/x-xbitmap xbm image/x-xpixmap xpm image/x-xwindowdump xwd model/iges igs iges model/mesh msh mesh silo model/vrml wrl vrml text/calendar ics icz text/comma-separated-values csv text/css css text/h323 323 text/html html htm shtml text/iuls uls text/mathml mml text/plain asc txt text diff pot text/richtext rtx text/rtf rtf text/scriptlet sct wsc text/texmacs tm ts text/tab-separated-values tsv text/vnd.sun.j2me.app-descriptor jad text/vnd.wap.wml wml text/vnd.wap.wmlscript wmls text/x-bibtex bib text/x-boo boo text/x-c++hdr h++ hpp hxx hh text/x-c++src c++ cpp cxx cc text/x-chdr h text/x-component htc text/x-csh csh text/x-csrc c text/x-dsrc d text/x-haskell hs text/x-java java text/x-literate-haskell lhs text/x-moc moc text/x-pascal p pas text/x-pcs-gcd gcd text/x-perl pl pm text/x-python py text/x-setext etx text/x-sh sh text/x-tcl tcl tk text/x-tex tex ltx sty cls text/x-vcalendar vcs text/x-vcard vcf video/dl dl video/dv dif dv video/fli fli video/gl gl video/mpeg mpeg mpg mpe video/mp4 mp4 video/quicktime qt mov video/vnd.mpegurl mxu video/x-la-asf lsf lsx video/x-mng mng video/x-ms-asf asf asx video/x-ms-wm wm video/x-ms-wmv wmv video/x-ms-wmx wmx video/x-ms-wvx wvx video/x-msvideo avi video/x-sgi-movie movie x-conference/x-cooltalk ice x-world/x-vrml vrm vrml wrl libsylph-1.1.0/ac/0000777000175000017500000000000010760423125010727 500000000000000libsylph-1.1.0/ac/Makefile.in0000644000175000017500000001317710760423125012721 00000000000000# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am # Copyright (C) 1994, 1995-8, 1999, 2001 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. SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include DESTDIR = pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_alias = @build_alias@ build_triplet = @build@ host_alias = @host_alias@ host_triplet = @host@ target_alias = @target_alias@ target_triplet = @target@ AR = @AR@ AS = @AS@ BUILD_REVISION = @BUILD_REVISION@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CPP = @CPP@ CXX = @CXX@ CXXCPP = @CXXCPP@ DATADIRNAME = @DATADIRNAME@ DLLTOOL = @DLLTOOL@ ECHO = @ECHO@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ GCJ = @GCJ@ GCJFLAGS = @GCJFLAGS@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GLIB_MKENUMS = @GLIB_MKENUMS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GOBJECT_QUERY = @GOBJECT_QUERY@ HAVE_LIB = @HAVE_LIB@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LEX = @LEX@ LIB = @LIB@ LIBICONV = @LIBICONV@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIB = @LTLIB@ LTLIBICONV = @LTLIBICONV@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ MAJOR_VERSION = @MAJOR_VERSION@ MAKEINFO = @MAKEINFO@ MICRO_VERSION = @MICRO_VERSION@ MINOR_VERSION = @MINOR_VERSION@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT_OPTS = @MSGFMT_OPTS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ RC = @RC@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WINDRES = @WINDRES@ YACC = @YACC@ localedir = @localedir@ MACROS = aclocal-include.m4 check-type.m4 EXTRA_DIST = $(MACROS) missing/gettext.m4 mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h CONFIG_CLEAN_FILES = DIST_COMMON = README Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps ac/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status tags: TAGS TAGS: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = ac distdir: $(DISTFILES) $(mkinstalldirs) $(distdir)/missing @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done info-am: info: info-am dvi-am: dvi: dvi-am check-am: all-am check: check-am installcheck-am: installcheck: installcheck-am install-exec-am: install-exec: install-exec-am install-data-am: install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am uninstall-am: uninstall: uninstall-am all-am: Makefile all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: mostlyclean-am: mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-generic clean-am -rm -f libtool distclean: distclean-am maintainer-clean-am: maintainer-clean-generic distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." maintainer-clean: maintainer-clean-am .PHONY: tags distdir info-am info dvi-am dvi check check-am \ installcheck-am installcheck install-exec-am install-exec \ install-data-am install-data install-am install uninstall-am uninstall \ all-redirect all-am all installdirs mostlyclean-generic \ distclean-generic clean-generic maintainer-clean-generic clean \ mostlyclean distclean maintainer-clean # 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: libsylph-1.1.0/ac/missing/0000755000175000017500000000000010760423125012374 500000000000000libsylph-1.1.0/ac/missing/gettext.m40000644000175000017500000004513010457702566014261 00000000000000# gettext.m4 serial 28 (gettext-0.13) dnl Copyright (C) 1995-2003 Free Software Foundation, Inc. dnl This file is free software, distributed under the terms of the GNU dnl General Public License. As a special exception to the GNU General dnl Public License, this file may be distributed as part of a program dnl that contains a configuration script generated by Autoconf, under dnl the same distribution terms as the rest of that program. dnl dnl This file can can be used in projects which are not available under dnl the GNU General Public License or the GNU Library General Public dnl License but which still want to provide support for the GNU gettext dnl functionality. dnl Please note that the actual code of the GNU gettext library is covered dnl by the GNU Library General Public License, and the rest of the GNU dnl gettext package package is covered by the GNU General Public License. dnl They are *not* in the public domain. dnl Authors: dnl Ulrich Drepper , 1995-2000. dnl Bruno Haible , 2000-2003. dnl Macro to add for using GNU gettext. dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]). dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The dnl default (if it is not specified or empty) is 'no-libtool'. dnl INTLSYMBOL should be 'external' for packages with no intl directory, dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory. dnl If INTLSYMBOL is 'use-libtool', then a libtool library dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static, dnl depending on --{enable,disable}-{shared,static} and on the presence of dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library dnl $(top_builddir)/intl/libintl.a will be created. dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext dnl implementations (in libc or libintl) without the ngettext() function dnl will be ignored. If NEEDSYMBOL is specified and is dnl 'need-formatstring-macros', then GNU gettext implementations that don't dnl support the ISO C 99 formatstring macros will be ignored. dnl INTLDIR is used to find the intl libraries. If empty, dnl the value `$(top_builddir)/intl/' is used. dnl dnl The result of the configuration is one of three cases: dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled dnl and used. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 2) GNU gettext has been found in the system's C library. dnl Catalog format: GNU --> install in $(datadir) dnl Catalog extension: .mo after installation, .gmo in source tree dnl 3) No internationalization, always use English msgid. dnl Catalog format: none dnl Catalog extension: none dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur. dnl The use of .gmo is historical (it was needed to avoid overwriting the dnl GNU format catalogs when building on a platform with an X/Open gettext), dnl but we keep it in order not to force irrelevant filename changes on the dnl maintainers. dnl AC_DEFUN([AM_GNU_GETTEXT], [ dnl Argument checking. ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], , [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT ])])])])]) ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], , [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT ])])])]) define(gt_included_intl, ifelse([$1], [external], [no], [yes])) define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], [])) AC_REQUIRE([AM_PO_SUBDIRS])dnl ifelse(gt_included_intl, yes, [ AC_REQUIRE([AM_INTL_SUBDIR])dnl ]) dnl Prerequisites of AC_LIB_LINKFLAGS_BODY. AC_REQUIRE([AC_LIB_PREPARE_PREFIX]) AC_REQUIRE([AC_LIB_RPATH]) dnl Sometimes libintl requires libiconv, so first search for libiconv. dnl Ideally we would do this search only after the dnl if test "$USE_NLS" = "yes"; then dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT dnl the configure script would need to contain the same shell code dnl again, outside any 'if'. There are two solutions: dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'. dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE. dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not dnl documented, we avoid it. ifelse(gt_included_intl, yes, , [ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY]) ]) dnl Set USE_NLS. AM_NLS ifelse(gt_included_intl, yes, [ BUILD_INCLUDED_LIBINTL=no USE_INCLUDED_LIBINTL=no ]) LIBINTL= LTLIBINTL= POSUB= dnl If we use NLS figure out what method if test "$USE_NLS" = "yes"; then gt_use_preinstalled_gnugettext=no ifelse(gt_included_intl, yes, [ AC_MSG_CHECKING([whether included gettext is requested]) AC_ARG_WITH(included-gettext, [ --with-included-gettext use the GNU gettext library included here], nls_cv_force_use_gnu_gettext=$withval, nls_cv_force_use_gnu_gettext=no) AC_MSG_RESULT($nls_cv_force_use_gnu_gettext) nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" if test "$nls_cv_force_use_gnu_gettext" != "yes"; then ]) dnl User does not insist on using GNU NLS library. Figure out what dnl to use. If GNU gettext is available we use this. Else we have dnl to fall back to GNU NLS library. dnl Add a version number to the cache macros. define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1))) define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc]) define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl]) AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc, [AC_TRY_LINK([#include ]ifelse([$2], [need-formatstring-macros], [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif changequote(,)dnl typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; changequote([,])dnl ], [])[extern int _nl_msg_cat_cntr; extern int *_nl_domain_bindings;], [bindtextdomain ("", ""); return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings], gt_cv_func_gnugettext_libc=yes, gt_cv_func_gnugettext_libc=no)]) if test "$gt_cv_func_gnugettext_libc" != "yes"; then dnl Sometimes libintl requires libiconv, so first search for libiconv. ifelse(gt_included_intl, yes, , [ AM_ICONV_LINK ]) dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv]) dnl because that would add "-liconv" to LIBINTL and LTLIBINTL dnl even if libiconv doesn't exist. AC_LIB_LINKFLAGS_BODY([intl]) AC_CACHE_CHECK([for GNU gettext in libintl], gt_cv_func_gnugettext_libintl, [gt_save_CPPFLAGS="$CPPFLAGS" CPPFLAGS="$CPPFLAGS $INCINTL" gt_save_LIBS="$LIBS" LIBS="$LIBS $LIBINTL" dnl Now see whether libintl exists and does not depend on libiconv. AC_TRY_LINK([#include ]ifelse([$2], [need-formatstring-macros], [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif changequote(,)dnl typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; changequote([,])dnl ], [])[extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias ();], [bindtextdomain ("", ""); return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], gt_cv_func_gnugettext_libintl=yes, gt_cv_func_gnugettext_libintl=no) dnl Now see whether libintl exists and depends on libiconv. if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then LIBS="$LIBS $LIBICONV" AC_TRY_LINK([#include ]ifelse([$2], [need-formatstring-macros], [#ifndef __GNU_GETTEXT_SUPPORTED_REVISION #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) #endif changequote(,)dnl typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; changequote([,])dnl ], [])[extern int _nl_msg_cat_cntr; extern #ifdef __cplusplus "C" #endif const char *_nl_expand_alias ();], [bindtextdomain ("", ""); return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)], [LIBINTL="$LIBINTL $LIBICONV" LTLIBINTL="$LTLIBINTL $LTLIBICONV" gt_cv_func_gnugettext_libintl=yes ]) fi CPPFLAGS="$gt_save_CPPFLAGS" LIBS="$gt_save_LIBS"]) fi dnl If an already present or preinstalled GNU gettext() is found, dnl use it. But if this macro is used in GNU gettext, and GNU dnl gettext is already preinstalled in libintl, we update this dnl libintl. (Cf. the install rule in intl/Makefile.in.) if test "$gt_cv_func_gnugettext_libc" = "yes" \ || { test "$gt_cv_func_gnugettext_libintl" = "yes" \ && test "$PACKAGE" != gettext-runtime \ && test "$PACKAGE" != gettext-tools; }; then gt_use_preinstalled_gnugettext=yes else dnl Reset the values set by searching for libintl. LIBINTL= LTLIBINTL= INCINTL= fi ifelse(gt_included_intl, yes, [ if test "$gt_use_preinstalled_gnugettext" != "yes"; then dnl GNU gettext is not found in the C library. dnl Fall back on included GNU gettext library. nls_cv_use_gnu_gettext=yes fi fi if test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions used to generate GNU NLS library. BUILD_INCLUDED_LIBINTL=yes USE_INCLUDED_LIBINTL=yes LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV" LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV" LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` fi if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then dnl Mark actions to use GNU gettext tools. CATOBJEXT=.gmo fi ]) if test "$gt_use_preinstalled_gnugettext" = "yes" \ || test "$nls_cv_use_gnu_gettext" = "yes"; then AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if translation of program messages to the user's native language is requested.]) else USE_NLS=no fi fi AC_MSG_CHECKING([whether to use NLS]) AC_MSG_RESULT([$USE_NLS]) if test "$USE_NLS" = "yes"; then AC_MSG_CHECKING([where the gettext function comes from]) if test "$gt_use_preinstalled_gnugettext" = "yes"; then if test "$gt_cv_func_gnugettext_libintl" = "yes"; then gt_source="external libintl" else gt_source="libc" fi else gt_source="included intl directory" fi AC_MSG_RESULT([$gt_source]) fi if test "$USE_NLS" = "yes"; then if test "$gt_use_preinstalled_gnugettext" = "yes"; then if test "$gt_cv_func_gnugettext_libintl" = "yes"; then AC_MSG_CHECKING([how to link with libintl]) AC_MSG_RESULT([$LIBINTL]) AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL]) fi dnl For backward compatibility. Some packages may be using this. AC_DEFINE(HAVE_GETTEXT, 1, [Define if the GNU gettext() function is already present or preinstalled.]) AC_DEFINE(HAVE_DCGETTEXT, 1, [Define if the GNU dcgettext() function is already present or preinstalled.]) fi dnl We need to process the po/ directory. POSUB=po fi ifelse(gt_included_intl, yes, [ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL dnl to 'yes' because some of the testsuite requires it. if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then BUILD_INCLUDED_LIBINTL=yes fi dnl Make all variables we use known to autoconf. AC_SUBST(BUILD_INCLUDED_LIBINTL) AC_SUBST(USE_INCLUDED_LIBINTL) AC_SUBST(CATOBJEXT) dnl For backward compatibility. Some configure.ins may be using this. nls_cv_header_intl= nls_cv_header_libgt= dnl For backward compatibility. Some Makefiles may be using this. DATADIRNAME=share AC_SUBST(DATADIRNAME) dnl For backward compatibility. Some Makefiles may be using this. INSTOBJEXT=.mo AC_SUBST(INSTOBJEXT) dnl For backward compatibility. Some Makefiles may be using this. GENCAT=gencat AC_SUBST(GENCAT) dnl For backward compatibility. Some Makefiles may be using this. if test "$USE_INCLUDED_LIBINTL" = yes; then INTLOBJS="\$(GETTOBJS)" fi AC_SUBST(INTLOBJS) dnl Enable libtool support if the surrounding package wishes it. INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX) ]) dnl For backward compatibility. Some Makefiles may be using this. INTLLIBS="$LIBINTL" AC_SUBST(INTLLIBS) dnl Make all documented variables known to autoconf. AC_SUBST(LIBINTL) AC_SUBST(LTLIBINTL) AC_SUBST(POSUB) ]) dnl Checks for all prerequisites of the intl subdirectory, dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS, dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL. AC_DEFUN([AM_INTL_SUBDIR], [ AC_REQUIRE([AC_PROG_INSTALL])dnl AC_REQUIRE([AM_MKINSTALLDIRS])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_RANLIB])dnl AC_REQUIRE([AC_ISC_POSIX])dnl AC_REQUIRE([AC_HEADER_STDC])dnl AC_REQUIRE([AC_C_CONST])dnl AC_REQUIRE([bh_C_SIGNED])dnl AC_REQUIRE([AC_C_INLINE])dnl AC_REQUIRE([AC_TYPE_OFF_T])dnl AC_REQUIRE([AC_TYPE_SIZE_T])dnl AC_REQUIRE([jm_AC_TYPE_LONG_LONG])dnl AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl AC_REQUIRE([gt_TYPE_WCHAR_T])dnl AC_REQUIRE([gt_TYPE_WINT_T])dnl AC_REQUIRE([jm_AC_HEADER_INTTYPES_H]) AC_REQUIRE([jm_AC_HEADER_STDINT_H]) AC_REQUIRE([gt_TYPE_INTMAX_T]) AC_REQUIRE([gt_PRINTF_POSIX]) AC_REQUIRE([AC_FUNC_ALLOCA])dnl AC_REQUIRE([AC_FUNC_MMAP])dnl AC_REQUIRE([jm_GLIBC21])dnl AC_REQUIRE([gt_INTDIV0])dnl AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl AC_REQUIRE([gt_INTTYPES_PRI])dnl AC_REQUIRE([gl_XSIZE])dnl AC_CHECK_TYPE([ptrdiff_t], , [AC_DEFINE([ptrdiff_t], [long], [Define as the type of the result of subtracting two pointers, if the system doesn't define it.]) ]) AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \ stdlib.h string.h unistd.h sys/param.h]) AC_CHECK_FUNCS([asprintf fwprintf getcwd getegid geteuid getgid getuid \ mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \ strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \ __fsetlocking]) dnl Use the _snprintf function only if it is declared (because on NetBSD it dnl is defined as a weak alias of snprintf; we prefer to use the latter). gt_CHECK_DECL(_snprintf, [#include ]) gt_CHECK_DECL(_snwprintf, [#include ]) dnl Use the *_unlocked functions only if they are declared. dnl (because some of them were defined without being declared in Solaris dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built dnl on Solaris 2.5.1 to run on Solaris 2.6). dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13. gt_CHECK_DECL(feof_unlocked, [#include ]) gt_CHECK_DECL(fgets_unlocked, [#include ]) gt_CHECK_DECL(getc_unlocked, [#include ]) case $gt_cv_func_printf_posix in *yes) HAVE_POSIX_PRINTF=1 ;; *) HAVE_POSIX_PRINTF=0 ;; esac AC_SUBST([HAVE_POSIX_PRINTF]) if test "$ac_cv_func_asprintf" = yes; then HAVE_ASPRINTF=1 else HAVE_ASPRINTF=0 fi AC_SUBST([HAVE_ASPRINTF]) if test "$ac_cv_func_snprintf" = yes; then HAVE_SNPRINTF=1 else HAVE_SNPRINTF=0 fi AC_SUBST([HAVE_SNPRINTF]) if test "$ac_cv_func_wprintf" = yes; then HAVE_WPRINTF=1 else HAVE_WPRINTF=0 fi AC_SUBST([HAVE_WPRINTF]) AM_ICONV AM_LANGINFO_CODESET if test $ac_cv_header_locale_h = yes; then AM_LC_MESSAGES fi dnl intl/plural.c is generated from intl/plural.y. It requires bison, dnl because plural.y uses bison specific features. It requires at least dnl bison-1.26 because earlier versions generate a plural.c that doesn't dnl compile. dnl bison is only needed for the maintainer (who touches plural.y). But in dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put dnl the rule in general Makefile. Now, some people carelessly touch the dnl files or have a broken "make" program, hence the plural.c rule will dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not dnl present or too old. AC_CHECK_PROGS([INTLBISON], [bison]) if test -z "$INTLBISON"; then ac_verc_fail=yes else dnl Found it, now check the version. AC_MSG_CHECKING([version of bison]) changequote(<<,>>)dnl ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` case $ac_prog_version in '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;; 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*) changequote([,])dnl ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;; *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;; esac AC_MSG_RESULT([$ac_prog_version]) fi if test $ac_verc_fail = yes; then INTLBISON=: fi ]) dnl gt_CHECK_DECL(FUNC, INCLUDES) dnl Check whether a function is declared. AC_DEFUN([gt_CHECK_DECL], [ AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1, [AC_TRY_COMPILE([$2], [ #ifndef $1 char *p = (char *) $1; #endif ], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)]) if test $ac_cv_have_decl_$1 = yes; then gt_value=1 else gt_value=0 fi AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value], [Define to 1 if you have the declaration of `$1', and to 0 if you don't.]) ]) dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version]) AC_DEFUN([AM_GNU_GETTEXT_VERSION], []) libsylph-1.1.0/ac/README0000644000175000017500000000035710457702566011544 00000000000000If you encountered errors like: aclocal: configure.in: ??: macro `AM_SOMETHING' not found in library when executing autogen.sh, copy the corresponding m4 files in the missing/ directory into here (or install the development packages). libsylph-1.1.0/ac/Makefile.am0000644000175000017500000000013610504714702012677 00000000000000MACROS = \ aclocal-include.m4 \ check-type.m4 EXTRA_DIST = $(MACROS) \ missing/gettext.m4 libsylph-1.1.0/ac/aclocal-include.m40000644000175000017500000000047710457702566014150 00000000000000# aclocal-include.m4 # # This macro adds the name macrodir to the set of directories # that `aclocal' searches for macros. dnl SYLPHEED_ACLOCAL_INCLUDE(macrodir) AC_DEFUN([SYLPHEED_ACLOCAL_INCLUDE], [ test -n "$ACLOCAL_FLAGS" && ACLOCAL="$ACLOCAL $ACLOCAL_FLAGS" for k in $1 ; do ACLOCAL="$ACLOCAL -I $k" ; done ]) libsylph-1.1.0/ac/check-type.m40000644000175000017500000000132510457702566013156 00000000000000dnl SYLPHEED_CHECK_TYPE(TYPE, DEFAULT [, INCLUDES, COMMENT]) dnl dnl Like AC_CHECK_TYPE, but in addition to `sys/types.h', `stdlib.h' and dnl `stddef.h' checks files included by INCLUDES, which should be a dnl series of #include statements. If TYPE is not defined, define it dnl to DEFAULT. dnl AC_DEFUN([SYLPHEED_CHECK_TYPE], [AC_REQUIRE([AC_HEADER_STDC])dnl AC_MSG_CHECKING(for $1) AC_CACHE_VAL(sylpheed_cv_type_$1, [AC_TRY_COMPILE([ #include #if STDC_HEADERS #include #include #endif $3 ], [ #undef $1 int a = sizeof($1); ], sylpheed_cv_type_$1=yes, sylpheed_cv_type_$1=no)])dnl AC_MSG_RESULT($sylpheed_cv_type_$1) if test $sylpheed_cv_type_$1 = no; then AC_DEFINE($1, $2, $4) fi ]) libsylph-1.1.0/doc/0000777000175000017500000000000010760423125011111 500000000000000libsylph-1.1.0/doc/Makefile.in0000644000175000017500000001374710760423125013106 00000000000000# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am # Copyright (C) 1994, 1995-8, 1999, 2001 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. SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include DESTDIR = pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_alias = @build_alias@ build_triplet = @build@ host_alias = @host_alias@ host_triplet = @host@ target_alias = @target_alias@ target_triplet = @target@ AR = @AR@ AS = @AS@ BUILD_REVISION = @BUILD_REVISION@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CPP = @CPP@ CXX = @CXX@ CXXCPP = @CXXCPP@ DATADIRNAME = @DATADIRNAME@ DLLTOOL = @DLLTOOL@ ECHO = @ECHO@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ GCJ = @GCJ@ GCJFLAGS = @GCJFLAGS@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GLIB_MKENUMS = @GLIB_MKENUMS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GOBJECT_QUERY = @GOBJECT_QUERY@ HAVE_LIB = @HAVE_LIB@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LEX = @LEX@ LIB = @LIB@ LIBICONV = @LIBICONV@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIB = @LTLIB@ LTLIBICONV = @LTLIBICONV@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ MAJOR_VERSION = @MAJOR_VERSION@ MAKEINFO = @MAKEINFO@ MICRO_VERSION = @MICRO_VERSION@ MINOR_VERSION = @MINOR_VERSION@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT_OPTS = @MSGFMT_OPTS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ RC = @RC@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WINDRES = @WINDRES@ YACC = @YACC@ localedir = @localedir@ EXTRA_DIST = README.ja account.txt base64.txt codeconv.txt compose.txt customheader.txt displayheader.txt filter.txt folder.txt html.txt imap.txt mbox.txt md5.txt md5_hmac.txt mh.txt news.txt nntp.txt pop.txt prefs.txt prefs_account.txt prefs_common.txt procheader.txt procmime.txt procmsg.txt quoted-printable.txt recv.txt session.txt smtp.txt socket.txt ssl.txt stringtable.txt sylmain.txt tmpl.txt unmime.txt utils.txt uuencode.txt virtual.txt xml.txt mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h CONFIG_CLEAN_FILES = DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps doc/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status tags: TAGS TAGS: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = doc distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done info-am: info: info-am dvi-am: dvi: dvi-am check-am: all-am check: check-am installcheck-am: installcheck: installcheck-am install-exec-am: install-exec: install-exec-am install-data-am: install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am uninstall-am: uninstall: uninstall-am all-am: Makefile all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: mostlyclean-am: mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-generic clean-am -rm -f libtool distclean: distclean-am maintainer-clean-am: maintainer-clean-generic distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." maintainer-clean: maintainer-clean-am .PHONY: tags distdir info-am info dvi-am dvi check check-am \ installcheck-am installcheck install-exec-am install-exec \ install-data-am install-data install-am install uninstall-am uninstall \ all-redirect all-am all installdirs mostlyclean-generic \ distclean-generic clean-generic maintainer-clean-generic clean \ mostlyclean distclean maintainer-clean # 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: libsylph-1.1.0/doc/Makefile.am0000644000175000017500000000106610533003012013047 00000000000000EXTRA_DIST = README.ja \ account.txt \ base64.txt \ codeconv.txt \ compose.txt \ customheader.txt \ displayheader.txt \ filter.txt \ folder.txt \ html.txt \ imap.txt \ mbox.txt \ md5.txt \ md5_hmac.txt \ mh.txt \ news.txt \ nntp.txt \ pop.txt \ prefs.txt \ prefs_account.txt \ prefs_common.txt \ procheader.txt \ procmime.txt \ procmsg.txt \ quoted-printable.txt \ recv.txt \ session.txt \ smtp.txt \ socket.txt \ ssl.txt \ stringtable.txt \ sylmain.txt \ tmpl.txt \ unmime.txt \ utils.txt \ uuencode.txt \ virtual.txt \ xml.txt libsylph-1.1.0/doc/README.ja0000644000175000017500000000353610533003115012274 00000000000000LibSylph リファレンスマニュアル このディレクトリには LibSylph の各モジュール毎のリファレンスマニュアルが 含まれます。 目次 ==== account.txt - アカウント情報の管理 base64.txt - BASE64 のエンコードとデコード処理 customheader.txt - ユーザ定義ヘッダの設定の管理 displayheader.txt - 表示するヘッダの設定の管理 codeconv.txt - 文字コードの変換 compose.txt - メッセージの作成 filter.txt - フィルタリング処理 folder.txt - フォルダ構造の管理 html.txt - 簡易 HTML パーサ imap.txt - IMAP4 に対する Folder インタフェース mbox.txt - Unix MBOX の操作 md5.txt - MD5 の処理 md5_hmac.txt - MD5 を用いた HMAC によるハッシュ値の生成 mh.txt - MH フォルダに対する Folder インタフェース news.txt - NNTP に対する Folder インタフェース nntp.txt - NNTP セッションの処理 pop.txt - POP3 セッションの処理 prefs.txt - 設定情報の管理 prefs_account.txt - アカウントの設定の管理 prefs_common.txt - 全般の設定の管理 procheader.txt - メッセージヘッダの解析処理 procmime.txt - MIME の処理 procmsg.txt - メッセージの操作 quoted-printable.txt - quoted-printable のエンコードとデコード recv.txt - データの受信 session.txt - ネットワークセッションの管理 smtp.txt - SMTP セッションの処理 socket.txt - 抽象化されたソケット入出力 ssl.txt - SSL の初期化と終了処理 stringtable.txt - 文字列テーブル sylmain.txt - LibSylphの初期化と終了処理 unmime.txt - MIME ヘッダのデコード utils.txt - ユーティリティ関数群 uuencode.txt - UUENCODE のエンコードとデコード virtual.txt - 仮想フォルダの実装と Folder インタフェース xml.txt - 簡易 XML パーサ libsylph-1.1.0/doc/account.txt0000644000175000017500000001701410522311505013217 00000000000000account - アカウント情報の管理 ------------------------------------------------------------------------------ typedef gint (*AccountFunc) (PrefsAccount *ac_prefs, gpointer user_data); account_foreach で呼び出されるコールバック関数の型です。 ------------------------------------------------------------------------------ void account_read_config_all (void); すべてのアカウントの設定を読み込みます。 ------------------------------------------------------------------------------ void account_write_config_all (void); すべてのアカウントの設定を書き出します。 ------------------------------------------------------------------------------ PrefsAccount *account_get_current_account (void); 現在選択されているアカウントを返します。 戻り値: 現在選択されているアカウントを指す PrefsAccount 構造体へのポインタ アカウントが存在しなければ NULL ------------------------------------------------------------------------------ PrefsAccount *account_find_from_smtp_server (const gchar *address, const gchar *smtp_server); アドレスと SMTP サーバから最初に一致するアカウントを検索します。 address: メールアドレス smtp_server: SMTP サーバのホスト名 戻り値: アドレスと SMTP サーバが最初に一致したアカウント 見つからなければ NULL ------------------------------------------------------------------------------ PrefsAccount *account_find_from_address (const gchar *address); アドレスから最初に一致するアカウントを検索します。 address: メールアドレス 戻り値: アドレスが最初に一致したアカウント 見つからなければ NULL ------------------------------------------------------------------------------ PrefsAccount *account_find_from_id (gint id); アカウントIDが一致するアカウントを検索します。 id: アカウントID 戻り値: アカウントIDが一致したアカウント 見つからなければ NULL ------------------------------------------------------------------------------ PrefsAccount *account_find_from_item (FolderItem *item); フォルダのプロパティの設定で指定されているアカウントを検索します。 見つからなかった場合、メールボックス(Folder)にリンクしているアカウントが あればそれを返します。 item: FolderItem オブジェクト 戻り値: 発見したアカウント 見つからなければ NULL ------------------------------------------------------------------------------ PrefsAccount *account_find_from_item_property (FolderItem *item); フォルダのプロパティの設定で指定されているアカウントを検索します。 item: FolderItem オブジェクト 戻り値: 発見したアカウント 見つからなければ NULL ------------------------------------------------------------------------------ PrefsAccount *account_find_from_message_file (const gchar *file); RFC 2822 メッセージファイル file の From、X-Sylpheed-Account-Id、AID ヘッダから、アカウントを検索します。 file: RFC 2822 メッセージファイルのパス(ファイル名エンコーディング) 戻り値: 一致したアカウント 見つからなければ NULL ------------------------------------------------------------------------------ PrefsAccount *account_find_from_msginfo (MsgInfo *msginfo); メッセージ情報 msginfo が示すメッセージからアカウントを検索します。 見つからなかった場合は msginfo を内包するフォルダのプロパティに指定されている アカウントを検索します。 msginfo: MsgInfo 構造体へのポインタ 戻り値: 発見したアカウント 見つからなければ NULL ------------------------------------------------------------------------------ gboolean account_address_exist (const gchar *address); アドレス address がアカウントのリストのうちいずれかに含まれるかどうかを 調べます。見つかった場合は TRUE を返します。 account_find_from_address() よりも高速です。 address: メールアドレス 戻り値: アドレスがアカウントのいずれかに含まれれば TRUE 含まれなければ FALSE ------------------------------------------------------------------------------ void account_foreach (AccountFunc func, gpointer user_data); すべてのアカウントに対して関数 func を呼び出します。 func: AccountFunc 型の関数へのポインタ user_data: func の引数に渡すユーザデータ ------------------------------------------------------------------------------ GList *account_get_list (void); 内部で保持しているアカウントのリストを取得します。 リストは解放する必要はありません。 戻り値: 内部で保持している PrefsAccount 構造体へのポインタのリスト ------------------------------------------------------------------------------ void account_list_free (void); 内部で保持しているアカウントのリストを解放します。 確保されている PrefsAccount 構造体自体は解放されないので注意してください。 ------------------------------------------------------------------------------ void account_append (PrefsAccount *ac_prefs); 内部で保持しているアカウントのリストにアカウント ac_prefs を追加します。 ac_prefs: リストに追加するアカウント ------------------------------------------------------------------------------ void account_set_as_default (PrefsAccount *ac_prefs); アカウント ac_prefs にデフォルトフラグを設定します。 他のアカウントのデフォルトフラグはクリアされます。 ac_prefs: デフォルトフラグを設定するアカウント ------------------------------------------------------------------------------ PrefsAccount *account_get_default (void); デフォルトに設定されているアカウントを取得します。 戻り値: デフォルトフラグが設定されているアカウント ------------------------------------------------------------------------------ FolderItem *account_get_special_folder(PrefsAccount *ac_prefs, SpecialFolderItemType type); アカウント ac_prefs に結び付いている特別フォルダを取得します。 結び付いているものがなければデフォルトのフォルダを返します。 ac_prefs: 対象のアカウント type: 特別フォルダのタイプ 戻り値: アカウントに結び付いている特別フォルダ 見つからなければ NULL ------------------------------------------------------------------------------ void account_destroy (PrefsAccount *ac_prefs); アカウント ac_prefs を削除します。内部のアカウントリストからも削除されます。 ac_prefs にデフォルトフラグが立っていた場合は、リストの先頭のアカウントに 自動的にデフォルトフラグを立てます。 ac_prefs: 削除するアカウント ------------------------------------------------------------------------------ void account_updated (void); アカウント情報に何らかの変更があった場合に呼びます。 これを呼び出すと、高速検索用に内部で保持しているアドレスのハッシュテーブルが クリアされます。 libsylph-1.1.0/doc/base64.txt0000644000175000017500000000532310530535542012657 00000000000000base64 - BASE64 のエンコードとデコード処理 ------------------------------------------------------------------------------ Base64Decoder struct _Base64Decoder { gint buf_len; gchar buf[4]; }; Base64Decoder は BASE64 のデコードに対してオブジェクト指向的なインタフェースを 提供します。 ------------------------------------------------------------------------------ void base64_encode (gchar *out, const guchar *in, gint inlen); inlen バイトのバイナリデータ in を BASE64 でエンコードし、 out に文字列として出力します。 out の領域は少なくとも inlen * 4 / 3 + 4 以上である必要があります。 out: BASE64 文字列を格納する領域 in: 入力データ inlen: 入力データの長さ(バイト数) ------------------------------------------------------------------------------ gint base64_decode (guchar *out, const gchar *in, gint inlen); BASE64 データ in を inlen の文字数デコードし、 out に出力します。 inlen が負の数の場合、あるいは in の文字列長より大きい場合は '\0' に到達するまでデコードします。 out の領域は少なくとも in の文字列長、あるいは inlen 以上である必要が あります。 out: BASE64 文字列からデコードしたデータを格納する領域 in: BASE64 文字列 inlen: BASE64 文字列からデコードする文字数 ------------------------------------------------------------------------------ Base64Decoder *base64_decoder_new (void); Base64Decoder 構造体を作成します。 作成した Base64Decoder 構造体は base64_decoder_free() で解放する 必要があります。 戻り値: 新規に作成した Base64Decoder 構造体へのポインタ ------------------------------------------------------------------------------ void base64_decoder_free (Base64Decoder *decoder); base64_decoder_new() で作成した Base64Decoder 構造体を解放します。 decoder: Base64Decoder 構造体へのポインタ ------------------------------------------------------------------------------ gint base64_decoder_decode (Base64Decoder *decoder, const gchar *in, guchar *out); BASE64 文字列 in をデコードし、 out に出力します。 out の領域は少なくとも in の文字列長以上である必要があります。 in が4バイト境界以外の場所で切れていた場合、その余りの部分はバッファされ、 次の呼び出し時に in に渡された文字列と結合して使用されます。 decoder: Base64Decoder 構造体へのポインタ in: BASE64 文字列 out: BASE64 文字列からデコードしたデータを格納する領域 libsylph-1.1.0/doc/codeconv.txt0000644000175000017500000004104310530535571013374 00000000000000codeconv - 文字コードの変換 ------------------------------------------------------------------------------ CharSet typedef enum { } CharSet; 各種文字コードを表す enum 型です。 ------------------------------------------------------------------------------ typedef gchar *(*CodeConvFunc) (const gchar *inbuf, gint *error); inbuf に入力された文字列を変換し、新たな領域を確保して出力する関数の型です。 ------------------------------------------------------------------------------ CodeConverter struct _CodeConverter { CodeConvFunc code_conv_func; gchar *src_encoding; gchar *dest_encoding; }; 文字コード変換をオブジェクト指向的に行うためのインタフェースを提供します。 ------------------------------------------------------------------------------ CharSet conv_guess_ja_encoding (const gchar *str); 与えられた文字列から日本語の文字コードを判定します。判定結果は CharSet 型の enum で返されます。 str: 日本語の文字列 戻り値: 判定された文字コード C_US_ASCII : ASCII 文字列 C_ISO_2022_JP: ISO-2022-JP 文字列 C_EUC_JP : EUC-JP 文字列 C_SHIFT_JIS : Shift_JIS 文字列 C_UTF_8 : UTF-8 文字列 C_AUTO : 不明 ------------------------------------------------------------------------------ gchar *conv_utf8todisp (const gchar *inbuf, gint *error); 文字列 inbuf が正しい UTF-8 文字列かどうかを判定し、 UTF-8 の場合は 先頭に BOM が付加されている場合はそれを除去し、新たにメモリを確保して 返します。正しい UTF-8 でない場合はすべての 8-bit コードを代替文字に 置換して返します。 返った文字列は g_free() で解放する必要があります。 inbuf: 入力文字列 error: NULL でない場合、エラーでなければ 0、エラーの場合は0以外がセットされる 戻り値: 変換後の文字列 ------------------------------------------------------------------------------ gchar *conv_localetodisp (const gchar *inbuf, gint *error); ロケール文字列 inbuf を UTF-8 に変換して返します。 返った文字列は g_free() で解放する必要があります。 inbuf: 入力文字列 error: NULL でない場合、エラーでなければ 0、エラーの場合は0以外がセットされる 戻り値: 変換後の文字列 ------------------------------------------------------------------------------ CodeConverter *conv_code_converter_new (const gchar *src_encoding, const gchar *dest_encoding); 文字コード変換のための CodeCoverter オブジェクトを作成します。 返ったオブジェクトは conv_code_converter_destroy() で解放する必要があります。 src_encoding: 変換元エンコーディング dest_encoding: 変換先エンコーディング 戻り値: CodeConverter オブジェクト ------------------------------------------------------------------------------ void conv_code_converter_destroy (CodeConverter *conv); CodeCoverter オブジェクトを破棄します。 conv: CodeConverter オブジェクト ------------------------------------------------------------------------------ gchar *conv_convert (CodeConverter *conv, const gchar *inbuf); CodeCoverter オブジェクトを用いて文字コードを変換します。 可能な場合は自前の文字コード変換ルーチンを使用します。それ以外は iconv() を用いて変換します。 返った文字列は g_free() で解放する必要があります。 conv: CodeConverter オブジェクト inbuf: 入力文字列 戻り値: 変換後の文字列 ------------------------------------------------------------------------------ #define conv_codeset_strdup(inbuf, src_code, dest_code) conv_codeset_strdup_full() を簡略化したインタフェースです。 ------------------------------------------------------------------------------ gchar *conv_codeset_strdup_full (const gchar *inbuf, const gchar *src_encoding, const gchar *dest_encoding, gint *error); 文字列 inbuf を変換元エンコーディング src_encoding から変換先エンコーディング dest_encoding に変換して返します。可能な場合は自前の文字コード変換ルーチンを 使用します。それ以外は iconv() を用いて変換します。 返った文字列は g_free() で解放する必要があります。 inbuf: 入力文字列 src_encoding: 変換元エンコーディング dest_encoding: 変換先エンコーディング error: NULL でない場合、エラーでなければ 0、エラーの場合は0以外がセットされる 戻り値: 変換後の文字列 ------------------------------------------------------------------------------ CodeConvFunc conv_get_code_conv_func (const gchar *src_encoding, const gchar *dest_encoding); 変換元エンコーディング src_encoding と変換先エンコーディング dest_encoding から、自前の文字コード変換ルーチンの関数ポインタを返します。 利用できるものがなければ単に文字列を複製するだけの関数(conv_noconv)を返します。 src_encoding: 変換元エンコーディング dest_encoding: 変換先エンコーディング 戻り値: CodeConvFunc 型の文字列変換関数へのポインタ ------------------------------------------------------------------------------ gchar *conv_iconv_strdup (const gchar *inbuf, const gchar *src_encoding, const gchar *dest_encoding, gint *error); 文字列 inbuf を iconv() を用いて変換元エンコーディング src_encoding から 変換先エンコーディング dest_encoding に変換して返します。 返った文字列は g_free() で解放する必要があります。 inbuf: 入力文字列 src_encoding: 変換元エンコーディング dest_encoding: 変換先エンコーディング error: NULL でない場合、エラーでなければ 0、エラーの場合は0以外がセットされる 戻り値: 変換後の文字列 ------------------------------------------------------------------------------ gchar *conv_iconv_strdup_with_cd (const gchar *inbuf, iconv_t cd, gint *error); 文字列 inbuf を iconv_open() が返した変換ディスクリプタ cd を用いて、 iconv() で変換して返します。 返った文字列は g_free() で解放する必要があります。 inbuf: 入力文字列 cd: iconv_open() が返した変換ディスクリプタ error: NULL でない場合、エラーでなければ 0、エラーの場合は0以外がセットされる 戻り値: 変換後の文字列 ------------------------------------------------------------------------------ const gchar *conv_get_charset_str (CharSet charset); charset: CharSet 型の enum から文字コードを表す文字列定数を取得します。 charset: CharSet 型の enum 戻り値: charset に対応する文字列定数 ------------------------------------------------------------------------------ CharSet conv_get_charset_from_str (const gchar *charset); 文字コードを表す文字列 charset から CharSet 型の enum を取得します。 charset: 文字列 戻り値: charset に対応する CharSet 型の enum ------------------------------------------------------------------------------ CharSet conv_get_locale_charset (void); ロケールのエンコーディングを CharSet 型の enum で取得します。 戻り値: ロケールのエンコーディング(CharSet 型の enum) ------------------------------------------------------------------------------ const gchar *conv_get_locale_charset_str (void); ロケールのエンコーディングを文字列定数で取得します。 戻り値: ロケールのエンコーディングを表す文字列定数 ------------------------------------------------------------------------------ CharSet conv_get_internal_charset (void); LibSylph 内部で使用しているエンコーディングを CharSet 型の enum で取得します。 常に C_UTF_8 が返されます。 戻り値: 内部エンコーディング(CharSet 型の enum) ------------------------------------------------------------------------------ const gchar *conv_get_internal_charset_str (void); LibSylph 内部で使用しているエンコーディングを文字列定数で取得します。 常に CS_UTF_8 ("UTF-8") が返されます。 戻り値: 内部エンコーディングを表す文字列定数 ------------------------------------------------------------------------------ CharSet conv_get_outgoing_charset (void); 現在のロケールエンコーディングに対応するメール送信用のエンコーディングを 内部のテーブルから調べ、 CharSet 型の enum として返します。 例えば、ロケールエンコーディングが "ja_JP.EUC-JP"、"ja_JP.UTF-8" 等の場合は C_ISO_2022_JP が返ります。 戻り値: 送信用エンコーディング(CharSet 型の enum) ------------------------------------------------------------------------------ const gchar *conv_get_outgoing_charset_str (void); 現在のロケールエンコーディングに対応するメール送信用のエンコーディングを 内部のテーブルから調べ、文字列定数として返します。 戻り値: 送信用エンコーディングを表す文字列定数 ------------------------------------------------------------------------------ gboolean conv_is_multibyte_encoding (CharSet encoding); encoding がマルチバイトのエンコーディングである場合に、 TRUE を返します。 encoding: CharSet 型の enum 戻り値: encoding がマルチバイトのエンコーディングの場合 TRUE そうでない場合 FALSE ------------------------------------------------------------------------------ const gchar *conv_get_current_locale (void); 現在のロケールエンコーディングを文字列で返します。 文字列は LibSylph 内部で保持しているため、解放してはいけません。 戻り値: 現在のロケールエンコーディングを表す文字列 ------------------------------------------------------------------------------ gboolean conv_is_ja_locale (void); 現在のロケールエンコーディングが日本語ロケールであった場合、 TRUE を返します。 戻り値: 現在のロケールエンコーディングが日本語ロケールの場合 TRUE そうでない場合 FALSE ------------------------------------------------------------------------------ gchar *conv_unmime_header (const gchar *str, const gchar *default_encoding); MIME エンコードされた文字列 str をデコードし、 UTF-8 文字列にして返します。 default_encoding が指定されている場合、 str をそのエンコーディングとみなして UTF-8 に変換してから MIME デコードを行います。 また、 default_encoding が指定されておらず、 str に8ビットコードが含まれて いる場合は、日本語ロケールの場合は日本語文字コードから UTF-8 への自動変換、 それ以外のロケールの場合はロケールエンコーディングから UTF-8 への変換を 行います。その後 MIME デコードを行います。 デコードした文字列は新たなメモリ領域に確保され、返されます。 使用後は g_free() で解放する必要があります。 str: MIME エンコードされた文字列 default_encoding: str のデフォルトのエンコーディング(NULL 可) 戻り値: デコードした文字列 ------------------------------------------------------------------------------ void conv_encode_header (gchar *dest, gint len, const gchar *src, gint header_len, gboolean addr_field, const gchar *out_encoding); UTF-8 文字列 src を MIME エンコードして dest に格納します。 header_len には MIME エンコード文字列の前にあるヘッダの文字列長を指定します (1行が76文字を超えないようにするため)。 addr_field が TRUE の場合は、ヘッダをアドレスフィールドとみなして、 括弧などをエンコード文字列に含まない例外処理を行います。 out_encoding には出力する MIME エンコード済み文字列のエンコーディングを 指定します。 dest: MIME エンコード済み文字列を格納するバッファ len: dest のサイズ src: UTF-8 文字列 header_len: ヘッダ文字列長 addr_field: ヘッダがアドレスフィールドの場合 TRUE そうでない場合 FALSE out_encoding: 出力エンコーディング ------------------------------------------------------------------------------ gchar *conv_encode_filename (const gchar *src, const gchar *param_name, const gchar *out_encoding); ファイル名または任意のパラメータを RFC 2231 で規定されているファイル名 エンコーディングでエンコードします。 エンコードした文字列は新たなメモリ領域に確保され、返されます。 使用後は g_free() で解放する必要があります。 src: パラメータの値となる UTF-8 文字列 param_name: パラメータ名 out_encoding: 出力エンコーディング ------------------------------------------------------------------------------ gint conv_copy_file (const gchar *src, const gchar *dest, const gchar *src_encoding); ファイル src のエンコーディングを src_encoding から UTF-8 に変換し、 dest にコピーします。 src: 変換元ファイルのパス(ファイル名エンコーディング) dest: 変換先ファイルのパス(ファイル名エンコーディング) src_encoding: src のエンコーディング 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint conv_copy_dir (const gchar *src, const gchar *dest, const gchar *src_encoding); ディレクトリ src 直下のファイルをすべてディレクトリ dest 以下にコピーします。 その際ファイルのエンコーディングを src_encoding から UTF-8 に変換します。 dest が存在しない場合は自動的に作成します。 src: 変換元ディレクトリのパス(ファイル名エンコーディング) dest: 変換先ディレクトリのパス(ファイル名エンコーディング) src_encoding: src 以下のファイルのエンコーディング 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ CharSet conv_check_file_encoding (const gchar *file); ファイル file のエンコーディングを調べ、 CharSet 型の enum で返します。 判別できるのは UTF-8 またはロケールエンコーディングのみです。 file: ファイルのパス(ファイル名エンコーディング) 戻り値: file のエンコーディング(CharSet 型の enum) C_UTF_8: file は UTF-8 ロケールエンコーディングに対応する値: file はロケールエンコーディング C_AUTO: 不明 ------------------------------------------------------------------------------ gchar *conv_filename_from_utf8 (const gchar *utf8_file); UTF-8 文字列 utf8_file をファイル名エンコーディングに変換して返します。 変換でエラーが発生した場合は、警告メッセージを出して元の文字列をそのまま コピーして返します。エラーを適切に処理したい場合は GLib の g_filename_from_utf8() を使用してください。 変換した文字列は新たなメモリ領域に確保され、返されます。 使用後は g_free() で解放する必要があります。 utf8_file: UTF-8 文字列 戻り値: ファイル名エンコーディング文字列 ------------------------------------------------------------------------------ gchar *conv_filename_to_utf8 (const gchar *fs_file); ファイル名エンコーディング文字列 fs_file を UTF-8 に変換して返します。 変換でエラーが発生した場合は、警告メッセージを出して元の文字列をそのまま コピーして返します。エラーを適切に処理したい場合は GLib の g_filename_to_utf8() を使用してください。 変換した文字列は新たなメモリ領域に確保され、返されます。 使用後は g_free() で解放する必要があります。 fs_file: ファイル名エンコーディング文字列 戻り値: UTF-8 文字列 libsylph-1.1.0/doc/compose.txt0000644000175000017500000003556310533166504013252 00000000000000compose - メッセージの作成 ------------------------------------------------------------------------------ ComposeMode typedef enum { COMPOSE_REPLY = 1, COMPOSE_REPLY_TO_SENDER = 2, COMPOSE_REPLY_TO_ALL = 3, COMPOSE_REPLY_TO_LIST = 4, COMPOSE_FORWARD = 5, COMPOSE_FORWARD_AS_ATTACH = 6, COMPOSE_NEW = 7, COMPOSE_REDIRECT = 8, COMPOSE_REEDIT = 9, COMPOSE_WITH_QUOTE = 1 << 16, COMPOSE_MODE_MASK = 0xffff } ComposeMode; compose_info_new() でメッセージ作成時のモードを指定するための型です。 COMPOSE_REPLY: 通常の返信 COMPOSE_REPLY_TO_SENDER: 差出人に返信(Reply-Toを無視する) COMPOSE_REPLY_TO_ALL: 全員に返信 COMPOSE_REPLY_TO_LIST: 差出人よりメーリングリストを優先して返信 COMPOSE_FORWARD: 通常の転送 COMPOSE_FORWARD_AS_ATTACH: 添付として転送 COMPOSE_NEW: 新規作成 COMPOSE_REDIRECT: 手を加えずに転送(リダイレクト) COMPOSE_REEDIT: 再編集 COMPOSE_WITH_QUOTE: アプリケーションが引用を制御するためのもので、 LibSylphでは使用されません。 COMPOSE_MODE_MASK: LibSylphがメッセージ作成モードに使用するフラグのマスク ------------------------------------------------------------------------------ #define COMPOSE_MODE(mode) ((mode) & COMPOSE_MODE_MASK) LibSylphが使用するメッセージ作成モードのみを取り出します。 ------------------------------------------------------------------------------ #define COMPOSE_QUOTE_MODE(mode) ((mode) & COMPOSE_WITH_QUOTE) アプリケーションが使用する引用モードを取り出します。 ------------------------------------------------------------------------------ ComposeFlags typedef enum { COMPOSE_OUT_MIME_PROLOG = 1 << 0, COMPOSE_OUT_DISPOSITION_INLINE = 1 << 1, COMPOSE_PROTECT_TRAILING_SPACE = 1 << 2, COMPOSE_DRAFT_MODE = 1 << 3 } ComposeFlags; メッセージ生成時の動作を指定するためのフラグです (FIXME: 現在ComposeInfo::flagsで直接指定)。 COMPOSE_OUT_MIME_PROLOG: マルチパートMIMEメッセージの場合プロローグメッセージを 出力するかどうかを決定します。 COMPOSE_OUT_DISPOSITION_INLINE: マルチパートMIMEメッセージの場合本文のパートを Content-Disposition: inline として出力するか どうかを決定します。 COMPOSE_PROTECT_TRAILING_SPACE: 行末の空白を保護するために quoted-printable または base64 を使用するかどうかを決定します。 COMPOSE_DRAFT_MODE: 指定した場合は草稿モードになります。 ------------------------------------------------------------------------------ ComposeInfo struct _ComposeInfo { ComposeMode mode; ComposeFlags flags; /* reference of redirect or reedit */ MsgInfo *targetinfo; /* reference of reply */ MsgInfo *replyinfo; /* extra information */ gchar *ref_replyto; gchar *ref_cc; gchar *ref_bcc; gchar *ref_newsgroups; gchar *ref_followup_to; gchar *ref_ml_post; /* composing message information */ gchar *to; gchar *cc; gchar *bcc; gchar *replyto; gchar *newsgroups; gchar *followup_to; gchar *subject; gchar *inreplyto; gchar *references; gchar *msgid; gchar *boundary; gchar *header_encoding; gchar *body_encoding; EncodingType ctencoding; gchar *body_text; GList *attach_list; /* actually sent address list */ GSList *to_list; GSList *newsgroup_list; PrefsAccount *account; /* callback functions for pre/post-process */ ComposePreFunc preprocess_func; ComposePostFunc postprocess_func; /* user data */ gpointer data; }; 作成するメッセージを管理するための構造体です。 compose_info_new() で作成し、 適切な設定を行った後 compose_write_to_file() を呼び出してメッセージを出力 します。 compose_info_free() で解放します。 ------------------------------------------------------------------------------ ComposeAttachInfo struct _ComposeAttachInfo { gchar *file; gchar *content_type; EncodingType encoding; gchar *name; gsize size; }; 添付ファイルを表す構造体です。 compose_attach_info_new() で作成し、 compose_attach_info_free() で解放します。 ------------------------------------------------------------------------------ gint (*ComposePreFunc) (ComposeInfo *compose, gpointer user_data); compose_write_to_file() から呼ばれるコールバック関数の型です。 compose: ComposeInfo構造体へのポインタ user_data: ComposeInfoにセットされているユーザデータ 戻り値: -1 を返せば compose_write_to_file() が処理を中断してエラーで返ります。 ------------------------------------------------------------------------------ gint (*ComposePostFunc) (ComposeInfo *compose, const gchar *file, gpointer user_data); compose_write_to_file() から呼ばれるコールバック関数の型です。 compose: ComposeInfo構造体へのポインタ file: 出力されたメッセージファイルのパス(改行コード変換前) user_data: ComposeInfoにセットされているユーザデータ 戻り値: -1 を返せば compose_write_to_file() が処理を中断してエラーで返ります。 ------------------------------------------------------------------------------ ComposeInfo *compose_info_new (PrefsAccount *account, ComposeMode mode); メッセージを作成するためのComposeInfo構造体を生成します。 生成したComposeInfo構造体は compose_info_free() で解放する必要があります。 account: メッセージ作成時に使用するアカウント mode: メッセージ作成モード(新規、返信など) 戻り値: 新しいComposeInfo構造体へのポインタ ------------------------------------------------------------------------------ void compose_info_free (ComposeInfo *compose); ComposeInfo構造体を破棄します。 compose: ComposeInfo構造体へのポインタ ------------------------------------------------------------------------------ ComposeAttachInfo *compose_attach_info_new (const gchar *file, const gchar *content_type, EncodingType encoding, const gchar *name, gsize size); 添付ファイルを表すComposeAttachInfo構造体を生成します。 ComposeAttachInfo構造体はcompose_attach_info_free()で解放する必要があります。 file: 添付ファイルのフルパス content_type: ファイルのContent-Type encoding: 添付ファイルのパートのContent-Transfer-Encoding name: ファイル名(実際のファイルとは異なっていてもよい) size: ファイルのサイズ 戻り値: 新しいComposeAttachInfo構造体へのポインタ ------------------------------------------------------------------------------ void compose_attach_info_free (ComposeAttachInfo *ainfo); ComposeAttachInfo構造体を破棄します。 ainfo: ComposeAttachInfo構造体へのポインタ ------------------------------------------------------------------------------ gint compose_parse_header (ComposeInfo *compose, MsgInfo *msginfo); メッセージ作成時に参照するメッセージを設定します。 メッセージの内容をスキャンし、ComposeInfo構造体に情報をセットします。 compose_info_new() で指定した mode によって動作は変わります。 compose: ComposeInfo構造体へのポインタ msginfo: 参照するメッセージ情報 戻り値: メッセージの読み込みに成功した場合は0、失敗した場合は-1を返します。 ------------------------------------------------------------------------------ gint compose_set_headers (ComposeInfo *compose, const gchar *to, const gchar *cc, const gchar *bcc, const gchar *replyto, const gchar *subject); ComposeInfoに作成するメッセージのヘッダ情報を指定します。 文字コードは UTF-8 である必要があります。 compose: ComposeInfo構造体へのポインタ to: To(宛先) cc: Cc(カーボンコピー) bcc: Bcc(ブラインドカーボンコピー) replyto: Reply-To(返信先) subject: Subject(件名) 戻り値: 成功した場合は0、失敗した場合は-1を返します。 ------------------------------------------------------------------------------ gint compose_set_news_headers (ComposeInfo *compose, const gchar *newsgroups, const gchar *followup_to); ネットニュースのためのヘッダ情報を指定します。 文字コードは UTF-8 である必要があります。 compose: ComposeInfo構造体へのポインタ newsgroups: Newsgroups(投稿先のニュースグループ名) followup_to: Followup-To(フォロー先) 戻り値: 成功した場合は0、失敗した場合は-1を返します。 ------------------------------------------------------------------------------ gint compose_set_body (ComposeInfo *compose, const gchar *body); ComposeInfoに作成するメッセージの本文を指定します。 文字コードは UTF-8 である必要があります。 compose: ComposeInfo構造体へのポインタ body: 本文(UTF-8) 戻り値: 成功した場合は0、失敗した場合は-1を返します。 ------------------------------------------------------------------------------ gint compose_set_encoding (ComposeInfo *compose, const gchar *header_encoding, const gchar *body_encoding); ヘッダに使用する文字エンコーディングと本文に使用する文字エンコーディングを 指定します。 compose: ComposeInfo構造体へのポインタ header_encoding: ヘッダに使用する文字エンコーディング body_encoding: 本文に使用する文字エンコーディング 戻り値: 成功した場合は0、失敗した場合は-1を返します。 ------------------------------------------------------------------------------ gint compose_set_attachments (ComposeInfo *compose, GList *attach_list); 添付ファイルのリストをComposeAttachInfo構造体のリストで指定します。 compose: ComposeInfo構造体へのポインタ attach_list: ComposeAttachInfo構造体へのポインタのリスト 戻り値: 成功した場合は0、失敗した場合は-1を返します。 ------------------------------------------------------------------------------ gint compose_write_to_file (ComposeInfo *compose, const gchar *out_file, GError *error); ComposeInfo構造体に指定した情報からメッセージを生成し、 指定したファイルに書き出します。 compose: ComposeInfo構造体へのポインタ out_file: 出力するファイルのフルパス error: NULLでない場合はエラーの詳細を返します(今は無視されます)。 戻り値: 成功した場合は0、失敗した場合は-1を返します。 ------------------------------------------------------------------------------ gint compose_redirect_write_to_file (ComposeInfo *compose, const gchar *out_file, GError *error); ComposeInfo::targetinfo で指定したメッセージをリダイレクト(手を加えずに転送) します。 リダイレクト専用のヘッダが作成されます。 compose_set_body() による本文の指定は無視されます。 それ以外は compose_write_to_file() と同様です。 compose: ComposeInfo構造体へのポインタ out_file: 出力するファイルのフルパス error: NULLでない場合はエラーの詳細を返します(今は無視されます)。 戻り値: 成功した場合は0、失敗した場合は-1を返します。 ------------------------------------------------------------------------------ gint compose_remove_reedit_target (ComposeInfo *compose); 再編集に使用したメッセージを削除します。 具体的には Compose::targetinfo で示されるメッセージを削除します。 compose: ComposeInfo構造体へのポインタ 戻り値: 成功した場合は0、失敗した場合は-1を返します。 ------------------------------------------------------------------------------ gint compose_queue (ComposeInfo *compose, const gchar *file); compose_write_to_file() で作成したメッセージファイルを送信待ちフォルダに 入れます。 ComposeInfo の内容と file の内容は対応している必要があります。 送信待ちフォルダに入れたメッセージは send_message_queue_all() などで 送信できます(注: 現在未実装)。 compose: ComposeInfo構造体へのポインタ file: compose_write_to_file() で作成したメッセージファイルのフルパス 戻り値: 成功した場合は0、失敗した場合は-1を返します。 ------------------------------------------------------------------------------ void compose_generate_msgid (ComposeInfo *compose, gchar *buf, gint len); ComposeInfo の内容から Message-Id 文字列を生成します。 Message-Idはメッセージファイルの作成時に自動的に生成されるので、 通常は使用する必要はありません。 compose: ComposeInfo構造体へのポインタ buf: 文字列のバッファ len: バッファ buf のサイズ ------------------------------------------------------------------------------ void compose_set_preprocess_func (ComposeInfo *compose, ComposePreFunc func); メッセージ作成時に前処理として呼ばれるコールバック関数を指定します。 func は ComposeInfo 構造体へのポインタとユーザデータが渡されて呼び出されます。 func は送信エンコーディングが決定され、本文のエンコーディングを変換した後の タイミングで呼ばれるため、ここで送信エンコーディングや本文の内容のチェックと その書き換えを行うことができます。 func が -1 を返せば処理を中断することができます(compose_write_to_file() は エラーで返ります)。 compose: ComposeInfo構造体へのポインタ func: ComposePreFunc型の関数ポインタ ------------------------------------------------------------------------------ void compose_set_postprocess_func (ComposeInfo *compose, ComposePostFunc func); メッセージ作成時に後処理として呼ばれるコールバック関数を指定します。 func は ComposeInfo 構造体へのポインタと、出力されたファイルのパス、そして ユーザデータが渡されて呼び出されます。 func はすべての出力処理が終わり、改行コードをLFに変換する直前で呼び出される ため、ここで出力されたファイルの書き換えなどを行うことができます。 func が -1 を返せば処理を中断することができます(compose_write_to_file() は エラーで返ります)。 compose: ComposeInfo構造体へのポインタ func: ComposePostFunc型の関数ポインタ libsylph-1.1.0/doc/customheader.txt0000644000175000017500000000516510532472203014256 00000000000000customheader - ユーザ定義ヘッダの設定の管理 ------------------------------------------------------------------------------ CustomHeader struct _CustomHeader { gint account_id; gchar *name; gchar *value; }; ユーザ定義ヘッダを表す構造体です。 account_id: アカウント ID name: ヘッダ名 value: ヘッダの値 ------------------------------------------------------------------------------ void custom_header_read_config (PrefsAccount *ac); アカウント ac に対応するユーザ定義ヘッダを設定ファイルから読み込み、 内部リストに格納します。 ac: PrefsAccount 構造体へのポインタ ------------------------------------------------------------------------------ void custom_header_write_config (PrefsAccount *ac); ユーザ定義ヘッダの設定ファイルのうち、アカウント ac に対応するユーザ定義 ヘッダの設定を更新します。 ac: PrefsAccount 構造体へのポインタ ------------------------------------------------------------------------------ gchar *custom_header_get_str (CustomHeader *ch); CustomHeader 構造体 ch からユーザ定義ヘッダの設定ファイルの形式で文字列を 出力します。 返った文字列は g_free() で解放する必要があります。 ch: CustomHeader 構造体へのポインタ 戻り値: ユーザ定義ヘッダ設定ファイル形式の文字列 ------------------------------------------------------------------------------ CustomHeader *custom_header_read_str (const gchar *buf); ユーザ定義ヘッダの設定ファイルの形式の文字列を読み込み、 CustomHeader 構造体を出力します。 返った値は custom_header_free() で解放する必要があります。 buf: ユーザ定義ヘッダ設定ファイル形式の文字列 戻り値: 新規 CustomHeader 構造体へのポインタ ------------------------------------------------------------------------------ CustomHeader *custom_header_find (GSList *header_list, const gchar *header); CustomHeader のリスト header_list からヘッダ名が header に最初に一致する ものを検索して返します。大小文字は区別しません。 header_list: CustomHeader 構造体へのポインタのリスト header: ヘッダ名 戻り値: header_list 内の見つかった CustomHeader 構造体へのポインタ 見つからなかった場合は NULL ------------------------------------------------------------------------------ void custom_header_free (CustomHeader *ch); CustomHeader 構造体を解放します。 ch: CustomHeader 構造体へのポインタ libsylph-1.1.0/doc/displayheader.txt0000644000175000017500000000300010532472302014373 00000000000000displayheader - 表示するヘッダの設定の管理 ------------------------------------------------------------------------------ DisplayHeaderProp struct _DisplayHeaderProp { gchar *name; gboolean hidden; }; 表示する(あるいは隠す)ヘッダ名を表します。 name: ヘッダ名 hidden: 隠す場合 TRUE 表示する場合 FALSE ------------------------------------------------------------------------------ gchar *display_header_prop_get_str (DisplayHeaderProp *dp); DisplayHeaderProp 構造体 dp を表示ヘッダの設定ファイルの形式の文字列に 変換して出力します。隠すヘッダの場合はヘッダ名の前に "-" が付きます。 返った文字列は g_free() で解放する必要があります。 dp: DisplayHeaderProp 構造体へのポインタ 戻り値: 表示ヘッダ設定ファイル形式の文字列 ------------------------------------------------------------------------------ DisplayHeaderProp *display_header_prop_read_str (gchar *buf); 表示ヘッダの設定ファイルの形式の文字列を DisplayHeaderProp 構造体に変換して 出力します。 返った値は display_header_prop_free() で解放する必要があります。 buf: 表示ヘッダ設定ファイル形式の文字列 ------------------------------------------------------------------------------ void display_header_prop_free (DisplayHeaderProp *dp); DisplayHeaderProp 構造体を解放します。 dp: DisplayHeaderProp 構造体へのポインタ libsylph-1.1.0/doc/filter.txt0000644000175000017500000003456110530535611013063 00000000000000filter - フィルタリング処理 ------------------------------------------------------------------------------ FilterTiming typedef enum { FLT_TIMING_ANY, FLT_TIMING_ON_RECEIVE, FLT_TIMING_MANUAL } FilterTiming; ------------------------------------------------------------------------------ FilterCondType typedef enum { FLT_COND_HEADER, FLT_COND_ANY_HEADER, FLT_COND_TO_OR_CC, FLT_COND_BODY, FLT_COND_CMD_TEST, FLT_COND_SIZE_GREATER, FLT_COND_AGE_GREATER, FLT_COND_UNREAD, FLT_COND_MARK, FLT_COND_COLOR_LABEL, FLT_COND_MIME, FLT_COND_ACCOUNT } FilterCondType; ------------------------------------------------------------------------------ typedef enum { FLT_CONTAIN, FLT_EQUAL, FLT_REGEX } FilterMatchType; ------------------------------------------------------------------------------ typedef enum { FLT_NOT_MATCH = 1 << 0, FLT_CASE_SENS = 1 << 1 } FilterMatchFlag; ------------------------------------------------------------------------------ typedef enum { FLT_OR, FLT_AND } FilterBoolOp; ------------------------------------------------------------------------------ typedef enum { FLT_ACTION_MOVE, FLT_ACTION_COPY, FLT_ACTION_NOT_RECEIVE, FLT_ACTION_DELETE, FLT_ACTION_EXEC, FLT_ACTION_EXEC_ASYNC, FLT_ACTION_MARK, FLT_ACTION_COLOR_LABEL, FLT_ACTION_MARK_READ, FLT_ACTION_FORWARD, FLT_ACTION_FORWARD_AS_ATTACHMENT, FLT_ACTION_REDIRECT, FLT_ACTION_STOP_EVAL, FLT_ACTION_NONE } FilterActionType; ------------------------------------------------------------------------------ typedef enum { FLT_BY_NONE, FLT_BY_AUTO, FLT_BY_FROM, FLT_BY_TO, FLT_BY_SUBJECT } FilterCreateType; ------------------------------------------------------------------------------ #define FLT_IS_NOT_MATCH(flag) FilterMatchFlag 型の値 flag に FLT_NOT_MATCH フラグが立っていれば TRUE を 返します。 ------------------------------------------------------------------------------ #define FLT_IS_CASE_SENS(flag) FilterMatchFlag 型の値 flag に FLT_CASE_SENS フラグが立っていれば TRUE を 返します。 ------------------------------------------------------------------------------ struct _FilterCond { FilterCondType type; gchar *header_name; gchar *str_value; gint int_value; FilterMatchType match_type; FilterMatchFlag match_flag; StrFindFunc match_func; }; フィルタの条件を表す構造体です。 ------------------------------------------------------------------------------ struct _FilterAction { FilterActionType type; gchar *str_value; gint int_value; }; フィルタの条件にマッチしたときに実行するアクションを表す構造体です。 ------------------------------------------------------------------------------ struct _FilterRule { gchar *name; FilterBoolOp bool_op; GSList *cond_list; GSList *action_list; FilterTiming timing; gboolean enabled; gchar *target_folder; gboolean recursive; }; フィルタルールを表す構造体です。一つのフィルタルールには任意の個数の 条件とアクションを設定できます。 ------------------------------------------------------------------------------ struct _FilterInfo { PrefsAccount *account; MsgFlags flags; gboolean actions[FLT_ACTION_NONE]; GSList *dest_list; FolderItem *move_dest; gboolean drop_done; }; フィルタルールを適用した際の情報を格納するための構造体です。 ------------------------------------------------------------------------------ gint filter_apply (GSList *fltlist, const gchar *file, FilterInfo *fltinfo); メッセージファイル file にフィルタルール FilterRule のリスト fltlist を 適用します。 fltinfo にはフィルタルールを適用した場合の情報が格納されます。 fltlist: FilterRule 構造体へのポインタのリスト file: メッセージファイルのパス fltinfo: FilterInfo 構造体へのポインタ 戻り値: 成功した場合は 0 エラーの場合は -1 ------------------------------------------------------------------------------ gint filter_apply_msginfo (GSList *fltlist, MsgInfo *msginfo, FilterInfo *fltinfo); メッセージ msginfo にフィルタルール FilterRule のリスト fltlist を 適用します。 fltinfo にはフィルタルールを適用した場合の情報が格納されます。 fltlist: FilterRule 構造体へのポインタのリスト msginfo: MsgInfo 構造体へのポインタ fltinfo: FilterInfo 構造体へのポインタ 戻り値: 成功した場合は 0 エラーの場合は -1 ------------------------------------------------------------------------------ gint filter_action_exec (FilterRule *rule, MsgInfo *msginfo, const gchar *file, FilterInfo *fltinfo); メッセージ msginfo に対してフィルタルール rule のアクションを実行します。 msginfo に対応するメッセージファイル file も同時に指定する必要があります。 rule: 適用するアクションを格納した FilterRule 構造体へのポインタ msginfo: MsgInfo 構造体へのポインタ file: msginfo に対応するメッセージファイルのパス fltinfo: FilterInfo 構造体へのポインタ 戻り値: 成功した場合は 0 エラーの場合は -1 ------------------------------------------------------------------------------ gboolean filter_match_rule (FilterRule *rule, MsgInfo *msginfo, GSList *hlist, FilterInfo *fltinfo); フィルタルール rule がメッセージ msginfo にマッチするかどうかを調べ、 マッチした場合は TRUE を返します。 msginfo に対応するヘッダリスト hlist は procheader_get_header_list_from_file() 等であらかじめ作成しておいて渡す必要があります。 rule: FilterRule 構造体へのポインタ msginfo: MsgInfo 構造体へのポインタ hlist: msginfo に対応する Header 構造体へのポインタのリスト fltinfo: FilterInfo 構造体へのポインタ 戻り値: rule が msginfo にマッチした場合は TRUE マッチしなければ FALSE ------------------------------------------------------------------------------ gboolean filter_rule_requires_full_headers (FilterRule *rule); フィルタルール rule の条件の判定に完全なヘッダ情報が必要かどうかを返します。 これが FALSE の場合は、 filter_match_rule() に渡すヘッダリストに procheader_get_header_list_from_msginfo() を使用し、処理を軽減できます。 rule: FilterRule 構造体へのポインタ 戻り値: 条件の判定に完全なヘッダ情報が必要な場合は TRUE そうでない場合は FALSE ------------------------------------------------------------------------------ GSList *filter_xml_node_to_filter_list (GNode *node); xml_parse_file() でフィルタルールを記述した XML ファイルを読み込んだ結果 から、 FilterRule のリストを生成します。 返ったリストは filter_rule_list_free() で解放する必要があります。 node: xml_parse_file() が生成した XML ツリー 戻り値: FilterRule 構造体へのポインタのリスト ------------------------------------------------------------------------------ GSList *filter_read_file (const gchar *file); フィルタルールを記述した XML ファイル file を読み込み、 FilterRule の リストを生成します。 file: フィルタルールを記述した XML ファイルへのパス 戻り値: FilterRule 構造体へのポインタのリスト ------------------------------------------------------------------------------ void filter_read_config (void); 設定ファイルのディレクトリ以下の XML ファイルを読み込み、フィルタルールの リストを PrefsCommon::fltlist に格納します。 ------------------------------------------------------------------------------ void filter_write_file (GSList *list, const gchar *file); フィルタルールのリスト list の内容を file に XML ファイルとして書き出します。 list: FilterRule 構造体へのポインタのリスト file: 出力するファイルのパス ------------------------------------------------------------------------------ void filter_write_config (void); PrefsCommon::fltlist の内容を設定ファイルのディレクトリ以下に XML ファイル として書き出します。 ------------------------------------------------------------------------------ /* gchar *filter_get_str (FilterRule *rule); */ ------------------------------------------------------------------------------ /* FilterRule *filter_read_str (const gchar *str); */ ------------------------------------------------------------------------------ FilterRule *filter_rule_new (const gchar *name, FilterBoolOp bool_op, GSList *cond_list, GSList *action_list); FilterRule 構造体を作成します。 返った値は filter_rule_free() で解放する必要があります。 name: フィルタルール名 bool_op: AND 条件の場合は FLT_AND OR 条件の場合は FLT_OR cond_list: FilterCond 構造体へのポインタのリスト action_list: FilterAction 構造体へのポインタのリスト 戻り値: FilterRule 構造体へのポインタ ------------------------------------------------------------------------------ FilterCond *filter_cond_new (FilterCondType type, FilterMatchType match_type, FilterMatchFlag match_flag, const gchar *header, const gchar *value); FilterCond 構造体を作成します。 返った値は GSList 型のリストに入れた後、 filter_cond_list_free() で 解放する必要があります。 type: 条件のタイプ match_type: 文字列のマッチタイプ match_flag: マッチの反転と大小文字の区別の指定 header: ヘッダ文字列(type が FLT_COND_HEADER の場合有効) value: 条件の値となる文字列 ------------------------------------------------------------------------------ FilterAction *filter_action_new (FilterActionType type, const gchar *str); FilterAction 構造体を作成します。 返った値は GSList 型のリストに入れた後、 filter_action_list_free() で 解放する必要があります。 type: アクションのタイプ str: アクションの値となる文字列 ------------------------------------------------------------------------------ FilterInfo *filter_info_new (void); FilterInfo 構造体を作成します。 返った値は filter_info_free() で解放する必要があります。 戻り値: FilterInfo 構造体へのポインタ ------------------------------------------------------------------------------ void filter_rule_rename_dest_path (FilterRule *rule, const gchar *old_path, const gchar *new_path); フィルタルール rule に含まれるアクションの移動先フォルダのパスが old_path に一致する場合、または old_path が親フォルダに該当する場合は それを new_path に書き換えます。 rule: FilterRule 構造体へのポインタ old_path: 置換前のパス new_path: 置換後のパス ------------------------------------------------------------------------------ void filter_rule_delete_action_by_dest_path (FilterRule *rule, const gchar *path); フィルタルール rule に含まれるアクションの移動先フォルダのパスが path に一致する場合、または path が親フォルダに該当する場合は そのアクションを削除します。 rule: FilterRule 構造体へのポインタ path: 削除対象となるフォルダのパス ------------------------------------------------------------------------------ void filter_list_rename_path (const gchar *old_path, const gchar *new_path); PrefsCommon::fltlist のすべてのルールのアクションの old_path を new_path に置換します。 old_path: 置換前のパス new_path: 置換後のパス ------------------------------------------------------------------------------ void filter_list_delete_path (const gchar *path); PrefsCommon::fltlist のすべてのルールのアクションの移動先フォルダが path に該当するアクションを削除します。アクションが空になった場合は そのフィルタルールも削除します。 ------------------------------------------------------------------------------ void filter_rule_match_type_str_to_enum (const gchar *type_str, FilterMatchType *type, FilterMatchFlag *flag); マッチタイプの文字列を enum 型に変換します。 type_str: マッチタイプの文字列 type: FilterMatchType 型の enum 変数へのポインタ flag: FilterMatchFlag 型の enum 変数へのポインタ ------------------------------------------------------------------------------ void filter_get_keyword_from_msg (MsgInfo *msginfo, gchar **header, gchar **key, FilterCreateType type); メッセージ msginfo からフィルタルールを自動生成するためのヘッダ名と キー文字列を取得します。 type で対象ヘッダを指定できます。 msginfo: MsgInfo 構造体へのポインタ header: ヘッダ名を返すためのポインタ key: キー文字列を返すためのポインタ type: FilterCreateType 型の値 ------------------------------------------------------------------------------ void filter_rule_list_free (GSList *fltlist); FilterRule のリストを解放します。 fltlist: FilterRule 構造体へのポインタのリスト ------------------------------------------------------------------------------ void filter_rule_free (FilterRule *rule); フィルタルール rule を解放します。 rule: FilterRule 構造体へのポインタ ------------------------------------------------------------------------------ void filter_cond_list_free (GSList *cond_list); FilterCond のリストを解放します。 cond_list: FilterCond 構造体へのポインタのリスト ------------------------------------------------------------------------------ void filter_action_list_free (GSList *action_list); FilterAction のリストを解放します。 action_list: FilterAction 構造体へのポインタのリスト ------------------------------------------------------------------------------ void filter_info_free (FilterInfo *info); FilterInfo 構造体を解放します。 info: FilterInfo 構造体へのポインタ libsylph-1.1.0/doc/folder.txt0000644000175000017500000010531010530263627013045 00000000000000folder - フォルダ構造の管理 ------------------------------------------------------------------------------ #define FOLDER(obj) FolderクラスのオブジェクトをFolder型にキャストします。 ------------------------------------------------------------------------------ #define FOLDER_CLASS(obj) Folderクラスのオブジェクトから FolderClass を取り出します。 ------------------------------------------------------------------------------ #define FOLDER_TYPE(obj) Folderオブジェクトから FolderType を得ます。 ------------------------------------------------------------------------------ #define LOCAL_FOLDER(obj) Folderオブジェクトを LocalFolder オブジェクトにキャストします。 ------------------------------------------------------------------------------ #define REMOTE_FOLDER(obj) Folderオブジェクトを RemoteFolder オブジェクトにキャストします。 ------------------------------------------------------------------------------ #define FOLDER_IS_LOCAL(obj) Folderオブジェクトが LocalFolder であるかどうかを gboolean 値で返します。 ------------------------------------------------------------------------------ #define FOLDER_IS_REMOTE(obj) Folderオブジェクトが RemoteFolder であるかどうかを gboolean 値で返します。 ------------------------------------------------------------------------------ #define FOLDER_ITEM(obj) 任意のポインタを FolderItem にキャストします。 ------------------------------------------------------------------------------ #define FOLDER_ITEM_CAN_ADD(obj) FolderItem オブジェクトにメッセージを追加(または削除)可能かどうかを gboolean 値で返します。 ------------------------------------------------------------------------------ FolderType typedef enum { F_MH, F_MBOX, F_MAILDIR, F_IMAP, F_NEWS, F_UNKNOWN } FolderType; Folder のタイプを表すenum型です。 F_MH: MH形式 F_MBOX: Unix MBOX形式(未実装) F_MAILDIR: Maildir形式(未実装) F_IMAP: IMAP4フォルダ F_NEWS: News (NNTP) フォルダ F_UNKNOWN: 不明 ------------------------------------------------------------------------------ SpecialFolderItemType typedef enum { F_NORMAL, F_INBOX, F_OUTBOX, F_DRAFT, F_QUEUE, F_TRASH, F_JUNK, F_VIRTUAL } SpecialFolderItemType; FolderItem のタイプを表すenum型です。 F_NORMAL: 通常のフォルダ F_INBOX: 受信箱 F_OUTBOX: 送信控え F_DRAFT: 草稿 F_QUEUE: 送信待ち F_TRASH: ごみ箱 F_JUNK: 迷惑メール F_VIRTUAL: 仮想フォルダ(検索フォルダ) ------------------------------------------------------------------------------ FolderSortKey typedef enum { SORT_BY_NONE, SORT_BY_NUMBER, SORT_BY_SIZE, SORT_BY_DATE, SORT_BY_TDATE, SORT_BY_FROM, SORT_BY_SUBJECT, SORT_BY_SCORE, SORT_BY_LABEL, SORT_BY_MARK, SORT_BY_UNREAD, SORT_BY_MIME, SORT_BY_TO } FolderSortKey; フォルダのメッセージ一覧をソートするためのキーを表します。 ------------------------------------------------------------------------------ FolderSortType typedef enum { SORT_ASCENDING, SORT_DESCENDING } FolderSortType; フォルダのメッセージ一覧をソートする場合昇順あるいは降順でソートするかを 表します。 ------------------------------------------------------------------------------ typedef void (*FolderUIFunc) (Folder *folder, FolderItem *item, gpointer data); typedef void (*FolderDestroyNotify) (Folder *folder, FolderItem *item, gpointer data); ------------------------------------------------------------------------------ Folder struct _Folder { FolderClass *klass; gchar *name; PrefsAccount *account; FolderItem *inbox; FolderItem *outbox; FolderItem *draft; FolderItem *queue; FolderItem *trash; FolderUIFunc ui_func; gpointer ui_func_data; GNode *node; gpointer data; }; Folder オブジェクトはメールボックスを表し、 FolderItem のツリーが格納 されます。実際には Folder 構造体は抽象クラスの一種として扱われ、 これを継承して MHFolder や IMAPFolder 等のオブジェクトとして実装されます。 ------------------------------------------------------------------------------ FolderClass struct _FolderClass { FolderType type; /* virtual functions */ Folder * (*folder_new) (const gchar *name, const gchar *path); void (*destroy) (Folder *folder); gint (*scan_tree) (Folder *folder); gint (*create_tree) (Folder *folder); GSList * (*get_msg_list) (Folder *folder, FolderItem *item, gboolean use_cache); /* return value is filename encoding */ gchar * (*fetch_msg) (Folder *folder, FolderItem *item, gint num); MsgInfo * (*get_msginfo) (Folder *folder, FolderItem *item, gint num); gint (*add_msg) (Folder *folder, FolderItem *dest, const gchar *file, MsgFlags *flags, gboolean remove_source); gint (*add_msgs) (Folder *folder, FolderItem *dest, GSList *file_list, gboolean remove_source, gint *first); gint (*move_msg) (Folder *folder, FolderItem *dest, MsgInfo *msginfo); gint (*move_msgs) (Folder *folder, FolderItem *dest, GSList *msglist); gint (*copy_msg) (Folder *folder, FolderItem *dest, MsgInfo *msginfo); gint (*copy_msgs) (Folder *folder, FolderItem *dest, GSList *msglist); gint (*remove_msg) (Folder *folder, FolderItem *item, MsgInfo *msginfo); gint (*remove_msgs) (Folder *folder, FolderItem *item, GSList *msglist); gint (*remove_all_msg) (Folder *folder, FolderItem *item); gboolean (*is_msg_changed) (Folder *folder, FolderItem *item, MsgInfo *msginfo); gint (*close) (Folder *folder, FolderItem *item); gint (*scan) (Folder *folder, FolderItem *item); FolderItem * (*create_folder) (Folder *folder, FolderItem *parent, const gchar *name); gint (*rename_folder) (Folder *folder, FolderItem *item, const gchar *name); gint (*move_folder) (Folder *folder, FolderItem *item, FolderItem *new_parent); gint (*remove_folder) (Folder *folder, FolderItem *item); }; FolderClass は Folder のタイプごとに実装される仮想関数を提供する抽象クラス です。 ------------------------------------------------------------------------------ LocalFolder struct _LocalFolder { Folder folder; gchar *rootpath; }; LocalFolder は Folder のサブクラスです。ローカルフォルダに共通の情報が 格納されます。 ------------------------------------------------------------------------------ RemoteFolder struct _RemoteFolder { Folder folder; Session *session; }; RemoteFolder は Folder のサブクラスです。リモートフォルダに共通の情報が 格納されます。 ------------------------------------------------------------------------------ FolderItem struct _FolderItem { SpecialFolderItemType stype; gchar *name; /* UTF-8 */ gchar *path; /* UTF-8 */ time_t mtime; gint new; gint unread; gint total; gint unmarked_num; gint last_num; /* special flags */ guint no_sub : 1; /* no child allowed? */ guint no_select : 1; /* not selectable? */ guint collapsed : 1; /* collapsed item */ guint threaded : 1; /* threaded folder view */ guint opened : 1; /* opened by summary view */ guint updated : 1; /* folderview should be updated */ guint cache_dirty : 1; /* cache file needs to be updated */ guint mark_dirty : 1; /* mark file needs to be updated */ FolderSortKey sort_key; FolderSortType sort_type; GNode *node; FolderItem *parent; Folder *folder; PrefsAccount *account; gboolean ac_apply_sub; gchar *auto_to; gboolean use_auto_to_on_reply; gchar *auto_cc; gchar *auto_bcc; gchar *auto_replyto; gboolean trim_summary_subject; gboolean trim_compose_subject; GSList *mark_queue; gpointer data; }; FolderItem はフォルダツリーの各ノードを表すオブジェクトです。 ------------------------------------------------------------------------------ Folder *folder_new (FolderType type, const gchar *name, const gchar *path); Folder オブジェクトを作成します。実際には type に応じて Folder のサブクラス のオブジェクトを生成し、 Folder 型にキャストして返します。作成時には メールボックス名を指定します。ローカルフォルダの場合はファイルシステム上の パスを指定します。 type: フォルダのタイプ name: メールボックス名(UTF-8) path: ローカルフォルダの場合ファイルシステム上のフォルダのパス(UTF-8) 戻り値: 作成された Folder オブジェクト ------------------------------------------------------------------------------ void folder_local_folder_init (Folder *folder, const gchar *name, const gchar *path); LocalFolder オブジェクトを作成した後、初期化のために呼びます。 folder_new() 内で自動的に呼ばれます。 folder: Folder オブジェクト name: メールボックス名(UTF-8) path: ファイルシステム上のフォルダのパス(UTF-8) ------------------------------------------------------------------------------ void folder_remote_folder_init (Folder *folder, const gchar *name, const gchar *path); RemoteFolder オブジェクトを作成した後、初期化のために呼びます。 folder_new() 内で自動的に呼ばれます。 folder: Folder オブジェクト name: メールボックス名(UTF-8) path: 未使用 ------------------------------------------------------------------------------ void folder_destroy (Folder *folder); Folder オブジェクトを破棄します。 folder: Folder オブジェクト ------------------------------------------------------------------------------ void folder_local_folder_destroy (LocalFolder *lfolder); LocalFolder オブジェクトを破棄します。 folder_destroy() 内で自動的に 呼ばれます。 lfolder: LocalFolder オブジェクト ------------------------------------------------------------------------------ void folder_remote_folder_destroy(RemoteFolder *rfolder); RemoteFolder オブジェクトを破棄します。 folder_destroy() 内で自動的に 呼ばれます。 rfolder: RemoteFolder オブジェクト ------------------------------------------------------------------------------ gint folder_scan_tree (Folder *folder); folder が示すメールボックス以下のディレクトリ階層を調べ、メモリ上に ツリー構造を生成します。必要な特別フォルダに対応する物理的なフォルダが 存在しない場合は自動的に作成します。 既にツリー構造が生成されている Folder オブジェクトに対してこれを呼んだ 場合、変更のないフォルダについてはそのまま保持した上で変更部分のみを 更新します。 FolderClass::scan_tree が実装されていない場合はエラーになります。 folder: Folder オブジェクト 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint folder_create_tree (Folder *folder); folder に対応する物理的なフォルダの存在を調べ、存在しなかった場合それらを 作成します。 フォルダが作成できなかった場合や、 FolderClass::create_tree が実装されて いない場合はエラーになります。 folder: Folder オブジェクト 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ FolderItem *folder_item_new (const gchar *name, const gchar *path); FolderItem オブジェクトを作成します。 name: フォルダ名 path: フォルダの相対パス ------------------------------------------------------------------------------ void folder_item_append (FolderItem *parent, FolderItem *item); item を parent の子として追加します。 parent: 親となる FolderItem オブジェクト item: parent の子となる FolderItem オブジェクト ------------------------------------------------------------------------------ void folder_item_remove (FolderItem *item); item とその子フォルダをフォルダツリーから取り除き、破棄します。 item: FolderItem オブジェクト ------------------------------------------------------------------------------ void folder_item_remove_children (FolderItem *item); item の子フォルダをすべてフォルダツリーから取り除き、破棄します。 item 自体は取り除かれません。 item: FolderItem オブジェクト ------------------------------------------------------------------------------ void folder_item_destroy (FolderItem *item); FolderItem オブジェクトを破棄します。 Folder オブジェクトから item への 参照も取り除かれます。 item: FolderItem オブジェクト ------------------------------------------------------------------------------ gint folder_item_compare (FolderItem *item_a, FolderItem *item_b); 2つの FolderItem を比較し、その結果を返します。返った値はソートに使用 できます。特別なフォルダは通常のフォルダよりも優先されます。 item_a: FolderItem オブジェクト item_b: FolderItem オブジェクト 戻り値: item_a < item_b の場合負の値 item_a == item_b の場合0 item_a > item_b の場合正の値 ------------------------------------------------------------------------------ void folder_set_ui_func (Folder *folder, FolderUIFunc func, gpointer data); 長い処理を行う場合に定期的に呼ばれるコールバック関数を指定します。 folder: Folder オブジェクト func: FolderUIFunc 型のコールバック関数 data: func に渡すデータ ------------------------------------------------------------------------------ void folder_set_name (Folder *folder, const gchar *name); メールボックスの名前を指定します。 folder: Folder オブジェクト name: メールボックス名(UTF-8) ------------------------------------------------------------------------------ void folder_tree_destroy (Folder *folder); フォルダツリーを破棄します。 folder->node は無効になります。 folder: Folder オブジェクト ------------------------------------------------------------------------------ void folder_add (Folder *folder); Folder オブジェクトを内部で保持しているリストに追加します。 Folder オブジェクトのリストは folder_get_list() で取得できます。 folder: Folder オブジェクト ------------------------------------------------------------------------------ GList *folder_get_list (void); LibSylph 内部で保持している Folder オブジェクトのリストを取得します。 戻り値: Folder オブジェクトのリスト ------------------------------------------------------------------------------ gint folder_read_list (void); 設定ファイル folderlist.xml を読み込み、 Folder オブジェクトと フォルダツリーを生成してメモリ上に格納します。 戻り値: Folder オブジェクトが1つ以上存在する場合は0、存在しない場合は-1 ------------------------------------------------------------------------------ void folder_write_list (void); メモリ上の Folder オブジェクトのリストから設定ファイル folderlist.xml を 書き出します。 ------------------------------------------------------------------------------ gchar *folder_get_status (GPtrArray *folders, gboolean full); フォルダツリーの統計情報を "新着数 未読数 総数" の形式で文字列で返します。 folders が指定されていれば、指定したフォルダのみを集計します。指定されて いなければすべてのフォルダを集計します。 full が TRUE の場合は、各フォルダ毎に "新着数 未読数 総数 フォルダ識別子" の形式で情報を返します。 返った文字列は g_free() で解放する必要があります。 folders: FolderItem オブジェクトの配列(GPtrArray) full: TRUE の場合はフォルダ毎の情報を返す 戻り値: 統計情報の文字列 ------------------------------------------------------------------------------ Folder *folder_find_from_path (const gchar *path); メールボックスのパスから Folder オブジェクトを検索して返します。 パスはメールボックスの格納ディレクトリからの相対パス、あるいは絶対パスに なります。 path: メールボックスのパス 戻り値: 見つかった場合は Folder オブジェクト、見つからなかった場合は NULL ------------------------------------------------------------------------------ Folder *folder_find_from_name (const gchar *name, FolderType type); メールボックス名とメールボックスのタイプから Folder オブジェクトを検索して 返します。 name: メールボックス名 type: メールボックスのタイプ 戻り値: 見つかった場合は Folder オブジェクト、見つからなかった場合は NULL ------------------------------------------------------------------------------ FolderItem *folder_find_item_from_path (const gchar *path); フォルダの相対パスから FolderItem オブジェクトを検索して返します。 一番最初の Folder オブジェクトのみが検索対象となります。 検索対象となる Folder オブジェクトを指定したい場合は folder_find_item_from_identifier() を使用してください。 path: フォルダの相対パス 戻り値: 見つかった場合は FolderItem オブジェクト、見つからなかった場合は NULL ------------------------------------------------------------------------------ FolderItem *folder_find_child_item_by_name (FolderItem *item, const gchar *name); フォルダ item の直接の子からフォルダ名で FolderItem オブジェクトを検索して 返します。 item: 検索対象となる FolderItem オブジェクト name: フォルダ名 戻り値: 見つかった場合は FolderItem オブジェクト、見付からなかった場合は NULL ------------------------------------------------------------------------------ gchar *folder_get_identifier (Folder *folder); メールボックスの識別子を得ます。識別子は "#フォルダタイプ/フォルダ名" の形式になります。 返った文字列は g_free() で解放する必要があります。 folder: Folder オブジェクト 戻り値: メールボックスの識別子(情報が得られなかった場合は NULL) ------------------------------------------------------------------------------ gchar *folder_item_get_identifier (FolderItem *item); フォルダの識別子を得ます。識別子は "#フォルダタイプ/フォルダ名/フォルダのパス" の形式になります(例: #mh/Mailbox/inbox)。 返った文字列は g_free() で解放する必要があります。 item: FolderItem オブジェクト 戻り値: メールボックスの識別子(情報が得られなかった場合は NULL) ------------------------------------------------------------------------------ FolderItem *folder_find_item_from_identifier (const gchar *identifier); フォルダの識別子から FolderItem オブジェクトを検索して返します。 identifier: フォルダの識別子 戻り値: 見つかった場合は FolderItem オブジェクト、見つからなかった場合は NULL ------------------------------------------------------------------------------ Folder *folder_get_default_folder (void); デフォルトの Folder オブジェクトを返します。 Folder オブジェクトのリストの先頭にあるものがデフォルトとして扱われます。 戻り値: デフォルトの Folder オブジェクト(存在しなければ NULL) ------------------------------------------------------------------------------ FolderItem *folder_get_default_inbox (void); デフォルトの Folder オブジェクトに含まれる受信箱を示す FolderItem を返します。 デフォルトの Folder オブジェクトは folder_get_default_folder() が返す ものに相当します。 戻り値: デフォルトの受信箱の FolderItem オブジェクト(存在しなければ NULL) ------------------------------------------------------------------------------ FolderItem *folder_get_default_outbox (void); デフォルトの Folder オブジェクトに含まれる送信控を示す FolderItem を返します。 デフォルトの Folder オブジェクトは folder_get_default_folder() が返す ものに相当します。 戻り値: デフォルトの送信控の FolderItem オブジェクト(存在しなければ NULL) ------------------------------------------------------------------------------ FolderItem *folder_get_default_draft (void); デフォルトの Folder オブジェクトに含まれる草稿を示す FolderItem を返します。 デフォルトの Folder オブジェクトは folder_get_default_folder() が返す ものに相当します。 戻り値: デフォルトの草稿の FolderItem オブジェクト(存在しなければ NULL) ------------------------------------------------------------------------------ FolderItem *folder_get_default_queue (void); デフォルトの Folder オブジェクトに含まれる送信待ちを示す FolderItem を返します。 デフォルトの Folder オブジェクトは folder_get_default_folder() が返す ものに相当します。 戻り値: デフォルトの送信待ちの FolderItem オブジェクト(存在しなければ NULL) ------------------------------------------------------------------------------ FolderItem *folder_get_default_trash (void); デフォルトの Folder オブジェクトに含まれるごみ箱を示す FolderItem を返します。 デフォルトの Folder オブジェクトは folder_get_default_folder() が返す ものに相当します。 戻り値: デフォルトのごみ箱の FolderItem オブジェクト(存在しなければ NULL) ------------------------------------------------------------------------------ void folder_set_missing_folders (void); メモリ上のすべての Folder オブジェクトを調べ、各種の特別フォルダそれぞれに 対応する物理的なフォルダが存在しない場合はそれらを作成します。 Folder からそれらの FolderItem に対応する参照が存在しない場合もそれらを 作成します。 ------------------------------------------------------------------------------ void folder_unref_account_all (PrefsAccount *account); メモリ上の Folder または FolderItem から account への参照が存在する場合、 それをすべて解除します。 account を削除する場合、その前にこれを呼ぶ必要があります。 account: 参照を解除したい PrefsAccount 構造体へのポインタ ------------------------------------------------------------------------------ gchar *folder_get_path (Folder *folder); folder のファイルシステム上の絶対パスを取得します。 戻り値はファイル名エンコーディングになります。 返った文字列は g_free() で解放する必要があります。 folder: Folder オブジェクト 戻り値: folder のファイルシステム上の絶対パス(ファイル名エンコーディング) ------------------------------------------------------------------------------ gchar *folder_item_get_path (FolderItem *item); item のファイルシステム上の絶対パスを取得します。 戻り値はファイル名エンコーディングになります。 返った文字列は g_free() で解放する必要があります。 item: FolderItem オブジェクト 戻り値: item のファイルシステム上の絶対パス(ファイル名エンコーディング) ------------------------------------------------------------------------------ gint folder_item_scan (FolderItem *item); item が指し示す物理的な(あるいはサーバ上の)フォルダの内容をスキャンし、 同期を取ります。 item: FolderItem オブジェクト 戻り値: 成功の場合0、エラーの場合-1 ------------------------------------------------------------------------------ void folder_item_scan_foreach (GHashTable *table); table に含まれる各 FolderItem オブジェクトに対して folder_item_scan() を呼びます。 table: FolderItem オブジェクトをキーとして含む GHashTable オブジェクト ------------------------------------------------------------------------------ GSList *folder_item_get_msg_list (FolderItem *item, gboolean use_cache); item からフォルダ中のメッセージ一覧を GSList として得ます。 use_cache が TRUE の場合はキャッシュを使用し、 FALSE の場合は 完全にフォルダの内容を読み直します。 返ったリストは procmsg_msg_list_free() で解放する必要があります。 item: FolderItem オブジェクト use_cache: TRUE の場合キャッシュを使用、 FALSE の場合はキャッシュを使用しない 戻り値: MsgInfo 構造体へのポインタの GSList 型のリスト ------------------------------------------------------------------------------ gchar *folder_item_fetch_msg (FolderItem *item, gint num); フォルダ item 内のメッセージ番号 num に対応するメッセージを取得し、 そのファイルの絶対パスを返します。ファイル名はファイル名エンコーディングに なります。 返った文字列は g_free() で解放する必要があります。 item: FolderItem オブジェクト num: メッセージ番号 戻り値: 取得したメッセージのファイルの絶対パス(ファイル名エンコーディング) 取得に失敗、または該当するメッセージが存在しない場合は NULL ------------------------------------------------------------------------------ gint folder_item_fetch_all_msg (FolderItem *item); フォルダ item 内のすべてのメッセージを取得します。 リモートのメールボックス(IMAP4, News等)の場合すべてのメッセージが ダウンロードされ、キャッシュされます。 item: FolderItem オブジェクト 戻り値: 成功した場合0、エラーの場合-1 ------------------------------------------------------------------------------ MsgInfo *folder_item_get_msginfo (FolderItem *item, gint num); フォルダ item 内のメッセージ番号 num に対応するメッセージを取得し、 そのメッセージをパースして MsgInfo 構造体を生成して返します。 返った MsgInfo は procmsg_msginfo_free() で解放する必要があります。 item: FolderItem オブジェクト num: メッセージ番号 戻り値: 取得したメッセージの MsgInfo 構造体へのポインタ 取得に失敗、または該当するメッセージが存在しない場合は NULL ------------------------------------------------------------------------------ gint folder_item_add_msg (FolderItem *dest, const gchar *file, MsgFlags *flags, gboolean remove_source); フォルダ dest に RFC 2822 メッセージファイル file を追加します。 flags を指定した場合は指定に従ってそのメッセージにフラグが設定されます。 追加に成功した場合で、 remove_source が TRUE の場合は、 ファイル file が削除されます。 dest: FolderItem オブジェクト file: 追加する RFC 2822 メッセージファイル(ファイル名エンコーディング) flags: MsgFlags 構造体へのポインタ remove_source: TRUE の場合はファイル file を削除する 戻り値: 追加したメッセージの dest 中での番号 ------------------------------------------------------------------------------ gint folder_item_add_msgs (FolderItem *dest, GSList *file_list, gboolean remove_source, gint *first); フォルダ dest に MsgFileInfo 構造体へのポインタのリスト file_list で指定した複数の RFC 2822 メッセージファイルを追加します。 MsgFileInfo で flags を指定した場合は指定に従って各メッセージにフラグが 設定されます。 追加に成功した場合で、 remove_source が TRUE の場合は、 file_list で指定したすべてのファイルが削除されます。 first を指定した場合は、最初に追加したメッセージの番号がセットされます。 dest: FolderItem オブジェクト file_list: MsgFileInfo 構造体へのポインタのリスト remove_source: TRUE の場合はファイル file を削除する first: NULL でない場合は最初に追加したメッセージの番号がセットされる 戻り値: 最後に追加したメッセージの dest 中での番号 ------------------------------------------------------------------------------ gint folder_item_move_msg (FolderItem *dest, MsgInfo *msginfo); フォルダ dest にメッセージ msginfo を移動します。 dest と msginfo が同じ Folder に属する場合は通常の移動が行われます。 そうでない場合はコピーした後元メッセージの削除という動作になります。 dest: FolderItem オブジェクト msginfo: 移動するメッセージの MsgInfo 構造体へのポインタ 戻り値: 成功した場合は追加したメッセージの dest 中での番号、 あるいはコピー+削除の動作の場合は0 エラーの場合は-1 ------------------------------------------------------------------------------ gint folder_item_move_msgs (FolderItem *dest, GSList *msglist); フォルダ dest に MsgInfo 構造体へのポインタのリスト msglist で指定された 複数のメッセージを移動します。 dest: FolderItem オブジェクト msglist: MsgInfo 構造体へのポインタのリスト 戻り値: 成功した場合は最後に追加したメッセージの dest 中での番号、 あるいはコピー+削除の動作の場合は0 エラーの場合は-1 ------------------------------------------------------------------------------ gint folder_item_copy_msg (FolderItem *dest, MsgInfo *msginfo); フォルダ dest にメッセージ msginfo をコピーします。 dest: FolderItem オブジェクト msginfo: コピーするメッセージの MsgInfo 構造体へのポインタ 戻り値: 成功した場合は追加したメッセージの dest 中での番号 エラーの場合は-1 ------------------------------------------------------------------------------ gint folder_item_copy_msgs (FolderItem *dest, GSList *msglist); フォルダ dest に MsgInfo 構造体へのポインタのリスト msglist で指定された 複数のメッセージをコピーします。 dest: FolderItem オブジェクト msglist: MsgInfo 構造体へのポインタのリスト 戻り値: 成功した場合は最後に追加したメッセージの dest 中での番号、 エラーの場合は-1 ------------------------------------------------------------------------------ gint folder_item_remove_msg (FolderItem *item, MsgInfo *msginfo); フォルダ item から item に属するメッセージ msginfo を削除します。 msginfo には MSG_INVALID フラグが立ちます(削除はされません)。 item: FolderItem オブジェクト msginfo: 削除するメッセージの MsgInfo 構造体へのポインタ 戻り値: 成功した場合は0、エラーの場合は-1 ------------------------------------------------------------------------------ gint folder_item_remove_msgs (FolderItem *item, GSList *msglist); フォルダ item から item に属する複数のメッセージ msglist を削除します。 msglist の各 msginfo には MSG_INVALID フラグが立ちます(削除はされません)。 item: FolderItem オブジェクト msglist: 削除するメッセージの MsgInfo 構造体へのポインタのリスト 戻り値: 成功した場合は0、エラーの場合は-1 ------------------------------------------------------------------------------ gint folder_item_remove_all_msg (FolderItem *item); フォルダ item からすべてのメッセージを削除します。 item: FolderItem オブジェクト 戻り値: 成功した場合は0、エラーの場合は-1 ------------------------------------------------------------------------------ gboolean folder_item_is_msg_changed (FolderItem *item, MsgInfo *msginfo); msginfo と実際のファイルシステム上のファイルを比較し、変更があった 場合は TRUE を返します。 item: FolderItem オブジェクト msginfo: 比較するメッセージの MsgInfo 構造体へのポインタ 戻り値: ファイルシステム上のファイルが変更されていた場合は TRUE 変更がなければ FALSE ------------------------------------------------------------------------------ gchar *folder_item_get_cache_file (FolderItem *item); フォルダ item のキャッシュファイルの絶対パスを返します。 戻り値はファイル名エンコーディングになります。 返った文字列は g_free() で解放する必要があります。 item: FolderItem オブジェクト 戻り値: キャッシュファイルの絶対パス(ファイル名エンコーディング) item が無効、またはパスが取得できない場合は NULL ------------------------------------------------------------------------------ gchar *folder_item_get_mark_file (FolderItem *item); フォルダ item のマークファイルの絶対パスを返します。 戻り値はファイル名エンコーディングになります。 返った文字列は g_free() で解放する必要があります。 item: FolderItem オブジェクト 戻り値: マークファイルの絶対パス(ファイル名エンコーディング) item が無効、またはパスが取得できない場合は NULL ------------------------------------------------------------------------------ gint folder_item_close (FolderItem *item); 開いていたフォルダ item を閉じます。 item の opened フラグは FALSE になります。 フォルダのタイプによってはクローズ処理が行われます。 item: FolderItem オブジェクト 戻り値: 成功した場合は0、エラーの場合は0以外 libsylph-1.1.0/doc/html.txt0000644000175000017500000000463310532473675012554 00000000000000html - 簡易 HTML パーサ ------------------------------------------------------------------------------ HTMLState typedef enum { HTML_NORMAL, HTML_PAR, HTML_BR, HTML_HR, HTML_HREF, HTML_IMG, HTML_FONT, HTML_PRE, HTML_UNKNOWN, HTML_CONV_FAILED, HTML_ERR, HTML_EOF } HTMLState; HTML パーサの現在の状態を表す enum です。 ------------------------------------------------------------------------------ HTMLParser struct _HTMLParser { FILE *fp; CodeConverter *conv; GHashTable *symbol_table; GString *str; GString *buf; gchar *bufp; HTMLState state; gchar *href; gboolean newline; gboolean empty_line; gboolean space; gboolean pre; }; HTML パーサの各種情報を格納する構造体です。 ------------------------------------------------------------------------------ HTMLAttr struct _HTMLAttr { gchar *name; gchar *value; }; HTML タグの各属性を表します。 ------------------------------------------------------------------------------ HTMLTag struct _HTMLTag { gchar *name; GList *attr; }; HTML タグを表します。タグ名と属性リストから構成されます。 ------------------------------------------------------------------------------ HTMLParser *html_parser_new (FILE *fp, CodeConverter *conv); HTML パーサオブジェクトを作成します。 HTML ファイルストリーム fp と HTML ファイルのエンコーディングにあわせた CodeCoverter conv を渡します。 返った値は html_parser_destroy() で解放する必要があります。 fp: HTML ファイルストリーム conv: CodeConverter 構造体へのポインタ 戻り値: 新規 HTMLParser 構造体へのポインタ ------------------------------------------------------------------------------ void html_parser_destroy (HTMLParser *parser); HTMLParser オブジェクトを解放します。 parser: HTMLParser 構造体へのポインタ ------------------------------------------------------------------------------ const gchar *html_parse (HTMLParser *parser); HTML ファイルから必要であれば1行読み込み、パースしてプレーンテキストに 変換した文字列を返します。 返った文字列は parser が保持しているため解放できません。 parser: HTMLParser 構造体へのポインタ 戻り値: プレーンテキストに変換された文字列 ファイルの終端に達した場合 NULL libsylph-1.1.0/doc/imap.txt0000644000175000017500000001272010532771206012521 00000000000000imap - IMAP4 に対する Folder インタフェース ------------------------------------------------------------------------------ #define IMAP_FOLDER(obj) Folder クラスのオブジェクト obj を Folder 型にキャストします。 ------------------------------------------------------------------------------ #define IMAP_SESSION(obj) Session クラスのオブジェクトを IMAPSession 型にキャストします。 ------------------------------------------------------------------------------ IMAPAuthType typedef enum { IMAP_AUTH_LOGIN = 1 << 0, IMAP_AUTH_CRAM_MD5 = 1 << 1, IMAP_AUTH_PLAIN = 1 << 2 } IMAPAuthType; IMAP の認証方法を指定するときに使用する enum です。 ------------------------------------------------------------------------------ IMAPFolder struct _IMAPFolder { RemoteFolder rfolder; /* list of IMAPNameSpace */ GList *ns_personal; GList *ns_others; GList *ns_shared; }; 1つの IMAP アカウントに属するサーバの情報とフォルダツリーを格納するための 構造体です。 RemoteFolder のサブクラスになります。 ------------------------------------------------------------------------------ IMAPSession struct _IMAPSession { Session session; gboolean authenticated; gchar **capability; gboolean uidplus; gchar *mbox; guint cmd_count; }; IMAP セッションを表す構造体です。 Session のサブクラスになります。 ------------------------------------------------------------------------------ IMAPNameSpace struct _IMAPNameSpace { gchar *name; gchar separator; }; IMAP のネームスペースの名前と区切り記号の組を表す構造体です。 ------------------------------------------------------------------------------ #define IMAP_SUCCESS 0 #define IMAP_SOCKET 2 #define IMAP_AUTHFAIL 3 #define IMAP_PROTOCOL 4 #define IMAP_SYNTAX 5 #define IMAP_IOERR 6 #define IMAP_ERROR 7 IMAP のエラー状態を表す値です。 ------------------------------------------------------------------------------ #define IMAPBUFSIZE IMAP の処理に使用するバッファのサイズを表します。 ------------------------------------------------------------------------------ IMAPFlags typedef enum { IMAP_FLAG_SEEN = 1 << 0, IMAP_FLAG_ANSWERED = 1 << 1, IMAP_FLAG_FLAGGED = 1 << 2, IMAP_FLAG_DELETED = 1 << 3, IMAP_FLAG_DRAFT = 1 << 4 } IMAPFlags; IMAP のメッセージのフラグを表す enum です。 ------------------------------------------------------------------------------ #define IMAP_IS_SEEN(flags) IMAPFlags flags に SEEN フラグが立っていれば TRUE を返します。 ------------------------------------------------------------------------------ #define IMAP_IS_ANSWERED(flags) IMAPFlags flags に ANSWERED フラグが立っていれば TRUE を返します。 ------------------------------------------------------------------------------ #define IMAP_IS_FLAGGED(flags) IMAPFlags flags に FLAGGED フラグが立っていれば TRUE を返します。 ------------------------------------------------------------------------------ #define IMAP_IS_DELETED(flags) IMAPFlags flags に DELETED フラグが立っていれば TRUE を返します。 ------------------------------------------------------------------------------ #define IMAP_IS_DRAFT(flags) IMAPFlags flags に DRAFT フラグが立っていれば TRUE を返します。 ------------------------------------------------------------------------------ FolderClass *imap_get_class (void); IMAPFolder の FolderClass を取得します。 戻り値: FolderClass へのポインタ ------------------------------------------------------------------------------ gint imap_msg_set_perm_flags (MsgInfo *msginfo, MsgPermFlags flags); メッセージ msginfo の IMAP サーバ上のフラグを flags 相当の状態に変更します。 msginfo: MsgInfo 構造体へのポインタ flags: msginfo に対してセットする永続フラグ 戻り値: 成功した場合 IMAP_SUCCESS エラーの場合 IMAP_SUCCESS 以外 ------------------------------------------------------------------------------ gint imap_msg_unset_perm_flags (MsgInfo *msginfo, MsgPermFlags flags); メッセージ msginfo の IMAP サーバ上のフラグのうち flags で指定されている ものを解除します。 msginfo: MsgInfo 構造体へのポインタ flags: msginfo に対して解除する永続フラグ 戻り値: 成功した場合 IMAP_SUCCESS エラーの場合 IMAP_SUCCESS 以外 ------------------------------------------------------------------------------ gint imap_msg_list_set_perm_flags (GSList *msglist, MsgPermFlags flags); メッセージのリスト msglist の IMAP サーバ上の各フラグを flags 相当の状態に 変更します。 msglist: MsgInfo 構造体へのポインタのリスト flags: msglist に対してセットする永続フラグ 戻り値: 成功した場合 IMAP_SUCCESS エラーの場合 IMAP_SUCCESS 以外 ------------------------------------------------------------------------------ gint imap_msg_list_unset_perm_flags (GSList *msglist, MsgPermFlags flags); メッセージのリスト msglist の IMAP サーバ上の各フラグのうち flags で指定 されているものを解除します。 msglist: MsgInfo 構造体へのポインタのリスト flags: msglist に対して解除する永続フラグ 戻り値: 成功した場合 IMAP_SUCCESS エラーの場合 IMAP_SUCCESS 以外 libsylph-1.1.0/doc/mbox.txt0000644000175000017500000000714410532717612012545 00000000000000mbox - Unix MBOX の操作 ------------------------------------------------------------------------------ LockType typedef enum { LOCK_FILE, LOCK_FLOCK } LockType; mbox ファイルのロックに使用する方式を指定するための enum です。 LOCK_FILE: ロックにファイルを使用 LOCK_FLOCK: ロックに flock() または lockf() を使用 ------------------------------------------------------------------------------ gint proc_mbox (FolderItem *dest, const gchar *mbox, GHashTable *folder_table); Unix MBOX ファイル mbox をフォルダ dest に取り込みます。 folder_table が指定されていれば、フィルタを適用し、移動先のフォルダを キー(値は1)として folder_table に追加します。フィルタによって移動または 削除が行われなければ dest に取り込まれます。 dest: 取り込み先フォルダ mbox: 取り込み対象の Unix MBOX ファイル folder_table: 移動先フォルダを格納するハッシュテーブル(NULL 可) 戻り値: 成功した場合取り込んだメッセージ数 エラーの場合 -1 ------------------------------------------------------------------------------ gint lock_mbox (const gchar *base, LockType type); ファイル base を type で指定した方式でロックします。 ロックは unlock_mbox() で解除します。 type に LOCK_FILE を指定した場合は base + "." + PID というファイルを作成し、 それに対して base + ".lock" というハードリンクを作成します。 このロックファイルが作成できなかった場合は、一定時間再試行します。 type に LOCK_FLOCK を指定した場合は環境に応じて flock() または lockf() を用いてロックを行います。 Win32 ではこの関数は常に -1 を返します。 base: ロックするファイル type: ロックに使用する方式 戻り値: 成功した場合: LOCK_FILE の場合 0 LOCK_FLOCK の場合ロックしたファイルのデスクリプタ エラーの場合 -1 ------------------------------------------------------------------------------ gint unlock_mbox (const gchar *base, gint fd, LockType type); lock_mbox() でロックされているファイル base のロックを解除します。 fd と type は lock_mbox() で使用した値と対応している必要があります。 base: ロックされているファイル fd: type が LOCK_FLOCK の場合ロックしたファイルのデスクリプタ type: ロックに使用した方式 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint copy_mbox (const gchar *src, const gchar *dest); ファイル src を dest にコピーします。 dest が既に存在する場合は dest の バックアップを取ります。 copy_file(src, dest, TRUE) と同等です。 src: コピー元ファイルのパス dest: コピー先のパス 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ void empty_mbox (const gchar *mbox); ファイル mbox のサイズを0に切り詰めます。 mbox: 切り詰めるファイル ------------------------------------------------------------------------------ gint export_to_mbox (FolderItem *src, const gchar *mbox); フォルダ src の内容を Unix MBOX 形式のファイル mbox に出力します。 src: 入力フォルダ mbox: 出力先ファイルのパス 戻り値: 成功した場合 0 エラーの場合 -1 libsylph-1.1.0/doc/md5.txt0000644000175000017500000001137210532744665012273 00000000000000md5 - MD5 の処理 ------------------------------------------------------------------------------ typedef struct _SMD5 SMD5; MD5 ハッシュを表す構造体です。 ------------------------------------------------------------------------------ #define S_GNET_MD5_HASH_LENGTH 16 MD5 ハッシュの長さ(バイト)です。 ------------------------------------------------------------------------------ SMD5* s_gnet_md5_new (const guchar* buffer, guint length); 長さ length の ハッシュデータ buffer から SMD5 構造体を作成します。 buffer: ハッシュデータを格納するバッファ length: buffer の長さ 戻り値: 新規 SMD5 構造体へのポインタ ------------------------------------------------------------------------------ SMD5* s_gnet_md5_new_string (const gchar* str); 16進数のハッシュ文字列 str から SMD5 構造体を作成します。 str: 16進数のハッシュ文字列 戻り値: 新規 SMD5 構造体へのポインタ ------------------------------------------------------------------------------ SMD5* s_gnet_md5_clone (const SMD5* md5); SMD5 構造体 md5 をコピーします。 md5: SMD5 構造体へのポインタ 戻り値: 新規 SMD5 構造体へのポインタ ------------------------------------------------------------------------------ void s_gnet_md5_delete (SMD5* md5); SMD5 構造体 md5 を削除します。 md5: SMD5 構造体へのポインタ ------------------------------------------------------------------------------ SMD5* s_gnet_md5_new_incremental (void); SMD5 構造体をインクリメンタルに作成します。 SMD5 を作成した後、 s_gnet_md5_update() を1度以上ハッシュデータに対して呼ぶ必要があります。 最後に s_gnet_md5_final() を呼んでハッシュ値を計算します。 戻り値: 新規 SMD5 構造体へのポインタ ------------------------------------------------------------------------------ void s_gnet_md5_update (SMD5* md5, const guchar* buffer, guint length); ハッシュ md5 を長さ length のハッシュデータ buffer で更新します。 s_gnet_md5_new_incremental() によって作成されたハッシュに対して s_gnet_md5_final() を呼んで完了するまでにこの関数を数回呼ぶことができます。 md5: SMD5 構造体へのポインタ buffer: 追加するハッシュデータ length: buffer の長さ ------------------------------------------------------------------------------ void s_gnet_md5_final (SMD5* md5); md5 の最終的なハッシュ値を計算します。この関数は s_gnet_md5_new_incremental() によって作成された SMD5 構造体に対してのみ呼ぶ必要があります。 md5: SMD5 構造体へのポインタ ------------------------------------------------------------------------------ gboolean s_gnet_md5_equal (gconstpointer p1, gconstpointer p2); 2つの SMD5 構造体 p1 と p2 が等しいかどうかを比較します。 p1: SMD5 構造体1へのポインタ p2: SMD5 構造体2へのポインタ 戻り値: p1 と p2 が等しい場合 TRUE 等しくない場合 FALSE ------------------------------------------------------------------------------ guint s_gnet_md5_hash (gconstpointer p); GHashTable で使用するための SMD5 構造体に対するハッシュ値を生成します。 この値は MD5 ダイジェストとは異なります。 p: SMD5 構造体へのポインタ 戻り値: p のハッシュ値 ------------------------------------------------------------------------------ gchar* s_gnet_md5_get_digest (const SMD5* md5); md5 の生のハッシュダイジェスト値を含むバッファを取得します。 バッファのサイズは S_GNET_MD5_HASH_LENGTH バイトです。 返った値は SMD5 側で保持しているため解放できません。 md5: SMD5 構造体へのポインタ 戻り値: MD5 ハッシュダイジェストを含むバッファへのポインタ ------------------------------------------------------------------------------ gchar* s_gnet_md5_get_string (const SMD5* md5); ダイジェスト値を16進文字列で取得します。文字列は 2 * S_GNET_MD5_HASH_LENGTH バイトで、ヌル文字で終端しています。 返った文字列は g_free() で解放する必要があります。 md5: SMD5 構造体へのポインタ 戻り値: ダイジェスト値を表す16進文字列 ------------------------------------------------------------------------------ void s_gnet_md5_copy_string (const SMD5* md5, gchar* buffer); ダイジェスト値を16進文字列として buffer にコピーします。文字列はヌル文字で 終端しません。 md5: SMD5 構造体へのポインタ buffer: 少なくとも 2 * S_GNET_MD5_HASH_LENGTH バイトのサイズのバッファ libsylph-1.1.0/doc/md5_hmac.txt0000644000175000017500000000247210532746350013255 00000000000000md5_hmac - MD5 を用いた HMAC によるハッシュ値の生成 ------------------------------------------------------------------------------ void md5_hmac (guchar *digest, const guchar* text, gint text_len, const guchar* key, gint key_len); RFC 2104 で定義されている HMAC アルゴリズムを用いて、長さ text_len のデータ text と長さ key_len の鍵 key からハッシュ値を生成し、バッファ digest に 格納します。 digest: 少なくとも S_GNET_MD5_HASH_LENGTH バイトのサイズのバッファ text: 計算対象のデータ text_len: text のサイズ key: 鍵データ key_len: key のサイズ ------------------------------------------------------------------------------ void md5_hex_hmac (gchar *hexdigest, const guchar* text, gint text_len, const guchar* key, gint key_len); RFC 2104 で定義されている HMAC アルゴリズムを用いて、長さ text_len のデータ text と長さ key_len の鍵 key からハッシュ値を生成し、16進文字列として バッファ hexdigest に格納します。文字列はヌル文字で終端されます。 digest: 少なくとも 2 * S_GNET_MD5_HASH_LENGTH + 1 バイトのサイズのバッファ text: 計算対象のデータ text_len: text のサイズ key: 鍵データ key_len: key のサイズ libsylph-1.1.0/doc/mh.txt0000644000175000017500000000127610533002440012167 00000000000000mh - MH フォルダに対する Folder インタフェース ------------------------------------------------------------------------------ #define MH_FOLDER(obj) Folder クラスのオブジェクト obj を MHFolder 型にキャストします。 ------------------------------------------------------------------------------ MHFolder struct _MHFolder { LocalFolder lfolder; }; MH フォルダのツリーを格納する構造体です。 LocalFolder のサブクラスになります。 ------------------------------------------------------------------------------ FolderClass *mh_get_class (void); MHFolder の FolderClass を取得します。 戻り値: FolderClass へのポインタ libsylph-1.1.0/doc/news.txt0000644000175000017500000000611010532762533012546 00000000000000news - NNTP に対する Folder インタフェース ------------------------------------------------------------------------------ NewsFolder struct _NewsFolder { RemoteFolder rfolder; gboolean use_auth; }; 1つの NNTP サーバに属する購読しているニュースグループの一覧を表す構造体 です。 RemoteFolder のサブクラスになります。 ------------------------------------------------------------------------------ NewsGroupInfo struct _NewsGroupInfo { gchar *name; guint first; guint last; gchar type; gboolean subscribed; }; 1つのニュースグループに関する情報を表す構造体です。 name: ニュースグループ名 first: 最初の記事番号 last: 最後の記事番号 type: グループのタイプ(モデレートかどうか) subscribed: 購読している場合 TRUE 購読していない場合 FALSE ------------------------------------------------------------------------------ FolderClass *news_get_class (void); NewsFolder の FolderClass を取得します。 戻り値: FolderClass へのポインタ ------------------------------------------------------------------------------ GSList *news_get_group_list (Folder *folder); NewsFolder folder に対応する NNTP サーバからニュースグループ一覧を取得します。 以前既に取得している場合はキャッシュが使用されます。 返った値は news_group_list_free() で解放する必要があります。 folder: NewsFolder オブジェクト 戻り値: NewsGroupInfo 構造体のリスト ------------------------------------------------------------------------------ void news_group_list_free (GSList *group_list); NewsGroupInfo 構造体のリストを解放します。 group_list: NewsGroupInfo 構造体のリスト ------------------------------------------------------------------------------ void news_remove_group_list_cache (Folder *folder); folder に対応するニュースグループリストのキャッシュが存在すればそれを 削除します。 folder: NewsFolder オブジェクト ------------------------------------------------------------------------------ gint news_post (Folder *folder, const gchar *file); folder が指す NNTP サーバにメッセージ file を 投稿します。 メッセージでは Newsgroups ヘッダで投稿するグループが指定されている必要が あります。 folder: NewsFolder オブジェクト file: 投稿するメッセージのファイル 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint news_post_stream (Folder *folder, FILE *fp); folder が指す NNTP サーバにメッセージのファイルストリーム fp の内容を 投稿します。メッセージでは Newsgroups ヘッダで投稿するグループが指定 されている必要があります。 folder: NewsFolder オブジェクト file: 投稿するメッセージのファイルストリーム 戻り値: 成功した場合 0 エラーの場合 -1 libsylph-1.1.0/doc/nntp.txt0000644000175000017500000002054610532760136012557 00000000000000nntp - NNTP セッションの処理 ------------------------------------------------------------------------------ #define NNTP_SESSION(obj) Session オブジェクト obj を NNTPSession にキャストします。 ------------------------------------------------------------------------------ NNTPSession struct _NNTPSession { Session session; gchar *group; gchar *userid; gchar *passwd; gboolean auth_failed; }; NNTP セッションを表す構造体です。 Session のサブクラスになります。 ------------------------------------------------------------------------------ #define NN_SUCCESS 0 #define NN_SOCKET 2 #define NN_AUTHFAIL 3 #define NN_PROTOCOL 4 #define NN_SYNTAX 5 #define NN_IOERR 6 #define NN_ERROR 7 #define NN_AUTHREQ 8 #define NN_AUTHCONT 9 NNTP のエラー状態を表す値です。 ------------------------------------------------------------------------------ #define NNTPBUFSIZE NNTP の処理に使用するバッファのサイズを表します。 ------------------------------------------------------------------------------ #if USE_SSL Session *nntp_session_new (const gchar *server, gushort port, gchar *buf, const gchar *userid, const gchar *passwd, SSLType ssl_type); #else Session *nntp_session_new (const gchar *server, gushort port, gchar *buf, const gchar *userid, const gchar *passwd); #endif NNTPSession オブジェクトを作成します。 SSL を有効にしてビルドされた場合は SSL のタイプを指定する引数が追加されます。このため、この関数を呼ぶ場合は 適切に USE_SSL が定義されている必要があります。 userid と passwd が両方設定されている場合は接続後認証を行います。 server: NNTP サーバ port: NNTP サーバのポート buf: サーバの応答を格納するバッファ(NULL 可) userid: 認証が必要な場合のユーザ ID passwd: 認証が必要な場合のパスワード 戻り値: NNTPSession オブジェクト(Session にキャスト) エラーの場合 NULL ------------------------------------------------------------------------------ gint nntp_group (NNTPSession *session, const gchar *group, gint *num, gint *first, gint *last); NNTP サーバに GROUP コマンドを送信し、結果を取得します。 session: NNTPSession オブジェクト group: GROUP コマンドの引数 num: サーバの応答の第1引数を格納するポインタ first: サーバの応答の第2引数を格納するポインタ last: サーバの応答の第3引数を格納するポインタ 戻り値: 成功した場合 NN_SUCCESS エラーの場合 NN_SUCCESS 以外 ------------------------------------------------------------------------------ gint nntp_get_article (NNTPSession *session, const gchar *cmd, gint num, gchar **msgid); NNTP サーバに ARTICLE, BODY, HEAD, STAT のいずれかのコマンドを発行し、 結果を取得します。 session: NNTPSession オブジェクト cmd: 発行するコマンド num: 指定する記事番号 msgid: 応答内のメッセージ ID を格納するポインタ 戻り値: 成功した場合 NN_SUCCESS エラーの場合 NN_SUCCESS 以外 ------------------------------------------------------------------------------ gint nntp_article (NNTPSession *session, gint num, gchar **msgid); NNTP サーバに ARTICLE コマンドを発行し、結果を取得します。 session: NNTPSession オブジェクト num: 指定する記事番号 msgid: 応答内のメッセージ ID を格納するポインタ 戻り値: 成功した場合 NN_SUCCESS エラーの場合 NN_SUCCESS 以外 ------------------------------------------------------------------------------ gint nntp_body (NNTPSession *session, gint num, gchar **msgid); NNTP サーバに BODY コマンドを発行し、結果を取得します。 session: NNTPSession オブジェクト num: 指定する記事番号 msgid: 応答内のメッセージ ID を格納するポインタ 戻り値: 成功した場合 NN_SUCCESS エラーの場合 NN_SUCCESS 以外 ------------------------------------------------------------------------------ gint nntp_head (NNTPSession *session, gint num, gchar **msgid); NNTP サーバに HEAD コマンドを発行し、結果を取得します。 session: NNTPSession オブジェクト num: 指定する記事番号 msgid: 応答内のメッセージ ID を格納するポインタ 戻り値: 成功した場合 NN_SUCCESS エラーの場合 NN_SUCCESS 以外 ------------------------------------------------------------------------------ gint nntp_stat (NNTPSession *session, gint num, gchar **msgid); NNTP サーバに STAT コマンドを発行し、結果を取得します。 session: NNTPSession オブジェクト num: 指定する記事番号 msgid: 応答内のメッセージ ID を格納するポインタ 戻り値: 成功した場合 NN_SUCCESS エラーの場合 NN_SUCCESS 以外 ------------------------------------------------------------------------------ gint nntp_next (NNTPSession *session, gint *num, gchar **msgid); NNTP サーバに NEXT コマンドを発行し、結果を取得します。 session: NNTPSession オブジェクト num: 指定する記事番号 msgid: 応答内のメッセージ ID を格納するポインタ 戻り値: 成功した場合 NN_SUCCESS エラーの場合 NN_SUCCESS 以外 ------------------------------------------------------------------------------ gint nntp_xover (NNTPSession *session, gint first, gint last); NNTP サーバに XOVER コマンドを発行します。 (注: RFC 3977 では OVER コマンドに変更されています。) session: NNTPSession オブジェクト first: 取得する最初の記事番号 last: 取得する最後の記事番号 戻り値: 成功した場合 NN_SUCCESS エラーの場合 NN_SUCCESS 以外 ------------------------------------------------------------------------------ gint nntp_xhdr (NNTPSession *session, const gchar *header, gint first, gint last); NNTP サーバに XHDR コマンドを発行します。 (注: RFC 3977 では HDR コマンドに変更されています。) session: NNTPSession オブジェクト header: 取得するヘッダ名 first: 取得する最初の記事番号 last: 取得する最後の記事番号 戻り値: 成功した場合 NN_SUCCESS エラーの場合 NN_SUCCESS 以外 ------------------------------------------------------------------------------ gint nntp_list (NNTPSession *session); NNTP サーバに LIST コマンドを発行します。 session: NNTPSession オブジェクト 戻り値: 成功した場合 NN_SUCCESS エラーの場合 NN_SUCCESS 以外 ------------------------------------------------------------------------------ gint nntp_post (NNTPSession *session, FILE *fp); NNTP サーバに POST コマンドを発行し、ファイルストリーム fp に格納されている メッセージデータを送信します。 fp の内容は送信前に正規化されます。 session: NNTPSession オブジェクト fp: メッセージデータを格納するファイルストリーム 戻り値: 成功した場合 NN_SUCCESS エラーの場合 NN_SUCCESS 以外 ------------------------------------------------------------------------------ gint nntp_newgroups (NNTPSession *session); 現在実装されていません。 session: NNTPSession オブジェクト 戻り値: 常に NN_SUCCESS ------------------------------------------------------------------------------ gint nntp_newnews (NNTPSession *session); 現在実装されていません。 session: NNTPSession オブジェクト 戻り値: 常に NN_SUCCESS ------------------------------------------------------------------------------ gint nntp_mode (NNTPSession *session, gboolean stream); NNTP サーバに MODE コマンドを発行します。 stream が TRUE の場合は MODE STREAM コマンドを、 stream が FALSE の場合は MODE READER コマンドを 発行します。 (注: MODE STREAM コマンドは RFC 3977 では定義されていません。) session: NNTPSession オブジェクト stream: STREAM モードの場合は TRUE READER モードの場合は FALSE libsylph-1.1.0/doc/pop.txt0000644000175000017500000001172110532437375012377 00000000000000pop - POP3 セッションの処理 ------------------------------------------------------------------------------ #define POP3_SESSION(obj) ((Pop3Session *)obj) Session オブジェクト obj を Pop3Session にキャストします。 ------------------------------------------------------------------------------ Pop3State typedef enum { POP3_READY, POP3_GREETING, POP3_STLS, POP3_GETAUTH_USER, POP3_GETAUTH_PASS, POP3_GETAUTH_APOP, POP3_GETRANGE_STAT, POP3_GETRANGE_LAST, POP3_GETRANGE_UIDL, POP3_GETRANGE_UIDL_RECV, POP3_GETSIZE_LIST, POP3_GETSIZE_LIST_RECV, POP3_RETR, POP3_RETR_RECV, POP3_DELETE, POP3_LOGOUT, POP3_DONE, POP3_ERROR, N_POP3_STATE } Pop3State; Pop3Session の状態を表す enum です。 ------------------------------------------------------------------------------ Pop3ErrorValue typedef enum { PS_SUCCESS = 0, /* command successful */ PS_NOMAIL = 1, /* no mail available */ PS_SOCKET = 2, /* socket I/O woes */ PS_AUTHFAIL = 3, /* user authorization failed */ PS_PROTOCOL = 4, /* protocol violation */ PS_SYNTAX = 5, /* command-line syntax error */ PS_IOERR = 6, /* file I/O error */ PS_ERROR = 7, /* protocol error */ PS_EXCLUDE = 8, /* client-side exclusion error */ PS_LOCKBUSY = 9, /* server responded lock busy */ PS_SMTP = 10, /* SMTP error */ PS_DNS = 11, /* fatal DNS error */ PS_BSMTP = 12, /* output batch could not be opened */ PS_MAXFETCH = 13, /* poll ended by fetch limit */ PS_NOTSUPPORTED = 14, /* command not supported */ /* leave space for more codes */ PS_CONTINUE = 128 /* more responses may follow */ } Pop3ErrorValue; POP3 のエラー状態を表す enum です。 ------------------------------------------------------------------------------ RecvTime typedef enum { RECV_TIME_NONE = 0, RECV_TIME_RECEIVED = 1, RECV_TIME_KEEP = 2, RECV_TIME_DELETE = 3 } RecvTime; 特殊なメッセージの受信時間を表す enum です。 ------------------------------------------------------------------------------ Pop3DropValue typedef enum { DROP_OK = 0, DROP_DONT_RECEIVE = 1, DROP_DELETE = 2, DROP_ERROR = -1 } Pop3DropValue; メッセージをローカルメールボックスに取り込むコールバック関数の戻り値です。 ------------------------------------------------------------------------------ Pop3MsgInfo struct _Pop3MsgInfo { gint size; gchar *uidl; time_t recv_time; guint received : 1; guint deleted : 1; }; POP3 の1メッセージを表す構造体です。 ------------------------------------------------------------------------------ Pop3Session struct _Pop3Session { Session session; Pop3State state; PrefsAccount *ac_prefs; gchar *greeting; gchar *user; gchar *pass; gint count; gint64 total_bytes; gint cur_msg; gint cur_total_num; gint64 cur_total_bytes; gint64 cur_total_recv_bytes; gint skipped_num; Pop3MsgInfo *msg; GHashTable *uidl_table; gboolean auth_only; gboolean new_msg_exist; gboolean uidl_is_valid; time_t current_time; Pop3ErrorValue error_val; gchar *error_msg; gpointer data; /* virtual method to drop message */ gint (*drop_message) (Pop3Session *session, const gchar *file); }; POP3 セッションを表す構造体です。 Session のサブクラスになります。 ------------------------------------------------------------------------------ #define POPBUFSIZE POP3 の処理に使用するバッファのサイズを表します。 ------------------------------------------------------------------------------ #define IDLEN UIDL 文字列の最大文字数です。 ------------------------------------------------------------------------------ Session *pop3_session_new (PrefsAccount *account); Pop3Session オブジェクトを作成します。 account: POP3 アカウント 戻り値: 新しい Pop3Session オブジェクト(Session にキャスト) エラーの場合 NULL ------------------------------------------------------------------------------ GHashTable *pop3_get_uidl_table (PrefsAccount *account); ローカルに保存されているアカウント account の既読メッセージの UIDL のリストを読み込み、 ハッシュテーブルに格納します。ハッシュテーブルの各 UIDL に対応する値はそれぞれの受信時間 となります。 account: POP3 アカウント 戻り値: UIDL をキーに、受信時間を値にしたハッシュテーブル UIDL のリストが読み込めなかった場合は空のハッシュテーブル ------------------------------------------------------------------------------ gint pop3_write_uidl_list (Pop3Session *session); 現在のセッション session の UIDL リストをファイルに書き出します。書き出した UIDL リストは pop3_get_uidl_table() で読み出せます。現在のセッションの UIDL リストが 有効でない場合は何もしません。 session: POP3 セッション 戻り値: 成功した場合、または UIDL が有効でない場合 0 エラーの場合 -1 libsylph-1.1.0/doc/prefs.txt0000644000175000017500000001456310530535624012721 00000000000000prefs - 設定情報の管理 ------------------------------------------------------------------------------ #define PREFSBUFSIZE 設定ファイルの処理に使用するバッファのサイズです。 ------------------------------------------------------------------------------ PrefType typedef enum { P_STRING, P_INT, P_BOOL, P_ENUM, P_USHORT, P_OTHER } PrefType; 設定項目の変数の型を表します。 P_STRING: gchar * (文字列) P_INT: gint (整数) P_BOOL: gboolean (bool 値) P_ENUM: DummyEnum (enum) P_USHORT: gushort (符号無し short) P_OTHER: その他(未定義) ------------------------------------------------------------------------------ typedef void (*DataSetFunc) (PrefParam *pparam); PrefParam 構造体にデータをセットするためのコールバック関数の型です。 ------------------------------------------------------------------------------ typedef void (*WidgetSetFunc) (PrefParam *pparam); PrefParam 構造体のデータから設定用 UI を更新するためのコールバック関数の 型です。 ------------------------------------------------------------------------------ PrefParam struct _PrefParam { gchar *name; gchar *defval; gpointer data; PrefType type; gpointer ui_data; }; 設定項目を表す構造体です。 name: 設定項目名 defval: デフォルト値 data: 設定を格納する変数へのポインタ type: 変数の型 ui_data: 設定用 UI と連携するために使用するデータ ------------------------------------------------------------------------------ PrefFile struct _PrefFile { FILE *fp; gchar *path; }; 設定ファイルを読み書きするときに使用する構造体です。 fp: ファイルストリーム path: ファイルのパス ------------------------------------------------------------------------------ GHashTable *prefs_param_table_get (PrefParam *param); PrefParam の設定項目名から PrefParam 構造体へのポインタを取得する ハッシュテーブルを生成します。 戻り値は prefs_param_table_destroy() で解放する必要があります。 param: PrefParam 構造体の配列 戻り値: 設定項目名をキー、 PrefParam 構造体へのポインタを値とする GHashTable オブジェクト ------------------------------------------------------------------------------ void prefs_param_table_destroy (GHashTable *param_table); prefs_param_table_get() で生成したハッシュテーブルを破棄します。 PrefParam 構造体自体は破棄されません。 param_table: prefs_param_table_get() で生成したハッシュテーブル ------------------------------------------------------------------------------ void prefs_read_config (PrefParam *param, const gchar *label, const gchar *rcfile, const gchar *encoding); ini ファイル形式の設定ファイル rcfile を読み込みます。 encoding が指定されている場合はそれを rcfile のエンコーディングとみなして UTF-8 への変換を行います。 まず "[label]" 形式の設定グループのラベルを探し、発見した行から次のラベル まで読み込みを行います。読み込んだ設定項目が PrefParam 構造体の配列 param 内に該当するものがある場合、その PrefParam 構造体に読み込んだデータを セットします。 param: PrefParam 構造体の配列 label: 設定グループのラベル rcfile: ini ファイル形式の設定ファイルのパス(ファイル名エンコーディング) encoding: rcfile のエンコーディング(NULL の場合 UTF-8) ------------------------------------------------------------------------------ void prefs_write_config (PrefParam *param, const gchar *label, const gchar *rcfile); PrefParam 構造体の配列 param を ini ファイル形式の設定ファイル rcfile として書き出します。 rcfile が既に存在し、複数の設定グループから構成される 場合は label に該当するグループのみが更新され、その他のグループは保持 されます。 param: PrefParam 構造体の配列 label: 設定グループのラベル rcfile: ini ファイル形式の設定ファイルのパス(ファイル名エンコーディング) ------------------------------------------------------------------------------ PrefFile *prefs_file_open (const gchar *path); 設定ファイル path をオープンし、 PrefFile 構造体を返します。 この時点ではまだ元のファイル path は上書きされません。 返った値は prefs_file_close() または prefs_file_close_revert() で解放する 必要があります。 ------------------------------------------------------------------------------ gint prefs_file_write_param (PrefFile *pfile, PrefParam *param); prefs_file_open() でオープンした設定ファイル pfile に設定項目 param を1行 書き出します。形式は name=value となります。 pfile: PrefFile 構造体へのポインタ param: PrefParam 構造体へのポインタ 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint prefs_file_close (PrefFile *pfile); 設定ファイル pfile をクローズし、元のファイルと置き換えます。 pfile: PrefFile 構造体へのポインタ 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint prefs_file_close_revert (PrefFile *pfile); 設定ファイル pfile をクローズし、元のファイルはそのまま保持し、 一時ファイルを破棄します。 pfile: PrefFile 構造体へのポインタ 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ void prefs_set_default (PrefParam *param); PrefParam 構造体の配列 param の各要素をすべてデフォルト値に設定します。 param: PrefParam 構造体の配列 ------------------------------------------------------------------------------ void prefs_free (PrefParam *param); PrefParam 構造体の配列 param の各要素の data が参照している、設定項目値として 確保されているメモリを解放します。 data の参照先は無効になります。 param: PrefParam 構造体の配列 libsylph-1.1.0/doc/prefs_account.txt0000644000175000017500000000723010530535641014425 00000000000000prefs_account - アカウントの設定の管理 ------------------------------------------------------------------------------ RecvProtocol typedef enum { A_POP3, A_APOP, /* deprecated */ A_RPOP, /* deprecated */ A_IMAP4, A_NNTP, A_LOCAL } RecvProtocol; 受信プロトコルの指定に使用します。 ------------------------------------------------------------------------------ SigType typedef enum { SIG_FILE, SIG_COMMAND, SIG_DIRECT } SigType; メッセージの署名の作成方法の指定に使用します。 ------------------------------------------------------------------------------ typedef enum { SIGN_KEY_DEFAULT, SIGN_KEY_BY_FROM, SIGN_KEY_CUSTOM } SignKeyType; PGP 署名の鍵の選択方法の指定に使用します。 ------------------------------------------------------------------------------ struct _PrefsAccount { }; アカウント毎の設定を格納する構造体です。 ------------------------------------------------------------------------------ PrefsAccount *prefs_account_new (void); PrefsAccount 構造体を作成します。作成した構造体の各メンバはデフォルトの値で 初期化されています。また、 PrefsAccount::account_id にはユニークな ID が 自動的にセットされます。 戻り値は prefs_account_free() で解放する必要があります。 戻り値: 新規に作成した PrefsAccount 構造体へのポインタ ------------------------------------------------------------------------------ PrefsAccount *prefs_account_get_tmp_prefs (void); prefs_account.c 内で宣言されている PrefsAccount の一時領域として使用する 構造体へのポインタを返します。 戻り値: PrefsAccount 構造体へのポインタ ------------------------------------------------------------------------------ void prefs_account_set_tmp_prefs (PrefsAccount *ac_prefs); ac_prefs の各メンバの値を prefs_account.c 内の PrefsAccount の一時領域に コピーします。文字列のコピーは行われません。 ac_prefs: コピー元の PrefsAccount 構造体へのポインタ ------------------------------------------------------------------------------ void prefs_account_apply_tmp_prefs (PrefsAccount *ac_prefs); prefs_account.c 内の PrefsAccount の一時領域の各メンバの値を ac_prefs に コピーします。文字列のコピーは行われません。 ac_prefs: コピー先の PrefsAccount 構造体へのポインタ ------------------------------------------------------------------------------ PrefParam *prefs_account_get_params (void); prefs_account.c 内で宣言されている PrefParam の構造体の配列へのポインタを 返します。 ------------------------------------------------------------------------------ void prefs_account_read_config (PrefsAccount *ac_prefs, const gchar *label); アカウントの設定ファイルから label ("アカウント名: ID")に該当するグループを 読み込み、 ac_prefs の各メンバの値を更新します。 ac_prefs: PrefsAccount 構造体へのポインタ label: 設定グループのラベル ------------------------------------------------------------------------------ void prefs_account_write_config_all (GList *account_list); PrefsAccount 構造体のリストで提供されたアカウント情報をアカウント設定 ファイル(accountrc)に書き出します。 account_list: PrefsAccount 構造体のリスト ------------------------------------------------------------------------------ void prefs_account_free (PrefsAccount *ac_prefs); PrefsAccount 構造体を解放します。 ac_prefs: PrefsAccount 構造体へのポインタ libsylph-1.1.0/doc/prefs_common.txt0000644000175000017500000000507510530535653014271 00000000000000prefs_common - 全般の設定の管理 ------------------------------------------------------------------------------ RecvDialogMode typedef enum { RECV_DIALOG_ALWAYS, RECV_DIALOG_MANUAL, RECV_DIALOG_NEVER } RecvDialogMode; 受信ダイアログのモードの指定に使用します。 ------------------------------------------------------------------------------ TransferEncodingMethod typedef enum { CTE_AUTO, CTE_BASE64, CTE_QUOTED_PRINTABLE, CTE_8BIT } TransferEncodingMethod; Content-Transfer-Encoding の指定に使用します。 ------------------------------------------------------------------------------ MIMEFilenameEncodingMethod typedef enum { FENC_MIME, FENC_RFC2231, FENC_NONE } MIMEFilenameEncodingMethod; ヘッダの MIME ファイル名エンコーディングの方式の指定に使用します。 ------------------------------------------------------------------------------ struct _PrefsCommon { }; 全般の設定を格納する構造体です。実体は prefs_common.c で宣言されています。 ------------------------------------------------------------------------------ PrefsCommon *prefs_common_get (void); prefs_common.c 内で宣言されている PrefsCommon 構造体へのポインタを返します。 全般の設定を参照する際はこれを使用します。 戻り値: PrefsCommon 構造体へのポインタ ------------------------------------------------------------------------------ PrefParam *prefs_common_get_params (void); prefs_common.c 内で宣言されている PrefParam の構造体の配列へのポインタを 返します。 戻り値: PrefParam の構造体の配列へのポインタ ------------------------------------------------------------------------------ void prefs_common_read_config (void); 全般の設定の設定ファイルを読み込み、 PrefsCommon 構造体の各メンバを更新します。 設定ファイルディレクトリ以下の sylpheedrc と command_history が読み込まれます。 ------------------------------------------------------------------------------ void prefs_common_write_config (void); PrefsCommon 構造体の情報を全般の設定の設定ファイルに書き出します。 設定ファイルディレクトリ以下の sylpheedrc と command_history が書き出されます。 ------------------------------------------------------------------------------ void prefs_common_junk_filter_list_set (void); PrefsCommon 構造体内の迷惑メールフィルタのリストを初期化します。 以前のフィルタルールは消去されます。 libsylph-1.1.0/doc/procheader.txt0000644000175000017500000003253110530535667013720 00000000000000procheader - メッセージヘッダの解析処理 ------------------------------------------------------------------------------ HeaderEntry struct _HeaderEntry { gchar *name; gchar *body; gboolean unfold; }; HeaderEntry は対象となるヘッダを指定し、結果を得るための構造体です。 通常は配列として関数に渡します。 name: ヘッダ名 body: name に対応するヘッダの値を格納するメンバ unfold: TRUE の場合は複数行にわたるヘッダを1行にまとめる ------------------------------------------------------------------------------ Header struct _Header { gchar *name; gchar *body; }; Header はヘッダフィールドの名前とその値を表す構造体です。 name: ヘッダ名 body: ヘッダの値 ------------------------------------------------------------------------------ gint procheader_get_one_field (gchar *buf, size_t len, FILE *fp, HeaderEntry hentry[]); メッセージファイルのストリーム fp から hentry で指定したヘッダ名のいずれかに 該当するヘッダが見つかるまで読み込み、見つかった場合はそのヘッダ文字列を buf に格納して返します。該当するヘッダの HeaderEntry::unfold が TRUE に 設定されていた場合は、そのヘッダが複数行で構成されている場合は1行にまとめて 返します。 空行が現れた場合、あるいはファイルの終わりに到達した 場合はヘッダの終了とみなして -1 を返します。 buf: ヘッダ文字列を格納するバッファ len: buf のサイズ fp: メッセージのファイルストリーム hentry: HeaderEntry 構造体の配列 戻り値: 該当するヘッダの hentry におけるインデックス値 ヘッダの終端まで読み込んだ、またはエラーの場合 -1 ------------------------------------------------------------------------------ gchar *procheader_get_unfolded_line (gchar *buf, size_t len, FILE *fp); メッセージファイルのストリーム fp から1行読み込み、 buf に格納して返します。 ヘッダが複数行で構成されている場合は1行にまとめて返します。 buf: ヘッダ文字列を格納するバッファ len: buf のサイズ fp: メッセージの FILE ポインタ 戻り値: 読み込みに成功した場合は buf ヘッダまたはファイルの終端に達した、あるいはエラーの場合 NULL ------------------------------------------------------------------------------ GSList *procheader_get_header_list_from_file (const gchar *file); メッセージファイル file を読み込み、すべてのヘッダに対応する Header 構造体の リストを生成して返します。 ヘッダが複数行で構成されている場合は1行にまとめられます。 返ったリストは procheader_header_list_destroy() で解放する必要があります。 file: メッセージファイルのパス(ファイル名エンコーディング) 戻り値: Header 構造体へのポインタのリスト ------------------------------------------------------------------------------ GSList *procheader_get_header_list (FILE *fp); メッセージファイルのストリーム fp を読み込み、すべてのヘッダに対応する Header 構造体のリストを生成して返します。 ヘッダが複数行で構成されている場合は1行にまとめられます。 返ったリストは procheader_header_list_destroy() で解放する必要があります。 fp: メッセージのファイルストリーム 戻り値: Header 構造体へのポインタのリスト ------------------------------------------------------------------------------ GSList *procheader_get_header_list_from_msginfo (MsgInfo *msginfo); メッセージ情報 msginfo からヘッダのリストを生成して返します。 ファイル自体は読み込まれません。 返ったリストは procheader_header_list_destroy() で解放する必要があります。 msginfo: MsgInfo 構造体へのポインタ 戻り値: Header 構造体へのポインタのリスト ------------------------------------------------------------------------------ GSList *procheader_add_header_list (GSList *hlist, const gchar *header_name, const gchar *body); Header 構造体のリストに新たなヘッダを追加します。 hlist: Header 構造体へのポインタのリスト header_name: ヘッダ名 body: ヘッダの内容 ------------------------------------------------------------------------------ GSList *procheader_merge_header_list (GSList *hlist1, GSList *hlist2); ヘッダリスト hlist2 のうち hlist1 に存在しないヘッダを hlist1 にマージ します。 注意: Header 構造体は hlist1 と hlist2 で共有されます。 hlist1: Header 構造体へのポインタのリスト hlist2: Header 構造体へのポインタのリスト 戻り値: マージされたヘッダリスト hlist1 ------------------------------------------------------------------------------ gint procheader_find_header_list (GSList *hlist, const gchar *header_name); ヘッダリスト hlist からヘッダ名が header_name に一致するものを探し、 最初に見つかったもののインデックス値を返します。大文字・小文字は区別しません。 hlist: Header 構造体へのポインタのリスト header_name: ヘッダ名 戻り値: 見つかった場合は hlist 上のインデックス値 (>=0) 見つからなかった場合は -1 ------------------------------------------------------------------------------ GPtrArray *procheader_get_header_array (FILE *fp, const gchar *encoding); メッセージファイルのストリーム fp を読み込み、すべてのヘッダに対応する Header 構造体の配列を生成して返します。 ヘッダが複数行で構成されている場合は1行にまとめられます。 encoding が指定されている場合は MIME ヘッダのデコード時にそれをデフォルトの エンコーディングとして処理します。 返った配列は procheader_header_array_destroy() で解放する必要があります。 fp: メッセージのファイルストリーム encoding: デフォルトのエンコーディング 戻り値: Header 構造体へのポインタの配列 ------------------------------------------------------------------------------ GPtrArray *procheader_get_header_array_asis (FILE *fp, const gchar *encoding); メッセージファイルのストリーム fp を読み込み、すべてのヘッダに対応する Header 構造体の配列を生成して返します。 ヘッダが複数行で構成されている場合は改行を含めてそのまま保持されます。 encoding が指定されている場合は MIME ヘッダのデコード時にそれをデフォルトの エンコーディングとして処理します。 返った配列は procheader_header_array_destroy() で解放する必要があります。 fp: メッセージのファイルストリーム encoding: デフォルトのエンコーディング 戻り値: Header 構造体へのポインタの配列 ------------------------------------------------------------------------------ GPtrArray *procheader_get_header_array_for_display (FILE *fp, const gchar *encoding); メッセージファイルのストリーム fp を読み込み、 PrefsCommon で表示するヘッダ として指定されているヘッダに対応する Header 構造体の配列を生成して返します。 ヘッダが複数行で構成されている場合は改行を含めてそのまま保持されます。 encoding が指定されている場合は MIME ヘッダのデコード時にそれをデフォルトの エンコーディングとして処理します。 返った配列は procheader_header_array_destroy() で解放する必要があります。 fp: メッセージのファイルストリーム encoding: デフォルトのエンコーディング 戻り値: Header 構造体へのポインタの配列 ------------------------------------------------------------------------------ void procheader_header_list_destroy (GSList *hlist); ヘッダリスト hlist を解放します。 Header 構造体自体も解放されます。 hlist: Header 構造体へのポインタのリスト ------------------------------------------------------------------------------ void procheader_header_array_destroy (GPtrArray *harray); ヘッダの配列 harray を解放します。 Header 構造体自体も解放されます。 hlist: Header 構造体へのポインタの配列 ------------------------------------------------------------------------------ void procheader_header_free (Header *header); Header 構造体を解放します。 header: Header 構造体へのポインタ ------------------------------------------------------------------------------ void procheader_get_header_fields (FILE *fp, HeaderEntry hentry[]); メッセージファイルのストリーム fp から hentry で指定したヘッダをすべて 読み込み、該当する hentry の配列の要素の body メンバに格納します。 To または Cc ヘッダが複数存在する場合は、各ヘッダの値を "," で結合して 一つの文字列にして格納します。それ以外の場合は最初に見つかったものが 優先されます。 fp: メッセージのファイルストリーム hentry: HeaderEntry 構造体の配列 ------------------------------------------------------------------------------ MsgInfo *procheader_parse_file (const gchar *file, MsgFlags flags, gboolean full); メッセージファイル file のヘッダをパースし、 MsgInfo 構造体を生成します。 その際 flags がデフォルトのフラグとして扱われます。 full が TRUE の場合は一部のヘッダ(Cc, X-Face)がパース対象に追加されます。 生成された MsgInfo 構造体は procmsg_msginfo_free() で解放する必要があります。 file: メッセージファイルのパス(ファイル名エンコーディング) flags: デフォルトのメッセージフラグ full: TRUE の場合は Cc, X-Face をパース対象に含める FALSE の場合は Cc, X-Face をパース対象に含めない 戻り値: MsgInfo 構造体へのポインタ ------------------------------------------------------------------------------ MsgInfo *procheader_parse_str (const gchar *str, MsgFlags flags, gboolean full); メッセージ全体を格納した文字列 str をパースし、 MsgInfo 構造体を生成します。 他は procheader_parse_file() と同様です。 生成された MsgInfo 構造体は procmsg_msginfo_free() で解放する必要があります。 str: メッセージ全体を格納する文字列 flags: デフォルトのメッセージフラグ full: TRUE の場合は Cc, X-Face をパース対象に含める FALSE の場合は Cc, X-Face をパース対象に含めない 戻り値: MsgInfo 構造体へのポインタ ------------------------------------------------------------------------------ MsgInfo *procheader_parse_stream (FILE *fp, MsgFlags flags, gboolean full); メッセージのファイルストリーム fp をパースし、 MsgInfo 構造体を生成します。 他は procheader_parse_file() と同様です。 生成された MsgInfo 構造体は procmsg_msginfo_free() で解放する必要があります。 str: メッセージのファイルストリーム flags: デフォルトのメッセージフラグ full: TRUE の場合は Cc, X-Face をパース対象に含める FALSE の場合は Cc, X-Face をパース対象に含めない 戻り値: MsgInfo 構造体へのポインタ ------------------------------------------------------------------------------ gchar *procheader_get_fromname (const gchar *str); メールアドレス文字列から差出人の名前を抽出します。 メールアドレス文字列は John Doe または johndoe@example.com (John Doe) の形式になります。 戻り値は g_free() で解放する必要があります。 str: メールアドレス文字列 戻り値: アドレスに含まれる名前の文字列 ------------------------------------------------------------------------------ time_t procheader_date_parse (gchar *dest, const gchar *src, gint len); RFC 2822 で規定されている Date ヘッダの文字列をパースし、 time_t 型に 変換します(UTC)。規定に違反している形式でもある程度は許容 されます。dast が NULL でない場合は、ローカルタイムに変換してから PrefsCommon で設定されている日付の形式に従って文字列に変換して格納します。 dest: 日付文字列を格納するバッファ src: RFC 2822 の Date ヘッダ文字列 len: dest のサイズ 戻り値: Date ヘッダ文字列から得た UTC 時間 ------------------------------------------------------------------------------ void procheader_date_get_localtime (gchar *dest, gint len, const time_t timer); UTC 時間 timer をローカルタイムに変換し、PrefsCommon で設定されている 日付の形式に従って文字列に変換して格納します。 dest: 日付文字列を格納するバッファ len: dest のサイズ timer: UTC 時間 libsylph-1.1.0/doc/procmime.txt0000644000175000017500000004477010530535700013413 00000000000000procmime - MIME の処理 ------------------------------------------------------------------------------ EncodingType typedef enum { ENC_7BIT, ENC_8BIT, ENC_QUOTED_PRINTABLE, ENC_BASE64, ENC_X_UUENCODE, ENC_UNKNOWN } EncodingType; Content-Transfer-Encoding のタイプを表す enum 型です。 ENC_7BIT: 7bit ENC_8BIT: 8bit ENC_QUOTED_PRINTABLE: quoted-printable ENC_BASE64: base64 ENC_X_UUENCODE: x-uuencode (非標準) ENC_UNKNOWN: 不明 ------------------------------------------------------------------------------ ContentType typedef enum { MIME_TEXT, MIME_TEXT_HTML, MIME_MESSAGE_RFC822, MIME_APPLICATION, MIME_APPLICATION_OCTET_STREAM, MIME_MULTIPART, MIME_IMAGE, MIME_AUDIO, MIME_VIDEO, MIME_UNKNOWN } ContentType; Content-Type (MIME タイプ)でよく使われるものを表す enum 型です。 MIME_TEXT: text/* MIME_TEXT_HTML: text/html MIME_MESSAGE_RFC822: message/rfc822 MIME_APPLICATION: application/* MIME_APPLICATION_OCTET_STREAM: application/octet-stream MIME_MULTIPART: multipart/* MIME_IMAGE: image/* MIME_AUDIO: audio/* MIME_VIDEO: video/* MIME_UNKNOWN: 不明 ------------------------------------------------------------------------------ MimeType struct _MimeType { gchar *type; gchar *sub_type; gchar *extension; }; MIME タイプを表す構造体です。 type: MIME タイプ sub_type: サブタイプ extension: 拡張子 ------------------------------------------------------------------------------ MailCap struct _MailCap { gchar *mime_type; gchar *cmdline_fmt; gboolean needs_terminal; }; mailcap 形式のファイルをパースするための構造体です。 mime_type: MIME タイプ cmdline_fmt: コマンドラインフォーマット needs_terminal: 端末が必要かどうか(現在未使用) ------------------------------------------------------------------------------ MimeInfo /* * An example of MimeInfo structure: * * multipart/mixed root <-+ parent * | * multipart/alternative children <-+ parent * | * text/plain children --+ * | * text/html next <-+ * * message/rfc822 next <-+ main * | * sub (capsulated message) * * image/jpeg next */ struct _MimeInfo { gchar *encoding; EncodingType encoding_type; ContentType mime_type; gchar *content_type; gchar *charset; gchar *name; gchar *boundary; gchar *content_disposition; gchar *filename; glong fpos; guint size; guint content_size; MimeInfo *main; MimeInfo *sub; MimeInfo *next; MimeInfo *parent; MimeInfo *children; MimeInfo *plaintext; gchar *sigstatus; gchar *sigstatus_full; gint level; }; MIME パートを表す構造体です。1つのメッセージ中の各 MIME パートはツリー構造 としてつながります。 ------------------------------------------------------------------------------ #define IS_BOUNDARY(s, bnd, len) 文字列 s が MIME パートの境界であるかどうかを返します。 s: 文字列 bnd: 境界文字列 len: bnd の長さ 戻り値: s が MIME パートの境界であれば TRUE 、そうでなければ FALSE ------------------------------------------------------------------------------ MimeInfo *procmime_mimeinfo_new (void); MimeInfo 構造体を作成します。 作成した MimeInfo 構造体は procmime_mimeinfo_free_all() で解放する必要が あります。 戻り値: MimeInfo 構造体へのポインタ ------------------------------------------------------------------------------ void procmime_mimeinfo_free_all (MimeInfo *mimeinfo); mimeinfo と mimeinfo 以下に接続されているすべての MimeInfo 構造体を 解放します。 mimeinfo の親からは mimeinfo: MimeInfo 構造体へのポインタ ------------------------------------------------------------------------------ MimeInfo *procmime_mimeinfo_insert (MimeInfo *parent, MimeInfo *mimeinfo); mimeinfo を parent の子として接続します。 parent にすでに子が存在する 場合は、その末尾に追加されます。 parent: 親となる MimeInfo 構造体 mimeinfo: parent の子となる MimeInfo 構造体 戻り値: mimeinfo ------------------------------------------------------------------------------ MimeInfo *procmime_mimeinfo_next (MimeInfo *mimeinfo); MIME ツリー上で mimeinfo の次に位置する MimeInfo 構造体を返します。 children, sub, next の順に優先されます。 mimeinfo: MimeInfo 構造体へのポインタ 戻り値: mimeinfo の次の位置にある MimeInfo 構造体へのポインタ ------------------------------------------------------------------------------ MimeInfo *procmime_scan_message (MsgInfo *msginfo); メッセージ msginfo 全体をスキャンし、 MIME ツリーを生成して返します。 復号化のコールバックが設定されている場合は自動的に復号されます。 msginfo: MsgInfo 構造体へのポインタ 戻り値: MimeInfo 構造体へのポインタ ------------------------------------------------------------------------------ void procmime_scan_multipart_message (MimeInfo *mimeinfo, FILE *fp); multipart/* または message/rfc822 の MIME パート mimeinfo 以下の MIME 構造を ファイルストリーム fp からスキャンし、 mimeinfo に結合します。 fp は mimeinfo が指すメッセージファイルに対して開かれている必要があります。 mimeinfo: MimeInfo 構造体へのポインタ(multipart/* または message/rfc822 のみ) fp: メッセージのファイルストリーム ------------------------------------------------------------------------------ void procmime_scan_encoding (MimeInfo *mimeinfo, const gchar *encoding); Content-Transfer-Encoding ヘッダ文字列 encoding を EncodingType 型に変換し、 mimeinfo->encoding_type に格納します。 mimeinfo: MimeInfo 構造体へのポインタ encoding: Content-Transfer-Encoding 文字列 ------------------------------------------------------------------------------ void procmime_scan_content_type (MimeInfo *mimeinfo, const gchar *content_type); Content-Type ヘッダ文字列 content_type をスキャンし、 mimeinfo の各メンバを それに合わせて適切に更新します。 mimeinfo: MimeInfo 構造体へのポインタ content_type: Content-Type 文字列 ------------------------------------------------------------------------------ void procmime_scan_content_type_str (const gchar *content_type, gchar **mime_type, gchar **charset, gchar **name, gchar **boundary); Content-Type ヘッダ文字列 content_type を解析し、 MIME タイプの値と、 charset 、 name 、 boundary 属性を得ます。 返った文字列は g_free() で解放する必要があります。 content_type: Content-Type 文字列 mime_type: MIME タイプ文字列の格納先(NULL 可) charset: charset 属性文字列の格納先(NULL 可) name: name 属性文字列の格納先(NULL 可) boundary: boundary 属性文字列の格納先(NULL 可) ------------------------------------------------------------------------------ void procmime_scan_content_disposition (MimeInfo *mimeinfo, const gchar *content_disposition); Content-Disposition ヘッダ文字列 content_disposition を解析し、 mimeinfo の各メンバをそれに合わせて適切に更新します。 mimeinfo: MimeInfo 構造体へのポインタ content_disposition: Content-Disposition ヘッダ文字列 ------------------------------------------------------------------------------ MimeInfo *procmime_scan_mime_header (FILE *fp); メッセージのファイルストリーム fp を読み込み、1パート分の各 MIME ヘッダを パースして MimeInfo 構造体を生成します。 作成した MimeInfo 構造体は procmime_mimeinfo_free_all() で解放する必要が あります。 fp: メッセージのファイルストリーム 戻り値: MimeInfo 構造体へのポインタ ------------------------------------------------------------------------------ FILE *procmime_decode_content (FILE *outfp, FILE *infp, MimeInfo *mimeinfo); MIME 情報 mimeinfo とそれに対応するメッセージのファイルストリーム fp から、 MIME パートの内容をデコードして取り出し、 outfp に書き出します。 テキストパートの場合はプラットフォームに合わせて改行コードを正規化します。 outfp が NULL の場合は一時ファイルを作成し、そこに書き込み、そのファイル ストリームを返します。一時ファイルの場合はファイルポインタの位置は先頭に なります。このファイルストリームをクローズすると一時ファイルは自動的に 消去されます。 outfp: 出力先ファイルストリーム NULL の場合は一時ファイルを作成 infp: 入力ファイルストリーム mimeinfo: デコードするパートを指す MimeInfo 構造体へのポインタ 戻り値: outfp が NULL でない場合は outfp outfp が NULL の場合は新規作成された一時ファイルのストリーム ------------------------------------------------------------------------------ gint procmime_get_part (const gchar *outfile, const gchar *infile, MimeInfo *mimeinfo); MIME 情報 mimeinfo とそれに対応するメッセージファイル infile から、 MIME パートの内容をデコードして取り出し、 outfile に書き出します。 テキストパートの場合はプラットフォームに合わせて改行コードを正規化します。 outfile: 出力先ファイルのパス(ファイル名エンコーディング) infile: 入力ファイルのパス(ファイル名エンコーディング) mimeinfo: デコードするパートを指す MimeInfo 構造体へのポインタ 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint procmime_get_part_fp (const gchar *outfile, FILE *infp, MimeInfo *mimeinfo); MIME 情報 mimeinfo とそれに対応するメッセージのファイルストリーム infp から、 MIME パートの内容をデコードして取り出し、 outfile に書き出します。 テキストパートの場合はプラットフォームに合わせて改行コードを正規化します。 outfile: 出力先ファイルのパス(ファイル名エンコーディング) infp: 入力ファイルストリーム mimeinfo: デコードするパートを指す MimeInfo 構造体へのポインタ 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint procmime_get_all_parts (const gchar *dir, const gchar *infile, MimeInfo *mimeinfo); mimeinfo 以下のパートを検索し、ファイル名をもつパート(添付ファイル)をすべて 指定したディレクトリ dir に保存します。ファイル名が重複する場合は自動的に 代替ファイル名が使用されます。 dir: 出力先ディレクトリ infile: mimeinfo に対応するメッセージファイル(ファイル名エンコーディング) mimeinfo: MimeInfo 構造体へのポインタ 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ FILE *procmime_get_text_content (MimeInfo *mimeinfo, FILE *infp, const gchar *encoding); テキストパート mimeinfo の内容を一時ファイルに書き出して返します。 mimeinfo のタイプは MIME_TEXT または MIME_TEXT_HTML である必要があります。 encoding を指定した場合はその文字エンコーディングに変換して出力します。 一時ファイルのファイルポインタの位置は先頭になります。 一時ファイルを閉じると一時ファイルは自動的に削除されます。 mimeinfo: MimeInfo 構造体へのポインタ infp: 入力ファイルストリーム encoding: 出力文字エンコーディング 戻り値: 新規作成された一時ファイルのストリーム ------------------------------------------------------------------------------ FILE *procmime_get_first_text_content (MsgInfo *msginfo, const gchar *encoding); メッセージ msginfo の最初のテキストパートを探し、その内容を一時ファイルに 書き出して返します。 encoding を指定した場合はその文字エンコーディングに変換して出力します。 一時ファイルのファイルポインタの位置は先頭になります。 一時ファイルを閉じると一時ファイルは自動的に削除されます。 msginfo: MsgInfo 構造体へのポインタ encoding: 出力文字エンコーディング 戻り値: 新規作成された一時ファイルのストリーム ------------------------------------------------------------------------------ gboolean procmime_find_string_part (MimeInfo *mimeinfo, const gchar *filename, const gchar *str, StrFindFunc find_func); 指定したメッセージのテキストパートに文字列 str が含まれているかどうかを 検索関数 find_func を用いて調べ、あれば TRUE を返します。 mimeinfo: MimeInfo 構造体へのポインタ filename: mimeinfo に対応するメッセージファイル(ファイル名エンコーディング) str: 検索文字列 find_func: 検索関数へのポインタ 戻り値: str が指定したパート中に見つかれば TRUE 、見つからなければ FALSE ------------------------------------------------------------------------------ gboolean procmime_find_string (MsgInfo *msginfo, const gchar *str, StrFindFunc find_func); メッセージ msginfo 中のすべてのテキストパートに、文字列 str が含まれて いるかどうかを検索関数 find_func を用いて調べ、あれば TRUE を返します。 msginfo: MsgInfo 構造体へのポインタ str: 検索文字列 find_func: 検索関数へのポインタ 戻り値: str がテキストパート中に見つかれば TRUE 、見つからなければ FALSE ------------------------------------------------------------------------------ gchar *procmime_get_part_file_name (MimeInfo *mimeinfo); メッセージのパート mimeinfo に対するファイル名を生成して返します。 添付ファイル名が指定されていればそれを使用し、なければ "mimetmp" という 文字列が返ります。文字列はファイルシステム上で使用できるように加工され、 ファイル名エンコーディングで返ります。 戻り値は g_free() で解放する必要があります。 mimeinfo: MimeInfo 構造体へのポインタ 戻り値: 生成されたファイル名文字列(ファイル名エンコーディング) ------------------------------------------------------------------------------ gchar *procmime_get_tmp_file_name (MimeInfo *mimeinfo); メッセージのパート mimeinfo に対する一時ファイル名をフルパスで生成して 返します。ファイル名には重複しないようプレフィクスが付加されます。 ファイルの場所は設定ファイルディレクトリ以下の mimetmp ディレクトリに なります。 mimeinfo: MimeInfo 構造体へのポインタ 戻り値: 生成された一時ファイル名のフルパス(ファイル名エンコーディング) ------------------------------------------------------------------------------ ContentType procmime_scan_mime_type (const gchar *mime_type); MIME タイプ文字列(type/subtype 形式)をスキャンし、 ContentType 型に変換して 返します。 mime_type: MIME タイプ文字列 戻り値: ContentType 型の enum 値 ------------------------------------------------------------------------------ gchar *procmime_get_mime_type (const gchar *filename); ファイル名の拡張子から MIME タイプ文字列(type/subtype 形式)を取得して 返します。拡張子がない、または未知の場合は NULL が返ります。 拡張子と MIME タイプの対応表は設定ファイルディレクトリ以下の mime.types ファイルが使用されます。 戻り値は g_free() で解放する必要があります。 filename: ファイル名 戻り値: MIME タイプ文字列 取得できなかった場合は NULL ------------------------------------------------------------------------------ gint procmime_execute_open_file (const gchar *file, const gchar *mime_type); ファイル file を MIME タイプ mime_type または file の拡張子に基づいて アプリケーションで開きます。 MIME タイプとアプリケーションの対応表は 設定ファイルディレクトリ以下の mailcap ファイル(または ~/.mailcap)が 使用されます。子プロセスは非同期で生成されます。 file: 開くファイル名 mime_type: MIME タイプ文字列(NULL の場合は file の拡張子から判断) 戻り値: 成功した場合は 0 エラーの場合は -1 ------------------------------------------------------------------------------ EncodingType procmime_get_encoding_for_charset (const gchar *charset); 文字エンコーディング charset から最適な Content-Transfer-Encoding のタイプ を取得します。 charset: 文字エンコーディング文字列 戻り値: EncodingType 型の enum 値 ------------------------------------------------------------------------------ EncodingType procmime_get_encoding_for_text_file(const gchar *file); テキストファイル file に対して最適な Content-Transfer-Encoding のタイプ を取得します。 ファイル中の 8bit 文字が全体の 20% 以上であれば ENC_BASE64 が選択されます。 それ以下の場合は ENC_QUOTED_PRINTABLE が選択されます。 すべての文字が 7bit の範囲に収まる場合は ENC_7BIT が選択されます。 file: テキストファイルのパス(ファイル名エンコーディング) 戻り値: EncodingType 型の enum 値 ------------------------------------------------------------------------------ const gchar *procmime_get_encoding_str (EncodingType encoding); EncodingType 型の値から Content-Transfer-Encoding 文字列を得ます。 返った文字列は解放する必要はありません。 encoding: EncodingType 型の enum 値 戻り値: Content-Transfer-Encoding 文字列 libsylph-1.1.0/doc/procmsg.txt0000644000175000017500000006635510530535710013256 00000000000000procmsg - メッセージの操作 ------------------------------------------------------------------------------ DataOpenMode typedef enum { DATA_READ, DATA_WRITE, DATA_APPEND } DataOpenMode; procmsg_open_data_file() 等でファイルを開く際に指定するモードです。 DATA_READ: 読み込みモード DATA_WRITE: 書き込み(上書き)モード DATA_APPEND: 追加書き込みモード ------------------------------------------------------------------------------ #define MSG_NEW (1U << 0) #define MSG_UNREAD (1U << 1) #define MSG_MARKED (1U << 2) #define MSG_DELETED (1U << 3) #define MSG_REPLIED (1U << 4) #define MSG_FORWARDED (1U << 5) #define MSG_CLABEL_SBIT (7) /* start bit of color label */ #define MAKE_MSG_CLABEL(h, m, l) (((h) << (MSG_CLABEL_SBIT + 2)) | \ ((m) << (MSG_CLABEL_SBIT + 1)) | \ ((l) << (MSG_CLABEL_SBIT + 0))) #define MSG_CLABEL_NONE MAKE_MSG_CLABEL(0U, 0U, 0U) #define MSG_CLABEL_1 MAKE_MSG_CLABEL(0U, 0U, 1U) #define MSG_CLABEL_2 MAKE_MSG_CLABEL(0U, 1U, 0U) #define MSG_CLABEL_3 MAKE_MSG_CLABEL(0U, 1U, 1U) #define MSG_CLABEL_4 MAKE_MSG_CLABEL(1U, 0U, 0U) #define MSG_CLABEL_5 MAKE_MSG_CLABEL(1U, 0U, 1U) #define MSG_CLABEL_6 MAKE_MSG_CLABEL(1U, 1U, 0U) #define MSG_CLABEL_7 MAKE_MSG_CLABEL(1U, 1U, 1U) #define MSG_CLABEL_ORANGE MSG_CLABEL_1 #define MSG_CLABEL_RED MSG_CLABEL_2 #define MSG_CLABEL_PINK MSG_CLABEL_3 #define MSG_CLABEL_SKYBLUE MSG_CLABEL_4 #define MSG_CLABEL_BLUE MSG_CLABEL_5 #define MSG_CLABEL_GREEN MSG_CLABEL_6 #define MSG_CLABEL_BROWN MSG_CLABEL_7 /* RESERVED */ #define MSG_RESERVED (1U << 31) #define MSG_CLABEL_FLAG_MASK (MSG_CLABEL_7) typedef guint32 MsgPermFlags; #define MSG_MOVE (1U << 0) #define MSG_COPY (1U << 1) #define MSG_QUEUED (1U << 16) #define MSG_DRAFT (1U << 17) #define MSG_ENCRYPTED (1U << 18) #define MSG_IMAP (1U << 19) #define MSG_NEWS (1U << 20) #define MSG_SIGNED (1U << 21) #define MSG_FLAG_CHANGED (1U << 27) #define MSG_CACHED (1U << 28) #define MSG_MIME (1U << 29) #define MSG_INVALID (1U << 30) #define MSG_RECEIVED (1U << 31) #define MSG_CACHED_FLAG_MASK (MSG_MIME) typedef guint32 MsgTmpFlags; #define MSG_SET_FLAGS(msg, flags) { (msg) |= (flags); } #define MSG_UNSET_FLAGS(msg, flags) { (msg) &= ~(flags); } #define MSG_SET_PERM_FLAGS(msg, flags) \ MSG_SET_FLAGS((msg).perm_flags, flags) #define MSG_SET_TMP_FLAGS(msg, flags) \ MSG_SET_FLAGS((msg).tmp_flags, flags) #define MSG_UNSET_PERM_FLAGS(msg, flags) \ MSG_UNSET_FLAGS((msg).perm_flags, flags) #define MSG_UNSET_TMP_FLAGS(msg, flags) \ MSG_UNSET_FLAGS((msg).tmp_flags, flags) #define MSG_IS_NEW(msg) (((msg).perm_flags & MSG_NEW) != 0) #define MSG_IS_UNREAD(msg) (((msg).perm_flags & MSG_UNREAD) != 0) #define MSG_IS_MARKED(msg) (((msg).perm_flags & MSG_MARKED) != 0) #define MSG_IS_DELETED(msg) (((msg).perm_flags & MSG_DELETED) != 0) #define MSG_IS_REPLIED(msg) (((msg).perm_flags & MSG_REPLIED) != 0) #define MSG_IS_FORWARDED(msg) (((msg).perm_flags & MSG_FORWARDED) != 0) #define MSG_GET_COLORLABEL(msg) (((msg).perm_flags & MSG_CLABEL_FLAG_MASK)) #define MSG_GET_COLORLABEL_VALUE(msg) (MSG_GET_COLORLABEL(msg) >> MSG_CLABEL_SBIT) #define MSG_SET_COLORLABEL_VALUE(msg, val) \ MSG_SET_PERM_FLAGS(msg, ((((guint)(val)) & 7) << MSG_CLABEL_SBIT)) #define MSG_IS_MOVE(msg) (((msg).tmp_flags & MSG_MOVE) != 0) #define MSG_IS_COPY(msg) (((msg).tmp_flags & MSG_COPY) != 0) #define MSG_IS_QUEUED(msg) (((msg).tmp_flags & MSG_QUEUED) != 0) #define MSG_IS_DRAFT(msg) (((msg).tmp_flags & MSG_DRAFT) != 0) #define MSG_IS_ENCRYPTED(msg) (((msg).tmp_flags & MSG_ENCRYPTED) != 0) #define MSG_IS_IMAP(msg) (((msg).tmp_flags & MSG_IMAP) != 0) #define MSG_IS_NEWS(msg) (((msg).tmp_flags & MSG_NEWS) != 0) #define MSG_IS_SIGNED(msg) (((msg).tmp_flags & MSG_SIGNED) != 0) #define MSG_IS_FLAG_CHANGED(msg) (((msg).tmp_flags & MSG_FLAG_CHANGED) != 0) #define MSG_IS_CACHED(msg) (((msg).tmp_flags & MSG_CACHED) != 0) #define MSG_IS_MIME(msg) (((msg).tmp_flags & MSG_MIME) != 0) #define MSG_IS_INVALID(msg) (((msg).tmp_flags & MSG_INVALID) != 0) #define MSG_IS_RECEIVED(msg) (((msg).tmp_flags & MSG_RECEIVED) != 0) #define WRITE_CACHE_DATA_INT(n, fp) #define WRITE_CACHE_DATA(data, fp) ------------------------------------------------------------------------------ MsgFlags struct _MsgFlags { MsgPermFlags perm_flags; MsgTmpFlags tmp_flags; }; MsgFlags は各メッセージに対して付加されるフラグを表します。 ------------------------------------------------------------------------------ MsgInfo struct _MsgInfo { guint msgnum; gsize size; time_t mtime; time_t date_t; MsgFlags flags; gchar *fromname; gchar *date; gchar *from; gchar *to; gchar *cc; gchar *newsgroups; gchar *subject; gchar *msgid; gchar *inreplyto; GSList *references; FolderItem *folder; FolderItem *to_folder; gchar *xface; /* used only for temporary messages */ gchar *file_path; /* used only for encrypted (and signed) messages */ MsgEncryptInfo *encinfo; }; MsgInfo 構造体は各メッセージの情報を表します。 ------------------------------------------------------------------------------ MsgFileInfo struct _MsgFileInfo { gchar *file; MsgFlags *flags; }; MsgFileInfo 構造体はメッセージファイルとそのフラグ情報をひとまとめにして 扱うためのものです。 folder_item_add_msgs() 等で使用されます。 ------------------------------------------------------------------------------ MsgEncryptInfo struct _MsgEncryptInfo { gchar *plaintext_file; gchar *sigstatus; gchar *sigstatus_full; gboolean decryption_failed; }; MsgEncryptInfo 構造体は電子署名・暗号化の情報を格納するためのものです。 ------------------------------------------------------------------------------ typedef FILE * (*DecryptMessageFunc) (MsgInfo *msginfo, MimeInfo **mimeinfo); 暗号化されたメッセージを復号化する際に呼び出すコールバック関数の型です。 procmsg_set_decrypt_message_func() で指定します。 ------------------------------------------------------------------------------ GHashTable *procmsg_msg_hash_table_create (GSList *mlist); MsgInfo のリストから、メッセージ番号をキーにしたハッシュテーブルを作成します。 返ったハッシュテーブルは g_hash_table_destroy() で解放する必要があります。 mlist: MsgInfo 構造体へのポインタのリスト 戻り値: メッセージ番号をキーにしたハッシュテーブル ------------------------------------------------------------------------------ void procmsg_msg_hash_table_append (GHashTable *msg_table, GSList *mlist); 既存の MsgInfo のハッシュテーブルに新たな MsgInfo を追加します。 mlist: MsgInfo 構造体へのポインタのリスト ------------------------------------------------------------------------------ GHashTable *procmsg_to_folder_hash_table_create (GSList *mlist); (省略) ------------------------------------------------------------------------------ gint procmsg_read_cache_data_str (FILE *fp, gchar **str); キャッシュファイルから文字列を1個読み込み、新たに文字列用のメモリを確保して str に返します。 fp: キャッシュファイルの FILE ポインタ str: 返す文字列を格納する変数へのポインタ 戻り値: 0: 成功 -1: エラー(ファイルが読み込めない、または壊れている) ------------------------------------------------------------------------------ GSList *procmsg_read_cache (FolderItem *item, gboolean scan_file); フォルダ item に対応するキャッシュファイルを読み込み、 MsgInfo のリストを 生成して返します。 scan_file が TRUE の場合はキャッシュデータに対応する メッセージファイルが変更されているかどうかを厳密にチェックします (パフォーマンスはその分低下します)。 返ったメッセージリストは procmsg_msg_list_free() で解放する必要があります。 item: FolderItem オブジェクト scan_file: TRUE の場合メッセージデータの変更をチェックする 戻り値: MsgInfo 構造体へのポインタのリスト ------------------------------------------------------------------------------ void procmsg_set_flags (GSList *mlist, FolderItem *item); フォルダ item に対応するフラグ(マーク)ファイルを読み込み、 item と mlist に反映させます。 item: FolderItem オブジェクト mlist: MsgInfo 構造体へのポインタのリスト ------------------------------------------------------------------------------ void procmsg_mark_all_read (FolderItem *item); フォルダ item 内のすべてのメッセージを既読にし、マークファイルを更新します。 item: FolderItem オブジェクト ------------------------------------------------------------------------------ GSList *procmsg_sort_msg_list (GSList *mlist, FolderSortKey sort_key, FolderSortType sort_type); MsgInfo のリスト mlist を sort_key と sort_type に従ってソートします。 mlist 自体を変更するため、元のリストは使用できなくなります。 mlist: MsgInfo 構造体へのポインタのリスト sort_key: ソートの対象となるキー sort_type: 昇順または降順 戻り値: ソートしたメッセージリスト ------------------------------------------------------------------------------ gint procmsg_get_last_num_in_msg_list(GSList *mlist); メッセージリスト mlist 中における最大のメッセージ番号を返します。 mlist: MsgInfo 構造体へのポインタのリスト 戻り値: 最大のメッセージ番号 ------------------------------------------------------------------------------ void procmsg_msg_list_free (GSList *mlist); MsgInfo のリストを MsgInfo 構造体自身も含めて解放します。 mlist: MsgInfo 構造体へのポインタのリスト ------------------------------------------------------------------------------ void procmsg_write_cache (MsgInfo *msginfo, FILE *fp); メッセージ情報 msginfo をキャッシュファイル fp に追加で書き込みます。 msginfo: MsgInfo 構造体へのポインタ fp: キャッシュファイルの FILE ポインタ ------------------------------------------------------------------------------ void procmsg_write_flags (MsgInfo *msginfo, FILE *fp); メッセージ情報 msginfo のフラグ情報をフラグ(マーク)ファイル fp に追加で 書き込みます。 msginfo: MsgInfo 構造体へのポインタ fp: マークファイルの FILE ポインタ ------------------------------------------------------------------------------ void procmsg_write_cache_list (FolderItem *item, GSList *mlist); フォルダ item に対応するキャッシュファイルにメッセージリスト mlist の 各メッセージ情報を書き出します(以前のキャッシュファイルは上書きされます)。 FolderItem::cache_dirty フラグはリセットされます。 item: FolderItem オブジェクト mlist: MsgInfo 構造体へのポインタのリスト ------------------------------------------------------------------------------ void procmsg_write_flags_list (FolderItem *item, GSList *mlist); フォルダ item に対応するフラグ(マーク)ファイルにメッセージリスト mlist の 各フラグ情報を書き出します(以前のマークファイルは上書きされます)。 item にマークがキューイングされている場合はそれも書き出します。 FolderItem::mark_dirty フラグはリセットされます。 item: FolderItem オブジェクト mlist: MsgInfo 構造体へのポインタのリスト ------------------------------------------------------------------------------ void procmsg_write_flags_for_multiple_folders (GSList *mlist); mlist が複数のフォルダのメッセージから構成される場合に各フォルダに 各メッセージのフラグ情報を書き出します。フラグ情報は追加で書き込まれるため、 以前のフラグ情報と重複する場合があります。その場合は最後に書き込んだ方が 優先されます。 mlist: MsgInfo 構造体へのポインタのリスト ------------------------------------------------------------------------------ void procmsg_flush_mark_queue (FolderItem *item, FILE *fp); フォルダ item にマークがキューイングされている場合、それをマークファイル fp に追加で書き出し、マークキューをクリアします。 item: FolderItem オブジェクト fp: マークファイルの FILE ポインタ ------------------------------------------------------------------------------ void procmsg_add_mark_queue (FolderItem *item, gint num, MsgFlags flags); フォルダ item にメッセージ番号 num に対するフラグ情報 flags を キューイングします。キューイングしたフラグ情報は procmsg_write_flags_list() または procmsg_flush_mark_queue() で書き出せます。 item: FolderItem オブジェクト num: メッセージ番号 flags: num に対応するフラグ情報 ------------------------------------------------------------------------------ void procmsg_add_flags (FolderItem *item, gint num, MsgFlags flags); フォルダ item に対応するフラグ(マーク)ファイルにフラグ情報 flags を追加で 書き込みます。 item: FolderItem オブジェクト num: メッセージ番号 flags: num に対応するフラグ情報 ------------------------------------------------------------------------------ void procmsg_get_mark_sum (FolderItem *item, gint *new, gint *unread, gint *total, gint *min, gint *max, gint first); フォルダ item に対応するフラグ(マーク)ファイルのフラグ情報を読み込み、 集計してその結果を返します。 first が1以上の場合はメッセージ番号が first 以上のもののみ集計します。 item: FolderItem オブジェクト new: 新着メッセージ数 unread: 未読メッセージ数 total: 総数 min: 最小のメッセージ番号 max: 最大のメッセージ番号 first: 集計対象とする最小のメッセージ番号 ------------------------------------------------------------------------------ FILE *procmsg_open_data_file (const gchar *file, guint version, DataOpenMode mode, gchar *buf, size_t buf_size); データファイル file をオープンし、 FILE ポインタを返します。 mode を DATA_READ モードに指定した場合は、指定したバージョン番号 version のチェックを行い、バージョンが異なった場合は NULL が返ります。 DATA_WRITE モードでオープンした場合は version を先頭に書き込んで FILE ポインタを返します。 DATA_APPEND モードでオープンした場合は、バージョンが一致した場合は 追加書き込みモードで FILE ポインタを返します。バージョンが異なった場合は DATA_WRITE モードでオープンして FILE ポインタを返します。 file: データファイルのパス version: データファイルのバージョン mode: ファイルをオープンするモード buf: DATA_READ 時に使用するバッファ領域を指定します。 NULL の場合は デフォルトの動作になります。 buf_size: buf のサイズ 戻り値: FILE ポインタ ------------------------------------------------------------------------------ FILE *procmsg_open_cache_file (FolderItem *item, DataOpenMode mode); フォルダ item に対応するキャッシュファイルをモード mode で開きます。 item: FolderItem オブジェクト mode: ファイルをオープンするモード 戻り値: FILE ポインタ ------------------------------------------------------------------------------ FILE *procmsg_open_mark_file (FolderItem *item, DataOpenMode mode); フォルダ item に対応するマーク(フラグ)ファイルをモード mode で開きます。 item: FolderItem オブジェクト mode: ファイルをオープンするモード 戻り値: FILE ポインタ ------------------------------------------------------------------------------ void procmsg_clear_cache (FolderItem *item); フォルダ item に対応するキャッシュファイルを空にします。 item: FolderItem オブジェクト ------------------------------------------------------------------------------ void procmsg_clear_mark (FolderItem *item); フォルダ item に対応するマーク(フラグ)ファイルを空にします。 item: FolderItem オブジェクト ------------------------------------------------------------------------------ GNode *procmsg_get_thread_tree (GSList *mlist); MsgInfo のリストからスレッドツリーを構築して返します。 注意: 返るツリーのトップのノード(root の直接の子ノード)は逆順になります。 戻り値は g_node_destroy() で解放する必要があります。 MsgInfo 自体はコピーされません。 mlist: MsgInfo 構造体へのポインタのリスト 戻り値: 逆順のスレッドツリー ------------------------------------------------------------------------------ guint procmsg_get_thread_date (GNode *node); スレッドの中で最新の日付を time_t 型の秒数で返します。 エラー等で日付が得られなかった場合は0が返ります。 node: スレッドツリーのトップのノード(root の直接の子ノード) 戻り値: スレッドの中での最新の日付 エラーの場合は0 ------------------------------------------------------------------------------ gint procmsg_move_messages (GSList *mlist); メッセージリスト mlist で指定されたメッセージを各メッセージにあらかじめ 指定された移動先フォルダ(MsgInfo::to_folder)に移動します。 mlist: MsgInfo 構造体へのポインタのリスト 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint procmsg_copy_messages (GSList *mlist); メッセージリスト mlist で指定されたメッセージを各メッセージにあらかじめ 指定されたコピー先フォルダ(MsgInfo::to_folder)にコピーします。 mlist: MsgInfo 構造体へのポインタのリスト 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gchar *procmsg_get_message_file_path (MsgInfo *msginfo); メッセージ msginfo のファイルの絶対パスを取得します。 リモートメールボックスの場合はファイルのパスを返すだけで、 実際の取得は行いません。 返った文字列は g_free() で解放する必要があります。 msginfo: MsgInfo 構造体へのポインタ 戻り値: メッセージファイルの絶対パス ------------------------------------------------------------------------------ gchar *procmsg_get_message_file (MsgInfo *msginfo); メッセージ msginfo のファイルの絶対パスを取得します。 リモートメールボックスの場合はファイルの取得も行います。 返った文字列は g_free() で解放する必要があります。 msginfo: MsgInfo 構造体へのポインタ 戻り値: メッセージファイルの絶対パス ------------------------------------------------------------------------------ GSList *procmsg_get_message_file_list (GSList *mlist); メッセージリスト mlist の各メッセージに対して procmsg_get_message_file() を呼び出し、ファイルのパスを取得します。取得したパスとフラグ情報から MsgFileInfo 構造体のリストを生成して返します。 返ったリストは procmsg_message_file_list_free() で解放する必要があります。 mlist: MsgInfo 構造体へのポインタのリスト 戻り値: MsgFIleInfo 構造体へのポインタのリスト ------------------------------------------------------------------------------ void procmsg_message_file_list_free (GSList *file_list); MsgFileInfo 構造体のリストを解放します。 file_list: MsgFIleInfo 構造体へのポインタのリスト ------------------------------------------------------------------------------ FILE *procmsg_open_message (MsgInfo *msginfo); メッセージ msginfo に対応するメッセージファイルを取得して開きます。 msginfo が送信待ちメッセージの場合は、送信待ち用ヘッダを読み飛ばし、 メッセージ本体のヘッダの先頭にシーク位置を移動して返します。 msginfo: MsgInfo 構造体へのポインタ 戻り値: メッセージファイルの FILE ポインタ エラーの場合は NULL ------------------------------------------------------------------------------ void procmsg_set_decrypt_message_func (DecryptMessageFunc func); メッセージが暗号化されていた場合に復号するためのコールバック関数を 指定します。 func: DecryptMessageFunc 型の関数ポインタ ------------------------------------------------------------------------------ FILE *procmsg_open_message_decrypted (MsgInfo *msginfo, MimeInfo **mimeinfo); procmsg_set_decrypt_message_func() でコールバック関数が指定されている場合は それを使用してファイルを復号し、開きます。また、 MIME 情報を取得して mimeinfo にセットします。 コールバック関数が指定されていない場合は、 procmsg_open_message() で メッセージを開き、 MIME 情報を取得して mimeinfo にセットして返ります。 msginfo: MsgInfo 構造体へのポインタ mimeinfo: メッセージの MIME 情報を返すためのポインタ 戻り値: 復号したメッセージファイルの FILE ポインタ エラーの場合は NULL ------------------------------------------------------------------------------ gboolean procmsg_msg_exist (MsgInfo *msginfo); メッセージ msginfo に対応するファイルが存在し、かつ変更されていない場合 TRUE を返します。 msginfo: MsgInfo 構造体へのポインタ 戻り値: ファイルが存在し、かつ変更されていない場合 TRUE ファイルが存在しないか、変更されている場合 FALSE ------------------------------------------------------------------------------ gboolean procmsg_trash_messages_exist (void); すべてのごみ箱フォルダを調べ、いずれかのごみ箱フォルダにメッセージが1通以上 含まれている場合 TRUE を返します。 戻り値: メッセージが1通以上含まれるごみ箱フォルダが存在する場合 TRUE すべてのごみ箱が空の場合 FALSE ------------------------------------------------------------------------------ void procmsg_empty_trash (FolderItem *trash); ごみ箱フォルダ trash 内のすべてのメッセージを空にします。 trash の特別フォルダタイプは F_TRASH でなければなりません。 trash: ごみ箱フォルダを指す FolderItem オブジェクト ------------------------------------------------------------------------------ void procmsg_empty_all_trash (void); すべてのごみ箱フォルダを空にします。 ------------------------------------------------------------------------------ void procmsg_remove_all_cached_messages (Folder *folder); リモートメールボックス folder のすべてのメッセージのキャッシュファイルを 削除します。 folder: リモートメールボックスを指す Folder オブジェクト ------------------------------------------------------------------------------ gint procmsg_save_to_outbox (FolderItem *outbox, const gchar *file); メッセージファイル file を送信控 outbox に保存します。 outbox が NULL の場合はデフォルトの送信控に保存します。 outbox: 送信控を指す FolderItem オブジェクト NULL の場合はデフォルトの送信控を指定 file: メッセージファイルの絶対パス(ファイル名エンコーディング) 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ void procmsg_print_message (MsgInfo *msginfo, const gchar *cmdline, gboolean all_headers); メッセージのテキストを印刷します。 コマンドライン cmdline が指定されている場合は、そのコマンドを実行します。 cmdline に NULL を指定した場合、プラットフォームのデフォルトの印刷コマンドを 使用します。 all_headers が TRUE の場合はすべてのヘッダを印刷します。 FALSE の場合は 現在表示するように指定されているヘッダのみを印刷します。 msginfo: MsgInfo 構造体へのポインタ cmdline: 印刷コマンド( %s が実際のファイルのパスに置換されます) all_headers: TRUE : すべてのヘッダを印刷 FALSE: 表示ヘッダのみ印刷 ------------------------------------------------------------------------------ MsgInfo *procmsg_msginfo_copy (MsgInfo *msginfo); MsgInfo 構造体をコピーします。 MsgInfo 構造体の各メンバ毎に新たなメモリの 確保とコピーが行われます(ディープコピー)。 返った MsgInfo 構造体は procmsg_msginfo_free() で解放する必要があります。 msginfo: MsgInfo 構造体へのポインタ 戻り値: コピーした MsgInfo 構造体へのポインタ ------------------------------------------------------------------------------ MsgInfo *procmsg_msginfo_get_full_info (MsgInfo *msginfo); メッセージ msginfo に対応するメッセージファイルをパースし、完全な情報を 取得し、新たな MsgInfo 構造体を作成して返します。 返った MsgInfo 構造体は procmsg_msginfo_free() で解放する必要があります。 msginfo: MsgInfo 構造体へのポインタ 戻り値: 新たに作成された MsgInfo 構造体へのポインタ ------------------------------------------------------------------------------ gboolean procmsg_msginfo_equal (MsgInfo *msginfo_a, MsgInfo *msginfo_b); msginfo_a と msginfo_b が同一のメッセージを指しているかどうかを返します。 msginfo_a: MsgInfo 構造体へのポインタ msginfo_b: MsgInfo 構造体へのポインタ 戻り値: TRUE : 同一のメッセージを指している FALSE: 異なるメッセージを指している ------------------------------------------------------------------------------ void procmsg_msginfo_free (MsgInfo *msginfo); MsgInfo 構造体を解放します。 msginfo: MsgInfo 構造体へのポインタ ------------------------------------------------------------------------------ gint procmsg_cmp_msgnum_for_sort (gconstpointer a, gconstpointer b); メッセージ番号によるソート用の比較関数です。 a: MsgInfo 構造体へのポインタ b: MsgInfo 構造体へのポインタ 戻り値: 負の値: a のメッセージ番号 < b のメッセージ番号 0: a のメッセージ番号 == b のメッセージ番号 正の値: a のメッセージ番号 > b のメッセージ番号 libsylph-1.1.0/doc/quoted-printable.txt0000644000175000017500000000427010532505114015044 00000000000000quoted-printable - quoted-printable のエンコードとデコード ------------------------------------------------------------------------------ void qp_encode_line (gchar *out, const guchar *in); 文字列 in を quoted-printable エンコードして out に出力します。 行末の改行は LF に正規化されます。 out には十分な領域が必要です(少なくとも in の文字列長 * 4) out: quoted-printable 文字列を出力するバッファ in: 入力文字列 ------------------------------------------------------------------------------ gint qp_decode_line (gchar *str); quoted-printable 文字列 str をデコードします。デコードした文字列は str に 上書きします。 str: quoted-printable 文字列(かつデコード文字列の出力先) 戻り値: 出力した文字列の長さ ------------------------------------------------------------------------------ gint qp_decode_q_encoding (guchar *out, const gchar *in, gint inlen); RFC 2045 / 2047 で定義されている Q エンコーディング文字列をデコードして out に出力します。 Q エンコードは quoted-printable と似ていますが、 ソフト改行がないのと一部の文字が追加でエンコードされます。 out には in の文字列長 + 1 の領域が必要です。 out: デコードした文字列を出力するバッファ in: Q エンコード文字列 inlen: in の文字列長(負の値の場合はヌル文字が出現するまで読む) 戻り値: 出力した文字列の長さ ------------------------------------------------------------------------------ gint qp_get_q_encoding_len (const guchar *str); 文字列 str を Q エンコードしたときの文字列の長さを算出します。 str: 文字列 戻り値: str を Q エンコードした場合の文字列の長さ ------------------------------------------------------------------------------ void qp_q_encode (gchar *out, const guchar *in); 文字列 in を Q エンコードして out に出力します。 out には少なくとも qp_get_q_encoding_len(in) で得た値 + 1 の領域が必要です。 out: 出力先バッファ in: 入力文字列 libsylph-1.1.0/doc/recv.txt0000644000175000017500000001050510532515204012523 00000000000000recv - データの受信 ------------------------------------------------------------------------------ typedef gboolean (*RecvUIFunc) (SockInfo *sock, gint count, gint read_bytes, gpointer data); データの受信に時間がかかる場合に定期的にユーザインタフェースを更新する ためのコールバック関数の型です。 sock: SockInfo 構造体へのポインタ count: 受信した行数 read_bytes: 受信したバイト数 data: ユーザデータ 戻り値: TRUE の場合受信を続行 FALSE の場合キャンセル ------------------------------------------------------------------------------ gchar *recv_bytes (SockInfo *sock, glong size); ソケット sock からデータを size バイト受信します。 受信バッファの末尾はヌル文字で終端されます。 受信したデータが size バイトに満たない場合は NULL が返ります。 返った値は g_free() で解放する必要があります。 sock: SockInfo 構造体へのポインタ size: 受信するデータのサイズ 戻り値: 受信したデータ エラーの場合 NULL ------------------------------------------------------------------------------ gint recv_write_to_file (SockInfo *sock, const gchar *filename); ソケット sock からテキストデータを終端行("." + CR + LF)まで受信し、 ファイル filename に書き出します。 また、以下の変更が行われます。 * 改行は LF に正規化されます。 * 先頭が ".." で始まる行は最初の "." が削除されます。 * 先頭が ">From " で始まる行は最初の ">" が削除されます。 sock: SockInfo 構造体へのポインタ filename: 書き出すファイルのパス 戻り値: 成功した場合 0 エラーの場合負の値 -1: ファイル関連のエラーなど -2: ソケットの受信エラー ------------------------------------------------------------------------------ gint recv_bytes_write_to_file (SockInfo *sock, glong size, const gchar *filename); ソケット sock からデータを size バイト受信し、ファイル filename に 書き出します。その際、改行は LF に正規化されます。 sock: SockInfo 構造体へのポインタ size: 受信するデータのサイズ filename: 書き出すファイルのパス 戻り値: 成功した場合 0 エラーの場合負の値 -1: ファイル関連のエラーなど -2: ソケットの受信エラー ------------------------------------------------------------------------------ gint recv_write (SockInfo *sock, FILE *fp); ソケット sock からテキストデータを終端行("." + CR + LF)まで受信し、 ファイルストリーム fp に書き出します。 また、以下の変更が行われます。 * 改行は LF に正規化されます。 * 先頭が ".." で始まる行は最初の "." が削除されます。 * 先頭が ">From " で始まる行は最初の ">" が削除されます。 sock: SockInfo 構造体へのポインタ fp: 書き出すファイルストリーム 戻り値: 成功した場合 0 エラーの場合負の値 -1: ファイル関連のエラーなど -2: ソケットの受信エラー ------------------------------------------------------------------------------ gint recv_bytes_write (SockInfo *sock, glong size, FILE *fp); ソケット sock からデータを size バイト受信し、ファイルストリーム fp に 書き出します。その際、改行は LF に正規化されます。 sock: SockInfo 構造体へのポインタ size: 受信するデータのサイズ fp: 書き出すファイルストリーム 戻り値: 成功した場合 0 エラーの場合負の値 -1: ファイル関連のエラーなど -2: ソケットの受信エラー ------------------------------------------------------------------------------ void recv_set_ui_func (RecvUIFunc func, gpointer data); recv_write() または recv_write_to_file() で受信に時間がかかる場合に 定期的にユーザインタフェースを更新するためのコールバック関数を指定します。 func: RecvUIFunc 型のコールバック関数へのポインタ data: func に渡されるユーザデータ libsylph-1.1.0/doc/session.txt0000644000175000017500000003362610530535507013266 00000000000000session - ネットワークセッションの管理 ------------------------------------------------------------------------------ #define SESSION_BUFFSIZE 8192 セッションの処理用のバッファサイズです。 ------------------------------------------------------------------------------ #define SESSION(obj) obj を Session 型にキャッシュします。 ------------------------------------------------------------------------------ SessionType typedef enum { SESSION_UNKNOWN, SESSION_IMAP, SESSION_NEWS, SESSION_SMTP, SESSION_POP3 } SessionType; Session のタイプを表す enum 型です。 SESSION_UNKNOWN: 未知のタイプ SESSION_IMAP: IMAP4 セッション SESSION_NEWS: News (NNTP) セッション SESSION_SMTP: SMTP セッション SESSION_POP3: POP3 セッション ------------------------------------------------------------------------------ SessionState typedef enum { SESSION_READY, SESSION_SEND, SESSION_RECV, SESSION_EOF, SESSION_TIMEOUT, SESSION_ERROR, SESSION_DISCONNECTED } SessionState; セッションの状態を表す enum 型です。 SESSION_READY: 準備完了(未接続) SESSION_SEND: メッセージ送信中 SESSION_RECV: メッセージ受信中 SESSION_EOF: EOF を受信 SESSION_TIMEOUT: タイムアウト SESSION_ERROR: エラー発生 SESSION_DISCONNECTED: 接続切断済 ------------------------------------------------------------------------------ SessionMsgType typedef enum { SESSION_MSG_NORMAL, SESSION_MSG_SEND_DATA, SESSION_MSG_RECV_DATA, SESSION_MSG_CONTROL, SESSION_MSG_ERROR, SESSION_MSG_UNKNOWN } SessionMsgType; セッションのメッセージのタイプを表します(現在未使用)。 SESSION_MSG_NORMAL: 通常のメッセージ SESSION_MSG_SEND_DATA: データ送信 SESSION_MSG_RECV_DATA: データ受信 SESSION_MSG_CONTROL: コントロールメッセージ SESSION_MSG_ERROR: エラーメッセージ SESSION_MSG_UNKNOWN: 不明 ------------------------------------------------------------------------------ typedef gint (*RecvMsgNotify) (Session *session, const gchar *msg, gpointer user_data); メッセージを受信したときにユーザに通知するためのコールバック関数の型です。 ------------------------------------------------------------------------------ typedef gint (*RecvDataProgressiveNotify) (Session *session, guint cur_len, guint total_len, gpointer user_data); 大きなデータの受信中に定期的にユーザに進捗を通知するためのコールバック関数の 型です。 ------------------------------------------------------------------------------ typedef gint (*RecvDataNotify) (Session *session, guint len, gpointer user_data); 大きなデータの受信が完了したときにユーザに通知するためのコールバック関数の 型です。 ------------------------------------------------------------------------------ typedef gint (*SendDataProgressiveNotify) (Session *session, guint cur_len, guint total_len, gpointer user_data); 大きなデータの送信中に定期的にユーザに進捗を通知するためのコールバック関数の 型です。 ------------------------------------------------------------------------------ typedef gint (*SendDataNotify) (Session *session, guint len, gpointer user_data); 大きなデータの送信が完了したときにユーザに通知するためのコールバック関数の 型です。 ------------------------------------------------------------------------------ Session struct _Session { SessionType type; SockInfo *sock; gchar *server; gushort port; SSLType ssl_type; gboolean nonblocking; SessionState state; time_t last_access_time; GTimeVal tv_prev; gint conn_id; gint io_tag; gchar read_buf[SESSION_BUFFSIZE]; gchar *read_buf_p; gint read_buf_len; /* buffer for short messages */ GString *read_msg_buf; /* buffer for relatively short multiple lines data */ GByteArray *read_data_buf; gchar *read_data_terminator; /* buffer for large data */ FILE *read_data_fp; gint read_data_pos; gint preread_len; /* buffer for short messages */ gchar *write_buf; gchar *write_buf_p; gint write_buf_len; /* buffer for large data */ FILE *write_data_fp; gint write_data_pos; gint write_data_len; guint timeout_tag; guint timeout_interval; guint ping_tag; gpointer data; /* virtual methods to parse server responses */ gint (*recv_msg) (Session *session, const gchar *msg); gint (*send_data_finished) (Session *session, guint len); gint (*recv_data_finished) (Session *session, guchar *data, guint len); gint (*recv_data_as_file_finished) (Session *session, FILE *fp, guint len); void (*destroy) (Session *session); /* notification functions */ RecvMsgNotify recv_msg_notify; RecvDataProgressiveNotify recv_data_progressive_notify; RecvDataNotify recv_data_notify; SendDataProgressiveNotify send_data_progressive_notify; SendDataNotify send_data_notify; gpointer recv_msg_notify_data; gpointer recv_data_progressive_notify_data; gpointer recv_data_notify_data; gpointer send_data_progressive_notify_data; gpointer send_data_notify_data; }; Session 構造体はサーバとの通信セッションの情報を表します。 ------------------------------------------------------------------------------ void session_init (Session *session); Session 構造体を初期化します。 Session 構造体のメモリを確保した直後にこの 関数を呼び出します。 session: Session 構造体へのポインタ ------------------------------------------------------------------------------ gint session_connect (Session *session, const gchar *server, gushort port); サーバ server のポート番号 port への接続を開始します。 接続は非同期で行われるため(Win32 の場合は同期)、この関数が返った段階では まだ接続は完了していないので、 g_main_iteration() 等でイベントループを 回して接続を待つ必要があります。 接続が完了した場合、サーバからの最初のメッセージが到着した時点で session_set_recv_message_notify() で指定したコールバック関数が呼ばれます。 session: Session 構造体へのポインタ server: 接続先サーバ port: 接続先ポート ------------------------------------------------------------------------------ gint session_disconnect (Session *session); セッション session の接続を切断します。 session: Session 構造体へのポインタ 戻り値: 常に 0 ------------------------------------------------------------------------------ void session_destroy (Session *session); セッション session を破棄します。サーバとの接続が確立されていた場合は 切断します。 ------------------------------------------------------------------------------ gboolean session_is_connected (Session *session); セッション session の接続が確立されている場合は TRUE を返します。 接続が確立されている間イベントループを回したい場合以下のようにします。 while (session_is_connected(session)) g_main_iteration(TRUE); session: Session 構造体へのポインタ ------------------------------------------------------------------------------ void session_set_access_time (Session *session); 現在の時刻を最後にサーバにアクセスした時刻としてセッション session に 通知します。 session: Session 構造体へのポインタ ------------------------------------------------------------------------------ void session_set_timeout (Session *session, guint interval); セッションのタイムアウト時間を秒数で設定します。 session_set_timeout() を呼び出した後 interval 秒経過した場合、 Session::state に SESSION_TIMEOUT をセットして処理を中断します。 session: Session 構造体へのポインタ ------------------------------------------------------------------------------ void session_set_recv_message_notify (Session *session, RecvMsgNotify notify_func, gpointer data); メッセージを受信したときにユーザに通知するためのコールバック関数を指定します。 session: Session 構造体へのポインタ notify_func: RecvMsgNotify 型の関数へのポインタ data: notify_func に渡すユーザデータ ------------------------------------------------------------------------------ void session_set_recv_data_progressive_notify (Session *session, RecvDataProgressiveNotify notify_func, gpointer data); 大きなデータの受信中に定期的にユーザに進捗を通知するためのコールバック関数 を指定します。 session: Session 構造体へのポインタ notify_func: RecvDataProgressiveNotify 型の関数へのポインタ data: notify_func に渡すユーザデータ ------------------------------------------------------------------------------ void session_set_recv_data_notify (Session *session, RecvDataNotify notify_func, gpointer data); 大きなデータの受信が完了したときにユーザに通知するためのコールバック関数を 指定します。 session: Session 構造体へのポインタ notify_func: RecvDataNotify 型の関数へのポインタ data: notify_func に渡すユーザデータ ------------------------------------------------------------------------------ void session_set_send_data_progressive_notify (Session *session, SendDataProgressiveNotify notify_func, gpointer data); 大きなデータの送信中に定期的にユーザに進捗を通知するためのコールバック関数 を指定します。 session: Session 構造体へのポインタ notify_func: SendDataProgressiveNotify 型の関数へのポインタ data: notify_func に渡すユーザデータ ------------------------------------------------------------------------------ void session_set_send_data_notify (Session *session, SendDataNotify notify_func, gpointer data); 大きなデータの送信が完了したときにユーザに通知するためのコールバック関数を 指定します。 session: Session 構造体へのポインタ notify_func: SendDataNotify 型の関数へのポインタ data: notify_func に渡すユーザデータ ------------------------------------------------------------------------------ #if USE_SSL gint session_start_tls (Session *session); #endif 接続が確立中のセッションで TLS セッションを開始します。 初期化が完了するまでソケットはブロッキングモードに移行します。 OpenSSL を有効にしてコンパイルしている場合のみ使用可能です。 session: Session 構造体へのポインタ 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint session_send_msg (Session *session, SessionMsgType type, const gchar *msg); サーバにメッセージ msg を送信します。 type には常に SESSION_MSG_NORMAL を 指定します。 session: Session 構造体へのポインタ type: メッセージのタイプ(現在未使用) msg: サーバに送信するメッセージ 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint session_recv_msg (Session *session); サーバからメッセージを受信します。受信が完了した場合、 session_set_recv_message_notify() で設定したコールバック関数が呼び出されます。 session: Session 構造体へのポインタ 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint session_send_data (Session *session, FILE *data_fp, guint size); サーバにデータを送信します。データはファイルストリームとして渡します。 ファイルストリーム data_fp の現在位置から size バイト送信されます。 送信が完了した場合、 session_set_send_data_notify() で設定したコールバック 関数が呼び出されます。 session: Session 構造体へのポインタ data_fp: 送信するデータを格納したファイルストリーム size: 送信するデータのサイズ 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint session_recv_data (Session *session, guint size, const gchar *terminator); サーバからデータを受信し、メモリに格納して取得します。 データが比較的小さい場合はこちらを使用します。 文字列 terminator + CR + LF をデータの終端とみなしてデータの終了を判断します (size は現在未使用)。 受信が完了した場合、 session_set_recv_data_notify() で設定したコールバック 関数が呼び出されます。 session: Session 構造体へのポインタ size: データのサイズ(現在未使用) terminator: データの終端を表す文字列 ------------------------------------------------------------------------------ gint session_recv_data_as_file (Session *session, guint size, const gchar *terminator); サーバからデータを受信し、ファイルストリームに格納して取得します。 データが大きくなる可能性がある(数MB〜)場合はこちらを使用します。 文字列 terminator + CR + LF をデータの終端とみなしてデータの終了を判断します (size は現在未使用)。 受信が完了した場合、 session_set_recv_data_notify() で設定したコールバック 関数が呼び出されます。 session: Session 構造体へのポインタ size: データのサイズ(現在未使用) terminator: データの終端を表す文字列 libsylph-1.1.0/doc/smtp.txt0000644000175000017500000000463310532437375012570 00000000000000smtp - SMTP セッションの処理 ------------------------------------------------------------------------------ #define SMTP_SESSION(obj) ((SMTPSession *)obj) Session オブジェクト obj を SMTPSession にキャストします。 ------------------------------------------------------------------------------ #define MSGBUFSIZE メッセージバッファのサイズです。 ------------------------------------------------------------------------------ SMTPErrorValue typedef enum { SM_OK = 0, SM_ERROR = 128, SM_UNRECOVERABLE = 129, SM_AUTHFAIL = 130 } SMTPErrorValue; SMTP のエラー状態を表す enum です。 ------------------------------------------------------------------------------ ESMTPFlag typedef enum { ESMTP_8BITMIME = 1 << 0, ESMTP_SIZE = 1 << 1, ESMTP_ETRN = 1 << 2 } ESMTPFlag; ESMTP 時に利用可能な機能を表す enum です。 ------------------------------------------------------------------------------ SMTPAuthType typedef enum { SMTPAUTH_LOGIN = 1 << 0, SMTPAUTH_CRAM_MD5 = 1 << 1, SMTPAUTH_DIGEST_MD5 = 1 << 2, SMTPAUTH_PLAIN = 1 << 3 } SMTPAuthType; SMTP AUTH 時の認証方法を表す enum です。 ------------------------------------------------------------------------------ SMTPState typedef enum { SMTP_READY, SMTP_CONNECTED, SMTP_HELO, SMTP_EHLO, SMTP_STARTTLS, SMTP_FROM, SMTP_AUTH, SMTP_AUTH_PLAIN, SMTP_AUTH_LOGIN_USER, SMTP_AUTH_LOGIN_PASS, SMTP_AUTH_CRAM_MD5, SMTP_RCPT, SMTP_DATA, SMTP_SEND_DATA, SMTP_EOM, SMTP_RSET, SMTP_QUIT, SMTP_ERROR, SMTP_DISCONNECTED, N_SMTP_PHASE } SMTPState; SMTPSession の状態を表す enum です。 ------------------------------------------------------------------------------ SMTPSession struct _SMTPSession { Session session; SMTPState state; gboolean tls_init_done; gchar *hostname; gchar *user; gchar *pass; gchar *from; GSList *to_list; GSList *cur_to; FILE *send_data_fp; gint send_data_len; SMTPAuthType avail_auth_type; SMTPAuthType forced_auth_type; SMTPAuthType auth_type; SMTPErrorValue error_val; gchar *error_msg; }; SMTP セッションを表す構造体です。 Session のサブクラスになります。 ------------------------------------------------------------------------------ Session *smtp_session_new (void); SMTPSession オブジェクトを作成します。 戻り値: 新しい SMTPSession オブジェクト(Session にキャスト) libsylph-1.1.0/doc/socket.txt0000644000175000017500000004567010530535731013074 00000000000000socket - 抽象化されたソケット入出力 ------------------------------------------------------------------------------ typedef enum { CONN_READY, CONN_LOOKUPSUCCESS, CONN_ESTABLISHED, CONN_LOOKUPFAILED, CONN_FAILED } ConnectionState; 接続状態を表す enum です。 ------------------------------------------------------------------------------ typedef gint (*SockConnectFunc) (SockInfo *sock, gpointer data); sock_connect_async() で接続が確立したときに呼ばれるコールバック関数の型です。 ------------------------------------------------------------------------------ typedef gboolean (*SockFunc) (SockInfo *sock, GIOCondition condition, gpointer data); sock_add_watch() でソケットを監視する際に呼ばれるコールバック関数の型です。 ------------------------------------------------------------------------------ SockInfo struct _SockInfo { gint sock; #if USE_SSL SSL *ssl; #endif GIOChannel *sock_ch; gchar *hostname; gushort port; ConnectionState state; gboolean nonblock; gpointer data; SockFunc callback; GIOCondition condition; }; SSL を含めたソケットを抽象的に扱うための構造体です。 ------------------------------------------------------------------------------ gint sock_init (void); ソケットライブラリを初期化します。 Win32 では WinSock ライブラリを初期化します。 Unix 系 OS では何もしません。 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint sock_cleanup (void); ソケットライブラリをクリーンアップします。 Win32 では WinSock ライブラリのクリーンアップを行います。 Unix 系 OS では何もしません。 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint sock_set_io_timeout (guint sec); ソケットの I/O タイムアウトを sec 秒に設定します。 sec: タイムアウトの秒数 戻り値: 常に 0 が返ります。 ------------------------------------------------------------------------------ gint sock_set_nonblocking_mode (SockInfo *sock, gboolean nonblock); nonblock が TRUE の場合、ソケット sock を非ブロッキングモードに設定します。 nonblock が FALSE の場合はブロッキングモードに設定します。 sock: SockInfo オブジェクト nonblock: TRUE の場合非ブロッキングモードに設定 FALSE の場合ブロッキングモードに設定 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gboolean sock_is_nonblocking_mode (SockInfo *sock); ソケット sock が非ブロッキングモードの場合 TRUE を返します。 sock: SockInfo オブジェクト 戻り値: sock が非ブロッキングモードの場合 TRUE ブロッキングモード、またはエラーの場合 FALSE ------------------------------------------------------------------------------ gboolean sock_has_read_data (SockInfo *sock); ソケット sock に既にデータが到着しているかどうかを調べ、到着していれば TRUE を返します。ただし、 Win32 プラットフォームで通常のソケットの場合のみ有効 です。それ以外の場合は常に TRUE を返します。 sock: SockInfo オブジェクト 戻り値: sock にデータが到着している場合 TRUE 到着していない場合 FALSE ------------------------------------------------------------------------------ guint sock_add_watch (SockInfo *sock, GIOCondition condition, SockFunc func, gpointer data); ソケット sock を GLib のイベントループ下で監視します。 sock に I/O の状態 condition に一致する変化があった場合、コールバック関数 func が呼ばれます。 func の引数には sock, condition, data が渡されます。 監視を停止する場合は、戻り値を引数にして g_source_remove() を呼びます。 sock: SockInfo オブジェクト condition: ソケットの I/O の状態 func: SockFunc 型のコールバック関数 data: func に渡されるユーザデータ 戻り値: GSource の ID ------------------------------------------------------------------------------ struct hostent *my_gethostbyname (const gchar *hostname); タイムアウト付きの gethostbyname() 関数です。 sock_set_io_timeout() で 設定したタイムアウト時間が経過した場合、強制的に gethostbyname() を タイムアウトさせて返ります。 Win32 の場合は通常の gethostbyname() と 同等です。 hostname: ホスト名文字列 戻り値: hostent 構造体へのポインタ ------------------------------------------------------------------------------ SockInfo *sock_connect (const gchar *hostname, gushort port); ホスト hostname のポート番号 port に接続し、 SockInfo オブジェクトを返します。 返ったソケットは sock_close() で閉じて解放する必要があります。 hostname: ホスト名文字列 port: ポート番号 戻り値: SockInfo オブジェクト ------------------------------------------------------------------------------ gint sock_connect_async (const gchar *hostname, gushort port, SockConnectFunc func, gpointer data); ホスト hostname のポート番号 port に非同期で接続します。 接続が完了した時点でコールバック関数 func が呼ばれます。 現在は Unix 系 OS のみ使用可能です。 hostname: ホスト名文字列 port: ポート番号 func: 接続が完了したときに呼ばれるコールバック関数 data: func に渡されるユーザデータ 戻り値: 成功した場合接続セッションの ID (> 0) エラーの場合 -1 ------------------------------------------------------------------------------ gint sock_connect_async_cancel (gint id); sock_connect_async() で処理中のセッションを接続が完了する前にキャンセル します。引数には sock_connect_async() の戻り値を渡します。 現在は Unix 系 OS のみ使用可能です。 id: 接続セッション ID 戻り値: 成功した場合 0 該当するセッションが存在しない場合 -1 ------------------------------------------------------------------------------ gint sock_printf (SockInfo *sock, const gchar *format, ...) printf フォーマット文字列をソケット sock に送信します。 sock: SockInfo オブジェクト format: printf フォーマット文字列 戻り値: 成功した場合書き込んだバイト数(> 0) エラーの場合 -1 ------------------------------------------------------------------------------ gint sock_read (SockInfo *sock, gchar *buf, gint len); ソケット sock からデータを最大 len バイト受信し、 buf に格納します。 読み込んだデータのサイズは len より小さい場合があります。 sock: SockInfo オブジェクト buf: 受信したデータを格納するバッファ len: 受信する最大サイズ 戻り値: 成功した場合受信したバイト数(> 0) EOF の場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint sock_write (SockInfo *sock, const gchar *buf, gint len); ソケット sock に buf にあるデータを最大 len バイト送信します。 送信したデータのサイズは len より小さい場合があります。 sock: SockInfo オブジェクト buf: 送信するデータを格納するバッファ len: 送信するデータのサイズ 戻り値: 成功した場合送信したバイト数(> 0) エラーの場合 -1 ------------------------------------------------------------------------------ gint sock_write_all (SockInfo *sock, const gchar *buf, gint len); ソケット sock に buf にあるデータを必ず len バイト送信します。 送信したデータが len より少ない場合は、 len に到達するまで送信を続けます。 sock: SockInfo オブジェクト buf: 送信するデータを格納するバッファ len: 送信するデータのサイズ 戻り値: 成功した場合送信したバイト数(> 0) エラーの場合 -1 ------------------------------------------------------------------------------ gint sock_gets (SockInfo *sock, gchar *buf, gint len); ソケット sock から1行(次の LF コードまで)読み込みます。 1行が len - 1 より長い場合は len - 1 までのサイズのデータが読み込まれます。 データの最後は必ずヌル文字で終端されます。 sock: SockInfo オブジェクト buf: 受信したデータを格納するバッファ len: 受信する最大サイズ 戻り値: 成功した場合受信したバイト数(> 0) エラーの場合 -1 ------------------------------------------------------------------------------ gint sock_getline (SockInfo *sock, gchar **line); ソケット sock から1行(次の LF コードまで)読み込みます。 動的にメモリを確保し、データを格納して返します。 データの最後は必ずヌル文字で終端されます。 sock: SockInfo オブジェクト line: 受信したデータを格納する領域へのポインタを返すためのポインタ 戻り値: 成功した場合受信したバイト数(> 0) エラーの場合 -1 ------------------------------------------------------------------------------ gint sock_puts (SockInfo *sock, const gchar *buf); ソケット sock に文字列 buf を送信し、さらに改行(CR+LF)を出力します。 buf の全てのデータが送信されることが保証されます。 sock: SockInfo オブジェクト buf: 送信する文字列 戻り値: 成功した場合最後に送信したバイト数(> 0) エラーの場合 -1 ------------------------------------------------------------------------------ gint sock_peek (SockInfo *sock, gchar *buf, gint len); ソケット sock から内部のバッファをクリアせずにデータを読み出します。 データを最大 len バイト受信し、 buf に格納します。 読み込んだデータのサイズは len より小さい場合があります。 sock: SockInfo オブジェクト buf: 受信したデータを格納するバッファ len: 受信する最大サイズ 戻り値: 成功した場合受信したバイト数(> 0) EOF の場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint sock_close (SockInfo *sock); ソケット sock をクローズし、メモリを解放します。 sock: SockInfo オブジェクト 戻り値: 常に 0 ------------------------------------------------------------------------------ gint fd_connect_inet (gushort port); ローカルホストのポート番号 port のソケットに接続します。 port: ポート番号 戻り値: ソケットのファイルデスクリプタ ------------------------------------------------------------------------------ gint fd_open_inet (gushort port); ローカルホストのポート番号 port のソケットを開いて接続を待ち受けます。 port: ポート番号 戻り値: ソケットのファイルデスクリプタ ------------------------------------------------------------------------------ gint fd_connect_unix (const gchar *path); パスが path となる Unix ドメインソケットに接続します。 Unix 系 OS のみ利用可能です。 Win32 では常に -1 を返します。 path: Unix ドメインソケットのパス 戻り値: ソケットのファイルデスクリプタ ------------------------------------------------------------------------------ gint fd_open_unix (const gchar *path); パスが path となる Unix ドメインソケットを開いて接続を待ち受けます。 Unix 系 OS のみ利用可能です。 Win32 では常に -1 を返します。 path: Unix ドメインソケットのパス 戻り値: ソケットのファイルデスクリプタ ------------------------------------------------------------------------------ gint fd_accept (gint sock); ソケットへの接続を受け付けます。 sock: ソケットのデスクリプタ 戻り値: 成功した場合新しいソケットのデスクリプタ エラーの場合 -1 ------------------------------------------------------------------------------ gint fd_read (gint sock, gchar *buf, gint len); ファイルデスクリプタ sock からデータを最大 len バイト受信し、 buf に格納します。 読み込んだデータのサイズは len より小さい場合があります。 sock: ファイルデスクリプタ buf: 受信したデータを格納するバッファ len: 受信する最大サイズ 戻り値: 成功した場合受信したバイト数(> 0) EOF の場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint fd_write (gint sock, const gchar *buf, gint len); ファイルデスクリプタ sock に buf にあるデータを最大 len バイト送信します。 送信したデータのサイズは len より小さい場合があります。 sock: ファイルデスクリプタ buf: 送信するデータを格納するバッファ len: 送信するデータのサイズ 戻り値: 成功した場合送信したバイト数(> 0) エラーの場合 -1 ------------------------------------------------------------------------------ gint fd_write_all (gint sock, const gchar *buf, gint len); ファイルデスクリプタ sock に buf にあるデータを必ず len バイト送信します。 送信したデータが len より少ない場合は、 len に到達するまで送信を続けます。 sock: ファイルデスクリプタ buf: 送信するデータを格納するバッファ len: 送信するデータのサイズ 戻り値: 成功した場合送信したバイト数(> 0) エラーの場合 -1 ------------------------------------------------------------------------------ gint fd_gets (gint sock, gchar *buf, gint len); ファイルデスクリプタ sock から1行(次の LF コードまで)読み込みます。 1行が len - 1 より長い場合は len - 1 までのサイズのデータが読み込まれます。 データの最後は必ずヌル文字で終端されます。 sock: ファイルデスクリプタ buf: 受信したデータを格納するバッファ len: 受信する最大サイズ 戻り値: 成功した場合受信したバイト数(> 0) エラーの場合 -1 ------------------------------------------------------------------------------ gint fd_getline (gint sock, gchar **line); ファイルデスクリプタ sock から1行(次の LF コードまで)読み込みます。 動的にメモリを確保し、データを格納して返します。 データの最後は必ずヌル文字で終端されます。 sock: ファイルデスクリプタ line: 受信したデータを格納する領域へのポインタを返すためのポインタ 戻り値: 成功した場合受信したバイト数(> 0) エラーの場合 -1 ------------------------------------------------------------------------------ gint fd_close (gint sock); ファイルデスクリプタ sock をクローズし、リソースを解放します。 sock: ファイルデスクリプタ 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint ssl_read (SSL *ssl, gchar *buf, gint len); SSL ssl からデータを最大 len バイト受信し、 buf に格納します。 読み込んだデータのサイズは len より小さい場合があります。 OpenSSL をリンクしている場合のみ利用可能です。 ssl: SSL buf: 受信したデータを格納するバッファ len: 受信する最大サイズ 戻り値: 成功した場合受信したバイト数(> 0) EOF の場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint ssl_write (SSL *ssl, const gchar *buf, gint len); SSL ssl に buf にあるデータを最大 len バイト送信します。 送信したデータのサイズは len より小さい場合があります。 OpenSSL をリンクしている場合のみ利用可能です。 ssl: SSL buf: 送信するデータを格納するバッファ len: 送信するデータのサイズ 戻り値: 成功した場合送信したバイト数(> 0) エラーの場合 -1 ------------------------------------------------------------------------------ gint ssl_write_all (SSL *ssl, const gchar *buf, gint len); SSL ssl に buf にあるデータを必ず len バイト送信します。 送信したデータが len より少ない場合は、 len に到達するまで送信を続けます。 OpenSSL をリンクしている場合のみ利用可能です。 ssl: SSL buf: 送信するデータを格納するバッファ len: 送信するデータのサイズ 戻り値: 成功した場合送信したバイト数(> 0) エラーの場合 -1 ------------------------------------------------------------------------------ gint ssl_gets (SSL *ssl, gchar *buf, gint len); SSL ssl から1行(次の LF コードまで)読み込みます。 1行が len - 1 より長い場合は len - 1 までのサイズのデータが読み込まれます。 データの最後は必ずヌル文字で終端されます。 OpenSSL をリンクしている場合のみ利用可能です。 ssl: SSL buf: 受信したデータを格納するバッファ len: 受信する最大サイズ 戻り値: 成功した場合受信したバイト数(> 0) エラーの場合 -1 ------------------------------------------------------------------------------ gint ssl_getline (SSL *ssl, gchar **line); SSL ssl から1行(次の LF コードまで)読み込みます。 動的にメモリを確保し、データを格納して返します。 データの最後は必ずヌル文字で終端されます。 OpenSSL をリンクしている場合のみ利用可能です。 ssl: SSL line: 受信したデータを格納する領域へのポインタを返すためのポインタ 戻り値: 成功した場合受信したバイト数(> 0) エラーの場合 -1 ------------------------------------------------------------------------------ gint ssl_peek (SSL *ssl, gchar *buf, gint len); SSL ssl から内部のバッファをクリアせずにデータを読み出します。 データを最大 len バイト受信し、 buf に格納します。 読み込んだデータのサイズは len より小さい場合があります。 OpenSSL をリンクしている場合のみ利用可能です。 ssl: SSL buf: 受信したデータを格納するバッファ len: 受信する最大サイズ 戻り値: 成功した場合受信したバイト数(> 0) EOF の場合 0 エラーの場合 -1 libsylph-1.1.0/doc/ssl.txt0000644000175000017500000000355510532511530012372 00000000000000ssl - SSL の初期化と終了処理 ------------------------------------------------------------------------------ SSLMethod typedef enum { SSL_METHOD_SSLv23, SSL_METHOD_TLSv1 } SSLMethod; SSL の初期化時に使用するメソッドを表す enum です。 ------------------------------------------------------------------------------ SSLType typedef enum { SSL_NONE, SSL_TUNNEL, SSL_STARTTLS } SSLType; SSL の設定項目用の enum です。 ------------------------------------------------------------------------------ void ssl_init (void); SSL ライブラリを初期化します。 このとき SSL 証明書も読み込まれます。 ------------------------------------------------------------------------------ void ssl_done (void); SSL のリソースを解放します。 ------------------------------------------------------------------------------ gboolean ssl_init_socket (SockInfo *sockinfo); ソケット sockinfo を SSLv23 で初期化します。 sockinfo: SockInfo 構造体へのポインタ 戻り値: 初期化に成功した場合 TRUE エラーの場合 FALSE ------------------------------------------------------------------------------ gboolean ssl_init_socket_with_method (SockInfo *sockinfo, SSLMethod method); ソケット sockinfo を指定したメソッドで初期化します。メソッドには SSLv23 と TLSv1 が指定可能です。 sockinfo: SockInfo 構造体へのポインタ method: SSL のメソッド 戻り値: 初期化に成功した場合 TRUE エラーの場合 FALSE ------------------------------------------------------------------------------ void ssl_done_socket (SockInfo *sockinfo); ソケット sockinfo が SSL の場合、 SSL のリソースを解放します。 sockinfo が SSL でない場合は何も行いません。 sockinfo: SockInfo 構造体へのポインタ libsylph-1.1.0/doc/stringtable.txt0000644000175000017500000000475210532773072014122 00000000000000stringtable - 文字列テーブル StringTable は、多量に確保する文字列が互いに重複する可能性が高い場合に、 メモリの消費量を節約する目的で使用します。 ------------------------------------------------------------------------------ StringTable typedef struct { GHashTable *hash_table; } StringTable; 文字列テーブルを表す構造体です。 ------------------------------------------------------------------------------ StringTable *string_table_new (void); StringTable を作成します。 返った値は string_table_free() で解放する必要があります。 戻り値: StringTable 構造体へのポインタ ------------------------------------------------------------------------------ void string_table_free (StringTable *table); StringTable を解放します。 table: StringTable 構造体へのポインタ ------------------------------------------------------------------------------ gchar *string_table_lookup_string (StringTable *table, const gchar *str); 文字列テーブル table 内の文字列 str に一致する文字列エントリを返します。 table: StringTable 構造体へのポインタ str: 検索文字列 戻り値: table 内の文字列エントリ 見つからなければ NULL ------------------------------------------------------------------------------ gchar *string_table_insert_string (StringTable *table, const gchar *str); 文字列テーブル table に文字列 str を追加します。 該当するエントリが既に存在する場合は、参照カウントのみを増加させます。 table: StringTable 構造体へのポインタ str: 追加する文字列 戻り値: table 内の文字列エントリ ------------------------------------------------------------------------------ void string_table_free_string (StringTable *table, const gchar *str); 文字列テーブル table から文字列 str を削除します。 該当するエントリの参照カウントを減らし、0になった場合はエントリが削除 されます。該当するエントリが存在しなければ何もしません。 table: StringTable 構造体へのポインタ str: 削除する文字列 ------------------------------------------------------------------------------ void string_table_get_stats (StringTable *table); 文字列テーブル table の統計情報を出力します(デバッグモード時のみ)。 table: StringTable 構造体へのポインタ libsylph-1.1.0/doc/sylmain.txt0000644000175000017500000000211410515067617013250 00000000000000sylmain - LibSylphの初期化と終了処理 void syl_init (void); gint syl_setup_rc_dir (void); void syl_save_all_state (void); void syl_cleanup (void); ------------------------------------------------------------------------------ void syl_init(void) LibSylphを初期化します。 環境変数の設定、ロケールの設定、ソケットの初期化などを行います。 ------------------------------------------------------------------------------ gint syl_setup_rc_dir(void) 設定ファイルを置くディレクトリを作成します。 戻り値: ディレクトリの作成に失敗した場合 -1 が返ります。 ------------------------------------------------------------------------------ void syl_save_all_state(void) 設定をすべて設定ファイルに書き出します。 終了時に設定を保存したい場合に使用します。 ------------------------------------------------------------------------------ void syl_cleanup(void) 終了時の処理を行います。 一時ファイルの消去、リソースの解放などを行います。 libsylph-1.1.0/doc/tmpl.txt0000644000175000017500000000031610525017051012536 00000000000000modulename - description ------------------------------------------------------------------------------ typedef/define ------------------------------------------------------------------------------ funcs libsylph-1.1.0/doc/unmime.txt0000644000175000017500000000076710532477251013100 00000000000000unmime - MIME ヘッダのデコード ------------------------------------------------------------------------------ gchar *unmime_header (const gchar *encoded_str); RFC 2045 / 2047 に基づいてエンコードされたヘッダをデコードします。 デコードした文字列は UTF-8 に変換して返します。 返った文字列は g_free() で解放する必要があります。 encoded_str: MIME エンコードされた文字列 戻り値: デコードされた UTF-8 文字列 libsylph-1.1.0/doc/utils.txt0000644000175000017500000022217410530240620012726 00000000000000utils - ユーティリティ関数群 ------------------------------------------------------------------------------ #define CHDIR_RETURN_IF_FAIL(dir) カレントディレクトリを dir に変更します。失敗した場合は return します。 dir: カレントディレクトリの変更先のパス ------------------------------------------------------------------------------ #define CHDIR_RETURN_VAL_IF_FAIL(dir, val) カレントディレクトリを dir に変更します。失敗した場合は return で val を 返します。 dir: カレントディレクトリの変更先のパス val: 失敗時に返す値 ------------------------------------------------------------------------------ #define Xalloca(ptr, size, iffail) alloca(size) を実行し、 size バイトのメモリをスタック上に確保します。 失敗した場合は、 iffail に記述した文(複数の場合はブロック)を実行します。 ptr: 確保したメモリへのポインタ size: 確保するメモリのサイズ iffail: 失敗した場合に実行する文あるいはブロック ------------------------------------------------------------------------------ #define Xstrdup_a(ptr, str, iffail) alloca() で確保したメモリに文字列 str をコピーします。 失敗した場合は、 iffail に記述した文(複数の場合はブロック)を実行します。 ptr: 確保したメモリへのポインタ str: コピーする文字列 iffail: 失敗した場合に実行する文あるいはブロック ------------------------------------------------------------------------------ #define Xstrndup_a(ptr, str, len, iffail) alloca() で確保したメモリに文字列 str を最大 len バイトコピーします。 末尾は常にヌル文字で終端されます。 失敗した場合は、 iffail に記述した文(複数の場合はブロック)を実行します。 ptr: 確保したメモリへのポインタ str: コピーする文字列 len: コピーするバイト数 iffail: 失敗した場合に実行する文あるいはブロック ------------------------------------------------------------------------------ #define Xstrcat_a(ptr, str1, str2, iffail) alloca() で確保したメモリに文字列 str1 と str2 を連結してコピーします。 失敗した場合は、 iffail に記述した文(複数の場合はブロック)を実行します。 ptr: 確保したメモリへのポインタ str1: コピーする文字列1 str1: コピーする文字列2 iffail: 失敗した場合に実行する文あるいはブロック ------------------------------------------------------------------------------ #define AUTORELEASE_STR(str, iffail) 通常の g_malloc() で確保された文字列 str を alloca() で確保したものに 置き換えることで、後で g_free() を行わずに済むようにします。 失敗した場合は、 iffail に記述した文(複数の場合はブロック)を実行します。 str: 自動解放する文字列 iffail: 失敗した場合に実行する文あるいはブロック ------------------------------------------------------------------------------ #define FILE_OP_ERROR(file, func) perror() を用いてファイル関連のエラーメッセージを出力します。 file: ファイル名 func: エラーの原因となった関数 ------------------------------------------------------------------------------ typedef void (*UIUpdateFunc) (void); UI を強制的に更新する場合に呼び出されるコールバック関数の型です。 ------------------------------------------------------------------------------ typedef void (*ProgressFunc) (gint cur, gint total); 進捗状況を表示するためのコールバック関数の型です。 cur: 現在のカウント total: 総数 ------------------------------------------------------------------------------ typedef gchar * (*QueryPasswordFunc) (const gchar *server, const gchar *user); パスワードをユーザに入力させる場合に呼び出されるコールバック関数の型です。 パスワード文字列は新規にメモリを確保して返します。 server: サーバ名 user: ユーザ名 戻り値: 入力したパスワード文字列 ------------------------------------------------------------------------------ typedef void (*LogFunc) (const gchar *str); ログの出力時に呼び出されるコールバック関数の型です。 str: ログに出力する文字列 ------------------------------------------------------------------------------ #define Str(x) #x #define Xstr(x) Str(x) 引数 x を文字列に変換するためのマクロです。 ------------------------------------------------------------------------------ void list_free_strings (GList *list); g_malloc() で確保した文字列(あるいはその他のデータ)を要素に持つ GList の各要素のメモリをすべて解放します。 list: g_malloc() で確保したメモリを要素に持つ GList ------------------------------------------------------------------------------ void slist_free_strings (GSList *list); g_malloc() で確保した文字列(あるいはその他のデータ)を要素に持つ GSList の各要素のメモリをすべて解放します。 list: g_malloc() で確保したメモリを要素に持つ GSList ------------------------------------------------------------------------------ void hash_free_strings (GHashTable *table); g_malloc() で確保した文字列(あるいはその他のデータ)をキーとして持つ GHashTable の各キーのメモリをすべて解放します。 table: g_malloc() で確保したメモリをキーとして持つ GHashTable ------------------------------------------------------------------------------ void hash_free_value_mem (GHashTable *table); g_malloc() で確保した文字列(あるいはその他のデータ)を値として持つ GHashTable の各値のメモリをすべて解放します。 table: g_malloc() で確保したメモリを値として持つ GHashTable ------------------------------------------------------------------------------ gint str_case_equal (gconstpointer v, gconstpointer v2); g_hash_table_new() で使用するための比較関数です。 文字列 v と v2 が大小文字を区別せずに一致する場合 TRUE を返します。 v: 文字列1 v2: 文字列2 戻り値: 文字列 v と v2 が大小文字を区別せずに一致する場合 TRUE そうでない場合 FALSE ------------------------------------------------------------------------------ guint str_case_hash (gconstpointer key); g_hash_table_new() で使用するためのハッシュ関数です。 文字列 key をすべて小文字に変換した上でハッシュ値を生成します。 key: ハッシュのキー文字列 戻り値: 生成されたハッシュ値 ------------------------------------------------------------------------------ void ptr_array_free_strings (GPtrArray *array); g_malloc() で確保した文字列(あるいはその他のデータ)を要素に持つ GPtrArray の各要素のメモリをすべて解放します。 list: g_malloc() で確保したメモリを要素に持つ GPtrArray ------------------------------------------------------------------------------ typedef gboolean (*StrFindFunc) (const gchar *haystack, const gchar *needle); 文字列検索用の関数の型です。 haystack: 検索対象文字列 needle: 検索文字列 戻り値: 見つかった場合 TRUE 見つからなかった場合 FALSE ------------------------------------------------------------------------------ gboolean str_find (const gchar *haystack, const gchar *needle); 文字列 haystack 中に文字列 needle が存在する場合に TRUE を返します。 haystack: 検索対象文字列 needle: 検索文字列 戻り値: 見つかった場合 TRUE 見つからなかった場合 FALSE ------------------------------------------------------------------------------ gboolean str_case_find (const gchar *haystack, const gchar *needle); 文字列 haystack 中に文字列 needle が存在する場合に TRUE を返します。 大小文字は区別しません。 haystack: 検索対象文字列 needle: 検索文字列 戻り値: 見つかった場合 TRUE 見つからなかった場合 FALSE ------------------------------------------------------------------------------ gboolean str_find_equal (const gchar *haystack, const gchar *needle); 文字列 haystack と文字列 needle が一致する場合に TRUE を返します。 haystack: 検索対象文字列 needle: 検索文字列 戻り値: 一致した場合 TRUE 一致しなかった場合 FALSE ------------------------------------------------------------------------------ gboolean str_case_find_equal (const gchar *haystack, const gchar *needle); 文字列 haystack と文字列 needle が一致する場合に TRUE を返します。 大小文字は区別しません。 haystack: 検索対象文字列 needle: 検索文字列 戻り値: 一致した場合 TRUE 一致しなかった場合 FALSE ------------------------------------------------------------------------------ gint to_number (const gchar *nstr); 非負の数値文字列 nstr を整数に変換します。 nstr がヌル文字列、または数字以外の文字を含む場合は -1 を返します。 nstr: 非負の数値文字列 戻り値: nstr を整数に変換した値 (>=0) 変換できない場合は -1 ------------------------------------------------------------------------------ gchar *itos_buf (gchar *nstr, gint n); 整数 n を文字列に変換し、 nstr に格納します。 nstr は 11 バイト以上の領域でなければなりません。 nstr: 変換した文字列を格納するバッファ(11 バイト以上) n: 変換する整数値 戻り値: nstr ------------------------------------------------------------------------------ gchar *itos (gint n); 整数 n を文字列に変換し、内部で保持しているバッファへのポインタを返します。 戻り値は解放できません。次の呼び出しでバッファの内容は上書きされます。 n: 変換する整数値 戻り値: 変換した文字列を格納する内部バッファへのポインタ ------------------------------------------------------------------------------ gchar *to_human_readable (gint64 size); 64ビットのバイト数 size を人間が読みやすい表記(**KB 、 **MB 等)に変換します。 戻り値は解放できません。次の呼び出しでバッファの内容は上書きされます。 size: 変換する64ビットの数値 戻り値: 変換した文字列を格納する内部バッファへのポインタ ------------------------------------------------------------------------------ gint strcmp2 (const gchar *s1, const gchar *s2); strcmp() と同等ですが、 s1 または s2 が NULL の場合は -1 を返します。 s1: 文字列1 s2: 文字列2 戻り値: s1 > s1 の場合正の値 s1 == s2 の場合 0 s1 < s2 の場合負の値 s1 または s2 が NULL の場合 -1 ------------------------------------------------------------------------------ gint path_cmp (const gchar *s1, const gchar *s2); パスを比較するための関数です。パスの末尾のセパレータは無視されます。 Win32 の場合、 '/' と '\' が混在していても正規化して正しく比較されます。 s1 または s2 が NULL 、あるいはヌル文字列の場合は -1 を返します。 s1: パス文字列1 s2: パス文字列2 戻り値: s1 > s1 の場合正の値 s1 == s2 の場合 0 s1 < s2 の場合負の値 s1 または s2 が NULL またはヌル文字列の場合 -1 ------------------------------------------------------------------------------ gchar *strretchomp (gchar *str); 文字列 str から末尾の改行(CR, LF)を除去します。 末尾に改行が複数ある場合もすべて除去されます。途中の改行は除去されません。 str: 文字列 戻り値: str ------------------------------------------------------------------------------ gchar *strtailchomp (gchar *str, gchar tail_char); 文字列 str から末尾の tail_char を除去します。 tail_char 以外の文字が出現した時点で終了します。 str: 文字列 戻り値: str ------------------------------------------------------------------------------ gchar *strcrchomp (gchar *str); 文字列 str の末尾が CR+LF の場合、 LF のみに書き換えます。 途中に出現する CR は除去されません。 str: 文字列 戻り値: str ------------------------------------------------------------------------------ gchar *strcasestr (const gchar *haystack, const gchar *needle); 文字列 haystack 中に needle が存在する場合、 haystack 上で最初に needle が 出現した位置を返します。大小文字は区別しません。 haystack: 検索対象文字列 needle: 検索文字列 戻り値: haystack 上で最初に needle が出現した位置 見つからなかった場合 NULL ------------------------------------------------------------------------------ gpointer my_memmem (gconstpointer haystack, size_t haystacklen, gconstpointer needle, size_t needlelen); 長さ haystacklen のデータ haystack 中に長さ needlelen のデータ needle と一致する部分が存在する場合、 haystack 上で最初に needle が出現した 位置を返します。 haystack: 検索対象データ haystacklen: haystack の長さ needle: 検索データ needlelen: needle の長さ 戻り値: haystack 上で最初に needle が出現した位置 見つからなかった場合 NULL ------------------------------------------------------------------------------ gchar *strncpy2 (gchar *dest, const gchar *src, size_t n); 文字列 src から n 文字を超えない長さの文字を dest にコピーします。 strncpy() とは異なり、 dest は常にヌル文字で終端されます。 src の長さが n より少ない場合も dest の残りはヌル文字で埋められません。 dest: コピー先のバッファ src: コピー元文字列 n: コピーする最大の長さ(ヌル文字を含む) 戻り値: dest ------------------------------------------------------------------------------ gboolean str_has_suffix_case (const gchar *str, const gchar *suffix); 文字列 str の末尾が suffix に一致するかどうかを調べます。 g_str_has_suffix() と同様ですが、大小文字を区別しません。 str: 文字列 suffix: 末尾の文字列 戻り値: str の末尾が suffix に一致する場合 TRUE 一致しない場合 FALSE ------------------------------------------------------------------------------ gint str_find_format_times (const gchar *haystack, gchar ch); 文字列 haystack 中に printf フォーマット文字列 "% + ch" が出現する回数を 数えます。文字列 "%%" はスキップします。 haystack: 検索対象文字列 ch: '%' の後に続く文字 戻り値: haystack 中に "% + ch" が出現した回数 ------------------------------------------------------------------------------ gboolean is_next_nonascii (const gchar *s); s から始まる次の文字列のブロック(空白が出現するまで)が非 ASCII 文字列 (8bit 文字またはコントロールコードが存在)の場合、 TRUE を返します。 s が空白で始まる場合、次の空白以外の文字までスキップされます。 s: 文字列の検索開始位置 戻り値: 次のブロックが非 ASCII 文字列の場合 TRUE ASCII 文字列の場合 FALSE ------------------------------------------------------------------------------ gint get_next_word_len (const gchar *s); s から始まる単語(次の空白まで)の文字数を数えます。 s が空白で始まる場合は 0 が返ります。 s: 文字列の検索開始位置 戻り値: 単語の文字数 ------------------------------------------------------------------------------ gint subject_compare (const gchar *s1, const gchar *s2); Subject 比較用の関数です。文字列 s1 と s2 のうち比較に不要な [...] 、 (...)、 Re: などの文字列を除去した上で strcmp() による比較を行います。 s1 または s2 が NULL 、またはヌル文字列の場合は -1 を返します。 s1: 文字列1 s2: 文字列2 戻り値: s1 > s1 の場合正の値 s1 == s2 の場合 0 s1 < s2 の場合負の値 s1 または s2 が NULL またはヌル文字列の場合 -1 ------------------------------------------------------------------------------ gint subject_compare_for_sort (const gchar *s1, const gchar *s2); Subject によるソート用の比較関数です。文字列 s1 と s2 のうち比較に不要な Re: などのヘッダを除去した上で g_ascii_strcasecmp() による比較を行います。 s1 または s2 が NULL の場合は -1 を返します。 s1: 文字列1 s2: 文字列2 戻り値: s1 > s1 の場合正の値 s1 == s2 の場合 0 s1 < s2 の場合負の値 s1 または s2 が NULL の場合 -1 ------------------------------------------------------------------------------ void trim_subject_for_compare (gchar *str); 文字列 str から Subject の比較に不要な [...] 、 (...)、 Re: などの文字列を 除去します。 str: Subject 文字列 ------------------------------------------------------------------------------ void trim_subject_for_sort (gchar *str); 文字列 str から Subject によるソート用の比較に不要な Re: などのヘッダを 除去します。 str: Subject 文字列 ------------------------------------------------------------------------------ void trim_subject (gchar *str); 文字列 str から Subject の簡略表示用に [...] 、 (...) などのヘッダを除去 します。 "Re:" は適切にスキップされます。 str: Subject 文字列 ------------------------------------------------------------------------------ void eliminate_parenthesis (gchar *str, gchar op, gchar cl); 文字列 str から文字 op と cl で囲まれた部分を除去します。 str: 文字列 op: 空き括弧文字 cl: 閉じ括弧文字 ------------------------------------------------------------------------------ void extract_parenthesis (gchar *str, gchar op, gchar cl); 文字列 str から文字 op と cl で囲まれた部分を抽出します。 括弧文字自体は処理後の文字列には含まれません。 str: 文字列 op: 空き括弧文字 cl: 閉じ括弧文字 ------------------------------------------------------------------------------ void extract_parenthesis_with_skip_quote (gchar *str, gchar quote_chr, gchar op, gchar cl); 文字列 str から文字 op と cl で囲まれた部分を除去します。ただし、 文字 quote_chr で囲まれた部分はスキップします。 str: 文字列 quote_chr: 引用文字 op: 空き括弧文字 cl: 閉じ括弧文字 ------------------------------------------------------------------------------ void eliminate_quote (gchar *str, gchar quote_chr); 文字列 str から文字 quote_chr で囲まれた部分を除去します。 str: 文字列 quote_chr: 引用文字 ------------------------------------------------------------------------------ void extract_quote (gchar *str, gchar quote_chr); 文字列 str から文字 quote_chr で囲まれた部分を抽出します。 最初に現れた部分のみが抽出されます。 str: 文字列 quote_chr: 引用文字 ------------------------------------------------------------------------------ void eliminate_address_comment (gchar *str); メールアドレス文字列 str から "" や () で囲まれたコメント部分を除去します。 str: メールアドレス文字列 ------------------------------------------------------------------------------ gchar *strchr_with_skip_quote (const gchar *str, gint quote_chr, gint c); 文字列 str から文字 c が最初に現れた位置を返します。 ただし文字 quote_chr で囲まれた部分は無視します。 str: 検索対象文字列 quote_chr: 引用文字 c: 検索文字 戻り値: str 上で c が最初に現れた位置 ------------------------------------------------------------------------------ gchar *strrchr_with_skip_quote (const gchar *str, gint quote_chr, gint c); 文字列 str から文字 c が最後に現れた位置を返します。 ただし文字 quote_chr で囲まれた部分は無視します。 str: 検索対象文字列 quote_chr: 引用文字 c: 検索文字 戻り値: str 上で c が最後に現れた位置 ------------------------------------------------------------------------------ void extract_address (gchar *str); メールアドレス文字列 str からアドレスのみを抽出します。 str: メールアドレス文字列 ------------------------------------------------------------------------------ void extract_list_id_str (gchar *str); List-Id: 文字列 str から List-Id 本体(<> で囲まれた部分)を抽出します。 str: List-Id: 文字列 ------------------------------------------------------------------------------ gchar *normalize_address_field (const gchar *str); 複数のメールアドレスからなる文字列 str を正規化します。結果は新たにメモリを 確保して返されます。 g_free() で解放する必要があります。 str: メールアドレス文字列 ------------------------------------------------------------------------------ gboolean address_equal (const gchar *addr1, const gchar *addr2); メールアドレス文字列 addr1 と addr2 が同一のアドレスである場合、 TRUE を 返します。名前やコメントは無視されます。 addr1: メールアドレス文字列1 addr2: メールアドレス文字列2 戻り値: addr1 と addr2 が同一のアドレスである場合 TRUE 異なる場合 FALSE ------------------------------------------------------------------------------ GSList *address_list_append_orig (GSList *addr_list, const gchar *str); カンマ ',' で区切られたアドレス文字列 str をアドレスごとに分解し、 各アドレスをリスト addr_list に追加します。その際名前やコメントなども そのまま保持されます。 addr_list: メールアドレス文字列のリスト str: メールアドレス文字列 戻り値: 更新されたメールアドレス文字列のリスト ------------------------------------------------------------------------------ GSList *address_list_append (GSList *addr_list, const gchar *str); カンマ ',' で区切られたアドレス文字列 str をアドレスごとに分解し、 各アドレスをリスト addr_list に追加します。その際名前やコメントなどは 除去されます。 addr_list: メールアドレス文字列のリスト str: メールアドレス文字列 戻り値: 更新されたメールアドレス文字列のリスト ------------------------------------------------------------------------------ GSList *references_list_prepend (GSList *msgid_list, const gchar *str); References: 文字列 str を各 Message-Id 毎に分解し、リスト msgid_list に 前から追加します。 msgid_list: Message-Id 文字列のリスト str: References: 文字列 戻り値: 更新された Message-Id 文字列のリスト ------------------------------------------------------------------------------ GSList *references_list_append (GSList *msgid_list, const gchar *str); References: 文字列 str を各 Message-Id 毎に分解し、リスト msgid_list の 後に追加します。 msgid_list: Message-Id 文字列のリスト str: References: 文字列 戻り値: 更新された Message-Id 文字列のリスト ------------------------------------------------------------------------------ GSList *newsgroup_list_append (GSList *group_list, const gchar *str); カンマ ',' で区切られたニュースグループ文字列 str をグループごとに分解し、 各グループをリスト group_list に追加します。その際 "" で括られた部分は 除去されます。 group_list: ニュースグループ文字列のリスト str: ニュースグループ文字列 戻り値: 更新されたニュースグループ文字列のリスト ------------------------------------------------------------------------------ GList *add_history (GList *list, const gchar *str); ヒストリリスト list に文字列 str を前から追加します。 str に一致する古いエントリがあった場合、それは除去されます。 追加するときエントリの数が MAX_HISTORY_SIZE を超える場合は一番古いエントリが 除去されます。 list: ヒストリリスト str: 追加する文字列 戻り値: 更新されたヒストリリスト ------------------------------------------------------------------------------ void remove_return (gchar *str); 文字列 str からすべての改行コード(CR, LF)を除去します。 str: 変更対象文字列 ------------------------------------------------------------------------------ void remove_space (gchar *str); 文字列 str からすべての空白文字を除去します。 str: 変更対象文字列 ------------------------------------------------------------------------------ void unfold_line (gchar *str); 文字列 str 中の改行文字を空白に置換した上で各行を結合します。 str: 変更対象文字列 ------------------------------------------------------------------------------ void subst_char (gchar *str, gchar orig, gchar subst); 文字列 str 中の文字 orig をすべて文字 subst に置換します。 str: 変更対象文字列 orig: 置換対象文字 subst: 置換文字 ------------------------------------------------------------------------------ void subst_chars (gchar *str, gchar *orig, gchar subst); 文字列 str 中の文字列 orig をすべて文字 subst に置換します。 str: 変更対象文字列 orig: 置換対象文字列 subst: 置換文字 ------------------------------------------------------------------------------ void subst_null (gchar *str, gint len, gchar subst); ヌル文字を含む長さ len の文字列 str のヌル文字をすべて文字 subst に置換します。 str: 変更対象文字列 len: str の長さ subst: 置換文字 ------------------------------------------------------------------------------ void subst_control (gchar *str, gchar subst); 文字列 str のコントロールコードをすべて文字 subst に置換します。 str: 変更対象文字列 subst: 置換文字 ------------------------------------------------------------------------------ void subst_for_filename (gchar *str); ファイル名文字列 str のうちファイル名に適さない文字を '_' に置換します。 str: 変更対象文字列 ------------------------------------------------------------------------------ gchar *get_alt_filename (const gchar *filename, gint count); ファイル名 filename に番号 count の接尾辞を付加します。拡張子は保持されます。 新しいファイル名は新たにメモリを確保して返します。 g_free() で解放する 必要があります。 filename: ファイル名 count: 接尾辞の番号 戻り値: 新しいファイル名 ------------------------------------------------------------------------------ gboolean is_header_line (const gchar *str); 文字列 str がヘッダ行("ヘッダ": "内容")である場合 TRUE を返します。 str: 文字列 戻り値: str がヘッダ行の場合 TRUE ヘッダ行でない場合 FALSE ------------------------------------------------------------------------------ gboolean is_ascii_str (const gchar *str); 文字列 str が ASCII 文字列である場合 TRUE を返します。 str: 文字列 戻り値: str が ASCII 文字列の場合 TRUE ASCII 文字列でない場合 FALSE ------------------------------------------------------------------------------ gint get_quote_level (const gchar *str); 文字列 str の引用レベルを取得します。 引用レベルは '>' の出現回数 - 1 となります。 "<...>" や "->" などは引用とみなさず無視します。 str: 文字列 戻り値: 引用レベル(>= 0) 引用符がない場合 -1 ------------------------------------------------------------------------------ gint check_line_length (const gchar *str, gint max_chars, gint *line); 文字列 str の各行の文字数をチェックし、 max_chars 文字以上の行があれば -1 を 返します。すべて max_chars 文字未満であれば 0 を返します。 line が NULL でない場合は、 line に最初に現れた max_chars 以上の行の番号(0〜)を セットします。 str: 文字列 max_chars: 許可する1行の最大文字数 line: NULL でない場合は最初に現れた max_chars 以上の行の番号(0〜) 戻り値: すべての行が max_chars 未満の場合 0 max_chars 以上の行があった場合 -1 ------------------------------------------------------------------------------ gchar *strstr_with_skip_quote (const gchar *haystack, const gchar *needle); 文字列 haystack から文字列 needle が最初に現れた位置を返します。 ただし ' または " で囲まれた部分は無視します。 haystack: 検索対象文字列 needle: 検索文字列 戻り値: haystack 上で needle が最初に現れた位置 ------------------------------------------------------------------------------ gchar *strchr_parenthesis_close (const gchar *str, gchar op, gchar cl); 文字列 str から文字 op と cl で囲まれた部分を探し、 cl の位置を返します。 ただし " で囲まれた部分はスキップします。 str: 文字列 op: 空き括弧文字 cl: 閉じ括弧文字 ------------------------------------------------------------------------------ gchar **strsplit_parenthesis (const gchar *str, gchar op, gchar cl, gint max_tokens); 文字列 str を括弧 op と cl で囲まれたブロック毎に分割し、文字列の配列にして返します。 括弧の外側の空白は無視し、それ以外の文字列はヌル文字列として追加されます。 配列の最後の要素は NULL になります。 max_tokens が指定されいる場合、ブロックがその数に到達した時点で処理を終了します。 返った配列は g_strfreev() で解放する必要があります。 例: "(foo) (bar)" -> a[0] = "foo", a[1] = "bar", a[2] = NULL str: 文字列 op: 空き括弧文字 cl: 閉じ括弧文字 max_tokens: 最大処理ブロック数 戻り値: 文字列へのポインタの配列(最後の要素は NULL) ------------------------------------------------------------------------------ gchar **strsplit_with_quote (const gchar *str, const gchar *delim, gint max_tokens); g_strsplit() と同様、文字列 str を区切り記号 delim で分割して文字列の配列にして 返します。ただし ' または " で囲まれた部分は無視されます。 max_tokens が指定されいる場合、トークンがその数に到達した時点で処理を終了します。 返った配列は g_strfreev() で解放する必要があります。 str: 文字列 delim: 区切り記号 max_tokens: 最大トークン数 戻り値: 文字列へのポインタの配列(最後の要素は NULL) ------------------------------------------------------------------------------ gchar *get_abbrev_newsgroup_name (const gchar *group, gint len); ニュースグループ名 group をできるだけ長さ len を超えないように簡略表記した文字列を 返します。 返った文字列は g_free() で解放する必要があります。 group: ニュースグループ文字列 len: 最大文字数 戻り値: 簡略表記したニュースグループ名 ------------------------------------------------------------------------------ gchar *trim_string (const gchar *str, gint len); UTF-8 文字列 str を長さ(バイト数) len を超えないように末尾を切り詰めた文字列を返します。 切り詰めた場合、末尾に "..." が付加されます。長さは "..." を含めて len 以下となります。 返った文字列は g_free() で解放する必要があります。 str: 文字列 len: 最大文字数 戻り値: 切り詰めた文字列 ------------------------------------------------------------------------------ gchar *trim_string_before (const gchar *str, gint len); UTF-8 文字列 str を長さ(バイト数) len を超えないように先頭を切り詰めた文字列を返します。 切り詰めた場合、先頭に "..." が付加されます。長さは "..." を含めて len 以下となります。 返った文字列は g_free() で解放する必要があります。 str: 文字列 len: 最大文字数 戻り値: 切り詰めた文字列 ------------------------------------------------------------------------------ GList *uri_list_extract_filenames (const gchar *uri_list); 改行で区切られたファイル名 URI (file:) のリスト文字列を分割して通常のパスにし、 GList として返します。 返ったリストは list_free_strings() と g_list_free() で解放する必要があります。 uri_list: URI のリスト文字列 戻り値: ファイルパス文字列を要素に持つ GList ------------------------------------------------------------------------------ gboolean is_uri_string (const gchar *str); 文字列 str が URI または URI と推測される文字列である場合 TRUE を返します。 str: 文字列 戻り値: str が URI である場合 TRUE URI でない場合 FALSE ------------------------------------------------------------------------------ gchar *get_uri_path (const gchar *uri); URI のスキーマ部を除いたパス部分の先頭位置を返します。 uri が URI でない場合は uri をそのまま返します。 file: URI はこの関数では URI とはみなされません。 uri: URI 文字列 戻り値: uri 上のパス部分の先頭位置 ------------------------------------------------------------------------------ gint get_uri_len (const gchar *str); URI 文字列 str の長さを返します。長さは URI に含まれない文字が出現したところまでに なります。 str: URI 文字列 戻り値: URI の長さ str が URI でない場合は 0 ------------------------------------------------------------------------------ void decode_uri (gchar *decoded_uri, const gchar *encoded_uri); URI エンコードされた文字列 encoded_uri をデコードして decoded_uri に出力します。 encoded_uri と decoded_uri は同じ場所を指していても構いません。 decoded_uri: デコードした文字列を格納するバッファ encoded_uri: URI エンコード文字列 ------------------------------------------------------------------------------ void decode_xdigit_encoded_str (gchar *decoded, const gchar *encoded); '%xx' の形式で16進数にエンコードされた文字列 encoded をデコードして decoded に 出力します。 encoded_uri と decoded_uri は同じ場所を指していても構いません。 decoded_uri() とは異なり、'+' はスペースに変換されません。 ------------------------------------------------------------------------------ gchar *encode_uri (const gchar *filename); ファイル名 filename を file: で始まる URI 文字列にエンコードします。 返った文字列は g_free() で解放する必要があります。 filename: ファイル名 戻り値: file: URI 文字列 ------------------------------------------------------------------------------ gchar *uriencode_for_filename (const gchar *filename); ファイル名 filename のうちファイルシステムに適さない文字を URI エンコードします。 返った文字列は g_free() で解放する必要があります。 filename: ファイル名 戻り値: URI エンコードした文字列 ------------------------------------------------------------------------------ gint scan_mailto_url (const gchar *mailto, gchar **to, gchar **cc, gchar **bcc, gchar **subject, gchar **body); mailto: URL 文字列 mailto をスキャンし、各値を抽出します。 返った文字列は g_free() で解放する必要があります。 mailto: mailto: URL 文字列 to: 宛先を格納する先 cc: cc の値を格納する先 bcc: bcc の値を格納する先 subject: subject の値を格納する先 body: body (本文)の値を格納する先 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ void set_startup_dir (void); カレントディレクトリを起動時のディレクトリとして記憶します。 Win32 の場合は実行ファイルのある場所にカレントディレクトリを変更し、そこを起動 ディレクトリとします。 2回目以降呼び出した場合は何もしません。 ------------------------------------------------------------------------------ void set_rc_dir (const gchar *dir); 設定ファイルを保存するディレクトリを dir に設定します。 dir が絶対パスの場合はそれを そのまま使用します。 dir が相対パスの場合は起動ディレクトリ以下からの相対パスと みなされます。2回目以降呼び出した場合は前の値が上書きされます。 dir: 設定ファイルのディレクトリのパス ------------------------------------------------------------------------------ const gchar *get_startup_dir (void); 起動ディレクトリを返します。 返った文字列は LibSylph 内部で保持しているため、解放できません。 戻り値: 起動ディレクトリ ------------------------------------------------------------------------------ const gchar *get_home_dir (void); ホームディレクトリを返します。 返った文字列は LibSylph 内部で保持しているため、解放できません。 戻り値: ホームディレクトリ ------------------------------------------------------------------------------ const gchar *get_document_dir (void); ドキュメントを保存するディレクトリを返します。 Unix 系 OS の場合はホームディレクトリが返ります。 Win32 の場合は「マイ ドキュメント」フォルダが返ります。 返った文字列は LibSylph 内部で保持しているため、解放できません。 戻り値: ドキュメントディレクトリ ------------------------------------------------------------------------------ const gchar *get_rc_dir (void); 設定ファイルを保存するディレクトリを返します。 返った文字列は LibSylph 内部で保持しているため、解放できません。 戻り値: 設定ファイルディレクトリ ------------------------------------------------------------------------------ const gchar *get_old_rc_dir (void); 2.0 以前のバージョンの Sylpheed の設定ファイルを保存するディレクトリを返します。 返った文字列は LibSylph 内部で保持しているため、解放できません。 戻り値: 旧設定ファイルディレクトリ ------------------------------------------------------------------------------ const gchar *get_mail_base_dir (void); メールボックスを置くディレクトリを返します。 Unix 系 OS の場合はホームディレクトリになります。 Win32 の場合は設定ファイルディレクトリ以下の Mailboxes ディレクトリになります。 返った文字列は LibSylph 内部で保持しているため、解放できません。 戻り値: メールボックスのベースディレクトリ ------------------------------------------------------------------------------ const gchar *get_news_cache_dir (void); ニュースキャッシュを置くディレクトリを返します。 返った文字列は LibSylph 内部で保持しているため、解放できません。 戻り値: ニュースキャッシュのベースディレクトリ ------------------------------------------------------------------------------ const gchar *get_imap_cache_dir (void); IMAP キャッシュを置くディレクトリを返します。 返った文字列は LibSylph 内部で保持しているため、解放できません。 戻り値: IMAP キャッシュのベースディレクトリ ------------------------------------------------------------------------------ const gchar *get_mime_tmp_dir (void); MIME 添付ファイルを一時的に置くディレクトリを返します。 返った文字列は LibSylph 内部で保持しているため、解放できません。 戻り値: MIME 添付ファイルのベースディレクトリ ------------------------------------------------------------------------------ const gchar *get_template_dir (void); テンプレートファイルを置くディレクトリを返します。 返った文字列は LibSylph 内部で保持しているため、解放できません。 戻り値: テンプレートファイルのベースディレクトリ ------------------------------------------------------------------------------ const gchar *get_tmp_dir (void); 一時ファイルを置くディレクトリを返します。 返った文字列は LibSylph 内部で保持しているため、解放できません。 戻り値: 一時ファイルのベースディレクトリ ------------------------------------------------------------------------------ gchar *get_tmp_file (void); ユニークな一時ファイル名を自動的に作成し、返します。ファイル名は get_tmp_dir() の ディレクトリ以下の絶対パスとなります。 返った文字列は g_free() で解放する必要があります。 戻り値: ユニークな一時ファイル名の絶対パス ------------------------------------------------------------------------------ const gchar *get_domain_name (void); Unix 系 OS の場合、マシンのドメイン名を取得して返します。 Win32 の場合常に "unknown" が返ります。 返った文字列は LibSylph 内部で保持しているため、解放できません。 戻り値: ドメイン名文字列 ------------------------------------------------------------------------------ off_t get_file_size (const gchar *file); ファイル file のファイルサイズを取得します。 file: ファイルのパス 戻り値: ファイルサイズ エラーの場合 -1 ------------------------------------------------------------------------------ off_t get_file_size_as_crlf (const gchar *file); テキストファイル file の改行コードを CR+LF とした場合のファイルサイズを取得します。 ファイル末尾が改行で終わっていない場合も改行があるものとしてカウントします。 file: ファイルのパス 戻り値: ファイルサイズ エラーの場合 -1 ------------------------------------------------------------------------------ off_t get_left_file_size (FILE *fp); ファイルストリーム fp で残りの読み出せるデータのサイズを取得します。 fp: ファイルストリーム 戻り値: 残りファイルサイズ エラーの場合 -1 ------------------------------------------------------------------------------ gboolean file_exist (const gchar *file, gboolean allow_fifo); ファイル file が存在する場合 TRUE を返します。ディレクトリなど通常ファイル以外の場合は FALSE を返します。 allow_fifo が TRUE の場合、 FIFO ファイルも通常のファイルと みなします。 file: ファイルのパス allow_fifo: FIFO を許可する場合 TRUE 許可しない場合 FALSE 戻り値: 通常ファイル file が存在する場合 TRUE 存在しない場合、またはエラーの場合 FALSE ------------------------------------------------------------------------------ #define is_file_exist(file) file_exist(file, FALSE) ファイル file が存在する(FIFO 除く)場合 TRUE を返します。 ------------------------------------------------------------------------------ #define is_file_or_fifo_exist(file) file_exist(file, TRUE) ファイル file が存在する(FIFO を含む)場合 TRUE を返します。 ------------------------------------------------------------------------------ gboolean is_dir_exist (const gchar *dir); ディレクトリ dir が存在する場合 TRUE を返します。ディレクトリ以外のファイルエントリ の場合は FALSE を返します。 dir: ディレクトリのパス 戻り値: ディレクトリ dir が存在する場合は TRUE 存在しない場合、またはエラーの場合 FALSE ------------------------------------------------------------------------------ gboolean is_file_entry_exist (const gchar *file); ファイルの種類に関わらず、ファイル file のエントリが存在する場合は TRUE を返します。 file: ファイルのパス 戻り値: ファイル file のエントリが存在する場合 TRUE 存在しない場合、またはエラーの場合 FALSE ------------------------------------------------------------------------------ gboolean dirent_is_regular_file (struct dirent *d); dirent 構造体に d_type メンバが存在して使用可能な場合、それを利用してエントリが 通常ファイルかどうかを返します。 d_type が使えない場合は通常のテストが行われます。 d: 目的のエントリを指している dirent 構造体へのポインタ 戻り値: エントリが通常ファイルの場合 TRUE そうでない場合 FALSE ------------------------------------------------------------------------------ gboolean dirent_is_directory (struct dirent *d); dirent 構造体に d_type メンバが存在して使用可能な場合、それを利用してエントリが ディレクトリかどうかを返します。 d_type が使えない場合は通常のテストが行われます。 d: 目的のエントリを指している dirent 構造体へのポインタ 戻り値: エントリがディレクトリの場合 TRUE そうでない場合 FALSE ------------------------------------------------------------------------------ gint change_dir (const gchar *dir); カレントディレクトリを dir に変更します。 dir: カレントディレクトリ変更先 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint make_dir (const gchar *dir); ディレクトリ dir を作成し、モードをユーザのみ読み、書き、実行できるように 変更します。モードが変更できなかった場合、エラーメッセージを表示しますが エラーは返しません。 dir: 作成するディレクトリ 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint make_dir_hier (const gchar *dir); ディレクトリ dir を親の階層も含めて作成します。 dir: 作成するディレクトリ 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint remove_all_files (const gchar *dir); ディレクトリ dir 内のすべてのファイルを削除します。 dir: 削除するファイルを格納するディレクトリ 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint remove_numbered_files (const gchar *dir, guint first, guint last); ディレクトリ dir 内の first 以上 last 以下の範囲の番号ファイルを削除します。 0 と負の値は対象に含まれません。 dir: 削除するファイルを格納するディレクトリ first: 削除する最小の番号 last: 削除する最大の番号 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint remove_all_numbered_files (const gchar *dir); ディレクトリ dir 内のすべての番号ファイルを削除します。 0 と負の値は対象に含まれません。 dir: 削除するファイルを格納するディレクトリ 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint remove_expired_files (const gchar *dir, guint hours); ディレクトリ dir 内の、作成後 hours 時間を超える番号ファイルを削除します。 dir: 削除するファイルを格納するディレクトリ hours: 期限切れとなる時間 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint remove_dir_recursive (const gchar *dir); ディレクトリ dir とそれに含まれるすべてのファイルとディレクトリを削除します。 呼び出し前のカレントディレクトリが dir 内であった場合、呼び出し後の カレントディレクトリは dir の親ディレクトリに設定されます。 dir: 削除するディレクトリ 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint rename_force (const gchar *oldpath, const gchar *newpath); ファイル newpath が既に存在する場合でも強制的にファイル oldpath を newpath にリネームします。既存のファイル newpath は削除されます。 oldpath: 変更元ファイルのパス newpath: 変更先のパス 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint copy_file (const gchar *src, const gchar *dest, gboolean keep_backup); ファイル src を dest にコピーします。 dest が既に存在する場合、それを dest + ".bak" というファイル名に変更してからコピーを行います。 コピーに失敗した場合バックアップファイルは元に戻されます。 keep_backup が TRUE の場合そのバックアップファイルを保持します。 FALSE の場合は削除します。 src: コピー元ファイル dest: コピー先ファイル keep_backup: TRUE の場合バックアップファイルを保持 FALSE の場合保持しない 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint copy_dir (const gchar *src, const gchar *dest); ディレクトリ src をその中のファイルも含めて dest にコピーします。 コピーされるのは1階層のみになります(サブディレクトリはコピーされません)。 コピー先のファイルが存在した場合は上書きされます。 src: コピー元ディレクトリ dest: コピー先ディレクトリ 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint move_file (const gchar *src, const gchar *dest, gboolean overwrite); ファイル src を dest に移動します。異なるファイルシステムに移動しようとして 失敗した場合は、ファイルのコピーと削除により移動を行います。 overwrite が FALSE の場合、 dest が既に存在する場合エラーとなります。 src: 移動元ファイル dest: 移動先ファイル overwrite: TRUE の場合上書きを許可 FALSE の場合上書きを許可しない 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint copy_file_part (FILE *fp, off_t offset, size_t length, const gchar *dest); ファイルストリーム fp のファイル先頭からのオフセット位置 offset から length バイトをファイル dest にコピーします。 dest が既に存在する場合は上書きされます。 コピー後の fp の現在位置はコピーした領域の直後の位置になります。 fp: コピー元ファイルストリーム offset: ファイル先頭からのオフセット位置 length: コピーするバイト数 dest: コピー先ファイル 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gchar *canonicalize_str (const gchar *str); 文字列 str の改行コードを CR+LF に正規化し、新たにメモリを確保して返します。 文字列の最後が改行で終了していない場合は改行が付加されます。 返った文字列は g_free() で解放する必要があります。 str: 変換元文字列 戻り値: 正規化された文字列 ------------------------------------------------------------------------------ gint canonicalize_file (const gchar *src, const gchar *dest); ファイル src の改行コードを CR+LF に正規化し、ファイル dest に出力します。 ファイルの最後が改行で終了していない場合は改行が付加されます。 dest が既に存在する場合は上書きされます。 src: 変換元ファイル dest: 正規化されたファイル 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint canonicalize_file_replace (const gchar *file); ファイル file の改行コードを CR+LF に正規化し、 file を置き換えます。 ファイルの最後が改行で終了していない場合は改行が付加されます。 file: 変換対象ファイル 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ FILE *canonicalize_file_stream (FILE *fp, gint *length); ファイルストリーム fp の改行コードを CR+LF に正規化し、読み出し可能な 一時ファイルのストリームとして出力します。一時ファイルの現在位置は 先頭になります。 ファイルの最後が改行で終了していない場合は改行が付加されます。 length が NULL でない場合は返ったデータのバイト数が返されます。 返ったファイルストリームを fclose() すると一時ファイルは自動的に削除されます。 fp: ファイルストリーム length: 返ったデータのバイト数(NULL 可) 戻り値: 正規化されたファイルのストリーム ------------------------------------------------------------------------------ gint uncanonicalize_file (const gchar *src, const gchar *dest); ファイル src の改行コードを LF に変換し、ファイル dest に出力します。 ファイルの最後が改行で終了していない場合はそのまま出力されます。 dest が既に存在する場合は上書きされます。 src: 変換元ファイル dest: 変換先ファイル 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint uncanonicalize_file_replace(const gchar *file); ファイル file の改行コードを LF に変換し、 file を置き換えます。 ファイルの最後が改行で終了していない場合はそのまま出力されます。 file: 変換対象ファイル 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gchar *normalize_newlines (const gchar *str); 文字列 str の改行コードを LF に変換し、新たにメモリを確保して返します。 文字列の最後が改行で終了していない場合はそのまま出力されます。 返った文字列は g_free() で解放する必要があります。 str: 変換元文字列 戻り値: 変換された文字列 ------------------------------------------------------------------------------ gchar *strchomp_all (const gchar *str); 複数行からなる文字列 str のすべての行末の空白を除去し、新たにメモリを確保 して返します。改行コードはそのまま保持されます。 返った文字列は g_free() で解放する必要があります。 str: 変換元文字列 戻り値: 変換された文字列 ------------------------------------------------------------------------------ FILE *get_outgoing_rfc2822_file (FILE *fp); RFC 2822 メッセージのファイルストリーム fp を加工し、 SMTP サーバにそのまま 送信できる状態にして一時ファイルのストリームに書き出して返します。 この関数では以下のことが行われます: - ヘッダから Bcc: を取り除く - 先頭が . の行は先頭にさらに . を付加する - 改行コードを CR+LF に変換する 返ったファイルストリームを fclose() すると一時ファイルは自動的に削除されます。 fp: RFC 2822 ファイルのストリーム 戻り値: 変換後のファイルのストリーム ------------------------------------------------------------------------------ gchar *get_outgoing_rfc2822_str (FILE *fp); RFC 2822 メッセージのファイルストリーム fp を加工し、 SMTP サーバにそのまま 送信できる状態にして、新たにメモリを確保して返します。 その他の仕様は get_outgoing_rfc2822_file() と同様です。 返った文字列は g_free() で解放する必要があります。 fp: RFC 2822 ファイルのストリーム 戻り値: 変換後の RFC 2822 メッセージ全体の文字列 ------------------------------------------------------------------------------ gchar *generate_mime_boundary (const gchar *prefix); MIME のパート境界のための文字列を生成します。 重複する確率を減らすため、日付とランダムな文字列が使用されます。 prefix が NULL でない場合は文字列の先頭に prefix が付加されます。 NULL の場合は "Multipart" が付加されます。 返った文字列は g_free() で解放する必要があります。 prefix: 境界文字列の先頭に付ける文字列 戻り値: 生成された文字列 ------------------------------------------------------------------------------ gint change_file_mode_rw (FILE *fp, const gchar *file); ファイルのパーミッションをユーザの読み書きのみ許可に指定します。 fchmod() が使用可能な場合はファイルストリーム fp を使用し、 使用できない場合はファイルのパス file を使用します。 fp: ファイルストリーム file: ファイルのパス 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ FILE *my_tmpfile (void); 一時ファイルのストリームを作成して返します。一時ファイルは get_tmp_dir() で得られる一時ファイルディレクトリの下に作成されます。 ストリームのモードは "w+b" で開かれます。 この一時ファイルはストリームを fclose() すると自動的に削除されます。 戻り値: 一時ファイルのストリーム ------------------------------------------------------------------------------ FILE *str_open_as_stream (const gchar *str); 文字列をファイルストリームとして開きます。 返ったファイルストリームを fclose() すると一時ファイルは自動的に削除されます。 str: 文字列 戻り値: ファイルストリーム ------------------------------------------------------------------------------ gint str_write_to_file (const gchar *str, const gchar *file); 文字列 str をファイル file に書き出します。 str: 文字列 file: 出力先ファイルのパス 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gchar *file_read_to_str (const gchar *file); ファイル file を読み出し、新たにメモリを確保して文字列として返します。 返った文字列は g_free() で解放する必要があります。 file: ファイルのパス 戻り値: ファイルの内容を格納した文字列 エラーの場合 NULL ------------------------------------------------------------------------------ gchar *file_read_stream_to_str (FILE *fp); ファイルストリーム fp を読み出し、新たにメモリを確保して文字列として返します。 返った文字列は g_free() で解放する必要があります。 fp: ファイルストリーム 戻り値: ファイルストリームの内容を格納した文字列 エラーの場合 NULL ------------------------------------------------------------------------------ gint execute_async (gchar *const argv[]); 文字列の配列 argv で渡されたコマンドラインを非同期で実行します。 argv の文字コードは UTF-8 を使用します。 argv: コマンドラインを格納した文字列の配列(UTF-8) 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint execute_sync (gchar *const argv[]); 文字列の配列 argv で渡されたコマンドラインを同期で実行します。 argv の文字コードは UTF-8 を使用します。 argv: コマンドラインを格納した文字列の配列(UTF-8) 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint execute_command_line (const gchar *cmdline, gboolean async); コマンドライン cmdline を実行します。 async が TRUE の場合は非同期で実行 されます。 cmdline: コマンドライン文字列 async: TRUE の場合非同期で実行 FALSE の場合同期で実行 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint execute_open_file (const gchar *file, const gchar *content_type); Win32 でファイルをシステムの関連付けに基づいてアプリケーションで開きます。 Unix 系 OS の場合は何もしません。 file: 開くファイルのパス content_type: ファイルの MIME タイプ(現在未使用) 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint execute_print_file (const gchar *file); Win32 でファイルをシステムの関連付けに基づいてアプリケーションで印刷します。 Unix 系 OS の場合は何もしません。 file: 印刷するファイルのパス 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gchar *get_command_output (const gchar *cmdline); コマンド cmdline の標準出力への出力を文字列として取得します。 返った文字列は g_free() で解放する必要があります。 cmdline: コマンドライン文字列 戻り値: 標準出力への出力 ------------------------------------------------------------------------------ gint open_uri(const gchar *uri, const gchar *cmdline); URI を cmdline で指定した外部ブラウザで開きます。 Win32 の場合で cmdline が NULL またはヌル文字列の場合、システムの既定の ブラウザで開きます。 uri: 開く URI cmdline: ブラウザのコマンドライン文字列 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ time_t remote_tzoffset_sec (const gchar *zone); タイムゾーン文字列 zone を標準時からのオフセット(秒数)に変換して返します。 例えば、 "+0900" は 9 * 60 * 60 になります。また、 RFC で規定されている 文字列も有効です。 zone: タイムゾーン文字列 戻り値: 標準時からのオフセット(秒数) zone が未知の場合 -1 ------------------------------------------------------------------------------ time_t tzoffset_sec (time_t *now); ローカル時間と標準時のオフセットを秒数で返します。 now には基準として 適当な time_t の値の入った変数へのポインタを渡します。 now: 基準とする時間 戻り値: ローカル時間と標準時のオフセット(秒数) エラーの場合 -1 ------------------------------------------------------------------------------ gchar *tzoffset (time_t *now); ローカル時間と標準時のオフセットを "符号+時間(2桁)+分(2桁)" の形式の文字列で 返します。 now には基準として適当な time_t の値の入った変数へのポインタを 渡します。 返った文字列は LibSylph 内部で確保しているため、解放できません。 now: 基準とする時間 戻り値: ローカル時間と標準時のオフセット文字列 エラーの場合 -1 ------------------------------------------------------------------------------ void get_rfc822_date (gchar *buf, gint len); 現在時刻を RFC 822 (2822) の Date ヘッダ形式の文字列で取得します。 buf: 文字列を格納するバッファ len: buf のサイズ ------------------------------------------------------------------------------ size_t my_strftime (gchar *s, size_t max, const gchar *format, const struct tm *tm); strftime() のラッパーです。コンパイラが %c について警告を発するのを防止 できます。 s: 文字列を格納するバッファ max: s のサイズ format: 書式指定文字列 tm: 文字列に変換する時刻 戻り値: s に格納された文字数 ------------------------------------------------------------------------------ void set_ui_update_func (UIUpdateFunc func); 長い時間がかかる処理中に定期的にユーザインタフェースを更新するための コールバック関数を指定します。 func: UIUpdateFunc 型のコールバック関数へのポインタ ------------------------------------------------------------------------------ void ui_update (void); ユーザインタフェースを更新するためのコールバック関数を呼び出します。 set_ui_update_func() で関数が設定されていない場合は何もしません。 ------------------------------------------------------------------------------ void set_progress_func (ProgressFunc func); 長い時間がかかる処理中に進捗を表示するためのコールバック関数を指定します。 func: ProgressFunc 型のコールバック関数へのポインタ ------------------------------------------------------------------------------ void progress_show (gint cur, gint total); 進捗を表示するためのコールバック関数を呼び出します。 set_progress_func() で関数が設定されていない場合は何もしません。 cur: 現在のカウント(0 <= cur <= total) total: カウントの総数 ------------------------------------------------------------------------------ void set_input_query_password_func (QueryPasswordFunc func); ユーザにパスワードの入力を促すためのコールバック関数を指定します。 コールバック関数では新規にメモリを確保してパスワード文字列を返す必要が あります。 func: QueryPasswordFunc 型のコールバック関数へのポインタ ------------------------------------------------------------------------------ gchar *input_query_password (const gchar *server, const gchar *user); ユーザにパスワードの入力を促すためのコールバック関数を呼び出します。 返った文字列は g_free() で解放する必要があります。 server: サーバ名 user: ユーザ名 戻り値: ユーザが入力したパスワード文字列 ------------------------------------------------------------------------------ void set_log_file (const gchar *filename); ログを出力するファイルを指定し、それを開きます。 filename: ログファイルのパス ------------------------------------------------------------------------------ void close_log_file (void); set_log_file() でログファイルを開いている場合、それを閉じます。 ------------------------------------------------------------------------------ void set_log_verbosity (gboolean verbose); ログの冗長レベルを設定します。 verbose が TRUE の場合冗長レベルが 1 上がります。逆に FALSE の場合 1 下がります。 verbose: TRUE の場合冗長レベルを 1 上げる FALSE の場合冗長レベルを 1 下げる ------------------------------------------------------------------------------ gboolean get_debug_mode (void); デバッグモードが有効になっている場合 TRUE を返します。 戻り値: デバッグモードが有効の場合 TRUE 無効の場合 FALSE ------------------------------------------------------------------------------ void set_debug_mode (gboolean enable); デバッグモードを有効または無効にします。 enable: TRUE の場合デバッグモード有効 FALSE の場合デバッグモード無効 ------------------------------------------------------------------------------ void set_log_ui_func (LogFunc print_func, LogFunc message_func, LogFunc warning_func, LogFunc error_func); ログを出力した場合にユーザインタフェースに表示させるためのコールバック関数を 各ログレベル毎に指定します。 print_func: log_print() で出力するときの関数 message_func: log_message() で出力するときの関数 warning_func: log_warning() で出力するときの関数 error_func: log_error() で出力するときの関数 ------------------------------------------------------------------------------ void set_log_show_status_func (LogFunc status_func); status_print() でユーザインタフェースにステータスを表示させるための コールバック関数を指定します。 status_func: LogFunc 型のコールバック関数へのポインタ ------------------------------------------------------------------------------ void debug_print (const gchar *format, ...); デバッグメッセージを出力します。デバッグモードが無効の場合は何も出力しません。 format: printf 書式指定文字列 ------------------------------------------------------------------------------ void status_print (const gchar *format, ...); ステータスメッセージを set_log_show_status_func() で指定した関数に出力します。 format: printf 書式指定文字列 ------------------------------------------------------------------------------ void log_write (const gchar *str, const gchar *prefix); ログメッセージをログファイルに書き出します。ログメッセージの前には時刻と プレフィクス文字列 prefix が付加されます。ログファイルを開いていない場合は 何もしません。 str: ログメッセージ prefix: ログメッセージの前に付加するプレフィクス(NULL 可) ------------------------------------------------------------------------------ void log_print (const gchar *format, ...); ログメッセージを出力します。ログメッセージの前には時刻が付加されます。 デバッグモードが有効の場合は標準出力にも出力されます。 format: printf 書式指定文字列 ------------------------------------------------------------------------------ void log_message (const gchar *format, ...); ログメッセージを出力します。ログメッセージの前には時刻と "* message: " という文字列が付加されます。デバッグモードが有効の場合は標準出力にも 出力されます。 format: printf 書式指定文字列 ------------------------------------------------------------------------------ void log_warning (const gchar *format, ...); 警告メッセージをログに出力します。ログメッセージの前には時刻と "** warning: " という文字列が付加されます。デバッグモードが有効の場合は標準エラー出力にも 出力されます。 format: printf 書式指定文字列 ------------------------------------------------------------------------------ void log_error (const gchar *format, ...); エラーメッセージをログに出力します。ログメッセージの前には時刻と "*** error: " という文字列が付加されます。デバッグモードが有効の場合は標準エラー出力にも 出力されます。 format: printf 書式指定文字列 libsylph-1.1.0/doc/uuencode.txt0000644000175000017500000000233510532501725013400 00000000000000uuencode - UUENCODE のエンコードとデコード ------------------------------------------------------------------------------ int touufrombits(unsigned char *out, const unsigned char *in, int inlen); 長さ inlen のデータ(最大 45 バイト) in を UUENCODE 文字列にエンコードし、 out に出力します。 out には十分な領域が必要です (少なくとも (inlen * 4 + 2) / 3 + 1 バイト)。 out: UUENCODE 文字列を出力するバッファ in: 入力データ inlen: 入力データの長さ(45 バイト以下) 戻り値: 出力文字列の長さ(ヌル文字の分を含む) エラーの場合 -1 ------------------------------------------------------------------------------ int fromuutobits(char *out, const char *in); UUENCODE エンコード文字列 in をデコードし、 out に出力します。 out の領域は 45 バイト必要です。 in: UUENCODE エンコード文字列 out: データ出力用バッファ 戻り値: 出力データの長さ エラーの場合負の値 -1: 不正な文字が含まれている -2: データの先頭に記録されているデータ長が不正 -3: 実際のデータ長が先頭の宣言と一致しない libsylph-1.1.0/doc/virtual.txt0000644000175000017500000000127710533002740013255 00000000000000virtual - 仮想フォルダの実装と Folder インタフェース ------------------------------------------------------------------------------ #define VIRTUAL_FOLDER(obj) Folder クラスのオブジェクト obj を VirtualFolder 型にキャストします。 ------------------------------------------------------------------------------ VirtualFolder struct _VirtualFolder { LocalFolder lfolder; }; 仮想フォルダを表す構造体です。現在は未使用です。 ------------------------------------------------------------------------------ FolderClass *virtual_get_class (void); VirtualFolder の FolderClass を取得します。 戻り値: FolderClass へのポインタ libsylph-1.1.0/doc/xml.txt0000644000175000017500000002350610532472325012377 00000000000000xml - 簡易 XML パーサ ------------------------------------------------------------------------------ XMLAttr struct _XMLAttr { gchar *name; gchar *value; }; XML タグの各属性を表します。属性名と値から構成されます。 ------------------------------------------------------------------------------ XMLTag struct _XMLTag { gchar *tag; GList *attr; }; XML タグを表します。タグ名と属性リストから構成されます。 ------------------------------------------------------------------------------ XMLNode struct _XMLNode { XMLTag *tag; gchar *element; }; XML の各ノードを表します。タグ情報と要素となるデータから構成されます。 ------------------------------------------------------------------------------ XMLFile struct _XMLFile { FILE *fp; GString *buf; gchar *bufp; gchar *dtd; gchar *encoding; GList *tag_stack; guint level; gboolean is_empty_element; }; XML ファイルを読み出すときに使用する構造体です。 XML ファイルの処理中の情報が格納されます。 ------------------------------------------------------------------------------ XMLFile *xml_open_file (const gchar *path); XML ファイルを開き、 XMLFile 構造体を生成して返します。 返った値は xml_close_file() で閉じます。 path: XML ファイルのパス 戻り値: 新規 XMLFile 構造体へのポインタ エラーの場合 NULL ------------------------------------------------------------------------------ void xml_close_file (XMLFile *file); xml_open_file() で開いた XML ファイルを閉じ、メモリを解放します。 file: XMLFile 構造体へのポインタ ------------------------------------------------------------------------------ GNode *xml_parse_file (const gchar *path); XML ファイル全体を解析し、ツリーを生成して返します。 ツリーは各ノードに XMLNode 構造体をもつ GNode として返されます。 返った値は xml_free_tree() で解放する必要があります。 path: XML ファイルのパス 戻り値: 新規 GNode 構造体へのポインタ ------------------------------------------------------------------------------ gint xml_get_dtd (XMLFile *file); XML ファイルの先頭の XML 宣言の情報を取得します。 xml_open_file() の直後に呼ぶ必要があります。 この時点で XML ファイルのエンコーディングが決定されます。 file: XMLFile 構造体へのポインタ 戻り値: 成功した場合 0 XML 宣言を取得できなかった場合 -1 ------------------------------------------------------------------------------ gint xml_parse_next_tag (XMLFile *file); XML ファイルの現在位置以降に最初に現れるタグをパースします。 タグの階層が深くなる毎に XMLTag は file 中のスタックに積まれていきます。 終了タグ()が現れた場合はスタックの先頭の該当するタグは除去されます。 file: XMLFile 構造体へのポインタ 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ void xml_push_tag (XMLFile *file, XMLTag *tag); XML タグ tag をスタックの先頭に積みます。 file: XMLFile 構造体へのポインタ tag: XMLTag 構造体へのポインタ ------------------------------------------------------------------------------ void xml_pop_tag (XMLFile *file); XML タグをスタックの先頭から除きます。 除かれた XMLTag は削除されます。 file: XMLFile 構造体へのポインタ ------------------------------------------------------------------------------ XMLTag *xml_get_current_tag (XMLFile *file); 現在スタックの先頭にある XMLTag を取得します。 file: XMLFile 構造体へのポインタ 戻り値: スタックの先頭のXMLTag 構造体へのポインタ スタックが空の場合 NULL ------------------------------------------------------------------------------ GList *xml_get_current_tag_attr(XMLFile *file); 現在スタックの先頭にある XMLTag の属性 XMLAttr のリストを取得します。 file: XMLFile 構造体へのポインタ 戻り値: XMLAttr 構造体へのポインタのリスト スタックが空、または XMLTag が属性を持たない場合 NULL ------------------------------------------------------------------------------ gchar *xml_get_element (XMLFile *file); XML ファイルの現在位置から次の任意のタグまでのテキストデータを取得します。 xml_parse_next_tag() で該当タグをパースした直後に呼び出す必要があります。 テキストデータの前後の空白は除去されます。 返った値は g_free() で解放する必要があります。 file: XMLFile 構造体へのポインタ 戻り値: 取得したテキストデータ エラーの場合 NULL ------------------------------------------------------------------------------ gint xml_read_line (XMLFile *file); XML ファイルから1行読み込み、内部のバッファに格納します。 file: XMLFile 構造体へのポインタ ------------------------------------------------------------------------------ void xml_truncate_buf (XMLFile *file); 内部バッファの読み込み位置が先頭より後にある場合、先頭から読み込み位置までの 不要なデータを切り詰めます。 file: XMLFile 構造体へのポインタ ------------------------------------------------------------------------------ gboolean xml_compare_tag (XMLFile *file, const gchar *name); スタックの先頭のタグ名が name に一致するかどうかを調べます。 大小文字は区別されます。 file: XMLFile 構造体へのポインタ name: タグ名 戻り値: スタックの先頭のタグ名が name と一致する場合 TRUE 一致しない、またはスタックが空の場合 FALSE ------------------------------------------------------------------------------ XMLNode *xml_node_new (XMLTag *tag, const gchar *text); XML タグ tag とテキストデータ text を要素に持つ XMLNode を作成します。 返った値は xml_free_node() で解放する必要があります。 tag: XMLTag 構造体へのポインタ text: tag に対応するテキストデータ 戻り値: 新規 XMLNode 構造体へのポインタ ------------------------------------------------------------------------------ XMLTag *xml_tag_new (const gchar *tag); XML タグ名 tag から XMLTag を作成します。 返った値は XMLNode にした上で xml_free_node() 等で解放する必要があります。 tag: XML タグ名 戻り値: 新規 XMLTag 構造体へのポインタ ------------------------------------------------------------------------------ XMLAttr *xml_attr_new (const gchar *name, const gchar *value); 属性名 name と値 value をもつ XMLAttr を作成します。 返った値は XMLTag の要素に追加した上で xml_free_node() 等で解放する必要が あります。 name: 属性名 value: 属性値 戻り値: 新規 XMLAttr 構造体へのポインタ ------------------------------------------------------------------------------ void xml_tag_add_attr (XMLTag *tag, XMLAttr *attr); XMLAttr attr を XMLTag tag の属性リストに追加します。 tag: XMLTag 構造体へのポインタ attr: XMLAttr 構造体へのポインタ ------------------------------------------------------------------------------ XMLTag *xml_copy_tag (XMLTag *tag); XMLTag 構造体を複製します。属性リストも含めて複製されます。 tag: XMLTag 構造体へのポインタ 戻り値: 複製された XMLTag 構造体へのポインタ ------------------------------------------------------------------------------ XMLAttr *xml_copy_attr (XMLAttr *attr); XMLAttr 構造体を複製します。 attr: XMLAttr 構造体へのポインタ 戻り値: 複製された XMLAttr 構造体へのポインタ ------------------------------------------------------------------------------ gint xml_unescape_str (gchar *str); XML エスケープ("&...;")された文字列 str のエスケープを解除します。 文字列 str は上書きされます。 str: XML エスケープされた文字列 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint xml_file_put_escape_str (FILE *fp, const gchar *str); 文字列 str のうちエスケープが必要な文字を XML エスケープしてファイルストリーム fp に出力します。 fp: ファイルストリーム str: XML エスケープされていない文字列 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint xml_file_put_xml_decl (FILE *fp); ファイルストリーム fp に XML 宣言文字列を出力します。 fp: ファイルストリーム 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ gint xml_file_put_node (FILE *fp, XMLNode *node); node の内容をファイルストリーム fp に出力します。 fp: ファイルストリーム node: XMLNode 構造体へのポインタ 戻り値: 成功した場合 0 エラーの場合 -1 ------------------------------------------------------------------------------ void xml_free_node (XMLNode *node); XMLNode 構造体を解放します。 node: XMLNode 構造体へのポインタ ------------------------------------------------------------------------------ void xml_free_tree (GNode *node); 各ノードに XMLNode 構造体をもつ GNode ツリーを解放します。 node: GNode ツリーのルートを指すポインタ libsylph-1.1.0/examples/0000777000175000017500000000000010760423125012162 500000000000000libsylph-1.1.0/examples/Makefile.in0000644000175000017500000001331410760423125014145 00000000000000# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am # Copyright (C) 1994, 1995-8, 1999, 2001 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. SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include DESTDIR = pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_alias = @build_alias@ build_triplet = @build@ host_alias = @host_alias@ host_triplet = @host@ target_alias = @target_alias@ target_triplet = @target@ AR = @AR@ AS = @AS@ BUILD_REVISION = @BUILD_REVISION@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CPP = @CPP@ CXX = @CXX@ CXXCPP = @CXXCPP@ DATADIRNAME = @DATADIRNAME@ DLLTOOL = @DLLTOOL@ ECHO = @ECHO@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ GCJ = @GCJ@ GCJFLAGS = @GCJFLAGS@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GLIB_MKENUMS = @GLIB_MKENUMS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GOBJECT_QUERY = @GOBJECT_QUERY@ HAVE_LIB = @HAVE_LIB@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LEX = @LEX@ LIB = @LIB@ LIBICONV = @LIBICONV@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIB = @LTLIB@ LTLIBICONV = @LTLIBICONV@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ MAJOR_VERSION = @MAJOR_VERSION@ MAKEINFO = @MAKEINFO@ MICRO_VERSION = @MICRO_VERSION@ MINOR_VERSION = @MINOR_VERSION@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT_OPTS = @MSGFMT_OPTS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ RC = @RC@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WINDRES = @WINDRES@ YACC = @YACC@ localedir = @localedir@ EXTRA_DIST = README.ja libsylph-compose.c libsylph-createmailbox.c libsylph-listfolder.c libsylph-listprefs.c libsylph-listsummary.c libsylph-pop.c libsylph-send.c libsylph-template.c mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h CONFIG_CLEAN_FILES = DIST_COMMON = README Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP_ENV = --best all: all-redirect .SUFFIXES: $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps examples/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status tags: TAGS TAGS: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = examples distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done info-am: info: info-am dvi-am: dvi: dvi-am check-am: all-am check: check-am installcheck-am: installcheck: installcheck-am install-exec-am: install-exec: install-exec-am install-data-am: install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am uninstall-am: uninstall: uninstall-am all-am: Makefile all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: mostlyclean-am: mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-generic clean-am -rm -f libtool distclean: distclean-am maintainer-clean-am: maintainer-clean-generic distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." maintainer-clean: maintainer-clean-am .PHONY: tags distdir info-am info dvi-am dvi check check-am \ installcheck-am installcheck install-exec-am install-exec \ install-data-am install-data install-am install uninstall-am uninstall \ all-redirect all-am all installdirs mostlyclean-generic \ distclean-generic clean-generic maintainer-clean-generic clean \ mostlyclean distclean maintainer-clean # 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: libsylph-1.1.0/examples/README0000644000175000017500000000104010530733575012761 00000000000000Several sample programs are included in this directory. Sylpheed configuration is needed for most examples in advance. The license of these sample programs is public domain. libsylph-compose.c: compose message libsylph-createmailbox.c: creates mailbox libsylph-listfolder.c: list all folders libsylph-listprefs.c: list all common preferences libsylph-listsummary.c: list message summary of a specified folder libsylph-pop.c: receive messages from POP3 server libsylph-send.c: send message via SMTP server libsylph-template.c: source template libsylph-1.1.0/examples/Makefile.am0000644000175000017500000000032010530733553014131 00000000000000EXTRA_DIST = README.ja \ libsylph-compose.c \ libsylph-createmailbox.c \ libsylph-listfolder.c \ libsylph-listprefs.c \ libsylph-listsummary.c \ libsylph-pop.c \ libsylph-send.c \ libsylph-template.c libsylph-1.1.0/examples/README.ja0000644000175000017500000000143710530733633013357 00000000000000このディレクトリにはいくつかのサンプルプログラムが含まれます。 ほとんどのサンプルでは事前に Sylpheed の設定が必要となっています。 このサンプルプログラムのライセンスはパブリックドメインとします。 libsylph-compose.c: メッセージの作成 libsylph-createmailbox.c: メールボックスの作成 libsylph-listfolder.c: すべてのフォルダのリストアップ libsylph-listprefs.c: すべての全般の設定のリストアップ libsylph-listsummary.c: 指定したフォルダのメッセージサマリ一覧を表示 libsylph-pop.c: POP3 サーバからメッセージを受信 libsylph-send.c: SMTP サーバ経由でメッセージを送信 libsylph-template.c: ソースのテンプレート libsylph-1.1.0/examples/libsylph-compose.c0000644000175000017500000000234110505714371015536 00000000000000/* gcc -Wall -g -o libsylph-compose libsylph-compose.c -lsylph `pkg-config glib-2.0 --cflags --libs` */ #include #include #include #include #include void do_compose(const gchar *to, const gchar *subject, const gchar *body) { ComposeInfo *compose; PrefsAccount *ac; ac = account_get_current_account(); compose = compose_info_new(ac, COMPOSE_NEW); compose_set_headers(compose, to, NULL, NULL, NULL, subject); compose_set_body(compose, body); compose_set_encoding(compose, CS_UTF_8, NULL); compose_write_to_file(compose, "mail.txt", NULL); compose_info_free(compose); } int main(int argc, char *argv[]) { GList *alist; gchar *to, *subject, *body; syl_init(); if (argc < 4) { g_print("Usage: %s to subject body\n", argv[0]); return 1; } to = argv[1]; subject = argv[2]; body = argv[3]; set_debug_mode(TRUE); prefs_common_read_config(); account_read_config_all(); if (folder_read_list() < 0) { g_warning("folder_read_list: error"); return 1; } alist = account_get_list(); if (!alist) { g_warning("no account found"); return 1; } g_print("\n"); do_compose(to, subject, body); syl_cleanup(); return 0; } libsylph-1.1.0/examples/libsylph-createmailbox.c0000644000175000017500000000170210530266165016711 00000000000000/* gcc -Wall -g -o libsylph-createmailbox libsylph-createmailbox.c -lsylph `pkg-config glib-2.0 --cflags --libs` */ #include #include #include Folder *create_mailbox(void) { Folder *folder; /* create new MH Folder object */ folder = folder_new(F_MH, "TestMailbox", "TestMailbox"); /* create physical directories */ folder_create_tree(folder); /* add to Folder list */ folder_add(folder); /* scan directory tree */ folder_scan_tree(folder); return folder; } int main(int argc, char *argv[]) { Folder *folder; FolderItem *item; syl_init(); prefs_common_read_config(); folder = create_mailbox(); /* search created folder */ item = folder_find_item_from_identifier("#mh/TestMailbox/inbox"); if (item) { gchar *path = folder_item_get_path(item); g_print("%s found\n", path); g_free(path); } /* destroy folder tree */ folder_destroy(folder); syl_cleanup(); return 0; } libsylph-1.1.0/examples/libsylph-listfolder.c0000644000175000017500000000201310505713703016232 00000000000000/* gcc -Wall -g -o libsylph-listfolder libsylph-listfolder.c -lsylph `pkg-config glib-2.0 --cflags --libs` */ #include #include #include #include static gboolean traverse_func(GNode *node, gpointer data) { FolderItem *item; gchar *id; item = FOLDER_ITEM(node->data); id = folder_item_get_identifier(item); if (id) { g_print("%s (%d, %d, %d)\n", id, item->new, item->unread, item->total); g_free(id); } return FALSE; } void list_folders(void) { GList *list; Folder *folder; for (list = folder_get_list(); list != NULL; list = list->next) { folder = FOLDER(list->data); if (folder->node) g_node_traverse(folder->node, G_PRE_ORDER, G_TRAVERSE_ALL, -1, traverse_func, NULL); } } int main(int argc, char *argv[]) { syl_init(); prefs_common_read_config(); account_read_config_all(); if (folder_read_list() < 0) { g_warning("folder_read_list: error"); return 1; } list_folders(); syl_cleanup(); return 0; } libsylph-1.1.0/examples/libsylph-listprefs.c0000644000175000017500000000172610505713557016117 00000000000000/* gcc -Wall -g -o libsylph-listprefs libsylph-listprefs.c -lsylph `pkg-config glib-2.0 --cflags --libs` */ #include #include #include void list_commonprefs(void) { PrefParam *param; gint i; gchar *val; param = prefs_common_get_params(); for (i = 0; param[i].name != NULL; ++i) { switch (param[i].type) { case P_STRING: val = *(gchar **)param[i].data; if (!val) val = "(NULL)"; break; case P_INT: case P_ENUM: val = itos(*(gint *)param[i].data); break; case P_BOOL: val = itos(*(gboolean *)param[i].data); break; case P_USHORT: val = itos(*(gushort *)param[i].data); break; default: break; } g_print("%s = %s (default: %s)\n", param[i].name, val, param[i].defval ? param[i].defval : "NULL"); } } int main(int argc, char *argv[]) { syl_init(); prefs_common_read_config(); account_read_config_all(); list_commonprefs(); syl_cleanup(); return 0; } libsylph-1.1.0/examples/libsylph-listsummary.c0000644000175000017500000000212710505713323016460 00000000000000/* gcc -Wall -g -o libsylph-listsummary libsylph-listsummary.c -lsylph `pkg-config glib-2.0 --cflags --libs` */ #include #include #include #include #include void list_messages(const gchar *folder_id) { FolderItem *item; GSList *mlist, *cur; if (!folder_id) folder_id = "inbox"; item = folder_find_item_from_identifier(folder_id); if (!item) { g_warning("folder item '%s' not found.\n", folder_id); exit(1); } mlist = folder_item_get_msg_list(item, TRUE); for (cur = mlist; cur != NULL; cur = cur->next) { MsgInfo *msginfo = (MsgInfo *)cur->data; g_print("%u %s %s %s\n", msginfo->msgnum, msginfo->subject, msginfo->from, msginfo->date); } procmsg_msg_list_free(mlist); } int main(int argc, char *argv[]) { gchar *folder_id = NULL; syl_init(); if (argc > 1) folder_id = argv[1]; prefs_common_read_config(); account_read_config_all(); if (folder_read_list() < 0) { g_warning("folder_read_list: error"); return 1; } list_messages(folder_id); syl_cleanup(); return 0; } libsylph-1.1.0/examples/libsylph-pop.c0000644000175000017500000000364410530733116014672 00000000000000/* gcc -Wall -g -o libsylph-pop libsylph-pop.c -lsylph `pkg-config glib-2.0 --cflags --libs` */ #include #include #include #include #include #define POP3_PORT 110 static gint drop_message(Pop3Session *session, const gchar *file) { FolderItem *inbox; inbox = folder_get_default_inbox(); g_return_val_if_fail(inbox != NULL, DROP_ERROR); /* add received message to inbox */ if (folder_item_add_msg(inbox, file, NULL, FALSE) < 0) { return DROP_ERROR; } return DROP_OK; } void pop_message(void) { PrefsAccount *ac; Session *session; ac = account_get_current_account(); g_return_if_fail(ac != NULL); g_return_if_fail(ac->recv_server != NULL); g_return_if_fail(ac->userid != NULL); g_return_if_fail(ac->passwd != NULL); g_print("Receiving from %s\n", ac->recv_server); /* create session */ session = pop3_session_new(ac); POP3_SESSION(session)->drop_message = drop_message; POP3_SESSION(session)->user = g_strdup(ac->userid); POP3_SESSION(session)->pass = g_strdup(ac->passwd); /* connect */ if (session_connect(session, ac->recv_server, POP3_PORT) < 0) { session_destroy(session); return; } /* start session */ g_print("POP3 session start\n"); while (session_is_connected(session)) g_main_iteration(TRUE); if (session->state == SESSION_ERROR || session->state == SESSION_EOF || session->state == SESSION_TIMEOUT || POP3_SESSION(session)->state == POP3_ERROR || POP3_SESSION(session)->error_val != PS_SUCCESS) { if (POP3_SESSION(session)->error_msg) g_warning("error occurred: %s\n", POP3_SESSION(session)->error_msg); else g_warning("error occurred\n"); } session_destroy(session); } int main(int argc, char *argv[]) { syl_init(); set_debug_mode(TRUE); prefs_common_read_config(); account_read_config_all(); folder_read_list(); pop_message(); syl_cleanup(); return 0; } libsylph-1.1.0/examples/libsylph-send.c0000644000175000017500000000400710530733452015022 00000000000000/* gcc -Wall -g -o libsylph-send libsylph-send.c -lsylph `pkg-config glib-2.0 --cflags --libs` */ #include #include #include #include #define SMTP_PORT 25 void send_message(const gchar *to, const gchar *file) { PrefsAccount *ac; Session *session; GSList *to_list; FILE *fp; ac = account_get_current_account(); g_return_if_fail(ac != NULL); g_return_if_fail(ac->address != NULL); g_print("from: %s\nto: %s\n", ac->address, to); if ((fp = g_fopen(file, "rb")) == NULL) { FILE_OP_ERROR(file, "fopen"); return; } /* create session */ session = smtp_session_new(); SMTP_SESSION(session)->from = g_strdup(ac->address); to_list = g_slist_append(NULL, g_strdup(to)); SMTP_SESSION(session)->to_list = to_list; SMTP_SESSION(session)->cur_to = to_list; SMTP_SESSION(session)->send_data_fp = get_outgoing_rfc2822_file(fp); SMTP_SESSION(session)->send_data_len = get_left_file_size(SMTP_SESSION(session)->send_data_fp); fclose(fp); /* connect */ if (session_connect(session, ac->smtp_server, SMTP_PORT) < 0) { goto finish; } /* start session */ g_print("SMTP session start\n"); while (session_is_connected(session)) g_main_iteration(TRUE); if (session->state == SESSION_ERROR || session->state == SESSION_EOF || session->state == SESSION_TIMEOUT || SMTP_SESSION(session)->state == SMTP_ERROR || SMTP_SESSION(session)->error_val != SM_OK) { if (SMTP_SESSION(session)->error_msg) g_warning("error occurred: %s\n", SMTP_SESSION(session)->error_msg); else g_warning("error occurred\n"); } finish: session_destroy(session); slist_free_strings(to_list); g_slist_free(to_list); } int main(int argc, char *argv[]) { gchar *to, *file; syl_init(); if (argc < 3) { g_print("Usage: %s message-file to-address\n", argv[0]); return 1; } file = argv[1]; to = argv[2]; set_debug_mode(TRUE); prefs_common_read_config(); account_read_config_all(); send_message(to, file); syl_cleanup(); return 0; } libsylph-1.1.0/examples/libsylph-template.c0000644000175000017500000000054510511404063015677 00000000000000/* gcc -Wall -g -o libsylph-template libsylph-template.c -lsylph `pkg-config glib-2.0 --cflags --libs` */ #include #include #include int main(int argc, char *argv[]) { syl_init(); prefs_common_read_config(); account_read_config_all(); /* do something here */ syl_cleanup(); return 0; } libsylph-1.1.0/libsylph/0000777000175000017500000000000010760423125012172 500000000000000libsylph-1.1.0/libsylph/Makefile.in0000644000175000017500000004057310760423125014164 00000000000000# Makefile.in generated automatically by automake 1.4-p6 from Makefile.am # Copyright (C) 1994, 1995-8, 1999, 2001 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. SHELL = @SHELL@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ bindir = @bindir@ sbindir = @sbindir@ libexecdir = @libexecdir@ datadir = @datadir@ sysconfdir = @sysconfdir@ sharedstatedir = @sharedstatedir@ localstatedir = @localstatedir@ libdir = @libdir@ infodir = @infodir@ mandir = @mandir@ includedir = @includedir@ oldincludedir = /usr/include DESTDIR = pkgdatadir = $(datadir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ top_builddir = .. ACLOCAL = @ACLOCAL@ AUTOCONF = @AUTOCONF@ AUTOMAKE = @AUTOMAKE@ AUTOHEADER = @AUTOHEADER@ INSTALL = @INSTALL@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ $(AM_INSTALL_PROGRAM_FLAGS) INSTALL_DATA = @INSTALL_DATA@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ transform = @program_transform_name@ NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_alias = @build_alias@ build_triplet = @build@ host_alias = @host_alias@ host_triplet = @host@ target_alias = @target_alias@ target_triplet = @target@ AR = @AR@ AS = @AS@ BUILD_REVISION = @BUILD_REVISION@ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ CC = @CC@ CPP = @CPP@ CXX = @CXX@ CXXCPP = @CXXCPP@ DATADIRNAME = @DATADIRNAME@ DLLTOOL = @DLLTOOL@ ECHO = @ECHO@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ F77 = @F77@ GCJ = @GCJ@ GCJFLAGS = @GCJFLAGS@ GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ GLIB_CFLAGS = @GLIB_CFLAGS@ GLIB_GENMARSHAL = @GLIB_GENMARSHAL@ GLIB_LIBS = @GLIB_LIBS@ GLIB_MKENUMS = @GLIB_MKENUMS@ GMOFILES = @GMOFILES@ GMSGFMT = @GMSGFMT@ GOBJECT_QUERY = @GOBJECT_QUERY@ HAVE_LIB = @HAVE_LIB@ INSTOBJEXT = @INSTOBJEXT@ INTLLIBS = @INTLLIBS@ LEX = @LEX@ LIB = @LIB@ LIBICONV = @LIBICONV@ LIBTOOL = @LIBTOOL@ LN_S = @LN_S@ LTLIB = @LTLIB@ LTLIBICONV = @LTLIBICONV@ LT_AGE = @LT_AGE@ LT_CURRENT = @LT_CURRENT@ LT_RELEASE = @LT_RELEASE@ LT_REVISION = @LT_REVISION@ MAINT = @MAINT@ MAJOR_VERSION = @MAJOR_VERSION@ MAKEINFO = @MAKEINFO@ MICRO_VERSION = @MICRO_VERSION@ MINOR_VERSION = @MINOR_VERSION@ MKINSTALLDIRS = @MKINSTALLDIRS@ MSGFMT_OPTS = @MSGFMT_OPTS@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ PACKAGE = @PACKAGE@ PKG_CONFIG = @PKG_CONFIG@ POFILES = @POFILES@ POSUB = @POSUB@ PO_IN_DATADIR_FALSE = @PO_IN_DATADIR_FALSE@ PO_IN_DATADIR_TRUE = @PO_IN_DATADIR_TRUE@ RANLIB = @RANLIB@ RC = @RC@ STRIP = @STRIP@ USE_NLS = @USE_NLS@ VERSION = @VERSION@ WINDRES = @WINDRES@ YACC = @YACC@ localedir = @localedir@ AM_CPPFLAGS = -DG_LOG_DOMAIN=\"LibSylph\" -DSYSCONFDIR=\""$(sysconfdir)"\" -DLOCALEDIR=\""$(localedir)"\" INCLUDES = $(GLIB_CFLAGS) -I$(top_srcdir) -I$(includedir) lib_LTLIBRARIES = libsylph.la #noinst_LTLIBRARIES = libsylph.la libsylph_la_SOURCES = account.c base64.c codeconv.c compose.c customheader.c displayheader.c filter.c folder.c html.c imap.c mbox.c md5.c md5_hmac.c mh.c news.c nntp.c pop.c prefs.c prefs_account.c prefs_common.c procheader.c procmime.c procmsg.c quoted-printable.c recv.c session.c smtp.c socket.c ssl.c stringtable.c sylmain.c unmime.c utils.c uuencode.c virtual.c xml.c libsylphincludedir = $(includedir)/sylph libsylphinclude_HEADERS = defs.h enums.h account.h base64.h codeconv.h compose.h customheader.h displayheader.h filter.h folder.h html.h imap.h mbox.h md5.h md5_hmac.h mh.h news.h nntp.h pop.h prefs.h prefs_account.h prefs_common.h procheader.h procmime.h procmsg.h quoted-printable.h recv.h session.h smtp.h socket.h ssl.h stringtable.h sylmain.h unmime.h utils.h uuencode.h virtual.h xml.h @OS_WIN32_TRUE@no_undefined = -no-undefined @OS_WIN32_TRUE@export_symbols = -export-symbols libsylph.def libsylph_la_LDFLAGS = -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) -export-dynamic $(no_undefined) $(export_symbols) libsylph_la_LIBADD = $(GLIB_LIBS) mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs CONFIG_HEADER = ../config.h CONFIG_CLEAN_FILES = LTLIBRARIES = $(lib_LTLIBRARIES) DEFS = @DEFS@ -I. -I$(srcdir) -I.. CPPFLAGS = @CPPFLAGS@ LDFLAGS = @LDFLAGS@ LIBS = @LIBS@ libsylph_la_DEPENDENCIES = libsylph_la_OBJECTS = account.lo base64.lo codeconv.lo compose.lo \ customheader.lo displayheader.lo filter.lo folder.lo html.lo imap.lo \ mbox.lo md5.lo md5_hmac.lo mh.lo news.lo nntp.lo pop.lo prefs.lo \ prefs_account.lo prefs_common.lo procheader.lo procmime.lo procmsg.lo \ quoted-printable.lo recv.lo session.lo smtp.lo socket.lo ssl.lo \ stringtable.lo sylmain.lo unmime.lo utils.lo uuencode.lo virtual.lo \ xml.lo CFLAGS = @CFLAGS@ COMPILE = $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) CCLD = $(CC) LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ HEADERS = $(libsylphinclude_HEADERS) DIST_COMMON = Makefile.am Makefile.in DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST) TAR = tar GZIP_ENV = --best SOURCES = $(libsylph_la_SOURCES) OBJECTS = $(libsylph_la_OBJECTS) all: all-redirect .SUFFIXES: .SUFFIXES: .S .c .lo .o .obj .s $(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) cd $(top_srcdir) && $(AUTOMAKE) --foreign --include-deps libsylph/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status cd $(top_builddir) \ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status mostlyclean-libLTLIBRARIES: clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) distclean-libLTLIBRARIES: maintainer-clean-libLTLIBRARIES: install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(libdir) @list='$(lib_LTLIBRARIES)'; for p in $$list; do \ if test -f $$p; then \ echo "$(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p"; \ $(LIBTOOL) --mode=install $(INSTALL) $$p $(DESTDIR)$(libdir)/$$p; \ else :; fi; \ done uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) list='$(lib_LTLIBRARIES)'; for p in $$list; do \ $(LIBTOOL) --mode=uninstall rm -f $(DESTDIR)$(libdir)/$$p; \ done .c.o: $(COMPILE) -c $< # FIXME: We should only use cygpath when building on Windows, # and only if it is available. .c.obj: $(COMPILE) -c `cygpath -w $<` .s.o: $(COMPILE) -c $< .S.o: $(COMPILE) -c $< mostlyclean-compile: -rm -f *.o core *.core -rm -f *.$(OBJEXT) clean-compile: distclean-compile: -rm -f *.tab.c maintainer-clean-compile: .c.lo: $(LIBTOOL) --mode=compile $(COMPILE) -c $< .s.lo: $(LIBTOOL) --mode=compile $(COMPILE) -c $< .S.lo: $(LIBTOOL) --mode=compile $(COMPILE) -c $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: maintainer-clean-libtool: libsylph.la: $(libsylph_la_OBJECTS) $(libsylph_la_DEPENDENCIES) $(LINK) -rpath $(libdir) $(libsylph_la_LDFLAGS) $(libsylph_la_OBJECTS) $(libsylph_la_LIBADD) $(LIBS) install-libsylphincludeHEADERS: $(libsylphinclude_HEADERS) @$(NORMAL_INSTALL) $(mkinstalldirs) $(DESTDIR)$(libsylphincludedir) @list='$(libsylphinclude_HEADERS)'; for p in $$list; do \ if test -f "$$p"; then d= ; else d="$(srcdir)/"; fi; \ echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libsylphincludedir)/$$p"; \ $(INSTALL_DATA) $$d$$p $(DESTDIR)$(libsylphincludedir)/$$p; \ done uninstall-libsylphincludeHEADERS: @$(NORMAL_UNINSTALL) list='$(libsylphinclude_HEADERS)'; for p in $$list; do \ rm -f $(DESTDIR)$(libsylphincludedir)/$$p; \ done tags: TAGS ID: $(HEADERS) $(SOURCES) $(LISP) list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ here=`pwd` && cd $(srcdir) \ && mkid -f$$here/ID $$unique $(LISP) TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) $(LISP) tags=; \ here=`pwd`; \ list='$(SOURCES) $(HEADERS)'; \ unique=`for i in $$list; do echo $$i; done | \ awk ' { files[$$0] = 1; } \ END { for (i in files) print i; }'`; \ test -z "$(ETAGS_ARGS)$$unique$(LISP)$$tags" \ || (cd $(srcdir) && etags -o $$here/TAGS $(ETAGS_ARGS) $$tags $$unique $(LISP)) mostlyclean-tags: clean-tags: distclean-tags: -rm -f TAGS ID maintainer-clean-tags: distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir) subdir = libsylph distdir: $(DISTFILES) @for file in $(DISTFILES); do \ d=$(srcdir); \ if test -d $$d/$$file; then \ cp -pr $$d/$$file $(distdir)/$$file; \ else \ test -f $(distdir)/$$file \ || ln $$d/$$file $(distdir)/$$file 2> /dev/null \ || cp -p $$d/$$file $(distdir)/$$file || :; \ fi; \ done account.lo account.o : account.c ../config.h defs.h folder.h \ prefs_account.h smtp.h session.h socket.h ssl.h prefs.h \ procmsg.h procmime.h utils.h account.h procheader.h base64.lo base64.o : base64.c base64.h codeconv.lo codeconv.o : codeconv.c ../config.h defs.h codeconv.h \ prefs_common.h enums.h prefs.h unmime.h base64.h \ quoted-printable.h utils.h compose.lo compose.o : compose.c ../config.h defs.h compose.h procmsg.h \ folder.h prefs_account.h smtp.h session.h socket.h ssl.h \ prefs.h procmime.h utils.h codeconv.h imap.h news.h \ customheader.h prefs_common.h enums.h account.h procheader.h \ base64.h quoted-printable.h filter.h customheader.lo customheader.o : customheader.c ../config.h defs.h \ customheader.h prefs_account.h folder.h session.h socket.h \ ssl.h procmsg.h procmime.h utils.h smtp.h prefs.h displayheader.lo displayheader.o : displayheader.c ../config.h \ displayheader.h filter.lo filter.o : filter.c ../config.h defs.h filter.h folder.h \ prefs_account.h smtp.h session.h socket.h ssl.h prefs.h \ procmsg.h procmime.h utils.h procheader.h xml.h prefs_common.h \ enums.h account.h folder.lo folder.o : folder.c ../config.h defs.h folder.h \ prefs_account.h smtp.h session.h socket.h ssl.h prefs.h \ procmsg.h procmime.h utils.h imap.h news.h mh.h virtual.h xml.h \ codeconv.h account.h html.lo html.o : html.c html.h codeconv.h ../config.h utils.h imap.lo imap.o : imap.c ../config.h defs.h imap.h folder.h \ prefs_account.h smtp.h session.h socket.h ssl.h prefs.h \ procmsg.h procmime.h utils.h recv.h procheader.h codeconv.h \ md5_hmac.h base64.h prefs_common.h enums.h virtual.h mbox.lo mbox.o : mbox.c ../config.h defs.h mbox.h folder.h \ prefs_account.h smtp.h session.h socket.h ssl.h prefs.h \ procmsg.h procmime.h utils.h filter.h prefs_common.h enums.h \ account.h md5.lo md5.o : md5.c md5.h md5_hmac.lo md5_hmac.o : md5_hmac.c ../config.h md5.h md5_hmac.h mh.lo mh.o : mh.c ../config.h defs.h folder.h prefs_account.h smtp.h \ session.h socket.h ssl.h prefs.h procmsg.h procmime.h utils.h \ mh.h procheader.h prefs_common.h enums.h news.lo news.o : news.c ../config.h defs.h news.h folder.h \ prefs_account.h smtp.h session.h socket.h ssl.h prefs.h \ procmsg.h procmime.h utils.h nntp.h recv.h procheader.h \ codeconv.h prefs_common.h enums.h nntp.lo nntp.o : nntp.c ../config.h nntp.h session.h socket.h ssl.h \ utils.h pop.lo pop.o : pop.c ../config.h defs.h pop.h session.h socket.h ssl.h \ prefs_account.h folder.h procmsg.h procmime.h utils.h smtp.h \ prefs.h md5.h recv.h prefs.lo prefs.o : prefs.c ../config.h prefs.h codeconv.h utils.h prefs_account.lo prefs_account.o : prefs_account.c ../config.h defs.h \ prefs.h prefs_account.h folder.h session.h socket.h ssl.h \ procmsg.h procmime.h utils.h smtp.h customheader.h account.h prefs_common.lo prefs_common.o : prefs_common.c ../config.h defs.h \ prefs.h prefs_common.h enums.h filter.h folder.h \ prefs_account.h smtp.h session.h socket.h ssl.h procmsg.h \ procmime.h utils.h codeconv.h procheader.lo procheader.o : procheader.c ../config.h procheader.h \ procmsg.h folder.h prefs_account.h smtp.h session.h socket.h \ ssl.h prefs.h procmime.h utils.h codeconv.h displayheader.h \ prefs_common.h enums.h procmime.lo procmime.o : procmime.c ../config.h defs.h procmime.h \ procmsg.h folder.h prefs_account.h smtp.h session.h socket.h \ ssl.h prefs.h utils.h procheader.h base64.h quoted-printable.h \ uuencode.h html.h codeconv.h prefs_common.h enums.h procmsg.lo procmsg.o : procmsg.c defs.h ../config.h utils.h procmsg.h \ folder.h prefs_account.h smtp.h session.h socket.h ssl.h \ prefs.h procmime.h procheader.h account.h prefs_common.h \ enums.h codeconv.h quoted-printable.lo quoted-printable.o : quoted-printable.c recv.lo recv.o : recv.c ../config.h defs.h recv.h socket.h ssl.h utils.h session.lo session.o : session.c ../config.h defs.h session.h socket.h \ ssl.h utils.h smtp.lo smtp.o : smtp.c ../config.h smtp.h session.h socket.h ssl.h \ md5_hmac.h base64.h utils.h socket.lo socket.o : socket.c ../config.h socket.h ssl.h utils.h ssl.lo ssl.o : ssl.c ../config.h defs.h utils.h ssl.h socket.h stringtable.lo stringtable.o : stringtable.c stringtable.h utils.h \ ../config.h sylmain.lo sylmain.o : sylmain.c ../config.h defs.h sylmain.h \ prefs_common.h enums.h prefs.h account.h prefs_account.h \ folder.h session.h socket.h ssl.h procmsg.h procmime.h utils.h \ smtp.h filter.h codeconv.h unmime.lo unmime.o : unmime.c ../config.h codeconv.h base64.h \ quoted-printable.h utils.lo utils.o : utils.c ../config.h defs.h utils.h socket.h ssl.h uuencode.lo uuencode.o : uuencode.c virtual.lo virtual.o : virtual.c ../config.h defs.h folder.h \ prefs_account.h smtp.h session.h socket.h ssl.h prefs.h \ procmsg.h procmime.h utils.h virtual.h mh.h procheader.h \ filter.h xml.lo xml.o : xml.c xml.h utils.h ../config.h codeconv.h stringtable.h info-am: info: info-am dvi-am: dvi: dvi-am check-am: all-am check: check-am installcheck-am: installcheck: installcheck-am install-exec-am: install-libLTLIBRARIES install-exec: install-exec-am install-data-am: install-libsylphincludeHEADERS install-data: install-data-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am install: install-am uninstall-am: uninstall-libLTLIBRARIES uninstall-libsylphincludeHEADERS uninstall: uninstall-am all-am: Makefile $(LTLIBRARIES) $(HEADERS) all-redirect: all-am install-strip: $(MAKE) $(AM_MAKEFLAGS) AM_INSTALL_PROGRAM_FLAGS=-s install installdirs: $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(libsylphincludedir) mostlyclean-generic: clean-generic: distclean-generic: -rm -f Makefile $(CONFIG_CLEAN_FILES) -rm -f config.cache config.log stamp-h stamp-h[0-9]* maintainer-clean-generic: mostlyclean-am: mostlyclean-libLTLIBRARIES mostlyclean-compile \ mostlyclean-libtool mostlyclean-tags \ mostlyclean-generic mostlyclean: mostlyclean-am clean-am: clean-libLTLIBRARIES clean-compile clean-libtool clean-tags \ clean-generic mostlyclean-am clean: clean-am distclean-am: distclean-libLTLIBRARIES distclean-compile \ distclean-libtool distclean-tags distclean-generic \ clean-am -rm -f libtool distclean: distclean-am maintainer-clean-am: maintainer-clean-libLTLIBRARIES \ maintainer-clean-compile maintainer-clean-libtool \ maintainer-clean-tags maintainer-clean-generic \ distclean-am @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." maintainer-clean: maintainer-clean-am .PHONY: mostlyclean-libLTLIBRARIES distclean-libLTLIBRARIES \ clean-libLTLIBRARIES maintainer-clean-libLTLIBRARIES \ uninstall-libLTLIBRARIES install-libLTLIBRARIES mostlyclean-compile \ distclean-compile clean-compile maintainer-clean-compile \ mostlyclean-libtool distclean-libtool clean-libtool \ maintainer-clean-libtool uninstall-libsylphincludeHEADERS \ install-libsylphincludeHEADERS tags mostlyclean-tags distclean-tags \ clean-tags maintainer-clean-tags distdir info-am info dvi-am dvi check \ check-am installcheck-am installcheck install-exec-am install-exec \ install-data-am install-data install-am install uninstall-am uninstall \ all-redirect all-am all installdirs mostlyclean-generic \ distclean-generic clean-generic maintainer-clean-generic clean \ mostlyclean distclean maintainer-clean # 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: libsylph-1.1.0/libsylph/Makefile.am0000644000175000017500000000277110510614362014147 00000000000000 AM_CPPFLAGS = \ -DG_LOG_DOMAIN=\"LibSylph\" \ -DSYSCONFDIR=\""$(sysconfdir)"\" \ -DLOCALEDIR=\""$(localedir)"\" INCLUDES = $(GLIB_CFLAGS) -I$(top_srcdir) -I$(includedir) lib_LTLIBRARIES = libsylph.la #noinst_LTLIBRARIES = libsylph.la libsylph_la_SOURCES = \ account.c \ base64.c \ codeconv.c \ compose.c \ customheader.c \ displayheader.c \ filter.c \ folder.c \ html.c \ imap.c \ mbox.c \ md5.c \ md5_hmac.c \ mh.c \ news.c \ nntp.c \ pop.c \ prefs.c \ prefs_account.c \ prefs_common.c \ procheader.c \ procmime.c \ procmsg.c \ quoted-printable.c \ recv.c \ session.c \ smtp.c \ socket.c \ ssl.c \ stringtable.c \ sylmain.c \ unmime.c \ utils.c \ uuencode.c \ virtual.c \ xml.c libsylphincludedir=$(includedir)/sylph libsylphinclude_HEADERS = \ defs.h \ enums.h \ account.h \ base64.h \ codeconv.h \ compose.h \ customheader.h \ displayheader.h \ filter.h \ folder.h \ html.h \ imap.h \ mbox.h \ md5.h \ md5_hmac.h \ mh.h \ news.h \ nntp.h \ pop.h \ prefs.h \ prefs_account.h \ prefs_common.h \ procheader.h \ procmime.h \ procmsg.h \ quoted-printable.h \ recv.h \ session.h \ smtp.h \ socket.h \ ssl.h \ stringtable.h \ sylmain.h \ unmime.h \ utils.h \ uuencode.h \ virtual.h \ xml.h if OS_WIN32 no_undefined = -no-undefined export_symbols = -export-symbols libsylph.def endif libsylph_la_LDFLAGS = \ -version-info $(LT_CURRENT):$(LT_REVISION):$(LT_AGE) \ -export-dynamic $(no_undefined) $(export_symbols) libsylph_la_LIBADD = $(GLIB_LIBS) libsylph-1.1.0/libsylph/account.c0000644000175000017500000002430710504175020013706 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2006 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "defs.h" #include #include #include #include #include "folder.h" #include "account.h" #include "prefs.h" #include "prefs_account.h" #include "procmsg.h" #include "procheader.h" #include "utils.h" #define PREFSBUFSIZE 1024 PrefsAccount *cur_account; static GList *account_list = NULL; GHashTable *address_table; void account_read_config_all(void) { GSList *ac_label_list = NULL, *cur; gchar *rcpath; FILE *fp; gchar buf[PREFSBUFSIZE]; PrefsAccount *ac_prefs; debug_print(_("Reading all config for each account...\n")); rcpath = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, ACCOUNT_RC, NULL); if ((fp = g_fopen(rcpath, "rb")) == NULL) { if (ENOENT != errno) FILE_OP_ERROR(rcpath, "fopen"); g_free(rcpath); return; } g_free(rcpath); while (fgets(buf, sizeof(buf), fp) != NULL) { if (!strncmp(buf, "[Account: ", 10)) { strretchomp(buf); memmove(buf, buf + 1, strlen(buf)); buf[strlen(buf) - 1] = '\0'; debug_print("Found label: %s\n", buf); ac_label_list = g_slist_append(ac_label_list, g_strdup(buf)); } } fclose(fp); /* read config data from file */ cur_account = NULL; for (cur = ac_label_list; cur != NULL; cur = cur->next) { ac_prefs = prefs_account_new(); prefs_account_read_config(ac_prefs, (gchar *)cur->data); account_list = g_list_append(account_list, ac_prefs); if (ac_prefs->is_default) cur_account = ac_prefs; } /* if default is not set, assume first account as default */ if (!cur_account && account_list) { ac_prefs = (PrefsAccount *)account_list->data; account_set_as_default(ac_prefs); cur_account = ac_prefs; } while (ac_label_list) { g_free(ac_label_list->data); ac_label_list = g_slist_remove(ac_label_list, ac_label_list->data); } } void account_write_config_all(void) { prefs_account_write_config_all(account_list); } PrefsAccount *account_get_current_account(void) { return cur_account; } PrefsAccount *account_find_from_smtp_server(const gchar *address, const gchar *smtp_server) { GList *cur; PrefsAccount *ac; g_return_val_if_fail(address != NULL, NULL); g_return_val_if_fail(smtp_server != NULL, NULL); for (cur = account_list; cur != NULL; cur = cur->next) { ac = (PrefsAccount *)cur->data; if (!strcmp2(address, ac->address) && !strcmp2(smtp_server, ac->smtp_server)) return ac; } return NULL; } /* * account_find_from_address: * @address: Email address string. * * Find a mail (not news) account with the specified email address. * * Return value: The found account, or NULL if not found. */ PrefsAccount *account_find_from_address(const gchar *address) { GList *cur; PrefsAccount *ac; g_return_val_if_fail(address != NULL, NULL); for (cur = account_list; cur != NULL; cur = cur->next) { ac = (PrefsAccount *)cur->data; if (ac->protocol != A_NNTP && ac->address && strcasestr(address, ac->address) != NULL) return ac; } return NULL; } PrefsAccount *account_find_from_id(gint id) { GList *cur; PrefsAccount *ac; for (cur = account_list; cur != NULL; cur = cur->next) { ac = (PrefsAccount *)cur->data; if (id == ac->account_id) return ac; } return NULL; } PrefsAccount *account_find_from_item(FolderItem *item) { PrefsAccount *ac; g_return_val_if_fail(item != NULL, NULL); ac = account_find_from_item_property(item); if (!ac) ac = item->folder->account; return ac; } PrefsAccount *account_find_from_item_property(FolderItem *item) { PrefsAccount *ac; g_return_val_if_fail(item != NULL, NULL); ac = item->account; if (!ac) { FolderItem *cur_item = item->parent; while (cur_item != NULL) { if (cur_item->account && cur_item->ac_apply_sub) { ac = cur_item->account; break; } cur_item = cur_item->parent; } } return ac; } PrefsAccount *account_find_from_message_file(const gchar *file) { static HeaderEntry hentry[] = {{"From:", NULL, FALSE}, {"X-Sylpheed-Account-Id:", NULL, FALSE}, {"AID:", NULL, FALSE}, {NULL, NULL, FALSE}}; enum { H_FROM = 0, H_X_SYLPHEED_ACCOUNT_ID = 1, H_AID = 2 }; PrefsAccount *ac = NULL; FILE *fp; gchar *str; gchar buf[BUFFSIZE]; gint hnum; g_return_val_if_fail(file != NULL, NULL); if ((fp = g_fopen(file, "rb")) == NULL) { FILE_OP_ERROR(file, "fopen"); return NULL; } while ((hnum = procheader_get_one_field(buf, sizeof(buf), fp, hentry)) != -1) { str = buf + strlen(hentry[hnum].name); if (hnum == H_FROM) ac = account_find_from_address(str); else if (hnum == H_X_SYLPHEED_ACCOUNT_ID || hnum == H_AID) { PrefsAccount *tmp_ac; tmp_ac = account_find_from_id(atoi(str)); if (tmp_ac) { ac = tmp_ac; break; } } } fclose(fp); return ac; } PrefsAccount *account_find_from_msginfo(MsgInfo *msginfo) { gchar *file; PrefsAccount *ac; file = procmsg_get_message_file(msginfo); ac = account_find_from_message_file(file); g_free(file); if (!ac && msginfo->folder) ac = account_find_from_item(msginfo->folder); return ac; } gboolean account_address_exist(const gchar *address) { if (!address_table) { GList *cur; address_table = g_hash_table_new(g_str_hash, g_str_equal); for (cur = account_list; cur != NULL; cur = cur->next) { PrefsAccount *ac = (PrefsAccount *)cur->data; if (ac->address) g_hash_table_insert(address_table, ac->address, GINT_TO_POINTER(1)); } } return (gboolean)g_hash_table_lookup(address_table, address); } void account_foreach(AccountFunc func, gpointer user_data) { GList *cur; for (cur = account_list; cur != NULL; cur = cur->next) if (func((PrefsAccount *)cur->data, user_data) != 0) return; } GList *account_get_list(void) { return account_list; } void account_list_free(void) { g_list_free(account_list); account_list = NULL; } void account_append(PrefsAccount *ac_prefs) { account_list = g_list_append(account_list, ac_prefs); account_updated(); } void account_set_as_default(PrefsAccount *ac_prefs) { PrefsAccount *ap; GList *cur; for (cur = account_list; cur != NULL; cur = cur->next) { ap = (PrefsAccount *)cur->data; if (ap->is_default) ap->is_default = FALSE; } ac_prefs->is_default = TRUE; } PrefsAccount *account_get_default(void) { PrefsAccount *ap; GList *cur; for (cur = account_list; cur != NULL; cur = cur->next) { ap = (PrefsAccount *)cur->data; if (ap->is_default) return ap; } return NULL; } #if 0 void account_set_missing_folder(void) { PrefsAccount *ap; GList *cur; for (cur = account_list; cur != NULL; cur = cur->next) { ap = (PrefsAccount *)cur->data; if ((ap->protocol == A_IMAP4 || ap->protocol == A_NNTP) && !ap->folder) { Folder *folder; if (ap->protocol == A_IMAP4) { folder = folder_new(F_IMAP, ap->account_name, ap->recv_server); } else { folder = folder_new(F_NEWS, ap->account_name, ap->nntp_server); } folder->account = ap; ap->folder = REMOTE_FOLDER(folder); folder_add(folder); if (ap->protocol == A_IMAP4) { if (main_window_toggle_online_if_offline (main_window_get())) { folder->klass->create_tree(folder); statusbar_pop_all(); } } } } } #endif FolderItem *account_get_special_folder(PrefsAccount *ac_prefs, SpecialFolderItemType type) { FolderItem *item = NULL; g_return_val_if_fail(ac_prefs != NULL, NULL); switch (type) { case F_INBOX: if (ac_prefs->folder) item = FOLDER(ac_prefs->folder)->inbox; if (!item) item = folder_get_default_inbox(); break; case F_OUTBOX: if (ac_prefs->set_sent_folder && ac_prefs->sent_folder) { item = folder_find_item_from_identifier (ac_prefs->sent_folder); } if (!item) { if (ac_prefs->folder) item = FOLDER(ac_prefs->folder)->outbox; if (!item) item = folder_get_default_outbox(); } break; case F_DRAFT: if (ac_prefs->set_draft_folder && ac_prefs->draft_folder) { item = folder_find_item_from_identifier (ac_prefs->draft_folder); } if (!item) { if (ac_prefs->folder) item = FOLDER(ac_prefs->folder)->draft; if (!item) item = folder_get_default_draft(); } break; case F_QUEUE: if (ac_prefs->set_queue_folder && ac_prefs->queue_folder) { item = folder_find_item_from_identifier (ac_prefs->queue_folder); /* only allow queue-type folder */ if (item && item->stype != F_QUEUE) item = NULL; } if (!item) { if (ac_prefs->folder) item = FOLDER(ac_prefs->folder)->queue; if (!item) item = folder_get_default_queue(); } break; case F_TRASH: if (ac_prefs->set_trash_folder && ac_prefs->trash_folder) { item = folder_find_item_from_identifier (ac_prefs->trash_folder); } if (!item) { if (ac_prefs->folder) item = FOLDER(ac_prefs->folder)->trash; if (!item) item = folder_get_default_trash(); } break; default: break; } return item; } void account_destroy(PrefsAccount *ac_prefs) { g_return_if_fail(ac_prefs != NULL); folder_unref_account_all(ac_prefs); account_list = g_list_remove(account_list, ac_prefs); if (cur_account == ac_prefs) cur_account = NULL; prefs_account_free(ac_prefs); if (!cur_account && account_list) { cur_account = account_get_default(); if (!cur_account) { ac_prefs = (PrefsAccount *)account_list->data; account_set_as_default(ac_prefs); cur_account = ac_prefs; } } account_updated(); } void account_updated(void) { if (address_table) { g_hash_table_destroy(address_table); address_table = NULL; } } libsylph-1.1.0/libsylph/base64.c0000644000175000017500000001032610457702534013347 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include "base64.h" static const gchar base64char[64] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"; static const gchar base64val[128] = { -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, -1, 62, -1, -1, -1, 63, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, -1, -1, -1, -1, -1, -1, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, -1, -1, -1, -1, -1, -1, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, -1, -1, -1, -1, -1 }; #define BASE64VAL(c) (isascii((guchar)c) ? base64val[(gint)(c)] : -1) void base64_encode(gchar *out, const guchar *in, gint inlen) { const guchar *inp = in; gchar *outp = out; while (inlen >= 3) { *outp++ = base64char[(inp[0] >> 2) & 0x3f]; *outp++ = base64char[((inp[0] & 0x03) << 4) | ((inp[1] >> 4) & 0x0f)]; *outp++ = base64char[((inp[1] & 0x0f) << 2) | ((inp[2] >> 6) & 0x03)]; *outp++ = base64char[inp[2] & 0x3f]; inp += 3; inlen -= 3; } if (inlen > 0) { *outp++ = base64char[(inp[0] >> 2) & 0x3f]; if (inlen == 1) { *outp++ = base64char[(inp[0] & 0x03) << 4]; *outp++ = '='; } else { *outp++ = base64char[((inp[0] & 0x03) << 4) | ((inp[1] >> 4) & 0x0f)]; *outp++ = base64char[((inp[1] & 0x0f) << 2)]; } *outp++ = '='; } *outp = '\0'; } gint base64_decode(guchar *out, const gchar *in, gint inlen) { const gchar *inp = in; guchar *outp = out; gchar buf[4]; if (inlen < 0) inlen = G_MAXINT; while (inlen >= 4 && *inp != '\0') { buf[0] = *inp++; inlen--; if (BASE64VAL(buf[0]) == -1) break; buf[1] = *inp++; inlen--; if (BASE64VAL(buf[1]) == -1) break; buf[2] = *inp++; inlen--; if (buf[2] != '=' && BASE64VAL(buf[2]) == -1) break; buf[3] = *inp++; inlen--; if (buf[3] != '=' && BASE64VAL(buf[3]) == -1) break; *outp++ = ((BASE64VAL(buf[0]) << 2) & 0xfc) | ((BASE64VAL(buf[1]) >> 4) & 0x03); if (buf[2] != '=') { *outp++ = ((BASE64VAL(buf[1]) & 0x0f) << 4) | ((BASE64VAL(buf[2]) >> 2) & 0x0f); if (buf[3] != '=') { *outp++ = ((BASE64VAL(buf[2]) & 0x03) << 6) | (BASE64VAL(buf[3]) & 0x3f); } } } return outp - out; } Base64Decoder *base64_decoder_new(void) { Base64Decoder *decoder; decoder = g_new0(Base64Decoder, 1); return decoder; } void base64_decoder_free(Base64Decoder *decoder) { g_free(decoder); } gint base64_decoder_decode(Base64Decoder *decoder, const gchar *in, guchar *out) { gint len, total_len = 0; gint buf_len; gchar buf[4]; g_return_val_if_fail(decoder != NULL, -1); g_return_val_if_fail(in != NULL, -1); g_return_val_if_fail(out != NULL, -1); buf_len = decoder->buf_len; memcpy(buf, decoder->buf, sizeof(buf)); for (;;) { while (buf_len < 4) { gchar c = *in; in++; if (c == '\0') break; if (c == '\r' || c == '\n') continue; if (c != '=' && BASE64VAL(c) == -1) return -1; buf[buf_len++] = c; } if (buf_len < 4 || buf[0] == '=' || buf[1] == '=') { decoder->buf_len = buf_len; memcpy(decoder->buf, buf, sizeof(buf)); return total_len; } len = base64_decode(out, buf, 4); out += len; total_len += len; buf_len = 0; if (len < 3) { decoder->buf_len = 0; return total_len; } } } libsylph-1.1.0/libsylph/codeconv.c0000644000175000017500000016763610734632360014101 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2007 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "defs.h" #include #include #include #include #include #include #if HAVE_LOCALE_H # include #endif #include #include "codeconv.h" #include "prefs_common.h" #include "unmime.h" #include "base64.h" #include "quoted-printable.h" #include "utils.h" typedef enum { JIS_ASCII, JIS_KANJI, JIS_HWKANA, JIS_AUXKANJI, JIS_UDC } JISState; #define SUBST_CHAR '_' #define ESC '\033' #define SO 0x0e #define SI 0x0f #define SS2 0x8e #define SS3 0x8f #define iseuckanji(c) \ (((c) & 0xff) >= 0xa1 && ((c) & 0xff) <= 0xfe) #define iseuchwkana1(c) \ (((c) & 0xff) == SS2) #define iseuchwkana2(c) \ (((c) & 0xff) >= 0xa1 && ((c) & 0xff) <= 0xdf) #define iseucaux(c) \ (((c) & 0xff) == SS3) #define issjiskanji1(c) \ ((((c) & 0xff) >= 0x81 && ((c) & 0xff) <= 0x9f) || \ (((c) & 0xff) >= 0xe0 && ((c) & 0xff) <= 0xef)) #define issjiskanji2(c) \ ((((c) & 0xff) >= 0x40 && ((c) & 0xff) <= 0x7e) || \ (((c) & 0xff) >= 0x80 && ((c) & 0xff) <= 0xfc)) #define issjishwkana(c) \ (((c) & 0xff) >= 0xa1 && ((c) & 0xff) <= 0xdf) #define issjisext(c) \ (((c) & 0xff) >= 0xf0 && ((c) & 0xff) <= 0xfc) #define issjisudc(c) \ (((c) & 0xff) >= 0xf0 && ((c) & 0xff) <= 0xf9) #define issjisibmext(c1, c2) \ ((((c1) & 0xff) >= 0xfa && ((c1) & 0xff) <= 0xfb && \ issjiskanji2(c2)) || \ (((c1) & 0xff) == 0xfc && \ ((c2) & 0xff) >= 0x40 && ((c2) & 0xff) <= 0x4b)) #define isjiskanji(c) \ (((c) & 0xff) >= 0x21 && ((c) & 0xff) <= 0x7e) #define isjishwkana(c) \ (((c) & 0xff) >= 0x21 && ((c) & 0xff) <= 0x5f) #define isjisudc(c) \ (((c) & 0xff) >= 0x21 && ((c) & 0xff) <= 0x34) #define isjisudclow(c) \ (((c) & 0xff) >= 0x21 && ((c) & 0xff) <= 0x2a) #define isjisudchigh(c) \ (((c) & 0xff) >= 0x2b && ((c) & 0xff) <= 0x34) /* U+0080 - U+07FF */ #define isutf8_2_1(c) \ (((c) & 0xe0) == 0xc0) #define isutf8_2_2(c) \ (((c) & 0xc0) == 0x80) /* U+0800 - U+FFFF */ #define isutf8_3_1(c) \ (((c) & 0xf0) == 0xe0) #define isutf8_3_2(c) \ (((c) & 0xc0) == 0x80) #define isutf8bom(s) \ (((*(s)) & 0xff) == 0xef && ((*(s + 1)) & 0xff) == 0xbb && \ ((*(s + 2)) & 0xff) == 0xbf) #define K_IN() \ if (state != JIS_KANJI) { \ *out++ = ESC; \ *out++ = '$'; \ *out++ = 'B'; \ state = JIS_KANJI; \ } #define K_OUT() \ if (state != JIS_ASCII) { \ *out++ = ESC; \ *out++ = '('; \ *out++ = 'B'; \ state = JIS_ASCII; \ } #define HW_IN() \ if (state != JIS_HWKANA) { \ *out++ = ESC; \ *out++ = '('; \ *out++ = 'I'; \ state = JIS_HWKANA; \ } #define AUX_IN() \ if (state != JIS_AUXKANJI) { \ *out++ = ESC; \ *out++ = '$'; \ *out++ = '('; \ *out++ = 'D'; \ state = JIS_AUXKANJI; \ } #define UDC_IN() \ if (state != JIS_UDC) { \ *out++ = ESC; \ *out++ = '$'; \ *out++ = '('; \ *out++ = '?'; \ state = JIS_UDC; \ } static gchar *conv_jistoeuc(const gchar *inbuf, gint *error); static gchar *conv_jistosjis(const gchar *inbuf, gint *error); static gchar *conv_euctojis(const gchar *inbuf, gint *error); static gchar *conv_sjistojis(const gchar *inbuf, gint *error); static gchar *conv_sjistoeuc(const gchar *inbuf, gint *error); static gchar *conv_jistoutf8(const gchar *inbuf, gint *error); static gchar *conv_sjistoutf8(const gchar *inbuf, gint *error); static gchar *conv_euctoutf8(const gchar *inbuf, gint *error); static gchar *conv_anytoutf8(const gchar *inbuf, gint *error); static gchar *conv_utf8toeuc(const gchar *inbuf, gint *error); static gchar *conv_utf8tojis(const gchar *inbuf, gint *error); static gchar *conv_utf8tosjis(const gchar *inbuf, gint *error); /* static void conv_unreadable_eucjp(gchar *str); */ static void conv_unreadable_8bit(gchar *str); /* static void conv_unreadable_latin(gchar *str); */ static gchar *conv_jistodisp(const gchar *inbuf, gint *error); static gchar *conv_sjistodisp(const gchar *inbuf, gint *error); static gchar *conv_euctodisp(const gchar *inbuf, gint *error); static gchar *conv_anytodisp(const gchar *inbuf, gint *error); static gchar *conv_ustodisp(const gchar *inbuf, gint *error); static gchar *conv_noconv(const gchar *inbuf, gint *error); static gchar *conv_jistoeuc(const gchar *inbuf, gint *error) { gchar *outbuf; const guchar *in = (guchar *)inbuf; guchar *out; JISState state = JIS_ASCII; gint error_ = 0; outbuf = g_malloc(strlen(inbuf) * 2 + 1); out = (guchar *)outbuf; while (*in != '\0') { if (*in == ESC) { in++; if (*in == '$') { if (*(in + 1) == '@' || *(in + 1) == 'B') { state = JIS_KANJI; in += 2; } else if (*(in + 1) == '(' && *(in + 2) == 'D') { state = JIS_AUXKANJI; in += 3; } else { /* unknown escape sequence */ error_ = -1; state = JIS_ASCII; } } else if (*in == '(') { if (*(in + 1) == 'B' || *(in + 1) == 'J') { state = JIS_ASCII; in += 2; } else if (*(in + 1) == 'I') { state = JIS_HWKANA; in += 2; } else { /* unknown escape sequence */ error_ = -1; state = JIS_ASCII; } } else { /* unknown escape sequence */ error_ = -1; state = JIS_ASCII; } } else if (*in == 0x0e) { state = JIS_HWKANA; in++; } else if (*in == 0x0f) { state = JIS_ASCII; in++; } else { switch (state) { case JIS_ASCII: *out++ = *in++; break; case JIS_KANJI: *out++ = *in++ | 0x80; if (*in == '\0') break; *out++ = *in++ | 0x80; break; case JIS_HWKANA: *out++ = 0x8e; *out++ = *in++ | 0x80; break; case JIS_AUXKANJI: *out++ = 0x8f; *out++ = *in++ | 0x80; if (*in == '\0') break; *out++ = *in++ | 0x80; break; default: *out++ = *in++; break; } } } *out = '\0'; if (error) *error = error_; return outbuf; } static gchar *conv_jistosjis(const gchar *inbuf, gint *error) { gchar *outbuf; const guchar *in = (guchar *)inbuf; guchar *out; JISState state = JIS_ASCII; gint error_ = 0; outbuf = g_malloc(strlen(inbuf) * 2 + 1); out = (guchar *)outbuf; while (*in != '\0') { if (*in == ESC) { in++; if (*in == '$') { if (*(in + 1) == '@' || *(in + 1) == 'B') { state = JIS_KANJI; in += 2; } else if (*(in + 1) == '(' && *(in + 2) == '?') { /* ISO-2022-JP-MS extention */ state = JIS_UDC; in += 3; } else { /* unknown escape sequence */ error_ = -1; state = JIS_ASCII; } } else if (*in == '(') { if (*(in + 1) == 'B' || *(in + 1) == 'J') { state = JIS_ASCII; in += 2; } else if (*(in + 1) == 'I') { state = JIS_HWKANA; in += 2; } else { /* unknown escape sequence */ error_ = -1; state = JIS_ASCII; } } else { /* unknown escape sequence */ error_ = -1; state = JIS_ASCII; } } else if (*in == SO) { state = JIS_HWKANA; in++; } else if (*in == SI) { state = JIS_ASCII; in++; } else { switch (state) { case JIS_ASCII: *out++ = *in++; break; case JIS_HWKANA: *out++ = *in++ | 0x80; break; case JIS_KANJI: if ((isjiskanji(*in) || (*in >= 0x7f && *in <= 0x97)) && isjiskanji(*(in + 1))) { *out++ = ((*in < 0x5f) ? (((*in - 0x21) / 2) + 0x81) : (((*in - 0x21) / 2) + 0xc1)); *out++ = ((*in % 2) ? ((*(in + 1) + ((*(in + 1) < 0x60) ? 0x1f : 0x20))) : *(in + 1) + 0x7e); in += 2; } else { error_ = -1; *out++ = SUBST_CHAR; in++; if (*in != '\0') { *out++ = SUBST_CHAR; in++; } } break; case JIS_UDC: if (isjisudc(*in) && isjiskanji(*(in + 1))) { *out++ = (((*in - 0x21) / 2) + 0xf0); *out++ = ((*in % 2) ? ((*(in + 1) + ((*(in + 1) < 0x60) ? 0x1f : 0x20))) : *(in + 1) + 0x7e); in += 2; } else { error_ = -1; *out++ = SUBST_CHAR; in++; if (*in != '\0') { *out++ = SUBST_CHAR; in++; } } break; default: *out++ = *in++; break; } } } *out = '\0'; if (error) *error = error_; return outbuf; } #define JIS_HWDAKUTEN 0x5e #define JIS_HWHANDAKUTEN 0x5f static gint conv_jis_hantozen(guchar *outbuf, guchar jis_code, guchar sound_sym) { static guint16 h2z_tbl[] = { /* 0x20 - 0x2f */ 0x0000, 0x2123, 0x2156, 0x2157, 0x2122, 0x2126, 0x2572, 0x2521, 0x2523, 0x2525, 0x2527, 0x2529, 0x2563, 0x2565, 0x2567, 0x2543, /* 0x30 - 0x3f */ 0x213c, 0x2522, 0x2524, 0x2526, 0x2528, 0x252a, 0x252b, 0x252d, 0x252f, 0x2531, 0x2533, 0x2535, 0x2537, 0x2539, 0x253b, 0x253d, /* 0x40 - 0x4f */ 0x253f, 0x2541, 0x2544, 0x2546, 0x2548, 0x254a, 0x254b, 0x254c, 0x254d, 0x254e, 0x254f, 0x2552, 0x2555, 0x2558, 0x255b, 0x255e, /* 0x50 - 0x5f */ 0x255f, 0x2560, 0x2561, 0x2562, 0x2564, 0x2566, 0x2568, 0x2569, 0x256a, 0x256b, 0x256c, 0x256d, 0x256f, 0x2573, 0x212b, 0x212c }; static guint16 dakuten_tbl[] = { /* 0x30 - 0x3f */ 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x252c, 0x252e, 0x2530, 0x2532, 0x2534, 0x2536, 0x2538, 0x253a, 0x253c, 0x253e, /* 0x40 - 0x4f */ 0x2540, 0x2542, 0x2545, 0x2547, 0x2549, 0x0000, 0x0000, 0x0000, 0x0000, 0x0000, 0x2550, 0x2553, 0x2556, 0x2559, 0x255c, 0x0000 }; static guint16 handakuten_tbl[] = { /* 0x4a - 0x4e */ 0x2551, 0x2554, 0x2557, 0x255a, 0x255d }; guint16 out_code; jis_code &= 0x7f; sound_sym &= 0x7f; if (jis_code < 0x21 || jis_code > 0x5f) return 0; if (sound_sym == JIS_HWDAKUTEN && jis_code >= 0x36 && jis_code <= 0x4e) { out_code = dakuten_tbl[jis_code - 0x30]; if (out_code != 0) { *outbuf = out_code >> 8; *(outbuf + 1) = out_code & 0xff; return 2; } } if (sound_sym == JIS_HWHANDAKUTEN && jis_code >= 0x4a && jis_code <= 0x4e) { out_code = handakuten_tbl[jis_code - 0x4a]; *outbuf = out_code >> 8; *(outbuf + 1) = out_code & 0xff; return 2; } out_code = h2z_tbl[jis_code - 0x20]; *outbuf = out_code >> 8; *(outbuf + 1) = out_code & 0xff; return 1; } static gchar *conv_euctojis(const gchar *inbuf, gint *error) { gchar *outbuf; const guchar *in = (guchar *)inbuf; guchar *out; JISState state = JIS_ASCII; gint error_ = 0; outbuf = g_malloc(strlen(inbuf) * 3 + 4); out = (guchar *)outbuf; while (*in != '\0') { if (isascii(*in)) { K_OUT(); *out++ = *in++; } else if (iseuckanji(*in)) { if (iseuckanji(*(in + 1))) { K_IN(); *out++ = *in++ & 0x7f; *out++ = *in++ & 0x7f; } else { error_ = -1; K_OUT(); *out++ = SUBST_CHAR; in++; if (*in != '\0' && !isascii(*in)) { *out++ = SUBST_CHAR; in++; } } } else if (iseuchwkana1(*in)) { if (iseuchwkana2(*(in + 1))) { if (prefs_common.allow_jisx0201_kana) { HW_IN(); in++; *out++ = *in++ & 0x7f; } else { guchar jis_ch[2]; gint len; if (iseuchwkana1(*(in + 2)) && iseuchwkana2(*(in + 3))) len = conv_jis_hantozen (jis_ch, *(in + 1), *(in + 3)); else len = conv_jis_hantozen (jis_ch, *(in + 1), '\0'); if (len == 0) in += 2; else { K_IN(); in += len * 2; *out++ = jis_ch[0]; *out++ = jis_ch[1]; } } } else { error_ = -1; K_OUT(); in++; if (*in != '\0' && !isascii(*in)) { *out++ = SUBST_CHAR; in++; } } } else if (iseucaux(*in)) { in++; if (iseuckanji(*in) && iseuckanji(*(in + 1))) { AUX_IN(); *out++ = *in++ & 0x7f; *out++ = *in++ & 0x7f; } else { error_ = -1; K_OUT(); if (*in != '\0' && !isascii(*in)) { *out++ = SUBST_CHAR; in++; if (*in != '\0' && !isascii(*in)) { *out++ = SUBST_CHAR; in++; } } } } else { error_ = -1; K_OUT(); *out++ = SUBST_CHAR; in++; } } K_OUT(); *out = '\0'; if (error) *error = error_; return outbuf; } #define sjistoidx(c1, c2) \ (((c1) > 0x9f) \ ? (((c1) - 0xc1) * 188 + (c2) - (((c2) > 0x7e) ? 0x41 : 0x40)) \ : (((c1) - 0x81) * 188 + (c2) - (((c2) > 0x7e) ? 0x41 : 0x40))) #define idxtojis1(c) (((c) / 94) + 0x21) #define idxtojis2(c) (((c) % 94) + 0x21) static guint conv_idx_ibmtonec(guint idx) { if (idx >= sjistoidx(0xfa, 0x5c)) idx -= sjistoidx(0xfa, 0x5c) - sjistoidx(0xed, 0x40); /* else if (idx == sjistoidx(0xfa, 0x5b)) */ /* idx = sjistoidx(0x81, 0xe6); */ /* else if (idx == sjistoidx(0xfa, 0x5a)) */ /* idx = sjistoidx(0x87, 0x84); */ /* else if (idx == sjistoidx(0xfa, 0x59)) */ /* idx = sjistoidx(0x87, 0x82); */ /* else if (idx == sjistoidx(0xfa, 0x58)) */ /* idx = sjistoidx(0x87, 0x8a); */ else if (idx >= sjistoidx(0xfa, 0x55)) idx -= sjistoidx(0xfa, 0x55) - sjistoidx(0xee, 0xfa); /* else if (idx == sjistoidx(0xfa, 0x54)) */ /* idx = sjistoidx(0x81, 0xca); */ /* else if (idx >= sjistoidx(0xfa, 0x4a)) */ /* idx -= sjistoidx(0xfa, 0x4a) */ /* - sjistoidx(0x87, 0x54); */ else if (idx >= sjistoidx(0xfa, 0x40)) idx -= sjistoidx(0xfa, 0x40) - sjistoidx(0xee, 0xef); return idx; } static gchar *conv_sjistojis(const gchar *inbuf, gint *error) { gchar *outbuf; const guchar *in = (guchar *)inbuf; guchar *out; JISState state = JIS_ASCII; gint error_ = 0; guint idx; outbuf = g_malloc(strlen(inbuf) * 5 + 4); out = (guchar *)outbuf; while (*in != '\0') { if (isascii(*in)) { K_OUT(); *out++ = *in++; } else if (issjiskanji1(*in)) { if (issjiskanji2(*(in + 1))) { K_IN(); idx = sjistoidx(*in, *(in + 1)); *out++ = idxtojis1(idx); *out++ = idxtojis2(idx); in += 2; } else { error_ = -1; K_OUT(); *out++ = SUBST_CHAR; in++; if (*in != '\0' && !isascii(*in)) { *out++ = SUBST_CHAR; in++; } } } else if (issjishwkana(*in)) { if (prefs_common.allow_jisx0201_kana) { HW_IN(); *out++ = *in++ & 0x7f; } else { guchar jis_ch[2]; gint len; if (issjishwkana(*(in + 1))) len = conv_jis_hantozen (jis_ch, *in, *(in + 1)); else len = conv_jis_hantozen (jis_ch, *in, '\0'); if (len == 0) in++; else { K_IN(); in += len; *out++ = jis_ch[0]; *out++ = jis_ch[1]; } } } else if (issjisibmext(*in, *(in + 1))) { K_IN(); idx = sjistoidx(*in, *(in + 1)); idx = conv_idx_ibmtonec(idx); *out++ = idxtojis1(idx); *out++ = idxtojis2(idx); in += 2; #if 0 } else if (issjisudc(*in)) { UDC_IN(); idx = sjistoidx(*in, *(in + 1)) - sjistoidx(0xf0, 0x40); *out++ = idxtojis1(idx); *out++ = idxtojis2(idx); in += 2; #endif } else if (issjisext(*in)) { error_ = -1; K_OUT(); *out++ = SUBST_CHAR; in++; if (*in != '\0' && !isascii(*in)) { *out++ = SUBST_CHAR; in++; } } else { error_ = -1; K_OUT(); *out++ = SUBST_CHAR; in++; } } K_OUT(); *out = '\0'; if (error) *error = error_; return outbuf; } static gchar *conv_sjistoeuc(const gchar *inbuf, gint *error) { gchar *outbuf; const guchar *in = (guchar *)inbuf; guchar *out; gint error_ = 0; outbuf = g_malloc(strlen(inbuf) * 2 + 1); out = (guchar *)outbuf; while (*in != '\0') { if (isascii(*in)) { *out++ = *in++; } else if (issjiskanji1(*in)) { if (issjiskanji2(*(in + 1))) { guchar out1 = *in; guchar out2 = *(in + 1); guchar row; row = out1 < 0xa0 ? 0x70 : 0xb0; if (out2 < 0x9f) { out1 = (out1 - row) * 2 - 1; out2 -= out2 > 0x7f ? 0x20 : 0x1f; } else { out1 = (out1 - row) * 2; out2 -= 0x7e; } *out++ = out1 | 0x80; *out++ = out2 | 0x80; in += 2; } else { error_ = -1; *out++ = SUBST_CHAR; in++; if (*in != '\0' && !isascii(*in)) { *out++ = SUBST_CHAR; in++; } } } else if (issjishwkana(*in)) { *out++ = SS2; *out++ = *in++; } else if (issjisext(*in)) { error_ = -1; *out++ = SUBST_CHAR; in++; if (*in != '\0' && !isascii(*in)) { *out++ = SUBST_CHAR; in++; } } else { error_ = -1; *out++ = SUBST_CHAR; in++; } } *out = '\0'; if (error) *error = error_; return outbuf; } static gchar *conv_jistoutf8(const gchar *inbuf, gint *error) { gchar *tmpstr, *utf8str; gint t_error = 0, u_error = 0; if (strstr(inbuf, "\033$(D")) { tmpstr = conv_jistoeuc(inbuf, &t_error); utf8str = conv_euctoutf8(tmpstr, &u_error); } else { tmpstr = conv_jistosjis(inbuf, &t_error); utf8str = conv_sjistoutf8(tmpstr, &u_error); } g_free(tmpstr); if (error) *error = (t_error | u_error); return utf8str; } static gchar *conv_sjistoutf8(const gchar *inbuf, gint *error) { static iconv_t cd = (iconv_t)-1; static gboolean iconv_ok = TRUE; if (cd == (iconv_t)-1) { if (!iconv_ok) { if (error) *error = -1; return g_strdup(inbuf); } cd = iconv_open(CS_UTF_8, CS_CP932); if (cd == (iconv_t)-1) { cd = iconv_open(CS_UTF_8, CS_SHIFT_JIS); if (cd == (iconv_t)-1) { g_warning("conv_sjistoutf8(): %s\n", g_strerror(errno)); iconv_ok = FALSE; if (error) *error = -1; return g_strdup(inbuf); } } } return conv_iconv_strdup_with_cd(inbuf, cd, error); } static gchar *conv_euctoutf8(const gchar *inbuf, gint *error) { static iconv_t cd = (iconv_t)-1; static gboolean iconv_ok = TRUE; if (cd == (iconv_t)-1) { if (!iconv_ok) { if (error) *error = -1; return g_strdup(inbuf); } cd = iconv_open(CS_UTF_8, CS_EUC_JP_MS); if (cd == (iconv_t)-1) { cd = iconv_open(CS_UTF_8, CS_EUC_JP); if (cd == (iconv_t)-1) { g_warning("conv_euctoutf8(): %s\n", g_strerror(errno)); iconv_ok = FALSE; if (error) *error = -1; return g_strdup(inbuf); } } } return conv_iconv_strdup_with_cd(inbuf, cd, error); } static gchar *conv_anytoutf8(const gchar *inbuf, gint *error) { switch (conv_guess_ja_encoding(inbuf)) { case C_ISO_2022_JP: return conv_jistoutf8(inbuf, error); case C_SHIFT_JIS: return conv_sjistoutf8(inbuf, error); case C_EUC_JP: return conv_euctoutf8(inbuf, error); case C_UTF_8: if (error) *error = 0; if (isutf8bom(inbuf)) inbuf += 3; return g_strdup(inbuf); default: if (error) *error = 0; return g_strdup(inbuf); } } static gchar *conv_utf8tosjis(const gchar *inbuf, gint *error) { static iconv_t cd = (iconv_t)-1; static gboolean iconv_ok = TRUE; if (cd == (iconv_t)-1) { if (!iconv_ok) { if (error) *error = -1; return g_strdup(inbuf); } cd = iconv_open(CS_CP932, CS_UTF_8); if (cd == (iconv_t)-1) { cd = iconv_open(CS_SHIFT_JIS, CS_UTF_8); if (cd == (iconv_t)-1) { g_warning("conv_utf8tosjis(): %s\n", g_strerror(errno)); iconv_ok = FALSE; if (error) *error = -1; return g_strdup(inbuf); } } } if (isutf8bom(inbuf)) inbuf += 3; return conv_iconv_strdup_with_cd(inbuf, cd, error); } static gchar *conv_utf8toeuc(const gchar *inbuf, gint *error) { static iconv_t cd = (iconv_t)-1; static gboolean iconv_ok = TRUE; if (cd == (iconv_t)-1) { if (!iconv_ok) { if (error) *error = -1; return g_strdup(inbuf); } cd = iconv_open(CS_EUC_JP_MS, CS_UTF_8); if (cd == (iconv_t)-1) { cd = iconv_open(CS_EUC_JP, CS_UTF_8); if (cd == (iconv_t)-1) { g_warning("conv_utf8toeuc(): %s\n", g_strerror(errno)); iconv_ok = FALSE; if (error) *error = -1; return g_strdup(inbuf); } } } if (isutf8bom(inbuf)) inbuf += 3; return conv_iconv_strdup_with_cd(inbuf, cd, error); } static gchar *conv_utf8tojis(const gchar *inbuf, gint *error) { gchar *tmpstr, *jisstr; gint t_error = 0, j_error = 0; #if 1 tmpstr = conv_utf8tosjis(inbuf, &t_error); jisstr = conv_sjistojis(tmpstr, &j_error); #else tmpstr = conv_utf8toeuc(inbuf, &t_error); jisstr = conv_euctojis(tmpstr, &j_error); #endif g_free(tmpstr); if (error) *error = (t_error | j_error); return jisstr; } #if 0 static gchar valid_eucjp_tbl[][96] = { /* 0xa2a0 - 0xa2ff */ { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 0 }, /* 0xa3a0 - 0xa3ff */ { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 }, /* 0xa4a0 - 0xa4ff */ { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* 0xa5a0 - 0xa5ff */ { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* 0xa6a0 - 0xa6ff */ { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* 0xa7a0 - 0xa7ff */ { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* 0xa8a0 - 0xa8ff */ { 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }; static gboolean isprintableeuckanji(guchar c1, guchar c2) { if (c1 <= 0xa0 || c1 >= 0xf5) return FALSE; if (c2 <= 0xa0 || c2 == 0xff) return FALSE; if (c1 >= 0xa9 && c1 <= 0xaf) return FALSE; if (c1 >= 0xa2 && c1 <= 0xa8) return (gboolean)valid_eucjp_tbl[c1 - 0xa2][c2 - 0xa0]; if (c1 == 0xcf) { if (c2 >= 0xd4 && c2 <= 0xfe) return FALSE; } else if (c1 == 0xf4) { if (c2 >= 0xa7 && c2 <= 0xfe) return FALSE; } return TRUE; } static void conv_unreadable_eucjp(gchar *str) { register guchar *p = str; while (*p != '\0') { if (isascii(*p)) { /* convert CR+LF -> LF */ if (*p == '\r' && *(p + 1) == '\n') memmove(p, p + 1, strlen(p)); /* printable 7 bit code */ p++; } else if (iseuckanji(*p)) { if (isprintableeuckanji(*p, *(p + 1))) { /* printable euc-jp code */ p += 2; } else { /* substitute unprintable code */ *p++ = SUBST_CHAR; if (*p != '\0') { if (isascii(*p)) p++; else *p++ = SUBST_CHAR; } } } else if (iseuchwkana1(*p)) { if (iseuchwkana2(*(p + 1))) /* euc-jp hankaku kana */ p += 2; else *p++ = SUBST_CHAR; } else if (iseucaux(*p)) { if (iseuckanji(*(p + 1)) && iseuckanji(*(p + 2))) { /* auxiliary kanji */ p += 3; } else *p++ = SUBST_CHAR; } else /* substitute unprintable 1 byte code */ *p++ = SUBST_CHAR; } } #endif static void conv_unreadable_8bit(gchar *str) { register gchar *p = str; while (*p != '\0') { /* convert CR+LF -> LF */ if (*p == '\r' && *(p + 1) == '\n') memmove(p, p + 1, strlen(p)); else if (!isascii(*(guchar *)p)) *p = SUBST_CHAR; p++; } } #if 0 static void conv_unreadable_latin(gchar *str) { register guchar *p = str; while (*p != '\0') { /* convert CR+LF -> LF */ if (*p == '\r' && *(p + 1) == '\n') memmove(p, p + 1, strlen(p)); else if ((*p & 0xff) >= 0x7f && (*p & 0xff) <= 0x9f) *p = SUBST_CHAR; p++; } } #endif #define NCV '\0' void conv_mb_alnum(gchar *str) { static guchar char_tbl[] = { /* 0xa0 - 0xaf */ NCV, ' ', NCV, NCV, ',', '.', NCV, ':', ';', '?', '!', NCV, NCV, NCV, NCV, NCV, /* 0xb0 - 0xbf */ NCV, NCV, NCV, NCV, NCV, NCV, NCV, NCV, NCV, NCV, NCV, NCV, NCV, NCV, NCV, NCV, /* 0xc0 - 0xcf */ NCV, NCV, NCV, NCV, NCV, NCV, NCV, NCV, NCV, NCV, '(', ')', NCV, NCV, '[', ']', /* 0xd0 - 0xdf */ '{', '}', NCV, NCV, NCV, NCV, NCV, NCV, NCV, NCV, NCV, NCV, '+', '-', NCV, NCV, /* 0xe0 - 0xef */ NCV, '=', NCV, '<', '>', NCV, NCV, NCV, NCV, NCV, NCV, NCV, NCV, NCV, NCV, NCV }; register guchar *p = (guchar *)str; register gint len; len = strlen(str); while (len > 1) { if (*p == 0xa3) { register guchar ch = *(p + 1); if (ch >= 0xb0 && ch <= 0xfa) { /* [a-zA-Z] */ *p = ch & 0x7f; p++; len--; memmove(p, p + 1, len); len--; } else { p += 2; len -= 2; } } else if (*p == 0xa1) { register guchar ch = *(p + 1); if (ch >= 0xa0 && ch <= 0xef && NCV != char_tbl[ch - 0xa0]) { *p = char_tbl[ch - 0xa0]; p++; len--; memmove(p, p + 1, len); len--; } else { p += 2; len -= 2; } } else if (iseuckanji(*p)) { p += 2; len -= 2; } else { p++; len--; } } } CharSet conv_guess_ja_encoding(const gchar *str) { const guchar *p = (const guchar *)str; CharSet guessed = C_US_ASCII; while (*p != '\0') { if (*p == ESC && (*(p + 1) == '$' || *(p + 1) == '(')) { if (guessed == C_US_ASCII) return C_ISO_2022_JP; p += 2; } else if (isascii(*p)) { p++; } else if (iseuckanji(*p) && iseuckanji(*(p + 1))) { if (*p >= 0xfd && *p <= 0xfe) return C_EUC_JP; else if (guessed == C_SHIFT_JIS) { if ((issjiskanji1(*p) && issjiskanji2(*(p + 1))) || issjishwkana(*p)) guessed = C_SHIFT_JIS; else guessed = C_EUC_JP; } else guessed = C_EUC_JP; p += 2; } else if (issjiskanji1(*p) && issjiskanji2(*(p + 1))) { guessed = C_SHIFT_JIS; p += 2; } else if (issjishwkana(*p)) { guessed = C_SHIFT_JIS; p++; } else { if (guessed == C_US_ASCII) guessed = C_AUTO; p++; } } if (guessed != C_US_ASCII) { p = (const guchar *)str; while (*p != '\0') { if (isascii(*p)) { p++; } else if (isutf8_3_1(*p) && isutf8_3_2(*(p + 1)) && isutf8_3_2(*(p + 2))) { p += 3; } else { return guessed; } } return C_UTF_8; } return guessed; } static gchar *conv_jistodisp(const gchar *inbuf, gint *error) { return conv_jistoutf8(inbuf, error); } static gchar *conv_sjistodisp(const gchar *inbuf, gint *error) { return conv_sjistoutf8(inbuf, error); } static gchar *conv_euctodisp(const gchar *inbuf, gint *error) { return conv_euctoutf8(inbuf, error); } gchar *conv_utf8todisp(const gchar *inbuf, gint *error) { if (g_utf8_validate(inbuf, -1, NULL) == TRUE) { if (error) *error = 0; if (isutf8bom(inbuf)) inbuf += 3; return g_strdup(inbuf); } else return conv_ustodisp(inbuf, error); } static gchar *conv_anytodisp(const gchar *inbuf, gint *error) { gchar *outbuf; outbuf = conv_anytoutf8(inbuf, error); if (g_utf8_validate(outbuf, -1, NULL) != TRUE) { if (error) *error = -1; conv_unreadable_8bit(outbuf); } return outbuf; } static gchar *conv_ustodisp(const gchar *inbuf, gint *error) { gchar *outbuf; outbuf = g_strdup(inbuf); conv_unreadable_8bit(outbuf); if (error) *error = 0; return outbuf; } gchar *conv_localetodisp(const gchar *inbuf, gint *error) { gchar *str; str = conv_iconv_strdup(inbuf, conv_get_locale_charset_str(), CS_INTERNAL, error); if (!str) str = conv_utf8todisp(inbuf, NULL); return str; } static gchar *conv_noconv(const gchar *inbuf, gint *error) { if (error) *error = 0; return g_strdup(inbuf); } static const gchar * conv_get_fallback_for_private_encoding(const gchar *encoding) { if (encoding) { if ((encoding[0] == 'X' || encoding[0] == 'x') && encoding[1] == '-') { if (!g_ascii_strcasecmp(encoding, CS_X_GBK)) return CS_GBK; else if (!g_ascii_strcasecmp(encoding, CS_X_SJIS)) return CS_SHIFT_JIS; } else if ((encoding[0] == 'K' || encoding[0] == 'k') && (encoding[1] == 'S' || encoding[1] == 's')) { if (!g_ascii_strcasecmp(encoding, CS_KS_C_5601_1987)) return CS_EUC_KR; } } return encoding; } CodeConverter *conv_code_converter_new(const gchar *src_encoding, const gchar *dest_encoding) { CodeConverter *conv; src_encoding = conv_get_fallback_for_private_encoding(src_encoding); conv = g_new0(CodeConverter, 1); conv->code_conv_func = conv_get_code_conv_func(src_encoding, dest_encoding); conv->src_encoding = g_strdup(src_encoding); conv->dest_encoding = g_strdup(dest_encoding); return conv; } void conv_code_converter_destroy(CodeConverter *conv) { g_free(conv->src_encoding); g_free(conv->dest_encoding); g_free(conv); } gchar *conv_convert(CodeConverter *conv, const gchar *inbuf) { if (!inbuf) return NULL; else if (conv->code_conv_func != conv_noconv) return conv->code_conv_func(inbuf, NULL); else return conv_iconv_strdup (inbuf, conv->src_encoding, conv->dest_encoding, NULL); } gchar *conv_codeset_strdup_full(const gchar *inbuf, const gchar *src_encoding, const gchar *dest_encoding, gint *error) { CodeConvFunc conv_func; if (!inbuf) { if (error) *error = 0; return NULL; } src_encoding = conv_get_fallback_for_private_encoding(src_encoding); conv_func = conv_get_code_conv_func(src_encoding, dest_encoding); if (conv_func != conv_noconv) return conv_func(inbuf, error); return conv_iconv_strdup(inbuf, src_encoding, dest_encoding, error); } CodeConvFunc conv_get_code_conv_func(const gchar *src_encoding, const gchar *dest_encoding) { CodeConvFunc code_conv = conv_noconv; CharSet src_charset; CharSet dest_charset; if (!src_encoding) src_charset = conv_get_locale_charset(); else src_charset = conv_get_charset_from_str(src_encoding); /* auto detection mode */ if (!src_encoding && !dest_encoding) { if (conv_is_ja_locale()) return conv_anytodisp; else return conv_noconv; } dest_charset = conv_get_charset_from_str(dest_encoding); if (dest_charset == C_US_ASCII) return conv_ustodisp; switch (src_charset) { case C_US_ASCII: case C_ISO_8859_1: case C_ISO_8859_2: case C_ISO_8859_3: case C_ISO_8859_4: case C_ISO_8859_5: case C_ISO_8859_6: case C_ISO_8859_7: case C_ISO_8859_8: case C_ISO_8859_9: case C_ISO_8859_10: case C_ISO_8859_11: case C_ISO_8859_13: case C_ISO_8859_14: case C_ISO_8859_15: case C_ISO_8859_16: break; case C_ISO_2022_JP: case C_ISO_2022_JP_2: case C_ISO_2022_JP_3: if (dest_charset == C_AUTO) code_conv = conv_jistodisp; else if (dest_charset == C_EUC_JP) code_conv = conv_jistoeuc; else if (dest_charset == C_SHIFT_JIS || dest_charset == C_CP932) code_conv = conv_jistosjis; else if (dest_charset == C_UTF_8) code_conv = conv_jistoutf8; break; case C_SHIFT_JIS: case C_CP932: if (dest_charset == C_AUTO) code_conv = conv_sjistodisp; else if (dest_charset == C_ISO_2022_JP || dest_charset == C_ISO_2022_JP_2 || dest_charset == C_ISO_2022_JP_3) code_conv = conv_sjistojis; else if (dest_charset == C_EUC_JP) code_conv = conv_sjistoeuc; else if (dest_charset == C_UTF_8) code_conv = conv_sjistoutf8; break; case C_EUC_JP: if (dest_charset == C_AUTO) code_conv = conv_euctodisp; else if (dest_charset == C_ISO_2022_JP || dest_charset == C_ISO_2022_JP_2 || dest_charset == C_ISO_2022_JP_3) code_conv = conv_euctojis; else if (dest_charset == C_UTF_8) code_conv = conv_euctoutf8; break; case C_UTF_8: if (dest_charset == C_EUC_JP) code_conv = conv_utf8toeuc; else if (dest_charset == C_ISO_2022_JP || dest_charset == C_ISO_2022_JP_2 || dest_charset == C_ISO_2022_JP_3) code_conv = conv_utf8tojis; else if (dest_charset == C_SHIFT_JIS || dest_charset == C_CP932) code_conv = conv_utf8tosjis; break; default: break; } return code_conv; } gchar *conv_iconv_strdup(const gchar *inbuf, const gchar *src_code, const gchar *dest_code, gint *error) { iconv_t cd; gchar *outbuf; if (!src_code) src_code = conv_get_locale_charset_str(); if (!dest_code) dest_code = CS_INTERNAL; cd = iconv_open(dest_code, src_code); if (cd == (iconv_t)-1) { if (error) *error = -1; return NULL; } outbuf = conv_iconv_strdup_with_cd(inbuf, cd, error); iconv_close(cd); return outbuf; } gchar *conv_iconv_strdup_with_cd(const gchar *inbuf, iconv_t cd, gint *error) { const gchar *inbuf_p; gchar *outbuf; gchar *outbuf_p; size_t in_size; size_t in_left; size_t out_size; size_t out_left; size_t n_conv; size_t len; gint error_ = 0; if (!inbuf) { if (error) *error = 0; return NULL; } inbuf_p = inbuf; in_size = strlen(inbuf); in_left = in_size; out_size = (in_size + 1) * 2; outbuf = g_malloc(out_size); outbuf_p = outbuf; out_left = out_size; #define EXPAND_BUF() \ { \ len = outbuf_p - outbuf; \ out_size *= 2; \ outbuf = g_realloc(outbuf, out_size); \ outbuf_p = outbuf + len; \ out_left = out_size - len; \ } while ((n_conv = iconv(cd, (ICONV_CONST gchar **)&inbuf_p, &in_left, &outbuf_p, &out_left)) == (size_t)-1) { if (EILSEQ == errno) { /* g_print("iconv(): at %d: %s\n", in_size - in_left, g_strerror(errno)); */ error_ = -1; inbuf_p++; in_left--; if (out_left == 0) { EXPAND_BUF(); } *outbuf_p++ = SUBST_CHAR; out_left--; } else if (EINVAL == errno) { error_ = -1; break; } else if (E2BIG == errno) { EXPAND_BUF(); } else { g_warning("conv_iconv_strdup(): %s\n", g_strerror(errno)); error_ = -1; break; } } while ((n_conv = iconv(cd, NULL, NULL, &outbuf_p, &out_left)) == (size_t)-1) { if (E2BIG == errno) { EXPAND_BUF(); } else { g_warning("conv_iconv_strdup(): %s\n", g_strerror(errno)); error_ = -1; break; } } #undef EXPAND_BUF len = outbuf_p - outbuf; outbuf = g_realloc(outbuf, len + 1); outbuf[len] = '\0'; if (error) *error = error_; return outbuf; } static const struct { CharSet charset; gchar *const name; } charsets[] = { {C_US_ASCII, CS_US_ASCII}, {C_US_ASCII, CS_ANSI_X3_4_1968}, {C_UTF_8, CS_UTF_8}, {C_UTF_7, CS_UTF_7}, {C_ISO_8859_1, CS_ISO_8859_1}, {C_ISO_8859_2, CS_ISO_8859_2}, {C_ISO_8859_3, CS_ISO_8859_3}, {C_ISO_8859_4, CS_ISO_8859_4}, {C_ISO_8859_5, CS_ISO_8859_5}, {C_ISO_8859_6, CS_ISO_8859_6}, {C_ISO_8859_7, CS_ISO_8859_7}, {C_ISO_8859_8, CS_ISO_8859_8}, {C_ISO_8859_9, CS_ISO_8859_9}, {C_ISO_8859_10, CS_ISO_8859_10}, {C_ISO_8859_11, CS_ISO_8859_11}, {C_ISO_8859_13, CS_ISO_8859_13}, {C_ISO_8859_14, CS_ISO_8859_14}, {C_ISO_8859_15, CS_ISO_8859_15}, {C_BALTIC, CS_BALTIC}, {C_CP932, CS_CP932}, {C_CP1250, CS_CP1250}, {C_CP1251, CS_CP1251}, {C_CP1252, CS_CP1252}, {C_CP1253, CS_CP1253}, {C_CP1254, CS_CP1254}, {C_CP1255, CS_CP1255}, {C_CP1256, CS_CP1256}, {C_CP1257, CS_CP1257}, {C_CP1258, CS_CP1258}, {C_WINDOWS_932, CS_WINDOWS_932}, {C_WINDOWS_1250, CS_WINDOWS_1250}, {C_WINDOWS_1251, CS_WINDOWS_1251}, {C_WINDOWS_1252, CS_WINDOWS_1252}, {C_WINDOWS_1253, CS_WINDOWS_1253}, {C_WINDOWS_1254, CS_WINDOWS_1254}, {C_WINDOWS_1255, CS_WINDOWS_1255}, {C_WINDOWS_1256, CS_WINDOWS_1256}, {C_WINDOWS_1257, CS_WINDOWS_1257}, {C_WINDOWS_1258, CS_WINDOWS_1258}, {C_KOI8_R, CS_KOI8_R}, {C_KOI8_T, CS_KOI8_T}, {C_KOI8_U, CS_KOI8_U}, {C_ISO_2022_JP, CS_ISO_2022_JP}, {C_ISO_2022_JP_2, CS_ISO_2022_JP_2}, {C_ISO_2022_JP_3, CS_ISO_2022_JP_3}, {C_EUC_JP, CS_EUC_JP}, {C_EUC_JP, CS_EUCJP}, {C_EUC_JP_MS, CS_EUC_JP_MS}, {C_SHIFT_JIS, CS_SHIFT_JIS}, {C_SHIFT_JIS, CS_SHIFT__JIS}, {C_SHIFT_JIS, CS_SJIS}, {C_ISO_2022_KR, CS_ISO_2022_KR}, {C_EUC_KR, CS_EUC_KR}, {C_ISO_2022_CN, CS_ISO_2022_CN}, {C_EUC_CN, CS_EUC_CN}, {C_GB2312, CS_GB2312}, {C_GBK, CS_GBK}, {C_EUC_TW, CS_EUC_TW}, {C_BIG5, CS_BIG5}, {C_BIG5_HKSCS, CS_BIG5_HKSCS}, {C_TIS_620, CS_TIS_620}, {C_WINDOWS_874, CS_WINDOWS_874}, {C_GEORGIAN_PS, CS_GEORGIAN_PS}, {C_TCVN5712_1, CS_TCVN5712_1}, {C_ISO_8859_16, CS_ISO_8859_16}, }; static const struct { gchar *const locale; CharSet charset; CharSet out_charset; } locale_table[] = { {"ja_JP.eucJP" , C_EUC_JP , C_ISO_2022_JP}, {"ja_JP.EUC-JP" , C_EUC_JP , C_ISO_2022_JP}, {"ja_JP.EUC" , C_EUC_JP , C_ISO_2022_JP}, {"ja_JP.ujis" , C_EUC_JP , C_ISO_2022_JP}, {"ja_JP.SJIS" , C_SHIFT_JIS , C_ISO_2022_JP}, {"ja_JP.JIS" , C_ISO_2022_JP , C_ISO_2022_JP}, #ifdef G_OS_WIN32 {"ja_JP" , C_CP932 , C_ISO_2022_JP}, #else {"ja_JP" , C_EUC_JP , C_ISO_2022_JP}, #endif {"ko_KR.EUC-KR" , C_EUC_KR , C_EUC_KR}, {"ko_KR" , C_EUC_KR , C_EUC_KR}, {"zh_CN.GB2312" , C_GB2312 , C_GB2312}, {"zh_CN.GBK" , C_GBK , C_GBK}, {"zh_CN" , C_GB2312 , C_GB2312}, {"zh_HK" , C_BIG5_HKSCS , C_BIG5_HKSCS}, {"zh_TW.eucTW" , C_EUC_TW , C_BIG5}, {"zh_TW.EUC-TW" , C_EUC_TW , C_BIG5}, {"zh_TW.Big5" , C_BIG5 , C_BIG5}, {"zh_TW" , C_BIG5 , C_BIG5}, {"ru_RU.KOI8-R" , C_KOI8_R , C_KOI8_R}, {"ru_RU.KOI8R" , C_KOI8_R , C_KOI8_R}, {"ru_RU.CP1251" , C_WINDOWS_1251, C_KOI8_R}, {"ru_RU" , C_ISO_8859_5 , C_KOI8_R}, {"tg_TJ" , C_KOI8_T , C_KOI8_T}, {"ru_UA" , C_KOI8_U , C_KOI8_U}, {"uk_UA.CP1251" , C_WINDOWS_1251, C_KOI8_U}, {"uk_UA" , C_KOI8_U , C_KOI8_U}, {"be_BY" , C_WINDOWS_1251, C_WINDOWS_1251}, {"bg_BG" , C_WINDOWS_1251, C_WINDOWS_1251}, {"yi_US" , C_WINDOWS_1255, C_WINDOWS_1255}, {"af_ZA" , C_ISO_8859_1 , C_ISO_8859_1}, {"br_FR" , C_ISO_8859_1 , C_ISO_8859_1}, {"ca_ES" , C_ISO_8859_1 , C_ISO_8859_1}, {"da_DK" , C_ISO_8859_1 , C_ISO_8859_1}, {"de_AT" , C_ISO_8859_1 , C_ISO_8859_1}, {"de_BE" , C_ISO_8859_1 , C_ISO_8859_1}, {"de_CH" , C_ISO_8859_1 , C_ISO_8859_1}, {"de_DE" , C_ISO_8859_1 , C_ISO_8859_1}, {"de_LU" , C_ISO_8859_1 , C_ISO_8859_1}, {"en_AU" , C_ISO_8859_1 , C_ISO_8859_1}, {"en_BW" , C_ISO_8859_1 , C_ISO_8859_1}, {"en_CA" , C_ISO_8859_1 , C_ISO_8859_1}, {"en_DK" , C_ISO_8859_1 , C_ISO_8859_1}, {"en_GB" , C_ISO_8859_1 , C_ISO_8859_1}, {"en_HK" , C_ISO_8859_1 , C_ISO_8859_1}, {"en_IE" , C_ISO_8859_1 , C_ISO_8859_1}, {"en_NZ" , C_ISO_8859_1 , C_ISO_8859_1}, {"en_PH" , C_ISO_8859_1 , C_ISO_8859_1}, {"en_SG" , C_ISO_8859_1 , C_ISO_8859_1}, {"en_US" , C_ISO_8859_1 , C_ISO_8859_1}, {"en_ZA" , C_ISO_8859_1 , C_ISO_8859_1}, {"en_ZW" , C_ISO_8859_1 , C_ISO_8859_1}, {"es_AR" , C_ISO_8859_1 , C_ISO_8859_1}, {"es_BO" , C_ISO_8859_1 , C_ISO_8859_1}, {"es_CL" , C_ISO_8859_1 , C_ISO_8859_1}, {"es_CO" , C_ISO_8859_1 , C_ISO_8859_1}, {"es_CR" , C_ISO_8859_1 , C_ISO_8859_1}, {"es_DO" , C_ISO_8859_1 , C_ISO_8859_1}, {"es_EC" , C_ISO_8859_1 , C_ISO_8859_1}, {"es_ES" , C_ISO_8859_1 , C_ISO_8859_1}, {"es_GT" , C_ISO_8859_1 , C_ISO_8859_1}, {"es_HN" , C_ISO_8859_1 , C_ISO_8859_1}, {"es_MX" , C_ISO_8859_1 , C_ISO_8859_1}, {"es_NI" , C_ISO_8859_1 , C_ISO_8859_1}, {"es_PA" , C_ISO_8859_1 , C_ISO_8859_1}, {"es_PE" , C_ISO_8859_1 , C_ISO_8859_1}, {"es_PR" , C_ISO_8859_1 , C_ISO_8859_1}, {"es_PY" , C_ISO_8859_1 , C_ISO_8859_1}, {"es_SV" , C_ISO_8859_1 , C_ISO_8859_1}, {"es_US" , C_ISO_8859_1 , C_ISO_8859_1}, {"es_UY" , C_ISO_8859_1 , C_ISO_8859_1}, {"es_VE" , C_ISO_8859_1 , C_ISO_8859_1}, {"et_EE" , C_ISO_8859_1 , C_ISO_8859_1}, {"eu_ES" , C_ISO_8859_1 , C_ISO_8859_1}, {"fi_FI" , C_ISO_8859_1 , C_ISO_8859_1}, {"fo_FO" , C_ISO_8859_1 , C_ISO_8859_1}, {"fr_BE" , C_ISO_8859_1 , C_ISO_8859_1}, {"fr_CA" , C_ISO_8859_1 , C_ISO_8859_1}, {"fr_CH" , C_ISO_8859_1 , C_ISO_8859_1}, {"fr_FR" , C_ISO_8859_1 , C_ISO_8859_1}, {"fr_LU" , C_ISO_8859_1 , C_ISO_8859_1}, {"ga_IE" , C_ISO_8859_1 , C_ISO_8859_1}, {"gl_ES" , C_ISO_8859_1 , C_ISO_8859_1}, {"gv_GB" , C_ISO_8859_1 , C_ISO_8859_1}, {"id_ID" , C_ISO_8859_1 , C_ISO_8859_1}, {"is_IS" , C_ISO_8859_1 , C_ISO_8859_1}, {"it_CH" , C_ISO_8859_1 , C_ISO_8859_1}, {"it_IT" , C_ISO_8859_1 , C_ISO_8859_1}, {"kl_GL" , C_ISO_8859_1 , C_ISO_8859_1}, {"kw_GB" , C_ISO_8859_1 , C_ISO_8859_1}, {"ms_MY" , C_ISO_8859_1 , C_ISO_8859_1}, {"nl_BE" , C_ISO_8859_1 , C_ISO_8859_1}, {"nl_NL" , C_ISO_8859_1 , C_ISO_8859_1}, {"nn_NO" , C_ISO_8859_1 , C_ISO_8859_1}, {"no_NO" , C_ISO_8859_1 , C_ISO_8859_1}, {"oc_FR" , C_ISO_8859_1 , C_ISO_8859_1}, {"pt_BR" , C_ISO_8859_1 , C_ISO_8859_1}, {"pt_PT" , C_ISO_8859_1 , C_ISO_8859_1}, {"sq_AL" , C_ISO_8859_1 , C_ISO_8859_1}, {"sv_FI" , C_ISO_8859_1 , C_ISO_8859_1}, {"sv_SE" , C_ISO_8859_1 , C_ISO_8859_1}, {"tl_PH" , C_ISO_8859_1 , C_ISO_8859_1}, {"uz_UZ" , C_ISO_8859_1 , C_ISO_8859_1}, {"wa_BE" , C_ISO_8859_1 , C_ISO_8859_1}, {"bs_BA" , C_ISO_8859_2 , C_ISO_8859_2}, {"cs_CZ" , C_ISO_8859_2 , C_ISO_8859_2}, {"hr_HR" , C_ISO_8859_2 , C_ISO_8859_2}, {"hu_HU" , C_ISO_8859_2 , C_ISO_8859_2}, {"pl_PL" , C_ISO_8859_2 , C_ISO_8859_2}, {"ro_RO" , C_ISO_8859_2 , C_ISO_8859_2}, {"sk_SK" , C_ISO_8859_2 , C_ISO_8859_2}, {"sl_SI" , C_ISO_8859_2 , C_ISO_8859_2}, {"sr_YU@cyrillic" , C_ISO_8859_5 , C_ISO_8859_5}, {"sr_YU" , C_ISO_8859_2 , C_ISO_8859_2}, {"mt_MT" , C_ISO_8859_3 , C_ISO_8859_3}, {"lt_LT.iso88594" , C_ISO_8859_4 , C_ISO_8859_4}, {"lt_LT.ISO8859-4" , C_ISO_8859_4 , C_ISO_8859_4}, {"lt_LT.ISO_8859-4" , C_ISO_8859_4 , C_ISO_8859_4}, {"lt_LT" , C_ISO_8859_13 , C_ISO_8859_13}, {"mk_MK" , C_ISO_8859_5 , C_ISO_8859_5}, {"ar_AE" , C_ISO_8859_6 , C_ISO_8859_6}, {"ar_BH" , C_ISO_8859_6 , C_ISO_8859_6}, {"ar_DZ" , C_ISO_8859_6 , C_ISO_8859_6}, {"ar_EG" , C_ISO_8859_6 , C_ISO_8859_6}, {"ar_IQ" , C_ISO_8859_6 , C_ISO_8859_6}, {"ar_JO" , C_ISO_8859_6 , C_ISO_8859_6}, {"ar_KW" , C_ISO_8859_6 , C_ISO_8859_6}, {"ar_LB" , C_ISO_8859_6 , C_ISO_8859_6}, {"ar_LY" , C_ISO_8859_6 , C_ISO_8859_6}, {"ar_MA" , C_ISO_8859_6 , C_ISO_8859_6}, {"ar_OM" , C_ISO_8859_6 , C_ISO_8859_6}, {"ar_QA" , C_ISO_8859_6 , C_ISO_8859_6}, {"ar_SA" , C_ISO_8859_6 , C_ISO_8859_6}, {"ar_SD" , C_ISO_8859_6 , C_ISO_8859_6}, {"ar_SY" , C_ISO_8859_6 , C_ISO_8859_6}, {"ar_TN" , C_ISO_8859_6 , C_ISO_8859_6}, {"ar_YE" , C_ISO_8859_6 , C_ISO_8859_6}, {"el_GR" , C_ISO_8859_7 , C_ISO_8859_7}, {"he_IL" , C_ISO_8859_8 , C_ISO_8859_8}, {"iw_IL" , C_ISO_8859_8 , C_ISO_8859_8}, {"tr_TR" , C_ISO_8859_9 , C_ISO_8859_9}, {"lv_LV" , C_ISO_8859_13 , C_ISO_8859_13}, {"mi_NZ" , C_ISO_8859_13 , C_ISO_8859_13}, {"cy_GB" , C_ISO_8859_14 , C_ISO_8859_14}, {"ar_IN" , C_UTF_8 , C_UTF_8}, {"en_IN" , C_UTF_8 , C_UTF_8}, {"se_NO" , C_UTF_8 , C_UTF_8}, {"ta_IN" , C_UTF_8 , C_UTF_8}, {"te_IN" , C_UTF_8 , C_UTF_8}, {"ur_PK" , C_UTF_8 , C_UTF_8}, {"th_TH" , C_TIS_620 , C_TIS_620}, /* {"th_TH" , C_WINDOWS_874}, */ /* {"th_TH" , C_ISO_8859_11}, */ {"ka_GE" , C_GEORGIAN_PS , C_GEORGIAN_PS}, {"vi_VN.TCVN" , C_TCVN5712_1 , C_TCVN5712_1}, {"C" , C_US_ASCII , C_US_ASCII}, {"POSIX" , C_US_ASCII , C_US_ASCII}, {"ANSI_X3.4-1968" , C_US_ASCII , C_US_ASCII}, }; static GHashTable *conv_get_charset_to_str_table(void) { static GHashTable *table; gint i; if (table) return table; table = g_hash_table_new(NULL, g_direct_equal); for (i = 0; i < sizeof(charsets) / sizeof(charsets[0]); i++) { if (g_hash_table_lookup(table, GUINT_TO_POINTER(charsets[i].charset)) == NULL) { g_hash_table_insert (table, GUINT_TO_POINTER(charsets[i].charset), charsets[i].name); } } return table; } static GHashTable *conv_get_charset_from_str_table(void) { static GHashTable *table; gint i; if (table) return table; table = g_hash_table_new(str_case_hash, str_case_equal); for (i = 0; i < sizeof(charsets) / sizeof(charsets[0]); i++) { g_hash_table_insert(table, charsets[i].name, GUINT_TO_POINTER(charsets[i].charset)); } return table; } const gchar *conv_get_charset_str(CharSet charset) { GHashTable *table; table = conv_get_charset_to_str_table(); return g_hash_table_lookup(table, GUINT_TO_POINTER(charset)); } CharSet conv_get_charset_from_str(const gchar *charset) { GHashTable *table; if (!charset) return C_AUTO; table = conv_get_charset_from_str_table(); return GPOINTER_TO_UINT(g_hash_table_lookup(table, charset)); } CharSet conv_get_locale_charset(void) { static CharSet cur_charset = -1; const gchar *cur_locale; const gchar *p; #ifndef G_OS_WIN32 gint i; #endif if (cur_charset != -1) return cur_charset; cur_locale = conv_get_current_locale(); if (!cur_locale) { cur_charset = C_US_ASCII; return cur_charset; } if (strcasestr(cur_locale, "UTF-8")) { cur_charset = C_UTF_8; return cur_charset; } if ((p = strcasestr(cur_locale, "@euro")) && p[5] == '\0') { cur_charset = C_ISO_8859_15; return cur_charset; } #ifdef G_OS_WIN32 cur_charset = conv_get_charset_from_str(conv_get_locale_charset_str()); return cur_charset; #else for (i = 0; i < sizeof(locale_table) / sizeof(locale_table[0]); i++) { const gchar *p; /* "ja_JP.EUC" matches with "ja_JP.eucJP", "ja_JP.EUC" and "ja_JP". "ja_JP" matches with "ja_JP.xxxx" and "ja" */ if (!g_ascii_strncasecmp(cur_locale, locale_table[i].locale, strlen(locale_table[i].locale))) { cur_charset = locale_table[i].charset; return cur_charset; } else if ((p = strchr(locale_table[i].locale, '_')) && !strchr(p + 1, '.')) { if (strlen(cur_locale) == 2 && !g_ascii_strncasecmp(cur_locale, locale_table[i].locale, 2)) { cur_charset = locale_table[i].charset; return cur_charset; } } } cur_charset = C_AUTO; return cur_charset; #endif } const gchar *conv_get_locale_charset_str(void) { static const gchar *codeset = NULL; if (!codeset) { #ifdef G_OS_WIN32 g_get_charset(&codeset); if (!strcmp(codeset, CS_US_ASCII) || !strcmp(codeset, CS_ANSI_X3_4_1968)) codeset = CS_INTERNAL; #else codeset = conv_get_charset_str(conv_get_locale_charset()); #endif } return codeset ? codeset : CS_INTERNAL; } CharSet conv_get_internal_charset(void) { return C_INTERNAL; } const gchar *conv_get_internal_charset_str(void) { return CS_INTERNAL; } CharSet conv_get_outgoing_charset(void) { static CharSet out_charset = -1; const gchar *cur_locale; const gchar *p; gint i; if (out_charset != -1) return out_charset; cur_locale = conv_get_current_locale(); if (!cur_locale) { out_charset = C_AUTO; return out_charset; } if ((p = strcasestr(cur_locale, "@euro")) && p[5] == '\0') { out_charset = C_ISO_8859_15; return out_charset; } for (i = 0; i < sizeof(locale_table) / sizeof(locale_table[0]); i++) { const gchar *p; if (!g_ascii_strncasecmp(cur_locale, locale_table[i].locale, strlen(locale_table[i].locale))) { out_charset = locale_table[i].out_charset; break; } else if ((p = strchr(locale_table[i].locale, '_')) && !strchr(p + 1, '.')) { if (strlen(cur_locale) == 2 && !g_ascii_strncasecmp(cur_locale, locale_table[i].locale, 2)) { out_charset = locale_table[i].out_charset; break; } } } return out_charset; } const gchar *conv_get_outgoing_charset_str(void) { CharSet out_charset; const gchar *str; out_charset = conv_get_outgoing_charset(); str = conv_get_charset_str(out_charset); return str ? str : CS_UTF_8; } gboolean conv_is_multibyte_encoding(CharSet encoding) { switch (encoding) { case C_EUC_JP: case C_EUC_JP_MS: case C_EUC_KR: case C_EUC_TW: case C_EUC_CN: case C_ISO_2022_JP: case C_ISO_2022_JP_2: case C_ISO_2022_JP_3: case C_ISO_2022_KR: case C_ISO_2022_CN: case C_SHIFT_JIS: case C_CP932: case C_GB2312: case C_GBK: case C_BIG5: case C_UTF_8: case C_UTF_7: return TRUE; default: return FALSE; } } const gchar *conv_get_current_locale(void) { static const gchar *cur_locale; if (!cur_locale) { #ifdef G_OS_WIN32 cur_locale = g_win32_getlocale(); #else cur_locale = g_getenv("LC_ALL"); if (!cur_locale || *cur_locale == '\0') cur_locale = g_getenv("LC_CTYPE"); if (!cur_locale || *cur_locale == '\0') cur_locale = g_getenv("LANG"); if (!cur_locale || *cur_locale == '\0') cur_locale = setlocale(LC_CTYPE, NULL); #endif /* G_OS_WIN32 */ debug_print("current locale: %s\n", cur_locale ? cur_locale : "(none)"); } return cur_locale; } gboolean conv_is_ja_locale(void) { static gint is_ja_locale = -1; const gchar *cur_locale; if (is_ja_locale != -1) return is_ja_locale != 0; is_ja_locale = 0; cur_locale = conv_get_current_locale(); if (cur_locale) { if (g_ascii_strncasecmp(cur_locale, "ja", 2) == 0) is_ja_locale = 1; } return is_ja_locale != 0; } gchar *conv_unmime_header(const gchar *str, const gchar *default_encoding) { gchar *buf; gchar *decoded_str; if (is_ascii_str(str)) return unmime_header(str); if (default_encoding) { buf = conv_codeset_strdup (str, default_encoding, CS_INTERNAL); if (buf) { decoded_str = unmime_header(buf); g_free(buf); return decoded_str; } } if (conv_is_ja_locale()) buf = conv_anytodisp(str, NULL); else buf = conv_localetodisp(str, NULL); decoded_str = unmime_header(buf); g_free(buf); return decoded_str; } #define MAX_LINELEN 76 #define MAX_HARD_LINELEN 996 #define MIMESEP_BEGIN "=?" #define MIMESEP_END "?=" #define B64LEN(len) ((len) / 3 * 4 + ((len) % 3 ? 4 : 0)) #define LBREAK_IF_REQUIRED(cond, is_plain_text) \ { \ if (len - (destp - dest) < MAX_LINELEN + 2) { \ *destp = '\0'; \ return; \ } \ \ if ((cond) && *srcp) { \ if (destp > dest && left < MAX_LINELEN - 1) { \ if (g_ascii_isspace(*(destp - 1))) \ destp--; \ else if (is_plain_text && \ g_ascii_isspace(*srcp)) \ srcp++; \ if (*srcp) { \ *destp++ = '\n'; \ *destp++ = ' '; \ left = MAX_LINELEN - 1; \ } \ } \ } \ } void conv_encode_header(gchar *dest, gint len, const gchar *src, gint header_len, gboolean addr_field, const gchar *out_encoding) { const gchar *src_encoding; gint mimestr_len; gchar *mimesep_enc; gint left; const gchar *srcp = src; gchar *destp = dest; gboolean use_base64; g_return_if_fail(g_utf8_validate(src, -1, NULL) == TRUE); src_encoding = CS_INTERNAL; if (!out_encoding) out_encoding = conv_get_outgoing_charset_str(); if (!strcmp(out_encoding, CS_US_ASCII)) out_encoding = CS_ISO_8859_1; if (!g_ascii_strncasecmp(out_encoding, "ISO-8859-", 9) || !g_ascii_strncasecmp(out_encoding, "KOI8-", 5) || !g_ascii_strncasecmp(out_encoding, "Windows-", 8)) { use_base64 = FALSE; mimesep_enc = "?Q?"; } else { use_base64 = TRUE; mimesep_enc = "?B?"; } mimestr_len = strlen(MIMESEP_BEGIN) + strlen(mimesep_enc) + strlen(MIMESEP_END); left = MAX_LINELEN - header_len; while (*srcp) { gboolean in_quote = FALSE; LBREAK_IF_REQUIRED(left <= 0, TRUE); while (g_ascii_isspace(*srcp)) { *destp++ = *srcp++; left--; LBREAK_IF_REQUIRED(left <= 0, TRUE); } /* output as it is if the next word is ASCII string */ if (!is_next_nonascii(srcp)) { gint word_len; word_len = get_next_word_len(srcp); LBREAK_IF_REQUIRED(left < word_len, TRUE); while (word_len > 0) { LBREAK_IF_REQUIRED(left + (MAX_HARD_LINELEN - MAX_LINELEN) <= 0, TRUE) *destp++ = *srcp++; left--; word_len--; } continue; } /* don't include parentheses in encoded strings */ if (addr_field && (*srcp == '(' || *srcp == ')')) { LBREAK_IF_REQUIRED(left < 2, FALSE); *destp++ = *srcp++; left--; } while (1) { gint mb_len = 0; gint cur_len = 0; gchar *part_str; gchar *out_str; gchar *enc_str; const gchar *p = srcp; const gchar *block_encoding = out_encoding; gint out_str_len; gint out_enc_str_len; gint mime_block_len; gint error = 0; gboolean cont = FALSE; while (*p != '\0') { if (*p == '"') in_quote ^= TRUE; else if (!in_quote) { if (g_ascii_isspace(*p) && !is_next_nonascii(p + 1)) break; /* don't include parentheses in encoded strings */ if (addr_field && (*p == '(' || *p == ')')) break; } mb_len = g_utf8_skip[*(guchar *)p]; Xstrndup_a(part_str, srcp, cur_len + mb_len, ); out_str = conv_codeset_strdup_full (part_str, src_encoding, block_encoding, &error); if (!out_str || error != 0) { g_warning("conv_encode_header(): code conversion failed. Keeping UTF-8.\n"); out_str = g_strdup(part_str); block_encoding = CS_UTF_8; } out_str_len = strlen(out_str); if (use_base64) out_enc_str_len = B64LEN(out_str_len); else out_enc_str_len = qp_get_q_encoding_len ((guchar *)out_str); g_free(out_str); if (mimestr_len + strlen(block_encoding) + out_enc_str_len <= left) { cur_len += mb_len; p += mb_len; } else if (cur_len == 0) { LBREAK_IF_REQUIRED(1, FALSE); if (*p == '"') in_quote ^= TRUE; continue; } else { cont = TRUE; if (*p == '"') in_quote ^= TRUE; break; } } if (cur_len > 0) { Xstrndup_a(part_str, srcp, cur_len, ); error = 0; out_str = conv_codeset_strdup_full (part_str, src_encoding, block_encoding, &error); if (!out_str || error != 0) { g_warning("conv_encode_header(): code conversion failed\n"); out_str = g_strdup(part_str); block_encoding = CS_UTF_8; } out_str_len = strlen(out_str); if (use_base64) out_enc_str_len = B64LEN(out_str_len); else out_enc_str_len = qp_get_q_encoding_len ((guchar *)out_str); Xalloca(enc_str, out_enc_str_len + 1, ); if (use_base64) base64_encode(enc_str, (guchar *)out_str, out_str_len); else qp_q_encode(enc_str, (guchar *)out_str); g_free(out_str); /* output MIME-encoded string block */ mime_block_len = mimestr_len + strlen(block_encoding) + strlen(enc_str); g_snprintf(destp, mime_block_len + 1, MIMESEP_BEGIN "%s%s%s" MIMESEP_END, block_encoding, mimesep_enc, enc_str); destp += mime_block_len; srcp += cur_len; left -= mime_block_len; } LBREAK_IF_REQUIRED(cont, FALSE); if (cur_len == 0) break; } } *destp = '\0'; } #undef LBREAK_IF_REQUIRED #define INT_TO_HEX_UPPER(outp, val) \ { \ if ((val) < 10) \ *outp = '0' + (val); \ else \ *outp = 'A' + (val) - 10; \ } #define IS_ESCAPE_CHAR(c) \ (c < 0x20 || c > 0x7f || \ strchr("\t \r\n*'%!#$&~`,{}|()<>@,;:\\\"/[]?=", c)) static gchar *encode_rfc2231_filename(const gchar *str) { const gchar *p; gchar *out; gchar *outp; outp = out = g_malloc(strlen(str) * 3 + 1); for (p = str; *p != '\0'; ++p) { guchar ch = *(guchar *)p; if (IS_ESCAPE_CHAR(ch)) { *outp++ = '%'; INT_TO_HEX_UPPER(outp, ch >> 4); ++outp; INT_TO_HEX_UPPER(outp, ch & 0x0f); ++outp; } else *outp++ = ch; } *outp = '\0'; return out; } gchar *conv_encode_filename(const gchar *src, const gchar *param_name, const gchar *out_encoding) { gint name_len, max_linelen; gchar *out_str, *enc_str; gchar cur_param[80]; GString *string; gint count = 0; gint cur_left_len; gchar *p; g_return_val_if_fail(src != NULL, NULL); g_return_val_if_fail(param_name != NULL, NULL); if (is_ascii_str(src)) return g_strdup_printf(" %s=\"%s\"", param_name, src); name_len = strlen(param_name); max_linelen = MAX_LINELEN - name_len - 3; if (!out_encoding) out_encoding = conv_get_outgoing_charset_str(); if (!strcmp(out_encoding, CS_US_ASCII)) out_encoding = CS_ISO_8859_1; out_str = conv_codeset_strdup(src, CS_INTERNAL, out_encoding); if (!out_str) return NULL; enc_str = encode_rfc2231_filename(out_str); g_free(out_str); if (strlen(enc_str) <= max_linelen) { gchar *ret; ret = g_strdup_printf(" %s*=%s''%s", param_name, out_encoding, enc_str); g_free(enc_str); return ret; } string = g_string_new(NULL); g_string_printf(string, " %s*0*=%s''", param_name, out_encoding); cur_left_len = MAX_LINELEN - string->len; p = enc_str; while (*p != '\0') { if ((*p == '%' && cur_left_len < 4) || (*p != '%' && cur_left_len < 2)) { gint len; g_string_append(string, ";\n"); ++count; len = g_snprintf(cur_param, sizeof(cur_param), " %s*%d*=", param_name, count); g_string_append(string, cur_param); cur_left_len = MAX_LINELEN - len; } if (*p == '%') { g_string_append_len(string, p, 3); p += 3; cur_left_len -= 3; } else { g_string_append_c(string, *p); ++p; --cur_left_len; } } g_free(enc_str); return g_string_free(string, FALSE); } gint conv_copy_file(const gchar *src, const gchar *dest, const gchar *encoding) { FILE *src_fp, *dest_fp; gchar buf[BUFFSIZE]; CodeConverter *conv; gboolean err = FALSE; if ((src_fp = g_fopen(src, "rb")) == NULL) { FILE_OP_ERROR(src, "fopen"); return -1; } if ((dest_fp = g_fopen(dest, "wb")) == NULL) { FILE_OP_ERROR(dest, "fopen"); fclose(src_fp); return -1; } if (change_file_mode_rw(dest_fp, dest) < 0) { FILE_OP_ERROR(dest, "chmod"); g_warning("can't change file mode\n"); } conv = conv_code_converter_new(encoding, NULL); while (fgets(buf, sizeof(buf), src_fp) != NULL) { gchar *outbuf; outbuf = conv_convert(conv, buf); if (outbuf) { fputs(outbuf, dest_fp); g_free(outbuf); } else fputs(buf, dest_fp); } conv_code_converter_destroy(conv); if (ferror(src_fp)) { FILE_OP_ERROR(src, "fgets"); err = TRUE; } fclose(src_fp); if (fclose(dest_fp) == EOF) { FILE_OP_ERROR(dest, "fclose"); err = TRUE; } if (err) { g_unlink(dest); return -1; } return 0; } gint conv_copy_dir(const gchar *src, const gchar *dest, const gchar *encoding) { GDir *dir; const gchar *dir_name; gchar *src_file; gchar *dest_file; if ((dir = g_dir_open(src, 0, NULL)) == NULL) { g_warning("failed to open directory: %s\n", src); return -1; } if (make_dir_hier(dest) < 0) { g_dir_close(dir); return -1; } while ((dir_name = g_dir_read_name(dir)) != NULL) { src_file = g_strconcat(src, G_DIR_SEPARATOR_S, dir_name, NULL); dest_file = g_strconcat(dest, G_DIR_SEPARATOR_S, dir_name, NULL); if (is_file_exist(src_file)) conv_copy_file(src_file, dest_file, encoding); g_free(dest_file); g_free(src_file); } g_dir_close(dir); return 0; } CharSet conv_check_file_encoding(const gchar *file) { FILE *fp; gchar buf[BUFFSIZE]; CharSet enc; const gchar *enc_str; gboolean is_locale = TRUE, is_utf8 = TRUE; g_return_val_if_fail(file != NULL, C_AUTO); enc = conv_get_locale_charset(); enc_str = conv_get_locale_charset_str(); if (enc == C_UTF_8) is_locale = FALSE; if ((fp = g_fopen(file, "rb")) == NULL) { FILE_OP_ERROR(file, "fopen"); return C_AUTO; } while (fgets(buf, sizeof(buf), fp) != NULL) { gchar *str; gint error = 0; if (is_locale) { str = conv_codeset_strdup_full(buf, enc_str, CS_INTERNAL, &error); if (!str || error != 0) is_locale = FALSE; g_free(str); } if (is_utf8 && g_utf8_validate(buf, -1, NULL) == FALSE) { is_utf8 = FALSE; } if (!is_locale && !is_utf8) break; } fclose(fp); if (is_locale) return enc; else if (is_utf8) return C_UTF_8; else return C_AUTO; } gchar *conv_filename_from_utf8(const gchar *utf8_file) { gchar *fs_file; GError *error = NULL; g_return_val_if_fail(utf8_file != NULL, NULL); fs_file = g_filename_from_utf8(utf8_file, -1, NULL, NULL, &error); if (error) { g_warning("failed to convert encoding of file name: %s\n", error->message); g_error_free(error); } if (!fs_file) fs_file = g_strdup(utf8_file); return fs_file; } gchar *conv_filename_to_utf8(const gchar *fs_file) { gchar *utf8_file; GError *error = NULL; g_return_val_if_fail(fs_file != NULL, NULL); utf8_file = g_filename_to_utf8(fs_file, -1, NULL, NULL, &error); if (error) { g_warning("failed to convert encoding of file name: %s\n", error->message); g_error_free(error); } if (!utf8_file) utf8_file = g_strdup(fs_file); return utf8_file; } libsylph-1.1.0/libsylph/compose.c0000644000175000017500000010443310734630561013731 00000000000000 #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "defs.h" #include #include #include #include #include #include #include #include #include #include #include #if HAVE_SYS_WAIT_H # include #endif #include #include #ifdef G_OS_WIN32 # include #endif #include "compose.h" #include "procmsg.h" #include "imap.h" #include "news.h" #include "customheader.h" #include "prefs_common.h" #include "prefs_account.h" #include "account.h" #include "procheader.h" #include "procmime.h" #include "base64.h" #include "quoted-printable.h" #include "codeconv.h" #include "utils.h" #include "socket.h" #include "folder.h" #include "filter.h" #define B64_LINE_SIZE 57 #define B64_BUFFSIZE 77 #define MAX_REFERENCES_LEN 999 static gchar *compose_parse_references (const gchar *ref, const gchar *msgid); static void compose_write_attach (ComposeInfo *compose, FILE *fp, const gchar *charset); static gint compose_write_headers (ComposeInfo *compose, FILE *fp, const gchar *charset, const gchar *body_charset, EncodingType encoding); static gint compose_redirect_write_headers (ComposeInfo *compose, FILE *fp); static void compose_convert_header (ComposeInfo *compose, gchar *dest, gint len, const gchar *src, gint header_len, gboolean addr_field, const gchar *encoding); static gchar *compose_convert_filename (ComposeInfo *compose, const gchar *src, const gchar *param_name, const gchar *encoding); ComposeInfo *compose_info_new(PrefsAccount *account, ComposeMode mode) { ComposeInfo *compose; g_return_val_if_fail(account != NULL, NULL); compose = g_new0(ComposeInfo, 1); compose->mode = mode; compose->flags = 0; compose->account = account; return compose; } void compose_info_free(ComposeInfo *compose) { if (!compose) return; g_free(compose); } ComposeAttachInfo *compose_attach_info_new(const gchar *file, const gchar *content_type, EncodingType encoding, const gchar *name, gsize size) { ComposeAttachInfo *ainfo; ainfo = g_new0(ComposeAttachInfo, 1); ainfo->file = g_strdup(file); ainfo->content_type = g_strdup(content_type); ainfo->encoding = encoding; ainfo->name = g_strdup(name); ainfo->size = size; return ainfo; } void compose_attach_info_free(ComposeAttachInfo *ainfo) { if (!ainfo) return; g_free(ainfo->file); g_free(ainfo->content_type); g_free(ainfo->name); g_free(ainfo); } gint compose_parse_header(ComposeInfo *compose, MsgInfo *msginfo) { static HeaderEntry hentry[] = {{"Reply-To:", NULL, TRUE}, {"Cc:", NULL, TRUE}, {"References:", NULL, FALSE}, {"Bcc:", NULL, TRUE}, {"Newsgroups:", NULL, TRUE}, {"Followup-To:", NULL, TRUE}, {"List-Post:", NULL, FALSE}, {"Content-Type:",NULL, FALSE}, {NULL, NULL, FALSE}}; enum { H_REPLY_TO = 0, H_CC = 1, H_REFERENCES = 2, H_BCC = 3, H_NEWSGROUPS = 4, H_FOLLOWUP_TO = 5, H_LIST_POST = 6, H_CONTENT_TYPE = 7 }; FILE *fp; gchar *charset = NULL; g_return_val_if_fail(msginfo != NULL, -1); g_free(compose->inreplyto); compose->inreplyto = NULL; g_free(compose->references); compose->references = NULL; if ((fp = procmsg_open_message(msginfo)) == NULL) return -1; procheader_get_header_fields(fp, hentry); fclose(fp); if (hentry[H_CONTENT_TYPE].body != NULL) { procmime_scan_content_type_str(hentry[H_CONTENT_TYPE].body, NULL, &charset, NULL, NULL); g_free(hentry[H_CONTENT_TYPE].body); hentry[H_CONTENT_TYPE].body = NULL; } if (hentry[H_REPLY_TO].body != NULL) { if (hentry[H_REPLY_TO].body[0] != '\0') { compose->ref_replyto = conv_unmime_header(hentry[H_REPLY_TO].body, charset); } g_free(hentry[H_REPLY_TO].body); hentry[H_REPLY_TO].body = NULL; } if (hentry[H_CC].body != NULL) { compose->ref_cc = conv_unmime_header(hentry[H_CC].body, charset); g_free(hentry[H_CC].body); hentry[H_CC].body = NULL; } if (hentry[H_REFERENCES].body != NULL) { if (compose->mode == COMPOSE_REEDIT) compose->references = hentry[H_REFERENCES].body; else { compose->references = compose_parse_references (hentry[H_REFERENCES].body, msginfo->msgid); g_free(hentry[H_REFERENCES].body); } hentry[H_REFERENCES].body = NULL; } if (hentry[H_BCC].body != NULL) { if (compose->mode == COMPOSE_REEDIT) compose->ref_bcc = conv_unmime_header(hentry[H_BCC].body, charset); g_free(hentry[H_BCC].body); hentry[H_BCC].body = NULL; } if (hentry[H_NEWSGROUPS].body != NULL) { compose->ref_newsgroups = hentry[H_NEWSGROUPS].body; hentry[H_NEWSGROUPS].body = NULL; } if (hentry[H_FOLLOWUP_TO].body != NULL) { if (hentry[H_FOLLOWUP_TO].body[0] != '\0') { compose->ref_followup_to = conv_unmime_header(hentry[H_FOLLOWUP_TO].body, charset); } g_free(hentry[H_FOLLOWUP_TO].body); hentry[H_FOLLOWUP_TO].body = NULL; } if (hentry[H_LIST_POST].body != NULL) { gchar *to = NULL; extract_address(hentry[H_LIST_POST].body); if (hentry[H_LIST_POST].body[0] != '\0') { scan_mailto_url(hentry[H_LIST_POST].body, &to, NULL, NULL, NULL, NULL); if (to) { g_free(compose->ref_ml_post); compose->ref_ml_post = to; } } g_free(hentry[H_LIST_POST].body); hentry[H_LIST_POST].body = NULL; } g_free(charset); if (compose->mode == COMPOSE_REEDIT) { if (msginfo->inreplyto && *msginfo->inreplyto) compose->inreplyto = g_strdup(msginfo->inreplyto); return 0; } if (msginfo->msgid && *msginfo->msgid) compose->inreplyto = g_strdup(msginfo->msgid); if (!compose->references) { if (msginfo->msgid && *msginfo->msgid) { if (msginfo->inreplyto && *msginfo->inreplyto) compose->references = g_strdup_printf("<%s>\n\t<%s>", msginfo->inreplyto, msginfo->msgid); else compose->references = g_strconcat("<", msginfo->msgid, ">", NULL); } else if (msginfo->inreplyto && *msginfo->inreplyto) { compose->references = g_strconcat("<", msginfo->inreplyto, ">", NULL); } } return 0; } static gchar *compose_parse_references(const gchar *ref, const gchar *msgid) { GSList *ref_id_list, *cur; GString *new_ref; gchar *new_ref_str; ref_id_list = references_list_append(NULL, ref); if (!ref_id_list) return NULL; if (msgid && *msgid) ref_id_list = g_slist_append(ref_id_list, g_strdup(msgid)); for (;;) { gint len = 0; for (cur = ref_id_list; cur != NULL; cur = cur->next) /* "<" + Message-ID + ">" + CR+LF+TAB */ len += strlen((gchar *)cur->data) + 5; if (len > MAX_REFERENCES_LEN) { /* remove second message-ID */ if (ref_id_list && ref_id_list->next && ref_id_list->next->next) { g_free(ref_id_list->next->data); ref_id_list = g_slist_remove (ref_id_list, ref_id_list->next->data); } else { slist_free_strings(ref_id_list); g_slist_free(ref_id_list); return NULL; } } else break; } new_ref = g_string_new(""); for (cur = ref_id_list; cur != NULL; cur = cur->next) { if (new_ref->len > 0) g_string_append(new_ref, "\n\t"); g_string_sprintfa(new_ref, "<%s>", (gchar *)cur->data); } slist_free_strings(ref_id_list); g_slist_free(ref_id_list); new_ref_str = new_ref->str; g_string_free(new_ref, FALSE); return new_ref_str; } gchar *compose_get_signature_str(ComposeInfo *compose) { gchar *sig_path; gchar *sig_body = NULL; gchar *sig_str = NULL; gchar *utf8_sig_str = NULL; g_return_val_if_fail(compose->account != NULL, NULL); if (!compose->account->sig_path) return NULL; if (g_path_is_absolute(compose->account->sig_path) || compose->account->sig_type == SIG_COMMAND) sig_path = g_strdup(compose->account->sig_path); else { #ifdef G_OS_WIN32 sig_path = g_strconcat(get_rc_dir(), #else sig_path = g_strconcat(get_home_dir(), #endif G_DIR_SEPARATOR_S, compose->account->sig_path, NULL); } if (compose->account->sig_type == SIG_FILE) { if (!is_file_or_fifo_exist(sig_path)) { debug_print("can't open signature file: %s\n", sig_path); g_free(sig_path); return NULL; } } if (compose->account->sig_type == SIG_COMMAND) sig_body = get_command_output(sig_path); else { gchar *tmp; tmp = file_read_to_str(sig_path); if (!tmp) return NULL; sig_body = normalize_newlines(tmp); g_free(tmp); } g_free(sig_path); if (prefs_common.sig_sep) { sig_str = g_strconcat(prefs_common.sig_sep, "\n", sig_body, NULL); g_free(sig_body); } else sig_str = sig_body; if (sig_str) { gint error = 0; utf8_sig_str = conv_codeset_strdup_full (sig_str, conv_get_locale_charset_str(), CS_INTERNAL, &error); if (!utf8_sig_str || error != 0) { if (g_utf8_validate(sig_str, -1, NULL) == TRUE) { g_free(utf8_sig_str); utf8_sig_str = sig_str; } else g_free(sig_str); } else g_free(sig_str); } return utf8_sig_str; } gint compose_set_headers(ComposeInfo *compose, const gchar *to, const gchar *cc, const gchar *bcc, const gchar *replyto, const gchar *subject) { g_free(compose->to); compose->to = g_strdup(to); g_free(compose->cc); compose->cc = g_strdup(cc); g_free(compose->bcc); compose->bcc = g_strdup(bcc); g_free(compose->replyto); compose->replyto = g_strdup(replyto); g_free(compose->subject); compose->subject = g_strdup(subject); return 0; } gint compose_set_news_headers(ComposeInfo *compose, const gchar *newsgroups, const gchar *followup_to) { g_free(compose->newsgroups); compose->newsgroups = g_strdup(newsgroups); g_free(compose->followup_to); compose->followup_to = g_strdup(followup_to); return 0; } gint compose_set_body(ComposeInfo *compose, const gchar *body) { g_free(compose->body_text); compose->body_text = canonicalize_str(body); return 0; } gint compose_set_encoding(ComposeInfo *compose, const gchar *header_encoding, const gchar *body_encoding) { g_free(compose->header_encoding); compose->header_encoding = g_strdup(header_encoding); g_free(compose->body_encoding); compose->body_encoding = g_strdup(body_encoding); return 0; } gint compose_set_attachments(ComposeInfo *compose, GList *attach_list) { compose->attach_list = attach_list; return 0; } gint compose_write_to_file(ComposeInfo *compose, const gchar *out_file, GError *error) { FILE *fp; size_t len; const gchar *header_encoding; const gchar *body_encoding; const gchar *src_encoding = CS_INTERNAL; EncodingType encoding; g_return_val_if_fail(compose->body_text != NULL, -1); /* get outgoing charset */ header_encoding = compose->header_encoding; if (!header_encoding) header_encoding = conv_get_outgoing_charset_str(); if (!g_ascii_strcasecmp(header_encoding, CS_US_ASCII)) header_encoding = CS_ISO_8859_1; body_encoding = compose->body_encoding; if (!body_encoding) body_encoding = conv_get_outgoing_charset_str(); if (!g_ascii_strcasecmp(body_encoding, CS_US_ASCII)) body_encoding = CS_ISO_8859_1; if (is_ascii_str(compose->body_text)) { body_encoding = CS_US_ASCII; encoding = ENC_7BIT; } else { gint err = 0; gchar *buf; buf = conv_codeset_strdup_full (compose->body_text, src_encoding, body_encoding, &err); if (!buf || err != 0) { /* FIXME: ask for UTF-8 */ header_encoding = body_encoding = src_encoding; g_free(buf); } else { g_free(compose->body_text); compose->body_text = buf; } if (prefs_common.encoding_method == CTE_BASE64) encoding = ENC_BASE64; else if (prefs_common.encoding_method == CTE_QUOTED_PRINTABLE) encoding = ENC_QUOTED_PRINTABLE; else if (prefs_common.encoding_method == CTE_8BIT) encoding = ENC_8BIT; else encoding = procmime_get_encoding_for_charset (body_encoding); } debug_print("src encoding = %s, header encoding = %s, " "body encoding = %s, transfer encoding = %s\n", src_encoding, header_encoding, body_encoding, procmime_get_encoding_str(encoding)); /* rewrite buffer or check contents here */ if (compose->preprocess_func) { if (compose->preprocess_func(compose, compose->data) < 0) return -1; } if ((fp = g_fopen(out_file, "wb")) == NULL) { FILE_OP_ERROR(out_file, "fopen"); return -1; } /* chmod for security */ if (change_file_mode_rw(fp, out_file) < 0) { FILE_OP_ERROR(out_file, "chmod"); g_warning(_("can't change file mode\n")); } /* write headers */ if (compose_write_headers(compose, fp, header_encoding, body_encoding, encoding) < 0) { g_warning("can't write headers\n"); fclose(fp); g_unlink(out_file); return -1; } /* write first part headers for multipart MIME */ if (compose->attach_list) { if ((compose->flags & COMPOSE_OUT_MIME_PROLOG) != 0) fputs("This is a multi-part message in MIME format.\n", fp); fprintf(fp, "\n--%s\n", compose->boundary); fprintf(fp, "Content-Type: text/plain; charset=%s\n", body_encoding); if ((compose->flags & COMPOSE_OUT_DISPOSITION_INLINE) != 0) fprintf(fp, "Content-Disposition: inline\n"); fprintf(fp, "Content-Transfer-Encoding: %s\n", procmime_get_encoding_str(encoding)); fputc('\n', fp); } /* write body */ len = strlen(compose->body_text); if (encoding == ENC_BASE64) { gchar outbuf[B64_BUFFSIZE]; gint i, l; for (i = 0; i < len; i += B64_LINE_SIZE) { l = MIN(B64_LINE_SIZE, len - i); base64_encode(outbuf, (guchar *)compose->body_text + i, l); fputs(outbuf, fp); fputc('\n', fp); } } else if (encoding == ENC_QUOTED_PRINTABLE) { gchar *outbuf; size_t outlen; outbuf = g_malloc(len * 4); qp_encode_line(outbuf, (guchar *)compose->body_text); outlen = strlen(outbuf); if (fwrite(outbuf, sizeof(gchar), outlen, fp) != outlen) { FILE_OP_ERROR(out_file, "fwrite"); fclose(fp); g_unlink(out_file); g_free(outbuf); return -1; } g_free(outbuf); } else if (fwrite(compose->body_text, sizeof(gchar), len, fp) != len) { FILE_OP_ERROR(out_file, "fwrite"); fclose(fp); g_unlink(out_file); return -1; } if (compose->attach_list) compose_write_attach(compose, fp, header_encoding); if (fclose(fp) == EOF) { FILE_OP_ERROR(out_file, "fclose"); g_unlink(out_file); return -1; } /* rewrite file here */ if (compose->postprocess_func) if (compose->postprocess_func (compose, out_file, compose->data) < 0) return -1; uncanonicalize_file_replace(out_file); return 0; } gint compose_redirect_write_to_file(ComposeInfo *compose, const gchar *file, GError *error) { FILE *fp; FILE *fdest; size_t len; gchar buf[BUFFSIZE]; g_return_val_if_fail(file != NULL, -1); g_return_val_if_fail(compose->account != NULL, -1); g_return_val_if_fail(compose->account->address != NULL, -1); g_return_val_if_fail(compose->mode == COMPOSE_REDIRECT, -1); g_return_val_if_fail(compose->targetinfo != NULL, -1); if ((fp = procmsg_open_message(compose->targetinfo)) == NULL) return -1; if ((fdest = g_fopen(file, "wb")) == NULL) { FILE_OP_ERROR(file, "fopen"); fclose(fp); return -1; } if (change_file_mode_rw(fdest, file) < 0) { FILE_OP_ERROR(file, "chmod"); g_warning(_("can't change file mode\n")); } while (procheader_get_one_field(buf, sizeof(buf), fp, NULL) == 0) { if (g_ascii_strncasecmp(buf, "Return-Path:", strlen("Return-Path:")) == 0 || g_ascii_strncasecmp(buf, "Delivered-To:", strlen("Delivered-To:")) == 0 || g_ascii_strncasecmp(buf, "Received:", strlen("Received:")) == 0 || g_ascii_strncasecmp(buf, "Subject:", strlen("Subject:")) == 0 || g_ascii_strncasecmp(buf, "X-UIDL:", strlen("X-UIDL:")) == 0) continue; if (fputs(buf, fdest) == EOF) goto error; #if 0 if (g_ascii_strncasecmp(buf, "From:", strlen("From:")) == 0) { fputs("\n (by way of ", fdest); if (compose->account->name) { compose_convert_header(compose, buf, sizeof(buf), compose->account->name, strlen(" (by way of "), FALSE, NULL); fprintf(fdest, "%s <%s>", buf, compose->account->address); } else fputs(compose->account->address, fdest); fputs(")", fdest); } #endif if (fputs("\n", fdest) == EOF) goto error; } compose_redirect_write_headers(compose, fdest); while ((len = fread(buf, sizeof(gchar), sizeof(buf), fp)) > 0) { if (fwrite(buf, sizeof(gchar), len, fdest) != len) { FILE_OP_ERROR(file, "fwrite"); goto error; } } fclose(fp); if (fclose(fdest) == EOF) { FILE_OP_ERROR(file, "fclose"); g_unlink(file); return -1; } return 0; error: fclose(fp); fclose(fdest); g_unlink(file); return -1; } gint compose_remove_reedit_target(ComposeInfo *compose) { FolderItem *item; MsgInfo *msginfo = compose->targetinfo; g_return_val_if_fail(compose->mode == COMPOSE_REEDIT, -1); if (!msginfo) return -1; item = msginfo->folder; g_return_val_if_fail(item != NULL, -1); folder_item_scan(item); if (procmsg_msg_exist(msginfo) && (item->stype == F_DRAFT || item->stype == F_QUEUE)) { if (folder_item_remove_msg(item, msginfo) < 0) { g_warning(_("can't remove the old message\n")); return -1; } } return 0; } gint compose_queue(ComposeInfo *compose, const gchar *file) { FolderItem *queue; gchar *tmp; FILE *fp, *src_fp; GSList *cur; gchar buf[BUFFSIZE]; gint num; MsgFlags flag = {0, 0}; debug_print(_("queueing message...\n")); g_return_val_if_fail(compose->to_list != NULL || compose->newsgroup_list != NULL, -1); g_return_val_if_fail(compose->account != NULL, -1); tmp = g_strdup_printf("%s%cqueue.%p", get_tmp_dir(), G_DIR_SEPARATOR, compose); if ((fp = g_fopen(tmp, "wb")) == NULL) { FILE_OP_ERROR(tmp, "fopen"); g_free(tmp); return -1; } if ((src_fp = g_fopen(file, "rb")) == NULL) { FILE_OP_ERROR(file, "fopen"); fclose(fp); g_unlink(tmp); g_free(tmp); return -1; } if (change_file_mode_rw(fp, tmp) < 0) { FILE_OP_ERROR(tmp, "chmod"); g_warning(_("can't change file mode\n")); } /* queueing variables */ fprintf(fp, "AF:\n"); fprintf(fp, "NF:0\n"); fprintf(fp, "PS:10\n"); fprintf(fp, "SRH:1\n"); fprintf(fp, "SFN:\n"); fprintf(fp, "DSR:\n"); if (compose->msgid) fprintf(fp, "MID:<%s>\n", compose->msgid); else fprintf(fp, "MID:\n"); fprintf(fp, "CFG:\n"); fprintf(fp, "PT:0\n"); fprintf(fp, "S:%s\n", compose->account->address); fprintf(fp, "RQ:\n"); if (compose->account->smtp_server) fprintf(fp, "SSV:%s\n", compose->account->smtp_server); else fprintf(fp, "SSV:\n"); if (compose->account->nntp_server) fprintf(fp, "NSV:%s\n", compose->account->nntp_server); else fprintf(fp, "NSV:\n"); fprintf(fp, "SSH:\n"); if (compose->to_list) { fprintf(fp, "R:<%s>", (gchar *)compose->to_list->data); for (cur = compose->to_list->next; cur != NULL; cur = cur->next) fprintf(fp, ",<%s>", (gchar *)cur->data); fprintf(fp, "\n"); } else fprintf(fp, "R:\n"); /* Sylpheed account ID */ fprintf(fp, "AID:%d\n", compose->account->account_id); fprintf(fp, "\n"); while (fgets(buf, sizeof(buf), src_fp) != NULL) { if (fputs(buf, fp) == EOF) { FILE_OP_ERROR(tmp, "fputs"); fclose(fp); fclose(src_fp); g_unlink(tmp); g_free(tmp); return -1; } } fclose(src_fp); if (fclose(fp) == EOF) { FILE_OP_ERROR(tmp, "fclose"); g_unlink(tmp); g_free(tmp); return -1; } queue = account_get_special_folder(compose->account, F_QUEUE); if (!queue) { g_warning(_("can't find queue folder\n")); g_unlink(tmp); g_free(tmp); return -1; } folder_item_scan(queue); if ((num = folder_item_add_msg(queue, tmp, &flag, TRUE)) < 0) { g_warning(_("can't queue the message\n")); g_unlink(tmp); g_free(tmp); return -1; } g_free(tmp); return 0; } static void compose_write_attach(ComposeInfo *compose, FILE *fp, const gchar *header_encoding) { ComposeAttachInfo *ainfo; GList *cur; FILE *attach_fp; gint len; EncodingType encoding; for (cur = compose->attach_list; cur != NULL; cur = cur->next) { ainfo = (ComposeAttachInfo *)cur->data; if ((attach_fp = g_fopen(ainfo->file, "rb")) == NULL) { g_warning("Can't open file %s\n", ainfo->file); continue; } fprintf(fp, "\n--%s\n", compose->boundary); encoding = ainfo->encoding; if (!g_ascii_strncasecmp(ainfo->content_type, "message/", 8)) { fprintf(fp, "Content-Type: %s\n", ainfo->content_type); fprintf(fp, "Content-Disposition: inline\n"); /* message/... shouldn't be encoded */ if (encoding == ENC_QUOTED_PRINTABLE || encoding == ENC_BASE64) encoding = ENC_8BIT; } else { if (prefs_common.mime_fencoding_method == FENC_RFC2231) { gchar *param; param = compose_convert_filename (compose, ainfo->name, "name", header_encoding); fprintf(fp, "Content-Type: %s;\n" "%s\n", ainfo->content_type, param); g_free(param); param = compose_convert_filename (compose, ainfo->name, "filename", header_encoding); fprintf(fp, "Content-Disposition: attachment;\n" "%s\n", param); g_free(param); } else { gchar filename[BUFFSIZE]; compose_convert_header(compose, filename, sizeof(filename), ainfo->name, 12, FALSE, header_encoding); fprintf(fp, "Content-Type: %s;\n" " name=\"%s\"\n", ainfo->content_type, filename); fprintf(fp, "Content-Disposition: attachment;\n" " filename=\"%s\"\n", filename); } if ((compose->flags & COMPOSE_PROTECT_TRAILING_SPACE) != 0) { if (encoding == ENC_7BIT) encoding = ENC_QUOTED_PRINTABLE; else if (encoding == ENC_8BIT) encoding = ENC_BASE64; } } fprintf(fp, "Content-Transfer-Encoding: %s\n\n", procmime_get_encoding_str(encoding)); if (encoding == ENC_BASE64) { gchar inbuf[B64_LINE_SIZE], outbuf[B64_BUFFSIZE]; FILE *tmp_fp = attach_fp; gchar *tmp_file = NULL; ContentType content_type; content_type = procmime_scan_mime_type(ainfo->content_type); if (content_type == MIME_TEXT || content_type == MIME_TEXT_HTML || content_type == MIME_MESSAGE_RFC822) { tmp_file = get_tmp_file(); if (canonicalize_file(ainfo->file, tmp_file) < 0) { g_free(tmp_file); fclose(attach_fp); continue; } if ((tmp_fp = g_fopen(tmp_file, "rb")) == NULL) { FILE_OP_ERROR(tmp_file, "fopen"); g_unlink(tmp_file); g_free(tmp_file); fclose(attach_fp); continue; } } while ((len = fread(inbuf, sizeof(gchar), B64_LINE_SIZE, tmp_fp)) == B64_LINE_SIZE) { base64_encode(outbuf, (guchar *)inbuf, B64_LINE_SIZE); fputs(outbuf, fp); fputc('\n', fp); } if (len > 0 && feof(tmp_fp)) { base64_encode(outbuf, (guchar *)inbuf, len); fputs(outbuf, fp); fputc('\n', fp); } if (tmp_file) { fclose(tmp_fp); g_unlink(tmp_file); g_free(tmp_file); } } else if (encoding == ENC_QUOTED_PRINTABLE) { gchar inbuf[BUFFSIZE], outbuf[BUFFSIZE * 4]; while (fgets(inbuf, sizeof(inbuf), attach_fp) != NULL) { qp_encode_line(outbuf, (guchar *)inbuf); fputs(outbuf, fp); } } else { gchar buf[BUFFSIZE]; while (fgets(buf, sizeof(buf), attach_fp) != NULL) { strcrchomp(buf); fputs(buf, fp); } } fclose(attach_fp); } fprintf(fp, "\n--%s--\n", compose->boundary); } #define QUOTE_IF_REQUIRED(out, str) \ { \ if (*str != '"' && strpbrk(str, ",.[]<>")) { \ gchar *__tmp; \ gint len; \ \ len = strlen(str) + 3; \ Xalloca(__tmp, len, return -1); \ g_snprintf(__tmp, len, "\"%s\"", str); \ out = __tmp; \ } else { \ Xstrdup_a(out, str, return -1); \ } \ } #define PUT_RECIPIENT_HEADER(header, str) \ { \ if (*str != '\0') { \ gchar *dest; \ \ Xstrdup_a(dest, str, return -1); \ g_strstrip(dest); \ if (*dest != '\0') { \ compose->to_list = address_list_append \ (compose->to_list, dest); \ compose_convert_header \ (compose, buf, sizeof(buf), dest, \ strlen(header) + 2, TRUE, header_encoding); \ fprintf(fp, "%s: %s\n", header, buf); \ } \ } \ } #define IS_IN_CUSTOM_HEADER(header) \ (compose->account->add_customhdr && \ custom_header_find(compose->account->customhdr_list, header) != NULL) static gint compose_write_headers(ComposeInfo *compose, FILE *fp, const gchar *header_encoding, const gchar *body_encoding, EncodingType encoding) { gchar buf[BUFFSIZE]; gchar *str; gchar *name; g_return_val_if_fail(fp != NULL, -1); g_return_val_if_fail(header_encoding != NULL, -1); g_return_val_if_fail(compose->account != NULL, -1); g_return_val_if_fail(compose->account->address != NULL, -1); /* Date */ if (compose->account->add_date) { get_rfc822_date(buf, sizeof(buf)); fprintf(fp, "Date: %s\n", buf); } /* From */ if (compose->account->name && *compose->account->name) { compose_convert_header (compose, buf, sizeof(buf), compose->account->name, strlen("From: "), TRUE, header_encoding); QUOTE_IF_REQUIRED(name, buf); fprintf(fp, "From: %s <%s>\n", name, compose->account->address); } else fprintf(fp, "From: %s\n", compose->account->address); slist_free_strings(compose->to_list); g_slist_free(compose->to_list); compose->to_list = NULL; if (compose->to) { PUT_RECIPIENT_HEADER("To", compose->to); } /* Newsgroups */ slist_free_strings(compose->newsgroup_list); g_slist_free(compose->newsgroup_list); compose->newsgroup_list = NULL; if (compose->newsgroups) { Xstrdup_a(str, compose->newsgroups, return -1); g_strstrip(str); remove_space(str); if (*str != '\0') { compose->newsgroup_list = newsgroup_list_append (compose->newsgroup_list, str); compose_convert_header(compose, buf, sizeof(buf), str, strlen("Newsgroups: "), FALSE, header_encoding); fprintf(fp, "Newsgroups: %s\n", buf); } } if (compose->cc) { PUT_RECIPIENT_HEADER("Cc", compose->cc); } if (compose->bcc) { PUT_RECIPIENT_HEADER("Bcc", compose->bcc); } if (!(compose->flags & COMPOSE_DRAFT_MODE) && !compose->to_list && !compose->newsgroup_list) { g_warning("no recepients\n"); return -1; } /* Subject */ if (compose->subject && !IS_IN_CUSTOM_HEADER("Subject")) { Xstrdup_a(str, compose->subject, return -1); g_strstrip(str); if (*str != '\0') { compose_convert_header(compose, buf, sizeof(buf), str, strlen("Subject: "), FALSE, header_encoding); fprintf(fp, "Subject: %s\n", buf); } } /* Message-ID */ if (compose->account->gen_msgid) { compose_generate_msgid(compose, buf, sizeof(buf)); fprintf(fp, "Message-Id: <%s>\n", buf); compose->msgid = g_strdup(buf); } /* In-Reply-To */ if (compose->inreplyto && compose->to_list) fprintf(fp, "In-Reply-To: <%s>\n", compose->inreplyto); /* References */ if (compose->references) fprintf(fp, "References: %s\n", compose->references); /* Followup-To */ if (compose->followup_to && !IS_IN_CUSTOM_HEADER("Followup-To")) { Xstrdup_a(str, compose->followup_to, return -1); g_strstrip(str); remove_space(str); if (*str != '\0') { compose_convert_header(compose, buf, sizeof(buf), str, strlen("Followup-To: "), FALSE, header_encoding); fprintf(fp, "Followup-To: %s\n", buf); } } /* Reply-To */ if (compose->replyto && !IS_IN_CUSTOM_HEADER("Reply-To")) { Xstrdup_a(str, compose->replyto, return -1); g_strstrip(str); if (*str != '\0') { compose_convert_header(compose, buf, sizeof(buf), str, strlen("Reply-To: "), TRUE, header_encoding); fprintf(fp, "Reply-To: %s\n", buf); } } /* Organization */ if (compose->account->organization && !IS_IN_CUSTOM_HEADER("Organization")) { compose_convert_header(compose, buf, sizeof(buf), compose->account->organization, strlen("Organization: "), FALSE, header_encoding); fprintf(fp, "Organization: %s\n", buf); } #if 0 /* Program version and system info */ if (compose->to_list && !IS_IN_CUSTOM_HEADER("X-Mailer")) { fprintf(fp, "X-Mailer: %s (GTK+ %d.%d.%d; %s)\n", prog_version, gtk_major_version, gtk_minor_version, gtk_micro_version, TARGET_ALIAS); } if (compose->newsgroup_list && !IS_IN_CUSTOM_HEADER("X-Newsreader")) { fprintf(fp, "X-Newsreader: %s (GTK+ %d.%d.%d; %s)\n", prog_version, gtk_major_version, gtk_minor_version, gtk_micro_version, TARGET_ALIAS); } #endif /* custom headers */ if (compose->account->add_customhdr) { GSList *cur; for (cur = compose->account->customhdr_list; cur != NULL; cur = cur->next) { CustomHeader *chdr = (CustomHeader *)cur->data; if (g_ascii_strcasecmp(chdr->name, "Date") != 0 && g_ascii_strcasecmp(chdr->name, "From") != 0 && g_ascii_strcasecmp(chdr->name, "To") != 0 && /* g_ascii_strcasecmp(chdr->name, "Sender") != 0 && */ g_ascii_strcasecmp(chdr->name, "Message-Id") != 0 && g_ascii_strcasecmp(chdr->name, "In-Reply-To") != 0 && g_ascii_strcasecmp(chdr->name, "References") != 0 && g_ascii_strcasecmp(chdr->name, "Mime-Version") != 0 && g_ascii_strcasecmp(chdr->name, "Content-Type") != 0 && g_ascii_strcasecmp(chdr->name, "Content-Transfer-Encoding") != 0) { compose_convert_header (compose, buf, sizeof(buf), chdr->value ? chdr->value : "", strlen(chdr->name) + 2, FALSE, header_encoding); fprintf(fp, "%s: %s\n", chdr->name, buf); } } } /* MIME */ fprintf(fp, "Mime-Version: 1.0\n"); if (compose->attach_list) { compose->boundary = generate_mime_boundary(NULL); fprintf(fp, "Content-Type: multipart/mixed;\n" " boundary=\"%s\"\n", compose->boundary); } else { fprintf(fp, "Content-Type: text/plain; charset=%s\n", body_encoding); if ((compose->flags & COMPOSE_OUT_DISPOSITION_INLINE) != 0) fprintf(fp, "Content-Disposition: inline\n"); fprintf(fp, "Content-Transfer-Encoding: %s\n", procmime_get_encoding_str(encoding)); } /* X-Sylpheed header */ if ((compose->flags & COMPOSE_DRAFT_MODE) != 0) fprintf(fp, "X-Sylpheed-Account-Id: %d\n", compose->account->account_id); /* separator between header and body */ fputs("\n", fp); return 0; } static gint compose_redirect_write_headers(ComposeInfo *compose, FILE *fp) { gchar buf[BUFFSIZE]; gchar *str; const gchar *header_encoding = NULL; g_return_val_if_fail(fp != NULL, -1); g_return_val_if_fail(compose->account != NULL, -1); g_return_val_if_fail(compose->account->address != NULL, -1); /* Resent-Date */ get_rfc822_date(buf, sizeof(buf)); fprintf(fp, "Resent-Date: %s\n", buf); /* Resent-From */ if (compose->account->name) { compose_convert_header (compose, buf, sizeof(buf), compose->account->name, strlen("Resent-From: "), TRUE, NULL); fprintf(fp, "Resent-From: %s <%s>\n", buf, compose->account->address); } else fprintf(fp, "Resent-From: %s\n", compose->account->address); slist_free_strings(compose->to_list); g_slist_free(compose->to_list); compose->to_list = NULL; /* Resent-To */ if (compose->to) { PUT_RECIPIENT_HEADER("Resent-To", compose->to); } if (compose->cc) { PUT_RECIPIENT_HEADER("Resent-Cc", compose->cc); } if (compose->bcc) { PUT_RECIPIENT_HEADER("Bcc", compose->bcc); } slist_free_strings(compose->newsgroup_list); g_slist_free(compose->newsgroup_list); compose->newsgroup_list = NULL; /* Newsgroups */ if (compose->newsgroups) { Xstrdup_a(str, compose->newsgroups, return -1); g_strstrip(str); remove_space(str); if (*str != '\0') { compose->newsgroup_list = newsgroup_list_append (compose->newsgroup_list, str); compose_convert_header(compose, buf, sizeof(buf), str, strlen("Newsgroups: "), FALSE, NULL); fprintf(fp, "Newsgroups: %s\n", buf); } } if (!compose->to_list && !compose->newsgroup_list) return -1; /* Subject */ if (compose->subject) { Xstrdup_a(str, compose->subject, return -1); g_strstrip(str); if (*str != '\0') { compose_convert_header(compose, buf, sizeof(buf), str, strlen("Subject: "), FALSE, NULL); fprintf(fp, "Subject: %s\n", buf); } } /* Resent-Message-Id */ if (compose->account->gen_msgid) { compose_generate_msgid(compose, buf, sizeof(buf)); fprintf(fp, "Resent-Message-Id: <%s>\n", buf); compose->msgid = g_strdup(buf); } /* Followup-To */ if (compose->followup_to) { Xstrdup_a(str, compose->followup_to, return -1); g_strstrip(str); remove_space(str); if (*str != '\0') { compose_convert_header(compose, buf, sizeof(buf), str, strlen("Followup-To: "), FALSE, NULL); fprintf(fp, "Followup-To: %s\n", buf); } } /* Resent-Reply-To */ if (compose->replyto) { Xstrdup_a(str, compose->replyto, return -1); g_strstrip(str); if (*str != '\0') { compose_convert_header (compose, buf, sizeof(buf), str, strlen("Resent-Reply-To: "), TRUE, NULL); fprintf(fp, "Resent-Reply-To: %s\n", buf); } } fputs("\n", fp); return 0; } #undef IS_IN_CUSTOM_HEADER static void compose_convert_header(ComposeInfo *compose, gchar *dest, gint len, const gchar *src, gint header_len, gboolean addr_field, const gchar *encoding) { gchar *src_; g_return_if_fail(src != NULL); g_return_if_fail(dest != NULL); if (len < 1) return; if (addr_field) src_ = normalize_address_field(src); else src_ = g_strdup(src); g_strchomp(src_); if (!encoding) encoding = compose->header_encoding; conv_encode_header(dest, len, src_, header_len, addr_field, encoding); g_free(src_); } static gchar *compose_convert_filename(ComposeInfo *compose, const gchar *src, const gchar *param_name, const gchar *encoding) { gchar *str; g_return_val_if_fail(src != NULL, NULL); if (!encoding) encoding = compose->header_encoding; str = conv_encode_filename(src, param_name, encoding); return str; } void compose_generate_msgid(ComposeInfo *compose, gchar *buf, gint len) { struct tm *lt; time_t t; gchar *addr; t = time(NULL); lt = localtime(&t); if (compose->account && compose->account->address && *compose->account->address) { if (strchr(compose->account->address, '@')) addr = g_strdup(compose->account->address); else addr = g_strconcat(compose->account->address, "@", get_domain_name(), NULL); } else addr = g_strconcat(g_get_user_name(), "@", get_domain_name(), NULL); g_snprintf(buf, len, "%04d%02d%02d%02d%02d%02d.%08x.%s", lt->tm_year + 1900, lt->tm_mon + 1, lt->tm_mday, lt->tm_hour, lt->tm_min, lt->tm_sec, g_random_int(), addr); debug_print(_("generated Message-ID: %s\n"), buf); g_free(addr); } libsylph-1.1.0/libsylph/customheader.c0000644000175000017500000001210710457702534014745 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "defs.h" #include #include #include #include #include #include "customheader.h" #include "prefs.h" #include "prefs_account.h" #include "utils.h" void custom_header_read_config(PrefsAccount *ac) { gchar *rcpath; FILE *fp; gchar buf[PREFSBUFSIZE]; CustomHeader *ch; debug_print("Reading custom header configuration...\n"); rcpath = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, CUSTOM_HEADER_RC, NULL); if ((fp = g_fopen(rcpath, "rb")) == NULL) { if (ENOENT != errno) FILE_OP_ERROR(rcpath, "fopen"); g_free(rcpath); ac->customhdr_list = NULL; return; } g_free(rcpath); /* remove all previous headers list */ while (ac->customhdr_list != NULL) { ch = (CustomHeader *)ac->customhdr_list->data; custom_header_free(ch); ac->customhdr_list = g_slist_remove(ac->customhdr_list, ch); } while (fgets(buf, sizeof(buf), fp) != NULL) { ch = custom_header_read_str(buf); if (ch) { if (ch->account_id == ac->account_id) { ac->customhdr_list = g_slist_append(ac->customhdr_list, ch); } else custom_header_free(ch); } } fclose(fp); } void custom_header_write_config(PrefsAccount *ac) { gchar *rcpath; PrefFile *pfile; GSList *cur; gchar buf[PREFSBUFSIZE]; FILE * fp; CustomHeader *ch; GSList *all_hdrs = NULL; debug_print("Writing custom header configuration...\n"); rcpath = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, CUSTOM_HEADER_RC, NULL); if ((fp = g_fopen(rcpath, "rb")) == NULL) { if (ENOENT != errno) FILE_OP_ERROR(rcpath, "fopen"); } else { all_hdrs = NULL; while (fgets(buf, sizeof(buf), fp) != NULL) { ch = custom_header_read_str(buf); if (ch) { if (ch->account_id != ac->account_id) all_hdrs = g_slist_append(all_hdrs, ch); else custom_header_free(ch); } } fclose(fp); } if ((pfile = prefs_file_open(rcpath)) == NULL) { g_warning("failed to write configuration to file\n"); g_free(rcpath); return; } for (cur = all_hdrs; cur != NULL; cur = cur->next) { CustomHeader *hdr = (CustomHeader *)cur->data; gchar *chstr; chstr = custom_header_get_str(hdr); if (fputs(chstr, pfile->fp) == EOF || fputc('\n', pfile->fp) == EOF) { FILE_OP_ERROR(rcpath, "fputs || fputc"); prefs_file_close_revert(pfile); g_free(rcpath); g_free(chstr); return; } g_free(chstr); } for (cur = ac->customhdr_list; cur != NULL; cur = cur->next) { CustomHeader *hdr = (CustomHeader *)cur->data; gchar *chstr; chstr = custom_header_get_str(hdr); if (fputs(chstr, pfile->fp) == EOF || fputc('\n', pfile->fp) == EOF) { FILE_OP_ERROR(rcpath, "fputs || fputc"); prefs_file_close_revert(pfile); g_free(rcpath); g_free(chstr); return; } g_free(chstr); } g_free(rcpath); while (all_hdrs != NULL) { ch = (CustomHeader *)all_hdrs->data; custom_header_free(ch); all_hdrs = g_slist_remove(all_hdrs, ch); } if (prefs_file_close(pfile) < 0) { g_warning("failed to write configuration to file\n"); return; } } gchar *custom_header_get_str(CustomHeader *ch) { return g_strdup_printf("%i:%s: %s", ch->account_id, ch->name, ch->value ? ch->value : ""); } CustomHeader *custom_header_read_str(const gchar *buf) { CustomHeader *ch; gchar *account_id_str; gint id; gchar *name; gchar *value; gchar *tmp; Xstrdup_a(tmp, buf, return NULL); account_id_str = tmp; name = strchr(account_id_str, ':'); if (!name) return NULL; else { gchar *endp; *name++ = '\0'; id = strtol(account_id_str, &endp, 10); if (*endp != '\0') return NULL; } value = strchr(name, ':'); if (!value) return NULL; *value++ = '\0'; g_strstrip(name); g_strstrip(value); ch = g_new0(CustomHeader, 1); ch->account_id = id; ch->name = *name ? g_strdup(name) : NULL; ch->value = *value ? g_strdup(value) : NULL; return ch; } CustomHeader *custom_header_find(GSList *header_list, const gchar *header) { GSList *cur; CustomHeader *chdr; for (cur = header_list; cur != NULL; cur = cur->next) { chdr = (CustomHeader *)cur->data; if (!g_ascii_strcasecmp(chdr->name, header)) return chdr; } return NULL; } void custom_header_free(CustomHeader *ch) { if (!ch) return; g_free(ch->name); g_free(ch->value); g_free(ch); } libsylph-1.1.0/libsylph/displayheader.c0000644000175000017500000000265710457702534015111 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include "displayheader.h" gchar *display_header_prop_get_str(DisplayHeaderProp *dp) { return g_strconcat(dp->hidden ? "-" : "", dp->name, NULL); } DisplayHeaderProp *display_header_prop_read_str(gchar *buf) { DisplayHeaderProp *dp; dp = g_new0(DisplayHeaderProp, 1); dp->hidden = FALSE; if (*buf == '-') { dp->hidden = TRUE; buf++; } if (*buf == '\0') { g_free(dp); return NULL; } dp->name = g_strdup(buf); return dp; } void display_header_prop_free(DisplayHeaderProp *dp) { if (!dp) return; g_free(dp->name); g_free(dp); } libsylph-1.1.0/libsylph/filter.c0000644000175000017500000011311310464313645013545 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2006 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "defs.h" #include #include #include #include #include #include #if USE_ONIGURUMA # include #elif HAVE_REGEX_H # include #endif #include #include "filter.h" #include "procmsg.h" #include "procheader.h" #include "folder.h" #include "utils.h" #include "xml.h" #include "prefs.h" #include "prefs_common.h" #include "prefs_account.h" #include "account.h" typedef enum { FLT_O_CONTAIN = 1 << 0, FLT_O_CASE_SENS = 1 << 1, FLT_O_REGEX = 1 << 2 } FilterOldFlag; static gboolean filter_match_cond (FilterCond *cond, MsgInfo *msginfo, GSList *hlist, FilterInfo *fltinfo); static gboolean filter_match_header_cond(FilterCond *cond, GSList *hlist); static void filter_cond_free (FilterCond *cond); static void filter_action_free (FilterAction *action); gint filter_apply(GSList *fltlist, const gchar *file, FilterInfo *fltinfo) { MsgInfo *msginfo; gint ret = 0; g_return_val_if_fail(file != NULL, -1); g_return_val_if_fail(fltinfo != NULL, -1); if (!fltlist) return 0; msginfo = procheader_parse_file(file, fltinfo->flags, FALSE); if (!msginfo) return 0; msginfo->file_path = g_strdup(file); ret = filter_apply_msginfo(fltlist, msginfo, fltinfo); procmsg_msginfo_free(msginfo); return ret; } gint filter_apply_msginfo(GSList *fltlist, MsgInfo *msginfo, FilterInfo *fltinfo) { gchar *file; GSList *hlist, *cur; FilterRule *rule; gint ret = 0; g_return_val_if_fail(msginfo != NULL, -1); g_return_val_if_fail(fltinfo != NULL, -1); if (!fltlist) return 0; file = procmsg_get_message_file(msginfo); hlist = procheader_get_header_list_from_file(file); if (!hlist) { g_free(file); return 0; } for (cur = fltlist; cur != NULL; cur = cur->next) { rule = (FilterRule *)cur->data; if (!rule->enabled) continue; if (filter_match_rule(rule, msginfo, hlist, fltinfo)) { ret = filter_action_exec(rule, msginfo, file, fltinfo); if (ret < 0) { g_warning("filter_action_exec() returned error\n"); break; } if (fltinfo->drop_done == TRUE || fltinfo->actions[FLT_ACTION_STOP_EVAL] == TRUE) break; } } procheader_header_list_destroy(hlist); g_free(file); return ret; } gint filter_action_exec(FilterRule *rule, MsgInfo *msginfo, const gchar *file, FilterInfo *fltinfo) { FolderItem *dest_folder = NULL; FilterAction *action; GSList *cur; gchar *cmdline; gboolean copy_to_self = FALSE; g_return_val_if_fail(rule != NULL, -1); g_return_val_if_fail(msginfo != NULL, -1); g_return_val_if_fail(file != NULL, -1); g_return_val_if_fail(fltinfo != NULL, -1); for (cur = rule->action_list; cur != NULL; cur = cur->next) { action = (FilterAction *)cur->data; switch (action->type) { case FLT_ACTION_MARK: debug_print("filter_action_exec(): mark\n"); MSG_SET_PERM_FLAGS(fltinfo->flags, MSG_MARKED); fltinfo->actions[action->type] = TRUE; break; case FLT_ACTION_COLOR_LABEL: debug_print("filter_action_exec(): color label: %d\n", action->int_value); MSG_UNSET_PERM_FLAGS(fltinfo->flags, MSG_CLABEL_FLAG_MASK); MSG_SET_COLORLABEL_VALUE(fltinfo->flags, action->int_value); fltinfo->actions[action->type] = TRUE; break; case FLT_ACTION_MARK_READ: debug_print("filter_action_exec(): mark as read\n"); if (msginfo->folder) { if (MSG_IS_NEW(fltinfo->flags)) msginfo->folder->new--; if (MSG_IS_UNREAD(fltinfo->flags)) msginfo->folder->unread--; } MSG_UNSET_PERM_FLAGS(fltinfo->flags, MSG_NEW|MSG_UNREAD); fltinfo->actions[action->type] = TRUE; break; case FLT_ACTION_EXEC: cmdline = g_strconcat(action->str_value, " \"", file, "\"", NULL); execute_command_line(cmdline, FALSE); g_free(cmdline); fltinfo->actions[action->type] = TRUE; break; case FLT_ACTION_EXEC_ASYNC: cmdline = g_strconcat(action->str_value, " \"", file, "\"", NULL); execute_command_line(cmdline, TRUE); g_free(cmdline); fltinfo->actions[action->type] = TRUE; break; default: break; } } for (cur = rule->action_list; cur != NULL; cur = cur->next) { action = (FilterAction *)cur->data; switch (action->type) { case FLT_ACTION_MOVE: case FLT_ACTION_COPY: dest_folder = folder_find_item_from_identifier (action->str_value); if (!dest_folder) { g_warning("dest folder '%s' not found\n", action->str_value); return -1; } debug_print("filter_action_exec(): %s: dest_folder = %s\n", action->type == FLT_ACTION_COPY ? "copy" : "move", action->str_value); if (msginfo->folder) { gint val; /* local filtering */ if (msginfo->folder == dest_folder) copy_to_self = TRUE; else { if (action->type == FLT_ACTION_COPY) { val = folder_item_copy_msg (dest_folder, msginfo); if (val == -1) return -1; } fltinfo->actions[action->type] = TRUE; } } else { if (folder_item_add_msg(dest_folder, file, &fltinfo->flags, FALSE) < 0) return -1; fltinfo->actions[action->type] = TRUE; } fltinfo->dest_list = g_slist_append(fltinfo->dest_list, dest_folder); if (action->type == FLT_ACTION_MOVE) { fltinfo->move_dest = dest_folder; fltinfo->drop_done = TRUE; } break; default: break; } } if (fltinfo->drop_done == TRUE) return 0; for (cur = rule->action_list; cur != NULL; cur = cur->next) { action = (FilterAction *)cur->data; switch (action->type) { case FLT_ACTION_NOT_RECEIVE: debug_print("filter_action_exec(): don't receive\n"); fltinfo->drop_done = TRUE; fltinfo->actions[action->type] = TRUE; return 0; case FLT_ACTION_DELETE: debug_print("filter_action_exec(): delete\n"); if (msginfo->folder) { /* local filtering */ if (copy_to_self == FALSE) fltinfo->actions[action->type] = TRUE; } else fltinfo->actions[action->type] = TRUE; fltinfo->drop_done = TRUE; return 0; case FLT_ACTION_STOP_EVAL: debug_print("filter_action_exec(): stop evaluation\n"); fltinfo->actions[action->type] = TRUE; return 0; default: break; } } return 0; } static gboolean strmatch_regex(const gchar *haystack, const gchar *needle) { #if defined(USE_ONIGURUMA) || defined(HAVE_REGCOMP) gint ret = 0; regex_t preg; #if USE_ONIGURUMA reg_set_encoding(REG_POSIX_ENCODING_UTF8); #endif ret = regcomp(&preg, needle, REG_ICASE|REG_EXTENDED); if (ret != 0) return FALSE; ret = regexec(&preg, haystack, 0, NULL, 0); regfree(&preg); if (ret == 0) return TRUE; else #endif return FALSE; } gboolean filter_match_rule(FilterRule *rule, MsgInfo *msginfo, GSList *hlist, FilterInfo *fltinfo) { FilterCond *cond; GSList *cur; gboolean matched; g_return_val_if_fail(rule->cond_list != NULL, FALSE); switch (rule->timing) { case FLT_TIMING_ANY: break; case FLT_TIMING_ON_RECEIVE: if (msginfo->folder != NULL) return FALSE; break; case FLT_TIMING_MANUAL: if (msginfo->folder == NULL) return FALSE; break; default: break; } if (rule->bool_op == FLT_AND) { for (cur = rule->cond_list; cur != NULL; cur = cur->next) { cond = (FilterCond *)cur->data; matched = filter_match_cond(cond, msginfo, hlist, fltinfo); if (matched == FALSE) return FALSE; } return TRUE; } else if (rule->bool_op == FLT_OR) { for (cur = rule->cond_list; cur != NULL; cur = cur->next) { cond = (FilterCond *)cur->data; matched = filter_match_cond(cond, msginfo, hlist, fltinfo); if (matched == TRUE) return TRUE; } return FALSE; } return FALSE; } static gboolean filter_match_cond(FilterCond *cond, MsgInfo *msginfo, GSList *hlist, FilterInfo *fltinfo) { gboolean matched = FALSE; gchar *file; gchar *cmdline; PrefsAccount *cond_ac; switch (cond->type) { case FLT_COND_HEADER: case FLT_COND_ANY_HEADER: case FLT_COND_TO_OR_CC: return filter_match_header_cond(cond, hlist); case FLT_COND_BODY: matched = procmime_find_string(msginfo, cond->str_value, cond->match_func); break; case FLT_COND_CMD_TEST: file = procmsg_get_message_file(msginfo); cmdline = g_strconcat(cond->str_value, " \"", file, "\"", NULL); matched = (execute_command_line(cmdline, FALSE) == 0); g_free(cmdline); g_free(file); break; case FLT_COND_SIZE_GREATER: matched = (msginfo->size > cond->int_value * 1024); break; case FLT_COND_AGE_GREATER: matched = (time(NULL) - msginfo->date_t > cond->int_value * 24 * 60 * 60); break; case FLT_COND_UNREAD: matched = MSG_IS_UNREAD(msginfo->flags); break; case FLT_COND_MARK: matched = MSG_IS_MARKED(msginfo->flags); break; case FLT_COND_COLOR_LABEL: matched = (MSG_GET_COLORLABEL_VALUE(msginfo->flags) != 0); break; case FLT_COND_MIME: matched = MSG_IS_MIME(msginfo->flags); break; case FLT_COND_ACCOUNT: cond_ac = account_find_from_id(cond->int_value); matched = (cond_ac != NULL && cond_ac == fltinfo->account); break; default: g_warning("filter_match_cond(): unknown condition: %d\n", cond->type); return FALSE; } if (FLT_IS_NOT_MATCH(cond->match_flag)) matched = !matched; return matched; } static gboolean filter_match_header_cond(FilterCond *cond, GSList *hlist) { gboolean matched = FALSE; GSList *cur; Header *header; for (cur = hlist; cur != NULL; cur = cur->next) { header = (Header *)cur->data; switch (cond->type) { case FLT_COND_HEADER: if (!g_ascii_strcasecmp (header->name, cond->header_name)) { if (!cond->str_value || cond->match_func(header->body, cond->str_value)) matched = TRUE; } break; case FLT_COND_ANY_HEADER: if (!cond->str_value || cond->match_func(header->body, cond->str_value)) matched = TRUE; break; case FLT_COND_TO_OR_CC: if (!g_ascii_strcasecmp(header->name, "To") || !g_ascii_strcasecmp(header->name, "Cc")) { if (!cond->str_value || cond->match_func(header->body, cond->str_value)) matched = TRUE; } break; default: break; } if (matched == TRUE) break; } if (FLT_IS_NOT_MATCH(cond->match_flag)) matched = !matched; return matched; } gboolean filter_rule_requires_full_headers(FilterRule *rule) { GSList *cur; for (cur = rule->cond_list; cur != NULL; cur = cur->next) { FilterCond *cond = (FilterCond *)cur->data; const gchar *name = cond->header_name; if (cond->type == FLT_COND_HEADER && name) { if (g_ascii_strcasecmp(name, "Date") != 0 && g_ascii_strcasecmp(name, "From") != 0 && g_ascii_strcasecmp(name, "To") != 0 && g_ascii_strcasecmp(name, "Newsgroups") != 0 && g_ascii_strcasecmp(name, "Subject") != 0) return TRUE; } else if (cond->type == FLT_COND_ANY_HEADER || cond->type == FLT_COND_TO_OR_CC) return TRUE; } return FALSE; } #define RETURN_IF_TAG_NOT_MATCH(tag_name) \ if (strcmp2(xmlnode->tag->tag, tag_name) != 0) { \ g_warning("tag name != \"" tag_name "\"\n"); \ filter_cond_list_free(cond_list); \ filter_action_list_free(cond_list); \ return FALSE; \ } \ #define STR_SWITCH(sw) { const gchar *sw_str = sw; #define STR_CASE_BEGIN(str) if (!strcmp(sw_str, str)) { #define STR_CASE(str) } else if (!strcmp(sw_str, str)) { #define STR_CASE_END } } static gboolean filter_xml_node_func(GNode *node, gpointer data) { XMLNode *xmlnode; GList *list; const gchar *name = NULL; FilterTiming timing = FLT_TIMING_ANY; gboolean enabled = TRUE; FilterRule *rule; FilterBoolOp bool_op = FLT_OR; const gchar *target_folder = NULL; gboolean recursive = FALSE; GSList *cond_list = NULL; GSList *action_list = NULL; GNode *child, *cond_child, *action_child; GSList **fltlist = (GSList **)data; if (g_node_depth(node) != 2) return FALSE; g_return_val_if_fail(node->data != NULL, FALSE); xmlnode = node->data; RETURN_IF_TAG_NOT_MATCH("rule"); for (list = xmlnode->tag->attr; list != NULL; list = list->next) { XMLAttr *attr = (XMLAttr *)list->data; if (!attr || !attr->name || !attr->value) continue; if (!strcmp(attr->name, "name")) name = attr->value; else if (!strcmp(attr->name, "timing")) { if (!strcmp(attr->value, "any")) timing = FLT_TIMING_ANY; else if (!strcmp(attr->value, "receive")) timing = FLT_TIMING_ON_RECEIVE; else if (!strcmp(attr->value, "manual")) timing = FLT_TIMING_MANUAL; } else if (!strcmp(attr->name, "enabled")) { if (!strcmp(attr->value, "true")) enabled = TRUE; else enabled = FALSE; } } /* condition list */ child = node->children; if (!child) { g_warning(" must have children\n"); return FALSE; } xmlnode = child->data; RETURN_IF_TAG_NOT_MATCH("condition-list"); for (list = xmlnode->tag->attr; list != NULL; list = list->next) { XMLAttr *attr = (XMLAttr *)list->data; if (attr && attr->name && attr->value && !strcmp(attr->name, "bool")) { if (!strcmp(attr->value, "or")) bool_op = FLT_OR; else bool_op = FLT_AND; } } for (cond_child = child->children; cond_child != NULL; cond_child = cond_child->next) { const gchar *type = NULL; const gchar *name = NULL; const gchar *value = NULL; gboolean case_sens = FALSE; FilterCond *cond; FilterCondType cond_type = FLT_COND_HEADER; FilterMatchType match_type = FLT_CONTAIN; FilterMatchFlag match_flag = 0; xmlnode = cond_child->data; if (!xmlnode || !xmlnode->tag || !xmlnode->tag->tag) continue; for (list = xmlnode->tag->attr; list != NULL; list = list->next) { XMLAttr *attr = (XMLAttr *)list->data; if (!attr || !attr->name || !attr->value) continue; STR_SWITCH(attr->name) STR_CASE_BEGIN("type") type = attr->value; STR_CASE("name") name = attr->value; STR_CASE("case") case_sens = TRUE; STR_CASE("recursive") if (!strcmp(attr->value, "true")) recursive = TRUE; else recursive = FALSE; STR_CASE_END } if (type) { filter_rule_match_type_str_to_enum (type, &match_type, &match_flag); } if (case_sens) match_flag |= FLT_CASE_SENS; value = xmlnode->element; STR_SWITCH(xmlnode->tag->tag) STR_CASE_BEGIN("match-header") cond_type = FLT_COND_HEADER; STR_CASE("match-any-header") cond_type = FLT_COND_ANY_HEADER; STR_CASE("match-to-or-cc") cond_type = FLT_COND_TO_OR_CC; STR_CASE("match-body-text") cond_type = FLT_COND_BODY; STR_CASE("command-test") cond_type = FLT_COND_CMD_TEST; STR_CASE("size") cond_type = FLT_COND_SIZE_GREATER; STR_CASE("age") cond_type = FLT_COND_AGE_GREATER; STR_CASE("unread") cond_type = FLT_COND_UNREAD; STR_CASE("mark") cond_type = FLT_COND_MARK; STR_CASE("color-label") cond_type = FLT_COND_COLOR_LABEL; STR_CASE("mime") cond_type = FLT_COND_MIME; STR_CASE("account-id") cond_type = FLT_COND_ACCOUNT; STR_CASE("target-folder") target_folder = value; continue; STR_CASE_END cond = filter_cond_new(cond_type, match_type, match_flag, name, value); cond_list = g_slist_append(cond_list, cond); } /* action list */ child = child->next; if (!child) { g_warning(" must have multiple children\n"); filter_cond_list_free(cond_list); return FALSE; } xmlnode = child->data; RETURN_IF_TAG_NOT_MATCH("action-list"); for (action_child = child->children; action_child != NULL; action_child = action_child->next) { FilterAction *action; FilterActionType action_type = FLT_ACTION_NONE; xmlnode = action_child->data; if (!xmlnode || !xmlnode->tag || !xmlnode->tag->tag) continue; STR_SWITCH(xmlnode->tag->tag) STR_CASE_BEGIN("move") action_type = FLT_ACTION_MOVE; STR_CASE("copy") action_type = FLT_ACTION_COPY; STR_CASE("not-receive") action_type = FLT_ACTION_NOT_RECEIVE; STR_CASE("delete") action_type = FLT_ACTION_DELETE; STR_CASE("exec") action_type = FLT_ACTION_EXEC; STR_CASE("exec-async") action_type = FLT_ACTION_EXEC_ASYNC; STR_CASE("mark") action_type = FLT_ACTION_MARK; STR_CASE("color-label") action_type = FLT_ACTION_COLOR_LABEL; STR_CASE("mark-as-read") action_type = FLT_ACTION_MARK_READ; STR_CASE("forward") action_type = FLT_ACTION_FORWARD; STR_CASE("forward-as-attachment") action_type = FLT_ACTION_FORWARD_AS_ATTACHMENT; STR_CASE("redirect") action_type = FLT_ACTION_REDIRECT; STR_CASE("stop-eval") action_type = FLT_ACTION_STOP_EVAL; STR_CASE_END action = filter_action_new(action_type, xmlnode->element); action_list = g_slist_append(action_list, action); } if (name && cond_list) { rule = filter_rule_new(name, bool_op, cond_list, action_list); rule->timing = timing; rule->enabled = enabled; if (target_folder) { rule->target_folder = g_strdup(target_folder); rule->recursive = recursive; } *fltlist = g_slist_prepend(*fltlist, rule); } return FALSE; } #undef RETURN_IF_TAG_NOT_MATCH #undef STR_SWITCH #undef STR_CASE_BEGIN #undef STR_CASE #undef STR_CASE_END GSList *filter_xml_node_to_filter_list(GNode *node) { GSList *fltlist = NULL; g_return_val_if_fail(node != NULL, NULL); g_node_traverse(node, G_PRE_ORDER, G_TRAVERSE_ALL, 2, filter_xml_node_func, &fltlist); fltlist = g_slist_reverse(fltlist); return fltlist; } GSList *filter_read_file(const gchar *file) { GNode *node; GSList *list; g_return_val_if_fail(file != NULL, NULL); debug_print("Reading %s\n", file); if (!is_file_exist(file)) return NULL; node = xml_parse_file(file); if (!node) { g_warning("Can't parse %s\n", file); return NULL; } list = filter_xml_node_to_filter_list(node); xml_free_tree(node); return list; } void filter_read_config(void) { gchar *rcpath; debug_print("Reading filter configuration...\n"); /* remove all previous filter list */ while (prefs_common.fltlist != NULL) { FilterRule *rule = (FilterRule *)prefs_common.fltlist->data; filter_rule_free(rule); prefs_common.fltlist = g_slist_remove(prefs_common.fltlist, rule); } rcpath = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, FILTER_LIST, NULL); prefs_common.fltlist = filter_read_file(rcpath); g_free(rcpath); } #define NODE_NEW(tag, text) \ node = xml_node_new(xml_tag_new(tag), text) #define ADD_ATTR(name, value) \ xml_tag_add_attr(node->tag, xml_attr_new(name, value)) void filter_write_file(GSList *list, const gchar *file) { PrefFile *pfile; GSList *cur; g_return_if_fail(file != NULL); if ((pfile = prefs_file_open(file)) == NULL) { g_warning("failed to write filter configuration to file: %s\n", file); return; } xml_file_put_xml_decl(pfile->fp); fputs("\n\n", pfile->fp); for (cur = list; cur != NULL; cur = cur->next) { FilterRule *rule = (FilterRule *)cur->data; GSList *cur_cond; GSList *cur_action; gchar match_type[16]; fputs(" fp); xml_file_put_escape_str(pfile->fp, rule->name); fprintf(pfile->fp, "\" timing=\"%s\"", rule->timing == FLT_TIMING_ON_RECEIVE ? "receive" : rule->timing == FLT_TIMING_MANUAL ? "manual" : "any"); fprintf(pfile->fp, " enabled=\"%s\">\n", rule->enabled ? "true" : "false"); fprintf(pfile->fp, " \n", rule->bool_op == FLT_OR ? "or" : "and"); for (cur_cond = rule->cond_list; cur_cond != NULL; cur_cond = cur_cond->next) { FilterCond *cond = (FilterCond *)cur_cond->data; XMLNode *node = NULL; switch (cond->match_type) { case FLT_CONTAIN: strcpy(match_type, FLT_IS_NOT_MATCH(cond->match_flag) ? "not-contain" : "contains"); break; case FLT_EQUAL: strcpy(match_type, FLT_IS_NOT_MATCH(cond->match_flag) ? "is-not" : "is"); break; case FLT_REGEX: strcpy(match_type, FLT_IS_NOT_MATCH(cond->match_flag) ? "not-regex" : "regex"); break; default: match_type[0] = '\0'; break; } switch (cond->type) { case FLT_COND_HEADER: NODE_NEW("match-header", cond->str_value); ADD_ATTR("type", match_type); ADD_ATTR("name", cond->header_name); if (FLT_IS_CASE_SENS(cond->match_flag)) ADD_ATTR("case", "true"); break; case FLT_COND_ANY_HEADER: NODE_NEW("match-any-header", cond->str_value); ADD_ATTR("type", match_type); if (FLT_IS_CASE_SENS(cond->match_flag)) ADD_ATTR("case", "true"); break; case FLT_COND_TO_OR_CC: NODE_NEW("match-to-or-cc", cond->str_value); ADD_ATTR("type", match_type); if (FLT_IS_CASE_SENS(cond->match_flag)) ADD_ATTR("case", "true"); break; case FLT_COND_BODY: NODE_NEW("match-body-text", cond->str_value); ADD_ATTR("type", match_type); if (FLT_IS_CASE_SENS(cond->match_flag)) ADD_ATTR("case", "true"); break; case FLT_COND_CMD_TEST: NODE_NEW("command-test", cond->str_value); break; case FLT_COND_SIZE_GREATER: NODE_NEW("size", itos(cond->int_value)); ADD_ATTR("type", FLT_IS_NOT_MATCH(cond->match_flag) ? "lt" : "gt"); break; case FLT_COND_AGE_GREATER: NODE_NEW("age", itos(cond->int_value)); ADD_ATTR("type", FLT_IS_NOT_MATCH(cond->match_flag) ? "lt" : "gt"); break; case FLT_COND_UNREAD: NODE_NEW("unread", NULL); ADD_ATTR("type", FLT_IS_NOT_MATCH(cond->match_flag) ? "is-not" : "is"); break; case FLT_COND_MARK: NODE_NEW("mark", NULL); ADD_ATTR("type", FLT_IS_NOT_MATCH(cond->match_flag) ? "is-not" : "is"); break; case FLT_COND_COLOR_LABEL: NODE_NEW("color-label", NULL); ADD_ATTR("type", FLT_IS_NOT_MATCH(cond->match_flag) ? "is-not" : "is"); break; case FLT_COND_MIME: NODE_NEW("mime", NULL); ADD_ATTR("type", FLT_IS_NOT_MATCH(cond->match_flag) ? "is-not" : "is"); break; case FLT_COND_ACCOUNT: NODE_NEW("account-id", itos(cond->int_value)); break; default: break; } if (node) { fputs(" ", pfile->fp); xml_file_put_node(pfile->fp, node); xml_free_node(node); } } if (rule->target_folder) { XMLNode *node; NODE_NEW("target-folder", rule->target_folder); ADD_ATTR("recursive", rule->recursive ? "true" : "false"); fputs(" ", pfile->fp); xml_file_put_node(pfile->fp, node); xml_free_node(node); } fputs(" \n", pfile->fp); fputs(" \n", pfile->fp); for (cur_action = rule->action_list; cur_action != NULL; cur_action = cur_action->next) { FilterAction *action = (FilterAction *)cur_action->data; XMLNode *node = NULL; switch (action->type) { case FLT_ACTION_MOVE: NODE_NEW("move", action->str_value); break; case FLT_ACTION_COPY: NODE_NEW("copy", action->str_value); break; case FLT_ACTION_NOT_RECEIVE: NODE_NEW("not-receive", NULL); break; case FLT_ACTION_DELETE: NODE_NEW("delete", NULL); break; case FLT_ACTION_EXEC: NODE_NEW("exec", action->str_value); break; case FLT_ACTION_EXEC_ASYNC: NODE_NEW("exec-async", action->str_value); break; case FLT_ACTION_MARK: NODE_NEW("mark", NULL); break; case FLT_ACTION_COLOR_LABEL: NODE_NEW("color-label", action->str_value); break; case FLT_ACTION_MARK_READ: NODE_NEW("mark-as-read", NULL); break; case FLT_ACTION_FORWARD: NODE_NEW("forward", action->str_value); break; case FLT_ACTION_FORWARD_AS_ATTACHMENT: NODE_NEW("forward-as-attachment", action->str_value); break; case FLT_ACTION_REDIRECT: NODE_NEW("redirect", action->str_value); break; case FLT_ACTION_STOP_EVAL: NODE_NEW("stop-eval", NULL); break; default: break; } if (node) { fputs(" ", pfile->fp); xml_file_put_node(pfile->fp, node); xml_free_node(node); } } fputs(" \n", pfile->fp); fputs(" \n", pfile->fp); } fputs("\n", pfile->fp); if (prefs_file_close(pfile) < 0) { g_warning("failed to write filter configuration to file: %s\n", file); return; } } void filter_write_config(void) { gchar *rcpath; debug_print("Writing filter configuration...\n"); rcpath = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, FILTER_LIST, NULL); filter_write_file(prefs_common.fltlist, rcpath); g_free(rcpath); } #undef NODE_NEW #undef ADD_ATTR gchar *filter_get_str(FilterRule *rule) { gchar *str; FilterCond *cond1, *cond2; FilterAction *action = NULL; GSList *cur; gint flag1 = 0, flag2 = 0; cond1 = (FilterCond *)rule->cond_list->data; if (rule->cond_list->next) cond2 = (FilterCond *)rule->cond_list->next->data; else cond2 = NULL; /* new -> old flag conversion */ switch (cond1->match_type) { case FLT_CONTAIN: case FLT_EQUAL: flag1 = FLT_IS_NOT_MATCH(cond1->match_flag) ? 0 : FLT_O_CONTAIN; if (FLT_IS_CASE_SENS(cond1->match_flag)) flag1 |= FLT_O_CASE_SENS; break; case FLT_REGEX: flag1 = FLT_O_REGEX; break; default: break; } if (cond2) { switch (cond2->match_type) { case FLT_CONTAIN: case FLT_EQUAL: flag2 = FLT_IS_NOT_MATCH(cond2->match_flag) ? 0 : FLT_O_CONTAIN; if (FLT_IS_CASE_SENS(cond2->match_flag)) flag2 |= FLT_O_CASE_SENS; break; case FLT_REGEX: flag2 = FLT_O_REGEX; break; default: break; } } else flag2 = FLT_O_CONTAIN; for (cur = rule->action_list; cur != NULL; cur = cur->next) { action = (FilterAction *)cur->data; if (action->type == FLT_ACTION_MOVE || action->type == FLT_ACTION_NOT_RECEIVE || action->type == FLT_ACTION_DELETE) break; } str = g_strdup_printf ("%s:%s:%c:%s:%s:%s:%d:%d:%c", cond1->header_name, cond1->str_value ? cond1->str_value : "", (cond2 && cond2->header_name) ? (rule->bool_op == FLT_AND ? '&' : '|') : ' ', (cond2 && cond2->header_name) ? cond2->header_name : "", (cond2 && cond2->str_value) ? cond2->str_value : "", (action && action->str_value) ? action->str_value : "", flag1, flag2, (action && action->type == FLT_ACTION_MOVE) ? 'm' : (action && action->type == FLT_ACTION_NOT_RECEIVE) ? 'n' : (action && action->type == FLT_ACTION_DELETE) ? 'd' : ' '); return str; } #define PARSE_ONE_PARAM(p, srcp) \ { \ p = strchr(srcp, '\t'); \ if (!p) return NULL; \ else \ *p++ = '\0'; \ } FilterRule *filter_read_str(const gchar *str) { FilterRule *rule; FilterBoolOp bool_op; gint flag; FilterCond *cond; FilterMatchType match_type; FilterMatchFlag match_flag; FilterAction *action; GSList *cond_list = NULL; GSList *action_list = NULL; gchar *tmp; gchar *rule_name; gchar *name1, *body1, *op, *name2, *body2, *dest; gchar *flag1 = NULL, *flag2 = NULL, *action1 = NULL; Xstrdup_a(tmp, str, return NULL); name1 = tmp; PARSE_ONE_PARAM(body1, name1); PARSE_ONE_PARAM(op, body1); PARSE_ONE_PARAM(name2, op); PARSE_ONE_PARAM(body2, name2); PARSE_ONE_PARAM(dest, body2); if (strchr(dest, '\t')) { gchar *p; PARSE_ONE_PARAM(flag1, dest); PARSE_ONE_PARAM(flag2, flag1); PARSE_ONE_PARAM(action1, flag2); if ((p = strchr(action1, '\t'))) *p = '\0'; } bool_op = (*op == '&') ? FLT_AND : FLT_OR; if (*name1) { if (flag1) flag = (FilterOldFlag)strtoul(flag1, NULL, 10); else flag = FLT_O_CONTAIN; match_type = FLT_CONTAIN; match_flag = 0; if (flag & FLT_O_REGEX) match_type = FLT_REGEX; else if (!(flag & FLT_O_CONTAIN)) match_flag = FLT_NOT_MATCH; if (flag & FLT_O_CASE_SENS) match_flag |= FLT_CASE_SENS; cond = filter_cond_new(FLT_COND_HEADER, match_type, match_flag, name1, body1); cond_list = g_slist_append(cond_list, cond); } if (*name2) { if (flag2) flag = (FilterOldFlag)strtoul(flag2, NULL, 10); else flag = FLT_O_CONTAIN; match_type = FLT_CONTAIN; match_flag = 0; if (flag & FLT_O_REGEX) match_type = FLT_REGEX; else if (!(flag & FLT_O_CONTAIN)) match_flag = FLT_NOT_MATCH; if (flag & FLT_O_CASE_SENS) match_flag |= FLT_CASE_SENS; cond = filter_cond_new(FLT_COND_HEADER, match_type, match_flag, name2, body2); cond_list = g_slist_append(cond_list, cond); } action = filter_action_new(FLT_ACTION_MOVE, *dest ? g_strdup(dest) : NULL); if (action1) { switch (*action1) { case 'm': action->type = FLT_ACTION_MOVE; break; case 'n': action->type = FLT_ACTION_NOT_RECEIVE; break; case 'd': action->type = FLT_ACTION_DELETE; break; default: g_warning("Invalid action: `%c'\n", *action1); } } action_list = g_slist_append(action_list, action); Xstrdup_a(rule_name, str, return NULL); subst_char(rule_name, '\t', ':'); rule = filter_rule_new(rule_name, bool_op, cond_list, action_list); return rule; } FilterRule *filter_rule_new(const gchar *name, FilterBoolOp bool_op, GSList *cond_list, GSList *action_list) { FilterRule *rule; rule = g_new0(FilterRule, 1); rule->name = g_strdup(name); rule->bool_op = bool_op; rule->cond_list = cond_list; rule->action_list = action_list; rule->timing = FLT_TIMING_ANY; rule->enabled = TRUE; return rule; } FilterCond *filter_cond_new(FilterCondType type, FilterMatchType match_type, FilterMatchFlag match_flag, const gchar *header, const gchar *value) { FilterCond *cond; cond = g_new0(FilterCond, 1); cond->type = type; cond->match_type = match_type; cond->match_flag = match_flag; if (type == FLT_COND_HEADER) cond->header_name = (header && *header) ? g_strdup(header) : NULL; else cond->header_name = NULL; cond->str_value = (value && *value) ? g_strdup(value) : NULL; if (type == FLT_COND_SIZE_GREATER || type == FLT_COND_AGE_GREATER) cond->int_value = atoi(value); else cond->int_value = 0; if (match_type == FLT_REGEX) cond->match_func = strmatch_regex; else if (match_type == FLT_EQUAL) { if (FLT_IS_CASE_SENS(match_flag)) cond->match_func = str_find_equal; else cond->match_func = str_case_find_equal; } else { if (FLT_IS_CASE_SENS(match_flag)) cond->match_func = str_find; else cond->match_func = str_case_find; } return cond; } FilterAction *filter_action_new(FilterActionType type, const gchar *str) { FilterAction *action; action = g_new0(FilterAction, 1); action->type = type; action->str_value = (str && *str) ? g_strdup(str) : NULL; if (type == FLT_ACTION_COLOR_LABEL && str) action->int_value = atoi(str); else action->int_value = 0; return action; } FilterInfo *filter_info_new(void) { FilterInfo *fltinfo; fltinfo = g_new0(FilterInfo, 1); fltinfo->dest_list = NULL; fltinfo->move_dest = NULL; fltinfo->drop_done = FALSE; return fltinfo; } void filter_rule_rename_dest_path(FilterRule *rule, const gchar *old_path, const gchar *new_path) { FilterAction *action; GSList *cur; gchar *base; gchar *dest_path; gint oldpathlen; oldpathlen = strlen(old_path); for (cur = rule->action_list; cur != NULL; cur = cur->next) { action = (FilterAction *)cur->data; if (action->type != FLT_ACTION_MOVE && action->type != FLT_ACTION_COPY) continue; if (action->str_value && !strncmp(old_path, action->str_value, oldpathlen)) { base = action->str_value + oldpathlen; if (*base != G_DIR_SEPARATOR && *base != '\0') continue; while (*base == G_DIR_SEPARATOR) base++; if (*base == '\0') dest_path = g_strdup(new_path); else dest_path = g_strconcat(new_path, G_DIR_SEPARATOR_S, base, NULL); debug_print("filter_rule_rename_dest_path(): " "renaming %s -> %s\n", action->str_value, dest_path); g_free(action->str_value); action->str_value = dest_path; } } } void filter_rule_delete_action_by_dest_path(FilterRule *rule, const gchar *path) { FilterAction *action; GSList *cur; GSList *next; gint pathlen; pathlen = strlen(path); for (cur = rule->action_list; cur != NULL; cur = next) { action = (FilterAction *)cur->data; next = cur->next; if (action->type != FLT_ACTION_MOVE && action->type != FLT_ACTION_COPY) continue; if (action->str_value && !strncmp(path, action->str_value, pathlen) && (action->str_value[pathlen] == G_DIR_SEPARATOR || action->str_value[pathlen] == '\0')) { debug_print("filter_rule_delete_action_by_dest_path(): " "deleting %s\n", action->str_value); rule->action_list = g_slist_remove (rule->action_list, action); filter_action_free(action); } } } void filter_list_rename_path(const gchar *old_path, const gchar *new_path) { GSList *cur; g_return_if_fail(old_path != NULL); g_return_if_fail(new_path != NULL); for (cur = prefs_common.fltlist; cur != NULL; cur = cur->next) { FilterRule *rule = (FilterRule *)cur->data; filter_rule_rename_dest_path(rule, old_path, new_path); } filter_write_config(); } void filter_list_delete_path(const gchar *path) { GSList *cur; GSList *next; g_return_if_fail(path != NULL); for (cur = prefs_common.fltlist; cur != NULL; cur = next) { FilterRule *rule = (FilterRule *)cur->data; next = cur->next; filter_rule_delete_action_by_dest_path(rule, path); if (!rule->action_list) { prefs_common.fltlist = g_slist_remove(prefs_common.fltlist, rule); filter_rule_free(rule); } } filter_write_config(); } void filter_rule_match_type_str_to_enum(const gchar *match_type, FilterMatchType *type, FilterMatchFlag *flag) { g_return_if_fail(match_type != NULL); *type = FLT_CONTAIN; *flag = 0; if (!strcmp(match_type, "contains")) { *type = FLT_CONTAIN; } else if (!strcmp(match_type, "not-contain")) { *type = FLT_CONTAIN; *flag = FLT_NOT_MATCH; } else if (!strcmp(match_type, "is")) { *type = FLT_EQUAL; } else if (!strcmp(match_type, "is-not")) { *type = FLT_EQUAL; *flag = FLT_NOT_MATCH; } else if (!strcmp(match_type, "regex")) { *type = FLT_REGEX; } else if (!strcmp(match_type, "not-regex")) { *type = FLT_REGEX; *flag = FLT_NOT_MATCH; } else if (!strcmp(match_type, "gt")) { } else if (!strcmp(match_type, "lt")) { *flag = FLT_NOT_MATCH; } } void filter_get_keyword_from_msg(MsgInfo *msginfo, gchar **header, gchar **key, FilterCreateType type) { static HeaderEntry hentry[] = {{"List-Id:", NULL, TRUE}, {"X-ML-Name:", NULL, TRUE}, {"X-List:", NULL, TRUE}, {"X-Mailing-list:", NULL, TRUE}, {"X-Sequence:", NULL, TRUE}, {NULL, NULL, FALSE}}; enum { H_LIST_ID = 0, H_X_ML_NAME = 1, H_X_LIST = 2, H_X_MAILING_LIST = 3, H_X_SEQUENCE = 4 }; FILE *fp; g_return_if_fail(msginfo != NULL); g_return_if_fail(header != NULL); g_return_if_fail(key != NULL); *header = NULL; *key = NULL; switch (type) { case FLT_BY_NONE: return; case FLT_BY_AUTO: if ((fp = procmsg_open_message(msginfo)) == NULL) return; procheader_get_header_fields(fp, hentry); fclose(fp); #define SET_FILTER_KEY(hstr, idx) \ { \ *header = g_strdup(hstr); \ *key = hentry[idx].body; \ hentry[idx].body = NULL; \ } if (hentry[H_LIST_ID].body != NULL) { SET_FILTER_KEY("List-Id", H_LIST_ID); extract_list_id_str(*key); } else if (hentry[H_X_ML_NAME].body != NULL) { SET_FILTER_KEY("X-ML-Name", H_X_ML_NAME); } else if (hentry[H_X_LIST].body != NULL) { SET_FILTER_KEY("X-List", H_X_LIST); } else if (hentry[H_X_MAILING_LIST].body != NULL) { SET_FILTER_KEY("X-Mailing-list", H_X_MAILING_LIST); } else if (hentry[H_X_SEQUENCE].body != NULL) { gchar *p; SET_FILTER_KEY("X-Sequence", H_X_SEQUENCE); p = *key; while (*p != '\0') { while (*p != '\0' && !g_ascii_isspace(*p)) p++; while (g_ascii_isspace(*p)) p++; if (g_ascii_isdigit(*p)) { *p = '\0'; break; } } g_strstrip(*key); } else if (msginfo->subject) { *header = g_strdup("Subject"); *key = g_strdup(msginfo->subject); } #undef SET_FILTER_KEY g_free(hentry[H_LIST_ID].body); hentry[H_LIST_ID].body = NULL; g_free(hentry[H_X_ML_NAME].body); hentry[H_X_ML_NAME].body = NULL; g_free(hentry[H_X_LIST].body); hentry[H_X_LIST].body = NULL; g_free(hentry[H_X_MAILING_LIST].body); hentry[H_X_MAILING_LIST].body = NULL; break; case FLT_BY_FROM: *header = g_strdup("From"); *key = g_strdup(msginfo->from); break; case FLT_BY_TO: *header = g_strdup("To"); *key = g_strdup(msginfo->to); break; case FLT_BY_SUBJECT: *header = g_strdup("Subject"); *key = g_strdup(msginfo->subject); break; default: break; } } void filter_rule_list_free(GSList *fltlist) { GSList *cur; for (cur = fltlist; cur != NULL; cur = cur->next) filter_rule_free((FilterRule *)cur->data); g_slist_free(fltlist); } void filter_rule_free(FilterRule *rule) { if (!rule) return; g_free(rule->name); g_free(rule->target_folder); filter_cond_list_free(rule->cond_list); filter_action_list_free(rule->action_list); g_free(rule); } void filter_cond_list_free(GSList *cond_list) { GSList *cur; for (cur = cond_list; cur != NULL; cur = cur->next) filter_cond_free((FilterCond *)cur->data); g_slist_free(cond_list); } void filter_action_list_free(GSList *action_list) { GSList *cur; for (cur = action_list; cur != NULL; cur = cur->next) filter_action_free((FilterAction *)cur->data); g_slist_free(action_list); } static void filter_cond_free(FilterCond *cond) { g_free(cond->header_name); g_free(cond->str_value); g_free(cond); } static void filter_action_free(FilterAction *action) { g_free(action->str_value); g_free(action); } void filter_info_free(FilterInfo *fltinfo) { g_slist_free(fltinfo->dest_list); g_free(fltinfo); } libsylph-1.1.0/libsylph/folder.c0000644000175000017500000011432610530264042013530 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "defs.h" #include #include #include #include #include #include "folder.h" #include "session.h" #include "imap.h" #include "news.h" #include "mh.h" #include "virtual.h" #include "utils.h" #include "xml.h" #include "codeconv.h" #include "prefs.h" #include "account.h" #include "prefs_account.h" static GList *folder_list = NULL; static void folder_init (Folder *folder, const gchar *name); static gboolean folder_read_folder_func (GNode *node, gpointer data); static gchar *folder_get_list_path (void); static void folder_write_list_recursive (GNode *node, gpointer data); Folder *folder_new(FolderType type, const gchar *name, const gchar *path) { Folder *folder = NULL; name = name ? name : path; switch (type) { case F_MH: folder = mh_get_class()->folder_new(name, path); break; case F_IMAP: folder = imap_get_class()->folder_new(name, path); break; case F_NEWS: folder = news_get_class()->folder_new(name, path); break; default: return NULL; } return folder; } static void folder_init(Folder *folder, const gchar *name) { FolderItem *item; g_return_if_fail(folder != NULL); folder_set_name(folder, name); folder->account = NULL; folder->inbox = NULL; folder->outbox = NULL; folder->draft = NULL; folder->queue = NULL; folder->trash = NULL; folder->ui_func = NULL; folder->ui_func_data = NULL; item = folder_item_new(name, NULL); item->folder = folder; folder->node = item->node = g_node_new(item); folder->data = NULL; } void folder_local_folder_init(Folder *folder, const gchar *name, const gchar *path) { folder_init(folder, name); LOCAL_FOLDER(folder)->rootpath = g_strdup(path); } void folder_remote_folder_init(Folder *folder, const gchar *name, const gchar *path) { folder_init(folder, name); REMOTE_FOLDER(folder)->session = NULL; } void folder_destroy(Folder *folder) { g_return_if_fail(folder != NULL); g_return_if_fail(folder->klass->destroy != NULL); folder->klass->destroy(folder); folder_list = g_list_remove(folder_list, folder); folder_tree_destroy(folder); g_free(folder->name); g_free(folder); } void folder_local_folder_destroy(LocalFolder *lfolder) { g_return_if_fail(lfolder != NULL); g_free(lfolder->rootpath); } void folder_remote_folder_destroy(RemoteFolder *rfolder) { g_return_if_fail(rfolder != NULL); if (rfolder->session) session_destroy(rfolder->session); } gint folder_scan_tree(Folder *folder) { g_return_val_if_fail(folder != NULL, -1); g_return_val_if_fail(folder->klass->scan_tree != NULL, -1); return folder->klass->scan_tree(folder); } gint folder_create_tree(Folder *folder) { g_return_val_if_fail(folder != NULL, -1); g_return_val_if_fail(folder->klass->create_tree != NULL, -1); return folder->klass->create_tree(folder); } FolderItem *folder_item_new(const gchar *name, const gchar *path) { FolderItem *item; item = g_new0(FolderItem, 1); item->stype = F_NORMAL; item->name = g_strdup(name); item->path = g_strdup(path); item->mtime = 0; item->new = 0; item->unread = 0; item->total = 0; item->unmarked_num = 0; item->last_num = -1; item->no_sub = FALSE; item->no_select = FALSE; item->collapsed = FALSE; item->threaded = TRUE; item->opened = FALSE; item->updated = FALSE; item->cache_dirty = FALSE; item->mark_dirty = FALSE; item->node = NULL; item->parent = NULL; item->folder = NULL; item->account = NULL; item->ac_apply_sub = FALSE; item->auto_to = NULL; item->use_auto_to_on_reply = FALSE; item->auto_cc = NULL; item->auto_bcc = NULL; item->auto_replyto = NULL; item->mark_queue = NULL; item->last_selected = 0; item->data = NULL; return item; } void folder_item_append(FolderItem *parent, FolderItem *item) { g_return_if_fail(parent != NULL); g_return_if_fail(parent->folder != NULL); g_return_if_fail(parent->node != NULL); g_return_if_fail(item != NULL); item->parent = parent; item->folder = parent->folder; item->node = g_node_append_data(parent->node, item); } static gboolean folder_item_remove_func(GNode *node, gpointer data) { FolderItem *item = FOLDER_ITEM(node->data); folder_item_destroy(item); return FALSE; } void folder_item_remove(FolderItem *item) { GNode *node; g_return_if_fail(item != NULL); g_return_if_fail(item->folder != NULL); g_return_if_fail(item->node != NULL); node = item->node; if (item->folder->node == node) item->folder->node = NULL; g_node_traverse(node, G_POST_ORDER, G_TRAVERSE_ALL, -1, folder_item_remove_func, NULL); g_node_destroy(node); } void folder_item_remove_children(FolderItem *item) { GNode *node, *next; g_return_if_fail(item != NULL); g_return_if_fail(item->folder != NULL); g_return_if_fail(item->node != NULL); node = item->node->children; while (node != NULL) { next = node->next; folder_item_remove(FOLDER_ITEM(node->data)); node = next; } } void folder_item_destroy(FolderItem *item) { Folder *folder; g_return_if_fail(item != NULL); folder = item->folder; if (folder) { if (folder->inbox == item) folder->inbox = NULL; else if (folder->outbox == item) folder->outbox = NULL; else if (folder->draft == item) folder->draft = NULL; else if (folder->queue == item) folder->queue = NULL; else if (folder->trash == item) folder->trash = NULL; } g_free(item->name); g_free(item->path); g_free(item->auto_to); g_free(item->auto_cc); g_free(item->auto_bcc); g_free(item->auto_replyto); g_free(item); } gint folder_item_compare(FolderItem *item_a, FolderItem *item_b) { gint ret; gchar *str_a, *str_b; if (!item_a || !item_b) return 0; if (!item_a->parent || !item_b->parent) return 0; if (!item_a->name || !item_b->name) return 0; /* if both a and b are special folders, sort them according to * their types (which is in-order). Note that this assumes that * there are no multiple folders of a special type. */ if (item_a->stype != F_NORMAL && item_b->stype != F_NORMAL) return item_a->stype - item_b->stype; /* if b is normal folder, and a is not, b is smaller (ends up * lower in the list) */ if (item_a->stype != F_NORMAL && item_b->stype == F_NORMAL) return item_b->stype - item_a->stype; /* if b is special folder, and a is not, b is larger (ends up * higher in the list) */ if (item_a->stype == F_NORMAL && item_b->stype != F_NORMAL) return item_b->stype - item_a->stype; /* otherwise just compare the folder names */ str_a = g_utf8_casefold(item_a->name, -1); str_b = g_utf8_casefold(item_b->name, -1); ret = g_utf8_collate(str_a, str_b); g_free(str_b); g_free(str_a); return ret; } void folder_set_ui_func(Folder *folder, FolderUIFunc func, gpointer data) { g_return_if_fail(folder != NULL); folder->ui_func = func; folder->ui_func_data = data; } void folder_set_name(Folder *folder, const gchar *name) { g_return_if_fail(folder != NULL); g_free(folder->name); folder->name = name ? g_strdup(name) : NULL; if (folder->node && folder->node->data) { FolderItem *item = (FolderItem *)folder->node->data; g_free(item->name); item->name = name ? g_strdup(name) : NULL; } } void folder_tree_destroy(Folder *folder) { g_return_if_fail(folder != NULL); if (folder->node) folder_item_remove(FOLDER_ITEM(folder->node->data)); } void folder_add(Folder *folder) { Folder *cur_folder; GList *cur; gint i; g_return_if_fail(folder != NULL); for (i = 0, cur = folder_list; cur != NULL; cur = cur->next, i++) { cur_folder = FOLDER(cur->data); if (FOLDER_TYPE(folder) == F_MH) { if (FOLDER_TYPE(cur_folder) != F_MH) break; } else if (FOLDER_TYPE(folder) == F_IMAP) { if (FOLDER_TYPE(cur_folder) != F_MH && FOLDER_TYPE(cur_folder) != F_IMAP) break; } else if (FOLDER_TYPE(folder) == F_NEWS) { if (FOLDER_TYPE(cur_folder) != F_MH && FOLDER_TYPE(cur_folder) != F_IMAP && FOLDER_TYPE(cur_folder) != F_NEWS) break; } } folder_list = g_list_insert(folder_list, folder, i); } GList *folder_get_list(void) { return folder_list; } gint folder_read_list(void) { GNode *node; XMLNode *xmlnode; gchar *path; path = folder_get_list_path(); if (!is_file_exist(path)) return -1; node = xml_parse_file(path); if (!node) return -1; xmlnode = node->data; if (strcmp2(xmlnode->tag->tag, "folderlist") != 0) { g_warning("wrong folder list\n"); xml_free_tree(node); return -1; } g_node_traverse(node, G_PRE_ORDER, G_TRAVERSE_ALL, 2, folder_read_folder_func, NULL); xml_free_tree(node); if (folder_list) return 0; else return -1; } void folder_write_list(void) { GList *list; Folder *folder; gchar *path; PrefFile *pfile; path = folder_get_list_path(); if ((pfile = prefs_file_open(path)) == NULL) return; fprintf(pfile->fp, "\n", CS_INTERNAL); fputs("\n\n", pfile->fp); for (list = folder_list; list != NULL; list = list->next) { folder = list->data; folder_write_list_recursive(folder->node, pfile->fp); } fputs("\n", pfile->fp); if (prefs_file_close(pfile) < 0) g_warning("failed to write folder list.\n"); } struct TotalMsgStatus { guint new; guint unread; guint total; GString *str; }; static gboolean folder_get_status_full_all_func(GNode *node, gpointer data) { FolderItem *item; struct TotalMsgStatus *status = (struct TotalMsgStatus *)data; gchar *id; g_return_val_if_fail(node->data != NULL, FALSE); item = FOLDER_ITEM(node->data); if (!item->path) return FALSE; status->new += item->new; status->unread += item->unread; status->total += item->total; if (status->str) { id = folder_item_get_identifier(item); g_string_sprintfa(status->str, "%5d %5d %5d %s\n", item->new, item->unread, item->total, id); g_free(id); } return FALSE; } static void folder_get_status_full_all(GString *str, guint *new, guint *unread, guint *total) { GList *list; Folder *folder; struct TotalMsgStatus status; status.new = status.unread = status.total = 0; status.str = str; debug_print("Counting total number of messages...\n"); for (list = folder_list; list != NULL; list = list->next) { folder = FOLDER(list->data); if (folder->node) g_node_traverse(folder->node, G_PRE_ORDER, G_TRAVERSE_ALL, -1, folder_get_status_full_all_func, &status); } *new = status.new; *unread = status.unread; *total = status.total; } gchar *folder_get_status(GPtrArray *folders, gboolean full) { guint new, unread, total; GString *str; gint i; gchar *ret; new = unread = total = 0; str = g_string_new(NULL); if (folders) { for (i = 0; i < folders->len; i++) { FolderItem *item; item = g_ptr_array_index(folders, i); new += item->new; unread += item->unread; total += item->total; if (full) { gchar *id; id = folder_item_get_identifier(item); g_string_sprintfa(str, "%5d %5d %5d %s\n", item->new, item->unread, item->total, id); g_free(id); } } } else { folder_get_status_full_all(full ? str : NULL, &new, &unread, &total); } if (full) g_string_sprintfa(str, "%5d %5d %5d\n", new, unread, total); else g_string_sprintfa(str, "%d %d %d\n", new, unread, total); ret = str->str; g_string_free(str, FALSE); return ret; } Folder *folder_find_from_path(const gchar *path) { GList *list; Folder *folder; for (list = folder_list; list != NULL; list = list->next) { folder = list->data; if (FOLDER_TYPE(folder) == F_MH && !path_cmp(LOCAL_FOLDER(folder)->rootpath, path)) return folder; } return NULL; } Folder *folder_find_from_name(const gchar *name, FolderType type) { GList *list; Folder *folder; for (list = folder_list; list != NULL; list = list->next) { folder = list->data; if (FOLDER_TYPE(folder) == type && strcmp2(name, folder->name) == 0) return folder; } return NULL; } static gboolean folder_item_find_func(GNode *node, gpointer data) { FolderItem *item = node->data; gpointer *d = data; const gchar *path = d[0]; if (path_cmp(path, item->path) != 0) return FALSE; d[1] = item; return TRUE; } FolderItem *folder_find_item_from_path(const gchar *path) { Folder *folder; gpointer d[2]; folder = folder_get_default_folder(); g_return_val_if_fail(folder != NULL, NULL); d[0] = (gpointer)path; d[1] = NULL; g_node_traverse(folder->node, G_PRE_ORDER, G_TRAVERSE_ALL, -1, folder_item_find_func, d); return d[1]; } FolderItem *folder_find_child_item_by_name(FolderItem *item, const gchar *name) { GNode *node; FolderItem *child; for (node = item->node->children; node != NULL; node = node->next) { child = FOLDER_ITEM(node->data); if (strcmp2(g_basename(child->path), name) == 0) return child; } return NULL; } static const struct { gchar *str; FolderType type; } type_str_table[] = { {"#mh" , F_MH}, {"#mbox" , F_MBOX}, {"#maildir", F_MAILDIR}, {"#imap" , F_IMAP}, {"#news" , F_NEWS} }; static gchar *folder_get_type_string(FolderType type) { gint i; for (i = 0; i < sizeof(type_str_table) / sizeof(type_str_table[0]); i++) { if (type_str_table[i].type == type) return type_str_table[i].str; } return NULL; } static FolderType folder_get_type_from_string(const gchar *str) { gint i; for (i = 0; i < sizeof(type_str_table) / sizeof(type_str_table[0]); i++) { if (g_ascii_strcasecmp(type_str_table[i].str, str) == 0) return type_str_table[i].type; } return F_UNKNOWN; } gchar *folder_get_identifier(Folder *folder) { gchar *type_str; g_return_val_if_fail(folder != NULL, NULL); type_str = folder_get_type_string(FOLDER_TYPE(folder)); return g_strconcat(type_str, "/", folder->name, NULL); } gchar *folder_item_get_identifier(FolderItem *item) { gchar *id; gchar *folder_id; g_return_val_if_fail(item != NULL, NULL); if (!item->path) { if (!item->parent) return folder_get_identifier(item->folder); else return NULL; } folder_id = folder_get_identifier(item->folder); id = g_strconcat(folder_id, "/", item->path, NULL); #ifdef G_OS_WIN32 subst_char(id, G_DIR_SEPARATOR, '/'); #endif g_free(folder_id); return id; } FolderItem *folder_find_item_from_identifier(const gchar *identifier) { Folder *folder; gpointer d[2]; gchar *str; gchar *p; gchar *name; gchar *path; FolderType type; g_return_val_if_fail(identifier != NULL, NULL); if (*identifier != '#') return folder_find_item_from_path(identifier); Xstrdup_a(str, identifier, return NULL); p = strchr(str, '/'); if (!p) return folder_find_item_from_path(identifier); *p = '\0'; p++; type = folder_get_type_from_string(str); if (type == F_UNKNOWN) return folder_find_item_from_path(identifier); name = p; p = strchr(p, '/'); if (p) { *p = '\0'; p++; } folder = folder_find_from_name(name, type); if (!folder) return folder_find_item_from_path(identifier); if (!p) return FOLDER_ITEM(folder->node->data); path = p; d[0] = (gpointer)path; d[1] = NULL; g_node_traverse(folder->node, G_PRE_ORDER, G_TRAVERSE_ALL, -1, folder_item_find_func, d); return d[1]; } Folder *folder_get_default_folder(void) { return folder_list ? FOLDER(folder_list->data) : NULL; } FolderItem *folder_get_default_inbox(void) { Folder *folder; if (!folder_list) return NULL; folder = FOLDER(folder_list->data); g_return_val_if_fail(folder != NULL, NULL); return folder->inbox; } FolderItem *folder_get_default_outbox(void) { Folder *folder; if (!folder_list) return NULL; folder = FOLDER(folder_list->data); g_return_val_if_fail(folder != NULL, NULL); return folder->outbox; } FolderItem *folder_get_default_draft(void) { Folder *folder; if (!folder_list) return NULL; folder = FOLDER(folder_list->data); g_return_val_if_fail(folder != NULL, NULL); return folder->draft; } FolderItem *folder_get_default_queue(void) { Folder *folder; if (!folder_list) return NULL; folder = FOLDER(folder_list->data); g_return_val_if_fail(folder != NULL, NULL); return folder->queue; } FolderItem *folder_get_default_trash(void) { Folder *folder; if (!folder_list) return NULL; folder = FOLDER(folder_list->data); g_return_val_if_fail(folder != NULL, NULL); return folder->trash; } #define CREATE_FOLDER_IF_NOT_EXIST(member, dir, type) \ { \ if (!folder->member) { \ item = folder_item_new(dir, dir); \ item->stype = type; \ folder_item_append(rootitem, item); \ folder->member = item; \ } \ } void folder_set_missing_folders(void) { Folder *folder; FolderItem *rootitem; FolderItem *item; GList *list; for (list = folder_list; list != NULL; list = list->next) { folder = list->data; if (FOLDER_TYPE(folder) != F_MH) continue; rootitem = FOLDER_ITEM(folder->node->data); g_return_if_fail(rootitem != NULL); if (folder->inbox && folder->outbox && folder->draft && folder->queue && folder->trash) continue; if (folder_create_tree(folder) < 0) { g_warning("%s: can't create the folder tree.\n", LOCAL_FOLDER(folder)->rootpath); continue; } CREATE_FOLDER_IF_NOT_EXIST(inbox, INBOX_DIR, F_INBOX); CREATE_FOLDER_IF_NOT_EXIST(outbox, OUTBOX_DIR, F_OUTBOX); CREATE_FOLDER_IF_NOT_EXIST(draft, DRAFT_DIR, F_DRAFT); CREATE_FOLDER_IF_NOT_EXIST(queue, QUEUE_DIR, F_QUEUE); CREATE_FOLDER_IF_NOT_EXIST(trash, TRASH_DIR, F_TRASH); /* CREATE_FOLDER_IF_NOT_EXIST(junk, JUNK_DIR, F_JUNK); */ } } static gboolean folder_unref_account_func(GNode *node, gpointer data) { FolderItem *item = node->data; PrefsAccount *account = data; if (item->account == account) item->account = NULL; return FALSE; } void folder_unref_account_all(PrefsAccount *account) { Folder *folder; GList *list; if (!account) return; for (list = folder_list; list != NULL; list = list->next) { folder = list->data; if (folder->account == account) folder->account = NULL; g_node_traverse(folder->node, G_PRE_ORDER, G_TRAVERSE_ALL, -1, folder_unref_account_func, account); } } #undef CREATE_FOLDER_IF_NOT_EXIST gchar *folder_get_path(Folder *folder) { gchar *path; g_return_val_if_fail(folder != NULL, NULL); if (FOLDER_TYPE(folder) == F_MH) { path = g_filename_from_utf8(LOCAL_FOLDER(folder)->rootpath, -1, NULL, NULL, NULL); if (!path) { g_warning("folder_get_path: faild to convert character set\n"); path = g_strdup(LOCAL_FOLDER(folder)->rootpath); } if (!g_path_is_absolute(path)) { gchar *path_; path_ = g_strconcat(get_mail_base_dir(), G_DIR_SEPARATOR_S, path, NULL); g_free(path); path = path_; } } else if (FOLDER_TYPE(folder) == F_IMAP) { gchar *uid; g_return_val_if_fail(folder->account != NULL, NULL); uid = uriencode_for_filename(folder->account->userid); path = g_strconcat(get_imap_cache_dir(), G_DIR_SEPARATOR_S, folder->account->recv_server, G_DIR_SEPARATOR_S, uid, NULL); g_free(uid); } else if (FOLDER_TYPE(folder) == F_NEWS) { g_return_val_if_fail(folder->account != NULL, NULL); path = g_strconcat(get_news_cache_dir(), G_DIR_SEPARATOR_S, folder->account->nntp_server, NULL); } else path = NULL; return path; } gchar *folder_item_get_path(FolderItem *item) { gchar *folder_path; gchar *item_path = NULL, *path; g_return_val_if_fail(item != NULL, NULL); folder_path = folder_get_path(item->folder); g_return_val_if_fail(folder_path != NULL, NULL); if (item->path) { item_path = g_filename_from_utf8(item->path, -1, NULL, NULL, NULL); if (!item_path) { g_warning("folder_item_get_path: faild to convert character set\n"); item_path = g_strdup(item->path); } #ifdef G_OS_WIN32 subst_char(item_path, '/', G_DIR_SEPARATOR); #endif } if (item_path) path = g_strconcat(folder_path, G_DIR_SEPARATOR_S, item_path, NULL); else path = g_strdup(folder_path); g_free(item_path); g_free(folder_path); return path; } gint folder_item_scan(FolderItem *item) { Folder *folder; g_return_val_if_fail(item != NULL, -1); folder = item->folder; return folder->klass->scan(folder, item); } static void folder_item_scan_foreach_func(gpointer key, gpointer val, gpointer data) { folder_item_scan(FOLDER_ITEM(key)); } void folder_item_scan_foreach(GHashTable *table) { g_hash_table_foreach(table, folder_item_scan_foreach_func, NULL); } GSList *folder_item_get_msg_list(FolderItem *item, gboolean use_cache) { Folder *folder; g_return_val_if_fail(item != NULL, NULL); folder = item->folder; if (item->stype == F_VIRTUAL) return virtual_get_class()->get_msg_list(folder, item, use_cache); return folder->klass->get_msg_list(folder, item, use_cache); } gchar *folder_item_fetch_msg(FolderItem *item, gint num) { Folder *folder; g_return_val_if_fail(item != NULL, NULL); folder = item->folder; return folder->klass->fetch_msg(folder, item, num); } gint folder_item_fetch_all_msg(FolderItem *item) { Folder *folder; GSList *mlist; GSList *cur; gint num = 0; gint ret = 0; g_return_val_if_fail(item != NULL, -1); debug_print("fetching all messages in %s ...\n", item->path); folder = item->folder; if (folder->ui_func) folder->ui_func(folder, item, folder->ui_func_data ? folder->ui_func_data : GINT_TO_POINTER(num)); mlist = folder_item_get_msg_list(item, TRUE); for (cur = mlist; cur != NULL; cur = cur->next) { MsgInfo *msginfo = (MsgInfo *)cur->data; gchar *msg; num++; if (folder->ui_func) folder->ui_func(folder, item, folder->ui_func_data ? folder->ui_func_data : GINT_TO_POINTER(num)); msg = folder_item_fetch_msg(item, msginfo->msgnum); if (!msg) { g_warning("Can't fetch message %d. Aborting.\n", msginfo->msgnum); ret = -1; break; } g_free(msg); } procmsg_msg_list_free(mlist); return ret; } MsgInfo *folder_item_get_msginfo(FolderItem *item, gint num) { Folder *folder; g_return_val_if_fail(item != NULL, NULL); folder = item->folder; return folder->klass->get_msginfo(folder, item, num); } gint folder_item_add_msg(FolderItem *dest, const gchar *file, MsgFlags *flags, gboolean remove_source) { Folder *folder; g_return_val_if_fail(dest != NULL, -1); g_return_val_if_fail(file != NULL, -1); g_return_val_if_fail(dest->folder->klass->add_msg != NULL, -1); folder = dest->folder; return folder->klass->add_msg(folder, dest, file, flags, remove_source); } gint folder_item_add_msgs(FolderItem *dest, GSList *file_list, gboolean remove_source, gint *first) { Folder *folder; g_return_val_if_fail(dest != NULL, -1); g_return_val_if_fail(file_list != NULL, -1); g_return_val_if_fail(dest->folder->klass->add_msgs != NULL, -1); folder = dest->folder; return folder->klass->add_msgs(folder, dest, file_list, remove_source, first); } gint folder_item_move_msg(FolderItem *dest, MsgInfo *msginfo) { Folder *folder; g_return_val_if_fail(dest != NULL, -1); g_return_val_if_fail(msginfo != NULL, -1); g_return_val_if_fail(dest->folder->klass->move_msg != NULL, -1); folder = dest->folder; return folder->klass->move_msg(folder, dest, msginfo); } gint folder_item_move_msgs(FolderItem *dest, GSList *msglist) { Folder *folder; g_return_val_if_fail(dest != NULL, -1); g_return_val_if_fail(msglist != NULL, -1); g_return_val_if_fail(dest->folder->klass->move_msgs != NULL, -1); folder = dest->folder; return folder->klass->move_msgs(folder, dest, msglist); } gint folder_item_copy_msg(FolderItem *dest, MsgInfo *msginfo) { Folder *folder; g_return_val_if_fail(dest != NULL, -1); g_return_val_if_fail(msginfo != NULL, -1); g_return_val_if_fail(dest->folder->klass->copy_msg != NULL, -1); folder = dest->folder; return folder->klass->copy_msg(folder, dest, msginfo); } gint folder_item_copy_msgs(FolderItem *dest, GSList *msglist) { Folder *folder; g_return_val_if_fail(dest != NULL, -1); g_return_val_if_fail(msglist != NULL, -1); g_return_val_if_fail(dest->folder->klass->copy_msgs != NULL, -1); folder = dest->folder; return folder->klass->copy_msgs(folder, dest, msglist); } gint folder_item_remove_msg(FolderItem *item, MsgInfo *msginfo) { Folder *folder; g_return_val_if_fail(item != NULL, -1); g_return_val_if_fail(item->folder->klass->remove_msg != NULL, -1); folder = item->folder; return folder->klass->remove_msg(folder, item, msginfo); } gint folder_item_remove_msgs(FolderItem *item, GSList *msglist) { Folder *folder; gint ret = 0; g_return_val_if_fail(item != NULL, -1); folder = item->folder; if (folder->klass->remove_msgs) { return folder->klass->remove_msgs(folder, item, msglist); } while (msglist != NULL) { MsgInfo *msginfo = (MsgInfo *)msglist->data; ret = folder_item_remove_msg(item, msginfo); if (ret != 0) break; msglist = msglist->next; } return ret; } gint folder_item_remove_all_msg(FolderItem *item) { Folder *folder; g_return_val_if_fail(item != NULL, -1); g_return_val_if_fail(item->folder->klass->remove_all_msg != NULL, -1); folder = item->folder; return folder->klass->remove_all_msg(folder, item); } gboolean folder_item_is_msg_changed(FolderItem *item, MsgInfo *msginfo) { Folder *folder; g_return_val_if_fail(item != NULL, FALSE); g_return_val_if_fail(item->folder->klass->is_msg_changed != NULL, FALSE); folder = item->folder; return folder->klass->is_msg_changed(folder, item, msginfo); } gint folder_item_close(FolderItem *item) { Folder *folder; g_return_val_if_fail(item != NULL, -1); item->opened = FALSE; folder = item->folder; return folder->klass->close(folder, item); } gchar *folder_item_get_cache_file(FolderItem *item) { gchar *path; gchar *file; g_return_val_if_fail(item != NULL, NULL); g_return_val_if_fail(item->path != NULL, NULL); path = folder_item_get_path(item); g_return_val_if_fail(path != NULL, NULL); if (!is_dir_exist(path)) make_dir_hier(path); file = g_strconcat(path, G_DIR_SEPARATOR_S, CACHE_FILE, NULL); g_free(path); return file; } gchar *folder_item_get_mark_file(FolderItem *item) { gchar *path; gchar *file; g_return_val_if_fail(item != NULL, NULL); g_return_val_if_fail(item->path != NULL, NULL); path = folder_item_get_path(item); g_return_val_if_fail(path != NULL, NULL); if (!is_dir_exist(path)) make_dir_hier(path); file = g_strconcat(path, G_DIR_SEPARATOR_S, MARK_FILE, NULL); g_free(path); return file; } static gboolean folder_build_tree(GNode *node, gpointer data) { Folder *folder = FOLDER(data); FolderItem *item; XMLNode *xmlnode; GList *list; SpecialFolderItemType stype = F_NORMAL; const gchar *name = NULL; const gchar *path = NULL; PrefsAccount *account = NULL; gboolean no_sub = FALSE, no_select = FALSE, collapsed = FALSE, threaded = TRUE, ac_apply_sub = FALSE; FolderSortKey sort_key = SORT_BY_NONE; FolderSortType sort_type = SORT_ASCENDING; gint new = 0, unread = 0, total = 0; time_t mtime = 0; gboolean use_auto_to_on_reply = FALSE; gchar *auto_to = NULL, *auto_cc = NULL, *auto_bcc = NULL, *auto_replyto = NULL; gboolean trim_summary_subject = FALSE, trim_compose_subject = FALSE; g_return_val_if_fail(node->data != NULL, FALSE); if (!node->parent) return FALSE; xmlnode = node->data; if (strcmp2(xmlnode->tag->tag, "folderitem") != 0) { g_warning("tag name != \"folderitem\"\n"); return FALSE; } list = xmlnode->tag->attr; for (; list != NULL; list = list->next) { XMLAttr *attr = list->data; if (!attr || !attr->name || !attr->value) continue; if (!strcmp(attr->name, "type")) { if (!g_ascii_strcasecmp(attr->value, "normal")) stype = F_NORMAL; else if (!g_ascii_strcasecmp(attr->value, "inbox")) stype = F_INBOX; else if (!g_ascii_strcasecmp(attr->value, "outbox")) stype = F_OUTBOX; else if (!g_ascii_strcasecmp(attr->value, "draft")) stype = F_DRAFT; else if (!g_ascii_strcasecmp(attr->value, "queue")) stype = F_QUEUE; else if (!g_ascii_strcasecmp(attr->value, "trash")) stype = F_TRASH; #if 0 else if (!g_ascii_strcasecmp(attr->value, "junk")) stype = F_JUNK; #endif else if (!g_ascii_strcasecmp(attr->value, "virtual")) stype = F_VIRTUAL; } else if (!strcmp(attr->name, "name")) name = attr->value; else if (!strcmp(attr->name, "path")) path = attr->value; else if (!strcmp(attr->name, "mtime")) mtime = strtoul(attr->value, NULL, 10); else if (!strcmp(attr->name, "new")) new = atoi(attr->value); else if (!strcmp(attr->name, "unread")) unread = atoi(attr->value); else if (!strcmp(attr->name, "total")) total = atoi(attr->value); else if (!strcmp(attr->name, "no_sub")) no_sub = *attr->value == '1' ? TRUE : FALSE; else if (!strcmp(attr->name, "no_select")) no_select = *attr->value == '1' ? TRUE : FALSE; else if (!strcmp(attr->name, "collapsed")) collapsed = *attr->value == '1' ? TRUE : FALSE; else if (!strcmp(attr->name, "threaded")) threaded = *attr->value == '1' ? TRUE : FALSE; else if (!strcmp(attr->name, "sort_key")) { if (!strcmp(attr->value, "none")) sort_key = SORT_BY_NONE; else if (!strcmp(attr->value, "number")) sort_key = SORT_BY_NUMBER; else if (!strcmp(attr->value, "size")) sort_key = SORT_BY_SIZE; else if (!strcmp(attr->value, "date")) sort_key = SORT_BY_DATE; else if (!strcmp(attr->value, "thread-date")) sort_key = SORT_BY_TDATE; else if (!strcmp(attr->value, "from")) sort_key = SORT_BY_FROM; else if (!strcmp(attr->value, "subject")) sort_key = SORT_BY_SUBJECT; else if (!strcmp(attr->value, "score")) sort_key = SORT_BY_SCORE; else if (!strcmp(attr->value, "label")) sort_key = SORT_BY_LABEL; else if (!strcmp(attr->value, "mark")) sort_key = SORT_BY_MARK; else if (!strcmp(attr->value, "unread")) sort_key = SORT_BY_UNREAD; else if (!strcmp(attr->value, "mime")) sort_key = SORT_BY_MIME; else if (!strcmp(attr->value, "to")) sort_key = SORT_BY_TO; } else if (!strcmp(attr->name, "sort_type")) { if (!strcmp(attr->value, "ascending")) sort_type = SORT_ASCENDING; else sort_type = SORT_DESCENDING; } else if (!strcmp(attr->name, "account_id")) { account = account_find_from_id(atoi(attr->value)); if (!account) g_warning("account_id: %s not found\n", attr->value); } else if (!strcmp(attr->name, "account_apply_sub")) ac_apply_sub = *attr->value == '1' ? TRUE : FALSE; else if (!strcmp(attr->name, "to")) auto_to = g_strdup(attr->value); else if (!strcmp(attr->name, "use_auto_to_on_reply")) use_auto_to_on_reply = *attr->value == '1' ? TRUE : FALSE; else if (!strcmp(attr->name, "cc")) auto_cc = g_strdup(attr->value); else if (!strcmp(attr->name, "bcc")) auto_bcc = g_strdup(attr->value); else if (!strcmp(attr->name, "replyto")) auto_replyto = g_strdup(attr->value); else if (!strcmp(attr->name, "trim_summary_subject")) { trim_summary_subject = *attr->value == '1' ? TRUE : FALSE; } else if (!strcmp(attr->name, "trim_compose_subject")) { trim_compose_subject = *attr->value = '1' ? TRUE : FALSE; } } item = folder_item_new(name, path); item->stype = stype; item->mtime = mtime; item->new = new; item->unread = unread; item->total = total; item->no_sub = no_sub; item->no_select = no_select; item->collapsed = collapsed; item->threaded = threaded; item->sort_key = sort_key; item->sort_type = sort_type; item->node = node; item->parent = FOLDER_ITEM(node->parent->data); item->folder = folder; switch (stype) { case F_INBOX: folder->inbox = item; break; case F_OUTBOX: folder->outbox = item; break; case F_DRAFT: folder->draft = item; break; case F_QUEUE: folder->queue = item; break; case F_TRASH: folder->trash = item; break; /* case F_JUNK: folder->junk = item; break; */ default: break; } item->account = account; item->ac_apply_sub = ac_apply_sub; item->auto_to = auto_to; item->use_auto_to_on_reply = use_auto_to_on_reply; item->auto_cc = auto_cc; item->auto_bcc = auto_bcc; item->auto_replyto = auto_replyto; item->trim_summary_subject = trim_summary_subject; item->trim_compose_subject = trim_compose_subject; node->data = item; xml_free_node(xmlnode); return FALSE; } static gboolean folder_read_folder_func(GNode *node, gpointer data) { Folder *folder; FolderItem *item; XMLNode *xmlnode; GList *list; FolderType type = F_UNKNOWN; const gchar *name = NULL; const gchar *path = NULL; PrefsAccount *account = NULL; gboolean collapsed = FALSE, threaded = TRUE, ac_apply_sub = FALSE; if (g_node_depth(node) != 2) return FALSE; g_return_val_if_fail(node->data != NULL, FALSE); xmlnode = node->data; if (strcmp2(xmlnode->tag->tag, "folder") != 0) { g_warning("tag name != \"folder\"\n"); return TRUE; } g_node_unlink(node); list = xmlnode->tag->attr; for (; list != NULL; list = list->next) { XMLAttr *attr = list->data; if (!attr || !attr->name || !attr->value) continue; if (!strcmp(attr->name, "type")) { if (!g_ascii_strcasecmp(attr->value, "mh")) type = F_MH; else if (!g_ascii_strcasecmp(attr->value, "mbox")) type = F_MBOX; else if (!g_ascii_strcasecmp(attr->value, "maildir")) type = F_MAILDIR; else if (!g_ascii_strcasecmp(attr->value, "imap")) type = F_IMAP; else if (!g_ascii_strcasecmp(attr->value, "news")) type = F_NEWS; } else if (!strcmp(attr->name, "name")) name = attr->value; else if (!strcmp(attr->name, "path")) path = attr->value; else if (!strcmp(attr->name, "collapsed")) collapsed = *attr->value == '1' ? TRUE : FALSE; else if (!strcmp(attr->name, "threaded")) threaded = *attr->value == '1' ? TRUE : FALSE; else if (!strcmp(attr->name, "account_id")) { account = account_find_from_id(atoi(attr->value)); if (!account) g_warning("account_id: %s not found\n", attr->value); } else if (!strcmp(attr->name, "account_apply_sub")) ac_apply_sub = *attr->value == '1' ? TRUE : FALSE; } folder = folder_new(type, name, path); g_return_val_if_fail(folder != NULL, FALSE); if (account && FOLDER_IS_REMOTE(folder)) { folder->account = account; account->folder = REMOTE_FOLDER(folder); } if (account && FOLDER_IS_LOCAL(folder)) ac_apply_sub = TRUE; item = FOLDER_ITEM(folder->node->data); node->data = item; item->node = node; g_node_destroy(folder->node); folder->node = node; folder_add(folder); item->collapsed = collapsed; item->threaded = threaded; item->account = account; item->ac_apply_sub = ac_apply_sub; g_node_traverse(node, G_PRE_ORDER, G_TRAVERSE_ALL, -1, folder_build_tree, folder); return FALSE; } static gchar *folder_get_list_path(void) { static gchar *filename = NULL; if (!filename) filename = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, FOLDER_LIST, NULL); return filename; } #define PUT_ESCAPE_STR(fp, attr, str) \ { \ fputs(" " attr "=\"", fp); \ xml_file_put_escape_str(fp, str); \ fputs("\"", fp); \ } static void folder_write_list_recursive(GNode *node, gpointer data) { FILE *fp = (FILE *)data; FolderItem *item; gint i, depth; static gchar *folder_type_str[] = {"mh", "mbox", "maildir", "imap", "news", "unknown"}; static gchar *folder_item_stype_str[] = {"normal", "inbox", "outbox", "draft", "queue", "trash", "junk", "virtual"}; static gchar *sort_key_str[] = {"none", "number", "size", "date", "thread-date", "from", "subject", "score", "label", "mark", "unread", "mime", "to"}; g_return_if_fail(node != NULL); g_return_if_fail(fp != NULL); item = FOLDER_ITEM(node->data); g_return_if_fail(item != NULL); depth = g_node_depth(node); for (i = 0; i < depth; i++) fputs(" ", fp); if (depth == 1) { Folder *folder = item->folder; fprintf(fp, "name) PUT_ESCAPE_STR(fp, "name", folder->name); if (FOLDER_TYPE(folder) == F_MH) PUT_ESCAPE_STR(fp, "path", LOCAL_FOLDER(folder)->rootpath); if (item->collapsed && node->children) fputs(" collapsed=\"1\"", fp); if (folder->account) fprintf(fp, " account_id=\"%d\"", folder->account->account_id); else if (item->account) fprintf(fp, " account_id=\"%d\"", item->account->account_id); if (item->ac_apply_sub) fputs(" account_apply_sub=\"1\"", fp); } else { fprintf(fp, "stype]); if (item->name) PUT_ESCAPE_STR(fp, "name", item->name); if (item->path) PUT_ESCAPE_STR(fp, "path", item->path); if (item->no_sub) fputs(" no_sub=\"1\"", fp); if (item->no_select) fputs(" no_select=\"1\"", fp); if (item->collapsed && node->children) fputs(" collapsed=\"1\"", fp); if (item->threaded) fputs(" threaded=\"1\"", fp); else fputs(" threaded=\"0\"", fp); if (item->sort_key != SORT_BY_NONE) { fprintf(fp, " sort_key=\"%s\"", sort_key_str[item->sort_key]); if (item->sort_type == SORT_ASCENDING) fprintf(fp, " sort_type=\"ascending\""); else fprintf(fp, " sort_type=\"descending\""); } fprintf(fp, " mtime=\"%lu\" new=\"%d\" unread=\"%d\" total=\"%d\"", item->mtime, item->new, item->unread, item->total); if (item->account) fprintf(fp, " account_id=\"%d\"", item->account->account_id); if (item->ac_apply_sub) fputs(" account_apply_sub=\"1\"", fp); if (item->auto_to) PUT_ESCAPE_STR(fp, "to", item->auto_to); if (item->use_auto_to_on_reply) fputs(" use_auto_to_on_reply=\"1\"", fp); if (item->auto_cc) PUT_ESCAPE_STR(fp, "cc", item->auto_cc); if (item->auto_bcc) PUT_ESCAPE_STR(fp, "bcc", item->auto_bcc); if (item->auto_replyto) PUT_ESCAPE_STR(fp, "replyto", item->auto_replyto); if (item->trim_summary_subject) fputs(" trim_summary_subject=\"1\"", fp); if (item->trim_compose_subject) fputs(" trim_compose_subject=\"1\"", fp); } if (node->children) { GNode *child; fputs(">\n", fp); child = node->children; while (child) { GNode *cur; cur = child; child = cur->next; folder_write_list_recursive(cur, data); } for (i = 0; i < depth; i++) fputs(" ", fp); fprintf(fp, "\n", depth == 1 ? "folder" : "folderitem"); } else fputs(" />\n", fp); } #undef PUT_ESCAPE_STR libsylph-1.1.0/libsylph/html.c0000644000175000017500000003557310457702534013242 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include "html.h" #include "codeconv.h" #include "utils.h" #define HTMLBUFSIZE 8192 #define HR_STR "------------------------------------------------" typedef struct _HTMLSymbol HTMLSymbol; struct _HTMLSymbol { gchar *const key; gchar *const val; }; static HTMLSymbol symbol_list[] = { {"<" , "<"}, {">" , ">"}, {"&" , "&"}, {""" , "\""} }; /*   - ÿ */ static HTMLSymbol latin_symbol_list[] = { {" " , " "}, /* {" " , "\302\240"}, */ {"¡" , "\302\241"}, {"¢" , "\302\242"}, {"£" , "\302\243"}, {"¤", "\302\244"}, {"¥" , "\302\245"}, {"¦", "\302\246"}, {"§" , "\302\247"}, {"¨" , "\302\250"}, {"©" , "\302\251"}, {"ª" , "\302\252"}, {"«" , "\302\253"}, {"¬" , "\302\254"}, {"­" , "\302\255"}, {"®" , "\302\256"}, {"¯" , "\302\257"}, {"°" , "\302\260"}, {"&plusm;" , "\302\261"}, {"²" , "\302\262"}, {"³" , "\302\263"}, {"´" , "\302\264"}, {"µ" , "\302\265"}, {"¶" , "\302\266"}, {"·", "\302\267"}, {"¸" , "\302\270"}, {"¹" , "\302\271"}, {"º" , "\302\272"}, {"»" , "\302\273"}, {"¼", "\302\274"}, {"½", "\302\275"}, {"¾", "\302\276"}, {"¿", "\302\277"}, {"À", "\303\200"}, {"Á", "\303\201"}, {"Â" , "\303\202"}, {"Ã", "\303\203"}, {"Ä" , "\303\204"}, {"Å" , "\303\205"}, {"Æ" , "\303\206"}, {"Ç", "\303\207"}, {"È", "\303\210"}, {"É", "\303\211"}, {"Ê" , "\303\212"}, {"Ë" , "\303\213"}, {"Ì", "\303\214"}, {"Í", "\303\215"}, {"Î" , "\303\216"}, {"Ï" , "\303\217"}, {"Ð" , "\303\220"}, {"Ñ", "\303\221"}, {"Ò", "\303\222"}, {"Ó", "\303\223"}, {"Ô" , "\303\224"}, {"Õ", "\303\225"}, {"Ö" , "\303\226"}, {"×" , "\303\227"}, {"Ø", "\303\230"}, {"Ù", "\303\231"}, {"Ú", "\303\232"}, {"Û" , "\303\233"}, {"Ü" , "\303\234"}, {"Ý", "\303\235"}, {"Þ" , "\303\236"}, {"ß" , "\303\237"}, {"à", "\303\240"}, {"á", "\303\241"}, {"â" , "\303\242"}, {"ã", "\303\243"}, {"ä" , "\303\244"}, {"å" , "\303\245"}, {"æ" , "\303\246"}, {"ç", "\303\247"}, {"è", "\303\250"}, {"é", "\303\251"}, {"ê" , "\303\252"}, {"ë" , "\303\253"}, {"ì", "\303\254"}, {"í", "\303\255"}, {"î" , "\303\256"}, {"ï" , "\303\257"}, {"ð" , "\303\260"}, {"ñ", "\303\261"}, {"ò", "\303\262"}, {"ó", "\303\263"}, {"ô" , "\303\264"}, {"õ", "\303\265"}, {"ö" , "\303\266"}, {"÷", "\303\267"}, {"ø", "\303\270"}, {"ù", "\303\271"}, {"ú", "\303\272"}, {"û" , "\303\273"}, {"ü" , "\303\274"}, {"ý", "\303\275"}, {"þ" , "\303\276"}, {"ÿ" , "\303\277"} }; static HTMLSymbol other_symbol_list[] = { /* Non-standard? */ {"…" , "..."}, {"’" , "'"}, {"–" , "-"}, {"™" , "\xe2\x84\xa2"}, {"œ" , "\xc5\x93"}, /* Symbolic characters */ {"™" , "\xe2\x84\xa2"}, /* Latin extended */ {"Œ" , "\xc5\x92"}, {"œ" , "\xc5\x93"}, {"Š", "\xc5\xa0"}, {"š", "\xc5\xa1"}, {"Ÿ" , "\xc5\xb8"}, {"ˆ" , "\xcb\x86"}, {"˜" , "\xcb\x9c"}, {"ƒ" , "\xc6\x92"}, }; static GHashTable *default_symbol_table; static HTMLState html_read_line (HTMLParser *parser); static void html_append_char (HTMLParser *parser, gchar ch); static void html_append_str (HTMLParser *parser, const gchar *str, gint len); static HTMLState html_parse_tag (HTMLParser *parser); static void html_parse_special (HTMLParser *parser); static void html_get_parenthesis (HTMLParser *parser, gchar *buf, gint len); HTMLParser *html_parser_new(FILE *fp, CodeConverter *conv) { HTMLParser *parser; g_return_val_if_fail(fp != NULL, NULL); g_return_val_if_fail(conv != NULL, NULL); parser = g_new0(HTMLParser, 1); parser->fp = fp; parser->conv = conv; parser->str = g_string_new(NULL); parser->buf = g_string_new(NULL); parser->bufp = parser->buf->str; parser->state = HTML_NORMAL; parser->href = NULL; parser->newline = TRUE; parser->empty_line = TRUE; parser->space = FALSE; parser->pre = FALSE; #define SYMBOL_TABLE_ADD(table, list) \ { \ gint i; \ \ for (i = 0; i < sizeof(list) / sizeof(list[0]); i++) \ g_hash_table_insert(table, list[i].key, list[i].val); \ } if (!default_symbol_table) { default_symbol_table = g_hash_table_new(g_str_hash, g_str_equal); SYMBOL_TABLE_ADD(default_symbol_table, symbol_list); SYMBOL_TABLE_ADD(default_symbol_table, latin_symbol_list); SYMBOL_TABLE_ADD(default_symbol_table, other_symbol_list); } #undef SYMBOL_TABLE_ADD parser->symbol_table = default_symbol_table; return parser; } void html_parser_destroy(HTMLParser *parser) { g_string_free(parser->str, TRUE); g_string_free(parser->buf, TRUE); g_free(parser->href); g_free(parser); } const gchar *html_parse(HTMLParser *parser) { parser->state = HTML_NORMAL; g_string_truncate(parser->str, 0); if (*parser->bufp == '\0') { g_string_truncate(parser->buf, 0); parser->bufp = parser->buf->str; if (html_read_line(parser) == HTML_EOF) return NULL; } while (*parser->bufp != '\0') { switch (*parser->bufp) { case '<': if (parser->str->len == 0) html_parse_tag(parser); else return parser->str->str; break; case '&': html_parse_special(parser); break; case ' ': case '\t': case '\r': case '\n': if (parser->bufp[0] == '\r' && parser->bufp[1] == '\n') parser->bufp++; if (!parser->pre) { if (!parser->newline) parser->space = TRUE; parser->bufp++; break; } /* fallthrough */ default: html_append_char(parser, *parser->bufp++); } } return parser->str->str; } static HTMLState html_read_line(HTMLParser *parser) { gchar buf[HTMLBUFSIZE]; gchar *conv_str; gint index; if (fgets(buf, sizeof(buf), parser->fp) == NULL) { parser->state = HTML_EOF; return HTML_EOF; } conv_str = conv_convert(parser->conv, buf); if (!conv_str) { index = parser->bufp - parser->buf->str; conv_str = conv_utf8todisp(buf, NULL); g_string_append(parser->buf, conv_str); g_free(conv_str); parser->bufp = parser->buf->str + index; return HTML_CONV_FAILED; } index = parser->bufp - parser->buf->str; g_string_append(parser->buf, conv_str); g_free(conv_str); parser->bufp = parser->buf->str + index; return HTML_NORMAL; } static void html_append_char(HTMLParser *parser, gchar ch) { GString *str = parser->str; if (!parser->pre && parser->space) { g_string_append_c(str, ' '); parser->space = FALSE; } g_string_append_c(str, ch); parser->empty_line = FALSE; if (ch == '\n') { parser->newline = TRUE; if (str->len > 1 && str->str[str->len - 2] == '\n') parser->empty_line = TRUE; } else parser->newline = FALSE; } static void html_append_str(HTMLParser *parser, const gchar *str, gint len) { GString *string = parser->str; if (!parser->pre && parser->space) { g_string_append_c(string, ' '); parser->space = FALSE; } if (len == 0) return; if (len < 0) g_string_append(string, str); else g_string_append_len(string, str, len); parser->empty_line = FALSE; if (string->len > 0 && string->str[string->len - 1] == '\n') { parser->newline = TRUE; if (string->len > 1 && string->str[string->len - 2] == '\n') parser->empty_line = TRUE; } else parser->newline = FALSE; } static HTMLTag *html_get_tag(const gchar *str) { HTMLTag *tag; gchar *tmp; gchar *tmpp; g_return_val_if_fail(str != NULL, NULL); if (*str == '\0' || *str == '!') return NULL; Xstrdup_a(tmp, str, return NULL); tag = g_new0(HTMLTag, 1); for (tmpp = tmp; *tmpp != '\0' && !g_ascii_isspace(*tmpp); tmpp++) ; if (*tmpp == '\0') { g_strdown(tmp); tag->name = g_strdup(tmp); return tag; } else { *tmpp++ = '\0'; g_strdown(tmp); tag->name = g_strdup(tmp); } while (*tmpp != '\0') { HTMLAttr *attr; gchar *attr_name; gchar *attr_value; gchar *p; gchar quote; while (g_ascii_isspace(*tmpp)) tmpp++; attr_name = tmpp; while (*tmpp != '\0' && !g_ascii_isspace(*tmpp) && *tmpp != '=') tmpp++; if (*tmpp != '\0' && *tmpp != '=') { *tmpp++ = '\0'; while (g_ascii_isspace(*tmpp)) tmpp++; } if (*tmpp == '=') { *tmpp++ = '\0'; while (g_ascii_isspace(*tmpp)) tmpp++; if (*tmpp == '"' || *tmpp == '\'') { /* name="value" */ quote = *tmpp; tmpp++; attr_value = tmpp; if ((p = strchr(attr_value, quote)) == NULL) { g_warning("html_get_tag(): syntax error in tag: '%s'\n", str); return tag; } tmpp = p; *tmpp++ = '\0'; while (g_ascii_isspace(*tmpp)) tmpp++; } else { /* name=value */ attr_value = tmpp; while (*tmpp != '\0' && !g_ascii_isspace(*tmpp)) tmpp++; if (*tmpp != '\0') *tmpp++ = '\0'; } } else attr_value = ""; g_strchomp(attr_name); g_strdown(attr_name); attr = g_new(HTMLAttr, 1); attr->name = g_strdup(attr_name); attr->value = g_strdup(attr_value); tag->attr = g_list_append(tag->attr, attr); } return tag; } static void html_free_tag(HTMLTag *tag) { if (!tag) return; g_free(tag->name); while (tag->attr != NULL) { HTMLAttr *attr = (HTMLAttr *)tag->attr->data; g_free(attr->name); g_free(attr->value); g_free(attr); tag->attr = g_list_remove(tag->attr, tag->attr->data); } g_free(tag); } static HTMLState html_parse_tag(HTMLParser *parser) { gchar buf[HTMLBUFSIZE]; HTMLTag *tag; html_get_parenthesis(parser, buf, sizeof(buf)); tag = html_get_tag(buf); parser->state = HTML_UNKNOWN; if (!tag) return HTML_UNKNOWN; if (!strcmp(tag->name, "br")) { parser->space = FALSE; html_append_char(parser, '\n'); parser->state = HTML_BR; } else if (!strcmp(tag->name, "a")) { if (tag->attr && tag->attr->data && !strcmp(((HTMLAttr *)tag->attr->data)->name, "href")) { g_free(parser->href); parser->href = g_strdup(((HTMLAttr *)tag->attr->data)->value); parser->state = HTML_HREF; } } else if (!strcmp(tag->name, "/a")) { g_free(parser->href); parser->href = NULL; parser->state = HTML_NORMAL; } else if (!strcmp(tag->name, "p")) { parser->space = FALSE; if (!parser->empty_line) { parser->space = FALSE; if (!parser->newline) html_append_char(parser, '\n'); html_append_char(parser, '\n'); } parser->state = HTML_PAR; } else if (!strcmp(tag->name, "pre")) { parser->pre = TRUE; parser->state = HTML_PRE; } else if (!strcmp(tag->name, "/pre")) { parser->pre = FALSE; parser->state = HTML_NORMAL; } else if (!strcmp(tag->name, "hr")) { if (!parser->newline) { parser->space = FALSE; html_append_char(parser, '\n'); } html_append_str(parser, HR_STR "\n", -1); parser->state = HTML_HR; } else if (!strcmp(tag->name, "div") || !strcmp(tag->name, "ul") || !strcmp(tag->name, "li") || !strcmp(tag->name, "table") || !strcmp(tag->name, "tr") || (tag->name[0] == 'h' && g_ascii_isdigit(tag->name[1]))) { if (!parser->newline) { parser->space = FALSE; html_append_char(parser, '\n'); } parser->state = HTML_NORMAL; } else if (!strcmp(tag->name, "/table") || (tag->name[0] == '/' && tag->name[1] == 'h' && g_ascii_isdigit(tag->name[1]))) { if (!parser->empty_line) { parser->space = FALSE; if (!parser->newline) html_append_char(parser, '\n'); html_append_char(parser, '\n'); } parser->state = HTML_NORMAL; } else if (!strcmp(tag->name, "/div") || !strcmp(tag->name, "/ul") || !strcmp(tag->name, "/li")) { if (!parser->newline) { parser->space = FALSE; html_append_char(parser, '\n'); } parser->state = HTML_NORMAL; } html_free_tag(tag); return parser->state; } static void html_parse_special(HTMLParser *parser) { gchar symbol_name[9]; gint n; const gchar *val; parser->state = HTML_UNKNOWN; g_return_if_fail(*parser->bufp == '&'); /* &foo; */ for (n = 0; parser->bufp[n] != '\0' && parser->bufp[n] != ';'; n++) ; if (n > 7 || parser->bufp[n] != ';') { /* output literal `&' */ html_append_char(parser, *parser->bufp++); parser->state = HTML_NORMAL; return; } strncpy2(symbol_name, parser->bufp, n + 2); parser->bufp += n + 1; if ((val = g_hash_table_lookup(parser->symbol_table, symbol_name)) != NULL) { html_append_str(parser, val, -1); parser->state = HTML_NORMAL; return; } else if (symbol_name[1] == '#' && g_ascii_isdigit(symbol_name[2])) { gint ch; ch = atoi(symbol_name + 2); if (ch < 128 && g_ascii_isprint(ch)) { html_append_char(parser, ch); parser->state = HTML_NORMAL; return; } else { /* ISO 10646 to UTF-8 */ gchar buf[6]; gint len; len = g_unichar_to_utf8((gunichar)ch, buf); if (len > 0) { html_append_str(parser, buf, len); parser->state = HTML_NORMAL; return; } } } html_append_str(parser, symbol_name, -1); } static void html_get_parenthesis(HTMLParser *parser, gchar *buf, gint len) { gchar *p; buf[0] = '\0'; g_return_if_fail(*parser->bufp == '<'); /* ignore comment / CSS / script stuff */ if (!strncmp(parser->bufp, "")) == NULL) if (html_read_line(parser) == HTML_EOF) return; parser->bufp = p + 3; return; } if (!g_ascii_strncasecmp(parser->bufp, "bufp += 6; while ((p = strcasestr(parser->bufp, "")) == NULL) if (html_read_line(parser) == HTML_EOF) return; parser->bufp = p + 8; return; } if (!g_ascii_strncasecmp(parser->bufp, "bufp += 7; while ((p = strcasestr(parser->bufp, "")) == NULL) if (html_read_line(parser) == HTML_EOF) return; parser->bufp = p + 9; return; } parser->bufp++; while ((p = strchr(parser->bufp, '>')) == NULL) if (html_read_line(parser) == HTML_EOF) return; strncpy2(buf, parser->bufp, MIN(p - parser->bufp + 1, len)); g_strstrip(buf); parser->bufp = p + 1; } libsylph-1.1.0/libsylph/imap.c0000644000175000017500000031701610477467562013232 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2006 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "defs.h" #include #include #include #include #include #include #include #include #include #if HAVE_ICONV # include #endif #include "imap.h" #include "socket.h" #include "ssl.h" #include "recv.h" #include "procmsg.h" #include "procheader.h" #include "folder.h" #include "prefs_account.h" #include "codeconv.h" #include "md5_hmac.h" #include "base64.h" #include "utils.h" #include "prefs_common.h" #include "virtual.h" #define IMAP4_PORT 143 #if USE_SSL #define IMAPS_PORT 993 #endif #define IMAP_COPY_LIMIT 200 #define IMAP_CMD_LIMIT 1000 #define QUOTE_IF_REQUIRED(out, str) \ { \ if (*str != '"' && strpbrk(str, " \t(){}[]%&*") != NULL) { \ gchar *__tmp; \ gint len; \ \ len = strlen(str) + 3; \ Xalloca(__tmp, len, return IMAP_ERROR); \ g_snprintf(__tmp, len, "\"%s\"", str); \ out = __tmp; \ } else { \ Xstrdup_a(out, str, return IMAP_ERROR); \ } \ } static GList *session_list = NULL; static void imap_folder_init (Folder *folder, const gchar *name, const gchar *path); static Folder *imap_folder_new (const gchar *name, const gchar *path); static void imap_folder_destroy (Folder *folder); static Session *imap_session_new (PrefsAccount *account); static gint imap_session_connect (IMAPSession *session); static gint imap_session_reconnect (IMAPSession *session); static void imap_session_destroy (Session *session); /* static void imap_session_destroy_all (void); */ static gint imap_search_flags (IMAPSession *session, GArray **uids, GHashTable **flags_table); static gint imap_fetch_flags (IMAPSession *session, GArray **uids, GHashTable **flags_table); static GSList *imap_get_msg_list (Folder *folder, FolderItem *item, gboolean use_cache); static gchar *imap_fetch_msg (Folder *folder, FolderItem *item, gint uid); static MsgInfo *imap_get_msginfo (Folder *folder, FolderItem *item, gint uid); static gint imap_add_msg (Folder *folder, FolderItem *dest, const gchar *file, MsgFlags *flags, gboolean remove_source); static gint imap_add_msgs (Folder *folder, FolderItem *dest, GSList *file_list, gboolean remove_source, gint *first); static gint imap_move_msg (Folder *folder, FolderItem *dest, MsgInfo *msginfo); static gint imap_move_msgs (Folder *folder, FolderItem *dest, GSList *msglist); static gint imap_copy_msg (Folder *folder, FolderItem *dest, MsgInfo *msginfo); static gint imap_copy_msgs (Folder *folder, FolderItem *dest, GSList *msglist); static gint imap_remove_msg (Folder *folder, FolderItem *item, MsgInfo *msginfo); static gint imap_remove_msgs (Folder *folder, FolderItem *item, GSList *msglist); static gint imap_remove_all_msg (Folder *folder, FolderItem *item); static gboolean imap_is_msg_changed (Folder *folder, FolderItem *item, MsgInfo *msginfo); static gint imap_close (Folder *folder, FolderItem *item); static gint imap_scan_folder (Folder *folder, FolderItem *item); static gint imap_scan_tree (Folder *folder); static gint imap_create_tree (Folder *folder); static FolderItem *imap_create_folder (Folder *folder, FolderItem *parent, const gchar *name); static gint imap_rename_folder (Folder *folder, FolderItem *item, const gchar *name); static gint imap_move_folder (Folder *folder, FolderItem *item, FolderItem *new_parent); static gint imap_remove_folder (Folder *folder, FolderItem *item); static IMAPSession *imap_session_get (Folder *folder); static gint imap_greeting (IMAPSession *session); static gint imap_auth (IMAPSession *session, const gchar *user, const gchar *pass, IMAPAuthType type); static gint imap_scan_tree_recursive (IMAPSession *session, FolderItem *item); static GSList *imap_parse_list (IMAPSession *session, const gchar *real_path, gchar *separator); static void imap_create_missing_folders (Folder *folder); static FolderItem *imap_create_special_folder (Folder *folder, SpecialFolderItemType stype, const gchar *name); static gint imap_do_copy_msgs (Folder *folder, FolderItem *dest, GSList *msglist, gboolean remove_source); static gint imap_remove_msgs_by_seq_set (Folder *folder, FolderItem *item, GSList *seq_list); static GSList *imap_get_uncached_messages (IMAPSession *session, FolderItem *item, guint32 first_uid, guint32 last_uid, gint exists, gboolean update_count); static void imap_delete_cached_message (FolderItem *item, guint32 uid); static GSList *imap_delete_cached_messages (GSList *mlist, FolderItem *item, guint32 first_uid, guint32 last_uid); static void imap_delete_all_cached_messages (FolderItem *item); #if USE_SSL static SockInfo *imap_open (const gchar *server, gushort port, SSLType ssl_type); #else static SockInfo *imap_open (const gchar *server, gushort port); #endif static gint imap_msg_list_change_perm_flags (GSList *msglist, MsgPermFlags flags, gboolean is_set); static gchar *imap_get_flag_str (IMAPFlags flags); static gint imap_set_message_flags (IMAPSession *session, const gchar *seq_set, IMAPFlags flags, gboolean is_set); static gint imap_select (IMAPSession *session, IMAPFolder *folder, const gchar *path, gint *exists, gint *recent, gint *unseen, guint32 *uid_validity); static gint imap_status (IMAPSession *session, IMAPFolder *folder, const gchar *path, gint *messages, gint *recent, guint32 *uid_next, guint32 *uid_validity, gint *unseen); static void imap_parse_namespace (IMAPSession *session, IMAPFolder *folder); static void imap_get_namespace_by_list (IMAPSession *session, IMAPFolder *folder); static IMAPNameSpace *imap_find_namespace (IMAPFolder *folder, const gchar *path); static gchar imap_get_path_separator (IMAPFolder *folder, const gchar *path); static gchar *imap_get_real_path (IMAPFolder *folder, const gchar *path); static gchar *imap_parse_atom (IMAPSession *session, gchar *src, gchar *dest, gint dest_len, GString *str); static MsgFlags imap_parse_flags (const gchar *flag_str); static IMAPFlags imap_parse_imap_flags (const gchar *flag_str); static MsgInfo *imap_parse_envelope (IMAPSession *session, FolderItem *item, GString *line_str); static gboolean imap_has_capability (IMAPSession *session, const gchar *capability); static void imap_capability_free (IMAPSession *session); /* low-level IMAP4rev1 commands */ static gint imap_cmd_capability (IMAPSession *session); static gint imap_cmd_authenticate (IMAPSession *session, const gchar *user, const gchar *pass, IMAPAuthType type); static gint imap_cmd_login (IMAPSession *session, const gchar *user, const gchar *pass); static gint imap_cmd_logout (IMAPSession *session); static gint imap_cmd_noop (IMAPSession *session); #if USE_SSL static gint imap_cmd_starttls (IMAPSession *session); #endif static gint imap_cmd_namespace (IMAPSession *session, gchar **ns_str); static gint imap_cmd_list (IMAPSession *session, const gchar *ref, const gchar *mailbox, GPtrArray *argbuf); static gint imap_cmd_do_select (IMAPSession *session, const gchar *folder, gboolean examine, gint *exists, gint *recent, gint *unseen, guint32 *uid_validity); static gint imap_cmd_select (IMAPSession *session, const gchar *folder, gint *exists, gint *recent, gint *unseen, guint32 *uid_validity); static gint imap_cmd_examine (IMAPSession *session, const gchar *folder, gint *exists, gint *recent, gint *unseen, guint32 *uid_validity); static gint imap_cmd_create (IMAPSession *session, const gchar *folder); static gint imap_cmd_rename (IMAPSession *session, const gchar *oldfolder, const gchar *newfolder); static gint imap_cmd_delete (IMAPSession *session, const gchar *folder); static gint imap_cmd_envelope (IMAPSession *session, const gchar *seq_set); static gint imap_cmd_search (IMAPSession *session, const gchar *criteria, GArray **result); static gint imap_cmd_fetch (IMAPSession *session, guint32 uid, const gchar *filename); static gint imap_cmd_append (IMAPSession *session, const gchar *destfolder, const gchar *file, IMAPFlags flags, guint32 *new_uid); static gint imap_cmd_copy (IMAPSession *session, const gchar *seq_set, const gchar *destfolder); static gint imap_cmd_store (IMAPSession *session, const gchar *seq_set, const gchar *sub_cmd); static gint imap_cmd_expunge (IMAPSession *session); static gint imap_cmd_close (IMAPSession *session); static gint imap_cmd_ok (IMAPSession *session, GPtrArray *argbuf); static void imap_cmd_gen_send (IMAPSession *session, const gchar *format, ...); static gint imap_cmd_gen_recv (IMAPSession *session, gchar **ret); /* misc utility functions */ static gchar *strchr_cpy (const gchar *src, gchar ch, gchar *dest, gint len); static gchar *get_quoted (const gchar *src, gchar ch, gchar *dest, gint len); static gchar *search_array_contain_str (GPtrArray *array, gchar *str); static gchar *search_array_str (GPtrArray *array, gchar *str); static void imap_path_separator_subst (gchar *str, gchar separator); static gchar *imap_modified_utf7_to_utf8 (const gchar *mutf7_str); static gchar *imap_utf8_to_modified_utf7 (const gchar *from); static GSList *imap_get_seq_set_from_msglist (GSList *msglist, gint limit); static gint imap_seq_set_get_count (const gchar *seq_set); static void imap_seq_set_free (GSList *seq_list); static GHashTable *imap_get_uid_table (GArray *array); static gboolean imap_rename_folder_func (GNode *node, gpointer data); static FolderClass imap_class = { F_IMAP, imap_folder_new, imap_folder_destroy, imap_scan_tree, imap_create_tree, imap_get_msg_list, imap_fetch_msg, imap_get_msginfo, imap_add_msg, imap_add_msgs, imap_move_msg, imap_move_msgs, imap_copy_msg, imap_copy_msgs, imap_remove_msg, imap_remove_msgs, imap_remove_all_msg, imap_is_msg_changed, imap_close, imap_scan_folder, imap_create_folder, imap_rename_folder, imap_move_folder, imap_remove_folder }; FolderClass *imap_get_class(void) { return &imap_class; } static Folder *imap_folder_new(const gchar *name, const gchar *path) { Folder *folder; folder = (Folder *)g_new0(IMAPFolder, 1); imap_folder_init(folder, name, path); return folder; } static void imap_folder_destroy(Folder *folder) { gchar *dir; dir = folder_get_path(folder); if (is_dir_exist(dir)) remove_dir_recursive(dir); g_free(dir); folder_remote_folder_destroy(REMOTE_FOLDER(folder)); } static void imap_folder_init(Folder *folder, const gchar *name, const gchar *path) { folder->klass = imap_get_class(); folder_remote_folder_init(folder, name, path); } static IMAPSession *imap_session_get(Folder *folder) { RemoteFolder *rfolder = REMOTE_FOLDER(folder); g_return_val_if_fail(folder != NULL, NULL); g_return_val_if_fail(FOLDER_TYPE(folder) == F_IMAP, NULL); g_return_val_if_fail(folder->account != NULL, NULL); if (!prefs_common.online_mode) return NULL; if (!rfolder->session) { rfolder->session = imap_session_new(folder->account); if (rfolder->session) imap_parse_namespace(IMAP_SESSION(rfolder->session), IMAP_FOLDER(folder)); return IMAP_SESSION(rfolder->session); } if (time(NULL) - rfolder->session->last_access_time < SESSION_TIMEOUT_INTERVAL) { return IMAP_SESSION(rfolder->session); } if (imap_cmd_noop(IMAP_SESSION(rfolder->session)) != IMAP_SUCCESS) { log_warning(_("IMAP4 connection to %s has been" " disconnected. Reconnecting...\n"), folder->account->recv_server); if (imap_session_reconnect(IMAP_SESSION(rfolder->session)) == IMAP_SUCCESS) imap_parse_namespace(IMAP_SESSION(rfolder->session), IMAP_FOLDER(folder)); else { session_destroy(rfolder->session); rfolder->session = NULL; } } return IMAP_SESSION(rfolder->session); } static gint imap_greeting(IMAPSession *session) { gchar *greeting; gint ok; if ((ok = imap_cmd_gen_recv(session, &greeting)) != IMAP_SUCCESS) return ok; if (greeting[0] != '*' || greeting[1] != ' ') ok = IMAP_ERROR; else if (!strncmp(greeting + 2, "OK", 2)) ok = IMAP_SUCCESS; else if (!strncmp(greeting + 2, "PREAUTH", 7)) { session->authenticated = TRUE; ok = IMAP_SUCCESS; } else ok = IMAP_ERROR; g_free(greeting); return ok; } static gint imap_auth(IMAPSession *session, const gchar *user, const gchar *pass, IMAPAuthType type) { gboolean nologin; gint ok = IMAP_AUTHFAIL; nologin = imap_has_capability(session, "LOGINDISABLED"); switch (type) { case 0: if (imap_has_capability(session, "AUTH=CRAM-MD5")) ok = imap_cmd_authenticate(session, user, pass, IMAP_AUTH_CRAM_MD5); else if (imap_has_capability(session, "AUTH=PLAIN")) ok = imap_cmd_authenticate(session, user, pass, IMAP_AUTH_PLAIN); else if (nologin) log_print(_("IMAP4 server disables LOGIN.\n")); else ok = imap_cmd_login(session, user, pass); break; case IMAP_AUTH_LOGIN: if (nologin) log_warning(_("IMAP4 server disables LOGIN.\n")); else ok = imap_cmd_login(session, user, pass); break; case IMAP_AUTH_CRAM_MD5: case IMAP_AUTH_PLAIN: ok = imap_cmd_authenticate(session, user, pass, type); break; default: break; } if (ok == IMAP_SUCCESS) session->authenticated = TRUE; return ok; } static Session *imap_session_new(PrefsAccount *account) { IMAPSession *session; gushort port; g_return_val_if_fail(account != NULL, NULL); g_return_val_if_fail(account->recv_server != NULL, NULL); g_return_val_if_fail(account->userid != NULL, NULL); #if USE_SSL port = account->set_imapport ? account->imapport : account->ssl_imap == SSL_TUNNEL ? IMAPS_PORT : IMAP4_PORT; #else port = account->set_imapport ? account->imapport : IMAP4_PORT; #endif session = g_new0(IMAPSession, 1); session_init(SESSION(session)); SESSION(session)->type = SESSION_IMAP; SESSION(session)->sock = NULL; SESSION(session)->server = g_strdup(account->recv_server); SESSION(session)->port = port; #if USE_SSL SESSION(session)->ssl_type = account->ssl_imap; #endif SESSION(session)->last_access_time = time(NULL); SESSION(session)->data = account; SESSION(session)->destroy = imap_session_destroy; session->authenticated = FALSE; session->capability = NULL; session->uidplus = FALSE; session->mbox = NULL; session->cmd_count = 0; session_list = g_list_append(session_list, session); if (imap_session_connect(session) != IMAP_SUCCESS) { session_destroy(SESSION(session)); return NULL; } return SESSION(session); } static gint imap_session_connect(IMAPSession *session) { SockInfo *sock; PrefsAccount *account; const gchar *pass; g_return_val_if_fail(session != NULL, IMAP_ERROR); account = (PrefsAccount *)(SESSION(session)->data); log_message(_("creating IMAP4 connection to %s:%d ...\n"), SESSION(session)->server, SESSION(session)->port); pass = account->passwd; if (!pass) pass = account->tmp_pass; if (!pass) { gchar *tmp_pass; tmp_pass = input_query_password(account->recv_server, account->userid); if (!tmp_pass) return IMAP_ERROR; account->tmp_pass = tmp_pass; pass = account->tmp_pass; } #if USE_SSL if ((sock = imap_open(SESSION(session)->server, SESSION(session)->port, SESSION(session)->ssl_type)) == NULL) #else if ((sock = imap_open(SESSION(session)->server, SESSION(session)->port)) == NULL) #endif return IMAP_ERROR; SESSION(session)->sock = sock; if (imap_greeting(session) != IMAP_SUCCESS) return IMAP_ERROR; if (imap_cmd_capability(session) != IMAP_SUCCESS) return IMAP_ERROR; if (imap_has_capability(session, "UIDPLUS")) session->uidplus = TRUE; #if USE_SSL if (account->ssl_imap == SSL_STARTTLS && imap_has_capability(session, "STARTTLS")) { gint ok; ok = imap_cmd_starttls(session); if (ok != IMAP_SUCCESS) { log_warning(_("Can't start TLS session.\n")); return IMAP_ERROR; } if (!ssl_init_socket_with_method(sock, SSL_METHOD_TLSv1)) return IMAP_SOCKET; /* capability can be changed after STARTTLS */ if (imap_cmd_capability(session) != IMAP_SUCCESS) return IMAP_ERROR; } #endif if (!session->authenticated && imap_auth(session, account->userid, pass, account->imap_auth_type) != IMAP_SUCCESS) { if (account->tmp_pass) { g_free(account->tmp_pass); account->tmp_pass = NULL; } imap_cmd_logout(session); return IMAP_AUTHFAIL; } return IMAP_SUCCESS; } static gint imap_session_reconnect(IMAPSession *session) { g_return_val_if_fail(session != NULL, IMAP_ERROR); session_disconnect(SESSION(session)); imap_capability_free(session); session->uidplus = FALSE; g_free(session->mbox); session->mbox = NULL; session->authenticated = FALSE; SESSION(session)->state = SESSION_READY; return imap_session_connect(session); } static void imap_session_destroy(Session *session) { imap_capability_free(IMAP_SESSION(session)); g_free(IMAP_SESSION(session)->mbox); session_list = g_list_remove(session_list, session); } #if 0 static void imap_session_destroy_all(void) { while (session_list != NULL) { IMAPSession *session = (IMAPSession *)session_list->data; imap_cmd_logout(session); session_destroy(SESSION(session)); } } #endif #define THROW goto catch static gint imap_search_flags(IMAPSession *session, GArray **uids, GHashTable **flags_table) { gint ok; gint i; GArray *flag_uids; GHashTable *unseen_table; GHashTable *flagged_table; GHashTable *answered_table; guint32 uid; IMAPFlags flags; ok = imap_cmd_search(session, "ALL", uids); if (ok != IMAP_SUCCESS) return ok; ok = imap_cmd_search(session, "UNSEEN", &flag_uids); if (ok != IMAP_SUCCESS) { g_array_free(*uids, TRUE); return ok; } unseen_table = imap_get_uid_table(flag_uids); g_array_free(flag_uids, TRUE); ok = imap_cmd_search(session, "FLAGGED", &flag_uids); if (ok != IMAP_SUCCESS) { g_hash_table_destroy(unseen_table); g_array_free(*uids, TRUE); return ok; } flagged_table = imap_get_uid_table(flag_uids); g_array_free(flag_uids, TRUE); ok = imap_cmd_search(session, "ANSWERED", &flag_uids); if (ok != IMAP_SUCCESS) { g_hash_table_destroy(flagged_table); g_hash_table_destroy(unseen_table); g_array_free(*uids, TRUE); return ok; } answered_table = imap_get_uid_table(flag_uids); g_array_free(flag_uids, TRUE); *flags_table = g_hash_table_new(NULL, g_direct_equal); for (i = 0; i < (*uids)->len; i++) { uid = g_array_index(*uids, guint32, i); flags = IMAP_FLAG_DRAFT; if (!g_hash_table_lookup(unseen_table, GUINT_TO_POINTER(uid))) flags |= IMAP_FLAG_SEEN; if (g_hash_table_lookup(flagged_table, GUINT_TO_POINTER(uid))) flags |= IMAP_FLAG_FLAGGED; if (g_hash_table_lookup(answered_table, GUINT_TO_POINTER(uid))) flags |= IMAP_FLAG_ANSWERED; g_hash_table_insert(*flags_table, GUINT_TO_POINTER(uid), GINT_TO_POINTER(flags)); } g_hash_table_destroy(answered_table); g_hash_table_destroy(flagged_table); g_hash_table_destroy(unseen_table); return IMAP_SUCCESS; } static gint imap_fetch_flags(IMAPSession *session, GArray **uids, GHashTable **flags_table) { gint ok; gchar *tmp; gchar *cur_pos; gchar buf[IMAPBUFSIZE]; guint32 uid; IMAPFlags flags; imap_cmd_gen_send(session, "UID FETCH 1:* (UID FLAGS)"); *uids = g_array_new(FALSE, FALSE, sizeof(guint32)); *flags_table = g_hash_table_new(NULL, g_direct_equal); while ((ok = imap_cmd_gen_recv(session, &tmp)) == IMAP_SUCCESS) { if (tmp[0] != '*' || tmp[1] != ' ') { g_free(tmp); break; } cur_pos = tmp + 2; #define PARSE_ONE_ELEMENT(ch) \ { \ cur_pos = strchr_cpy(cur_pos, ch, buf, sizeof(buf)); \ if (cur_pos == NULL) { \ g_warning("cur_pos == NULL\n"); \ g_free(tmp); \ g_hash_table_destroy(*flags_table); \ g_array_free(*uids, TRUE); \ return IMAP_ERROR; \ } \ } PARSE_ONE_ELEMENT(' '); PARSE_ONE_ELEMENT(' '); if (strcmp(buf, "FETCH") != 0) { g_free(tmp); continue; } if (*cur_pos != '(') { g_free(tmp); continue; } cur_pos++; uid = 0; flags = 0; while (*cur_pos != '\0' && *cur_pos != ')') { while (*cur_pos == ' ') cur_pos++; if (!strncmp(cur_pos, "UID ", 4)) { cur_pos += 4; uid = strtoul(cur_pos, &cur_pos, 10); } else if (!strncmp(cur_pos, "FLAGS ", 6)) { cur_pos += 6; if (*cur_pos != '(') { g_warning("*cur_pos != '('\n"); break; } cur_pos++; PARSE_ONE_ELEMENT(')'); flags = imap_parse_imap_flags(buf); flags |= IMAP_FLAG_DRAFT; } else { g_warning("invalid FETCH response: %s\n", cur_pos); break; } } #undef PARSE_ONE_ELEMENT if (uid > 0) { g_array_append_val(*uids, uid); g_hash_table_insert(*flags_table, GUINT_TO_POINTER(uid), GINT_TO_POINTER(flags)); } g_free(tmp); } if (ok != IMAP_SUCCESS) { g_hash_table_destroy(*flags_table); g_array_free(*uids, TRUE); } return ok; } static GSList *imap_get_msg_list(Folder *folder, FolderItem *item, gboolean use_cache) { GSList *mlist = NULL; IMAPSession *session; gint ok, exists = 0, recent = 0, unseen = 0; guint32 uid_validity = 0; guint32 first_uid = 0, last_uid = 0; g_return_val_if_fail(folder != NULL, NULL); g_return_val_if_fail(item != NULL, NULL); g_return_val_if_fail(FOLDER_TYPE(folder) == F_IMAP, NULL); g_return_val_if_fail(folder->account != NULL, NULL); item->new = item->unread = item->total = 0; session = imap_session_get(folder); if (!session) { mlist = procmsg_read_cache(item, FALSE); item->last_num = procmsg_get_last_num_in_msg_list(mlist); procmsg_set_flags(mlist, item); return mlist; } ok = imap_select(session, IMAP_FOLDER(folder), item->path, &exists, &recent, &unseen, &uid_validity); if (ok != IMAP_SUCCESS) THROW; if (exists == 0) { imap_delete_all_cached_messages(item); return NULL; } /* invalidate current cache if UIDVALIDITY has been changed */ if (item->mtime != uid_validity) { debug_print("imap_get_msg_list: " "UIDVALIDITY has been changed.\n"); use_cache = FALSE; } if (use_cache) { GArray *uids; GHashTable *msg_table; GHashTable *flags_table; guint32 cache_last; guint32 begin = 0; GSList *cur, *next = NULL; MsgInfo *msginfo; IMAPFlags imap_flags; /* get cache data */ mlist = procmsg_read_cache(item, FALSE); procmsg_set_flags(mlist, item); cache_last = procmsg_get_last_num_in_msg_list(mlist); /* get all UID list and flags */ ok = imap_search_flags(session, &uids, &flags_table); if (ok != IMAP_SUCCESS) { if (ok == IMAP_SOCKET || ok == IMAP_IOERR) THROW; ok = imap_fetch_flags(session, &uids, &flags_table); if (ok != IMAP_SUCCESS) THROW; } if (uids->len > 0) { first_uid = g_array_index(uids, guint32, 0); last_uid = g_array_index(uids, guint32, uids->len - 1); } else { g_array_free(uids, TRUE); g_hash_table_destroy(flags_table); THROW; } /* sync message flags with server */ for (cur = mlist; cur != NULL; cur = next) { msginfo = (MsgInfo *)cur->data; next = cur->next; imap_flags = GPOINTER_TO_INT(g_hash_table_lookup (flags_table, GUINT_TO_POINTER(msginfo->msgnum))); if (imap_flags == 0) { debug_print("imap_get_msg_list: " "message %u has been deleted.\n", msginfo->msgnum); imap_delete_cached_message (item, msginfo->msgnum); if (MSG_IS_NEW(msginfo->flags)) item->new--; if (MSG_IS_UNREAD(msginfo->flags)) item->unread--; item->total--; mlist = g_slist_remove(mlist, msginfo); procmsg_msginfo_free(msginfo); item->cache_dirty = TRUE; item->mark_dirty = TRUE; continue; } if (!IMAP_IS_SEEN(imap_flags)) { if (!MSG_IS_UNREAD(msginfo->flags)) { item->unread++; MSG_SET_PERM_FLAGS(msginfo->flags, MSG_UNREAD); item->mark_dirty = TRUE; } } else { if (MSG_IS_NEW(msginfo->flags)) { item->new--; item->mark_dirty = TRUE; } if (MSG_IS_UNREAD(msginfo->flags)) { item->unread--; item->mark_dirty = TRUE; } MSG_UNSET_PERM_FLAGS(msginfo->flags, MSG_NEW|MSG_UNREAD); } if (IMAP_IS_FLAGGED(imap_flags)) { if (!MSG_IS_MARKED(msginfo->flags)) { MSG_SET_PERM_FLAGS(msginfo->flags, MSG_MARKED); item->mark_dirty = TRUE; } } else { if (MSG_IS_MARKED(msginfo->flags)) { MSG_UNSET_PERM_FLAGS(msginfo->flags, MSG_MARKED); item->mark_dirty = TRUE; } } if (IMAP_IS_ANSWERED(imap_flags)) { if (!MSG_IS_REPLIED(msginfo->flags)) { MSG_SET_PERM_FLAGS(msginfo->flags, MSG_REPLIED); item->mark_dirty = TRUE; } } else { if (MSG_IS_REPLIED(msginfo->flags)) { MSG_UNSET_PERM_FLAGS(msginfo->flags, MSG_REPLIED); item->mark_dirty = TRUE; } } } /* check for the first new message */ msg_table = procmsg_msg_hash_table_create(mlist); if (msg_table == NULL) begin = first_uid; else { gint i; for (i = 0; i < uids->len; i++) { guint32 uid; uid = g_array_index(uids, guint32, i); if (g_hash_table_lookup (msg_table, GUINT_TO_POINTER(uid)) == NULL) { debug_print("imap_get_msg_list: " "first new UID: %u\n", uid); begin = uid; break; } } g_hash_table_destroy(msg_table); } g_array_free(uids, TRUE); g_hash_table_destroy(flags_table); /* remove ununsed caches */ if (first_uid > 0 && last_uid > 0) { mlist = imap_delete_cached_messages (mlist, item, 0, first_uid - 1); mlist = imap_delete_cached_messages (mlist, item, begin > 0 ? begin : last_uid + 1, UINT_MAX); } if (begin > 0 && begin <= last_uid) { GSList *newlist; newlist = imap_get_uncached_messages (session, item, begin, last_uid, exists - item->total, TRUE); if (newlist) { item->cache_dirty = TRUE; item->mark_dirty = TRUE; } mlist = g_slist_concat(mlist, newlist); } } else { imap_delete_all_cached_messages(item); mlist = imap_get_uncached_messages(session, item, 0, 0, exists, TRUE); last_uid = procmsg_get_last_num_in_msg_list(mlist); item->cache_dirty = TRUE; item->mark_dirty = TRUE; } mlist = procmsg_sort_msg_list(mlist, item->sort_key, item->sort_type); item->last_num = last_uid; if (item->mark_queue) item->mark_dirty = TRUE; debug_print("cache_dirty: %d, mark_dirty: %d\n", item->cache_dirty, item->mark_dirty); if (!item->opened) { item->mtime = uid_validity; if (item->cache_dirty) procmsg_write_cache_list(item, mlist); if (item->mark_dirty) procmsg_write_flags_list(item, mlist); } catch: return mlist; } #undef THROW static gchar *imap_fetch_msg(Folder *folder, FolderItem *item, gint uid) { gchar *path, *filename; IMAPSession *session; gint ok; g_return_val_if_fail(folder != NULL, NULL); g_return_val_if_fail(item != NULL, NULL); path = folder_item_get_path(item); if (!is_dir_exist(path)) make_dir_hier(path); filename = g_strconcat(path, G_DIR_SEPARATOR_S, itos(uid), NULL); g_free(path); if (is_file_exist(filename)) { debug_print("message %d has been already cached.\n", uid); return filename; } session = imap_session_get(folder); if (!session) { g_free(filename); return NULL; } ok = imap_select(session, IMAP_FOLDER(folder), item->path, NULL, NULL, NULL, NULL); if (ok != IMAP_SUCCESS) { g_warning("can't select mailbox %s\n", item->path); g_free(filename); return NULL; } status_print(_("Getting message %d"), uid); debug_print("getting message %d...\n", uid); ok = imap_cmd_fetch(session, (guint32)uid, filename); if (ok != IMAP_SUCCESS) { g_warning("can't fetch message %d\n", uid); g_free(filename); return NULL; } return filename; } static MsgInfo *imap_get_msginfo(Folder *folder, FolderItem *item, gint uid) { IMAPSession *session; GSList *list; MsgInfo *msginfo = NULL; g_return_val_if_fail(folder != NULL, NULL); g_return_val_if_fail(item != NULL, NULL); session = imap_session_get(folder); g_return_val_if_fail(session != NULL, NULL); list = imap_get_uncached_messages(session, item, uid, uid, 0, FALSE); if (list) { msginfo = (MsgInfo *)list->data; list->data = NULL; } procmsg_msg_list_free(list); return msginfo; } static gint imap_add_msg(Folder *folder, FolderItem *dest, const gchar *file, MsgFlags *flags, gboolean remove_source) { GSList file_list; MsgFileInfo fileinfo; g_return_val_if_fail(file != NULL, -1); fileinfo.file = (gchar *)file; fileinfo.flags = flags; file_list.data = &fileinfo; file_list.next = NULL; return imap_add_msgs(folder, dest, &file_list, remove_source, NULL); } static gint imap_add_msgs(Folder *folder, FolderItem *dest, GSList *file_list, gboolean remove_source, gint *first) { gchar *destdir; IMAPSession *session; gint messages, recent, unseen; guint32 uid_next, uid_validity; guint32 last_uid = 0; GSList *cur; MsgFileInfo *fileinfo; gint count = 1; gint total; gint ok; GTimeVal tv_prev, tv_cur; g_return_val_if_fail(folder != NULL, -1); g_return_val_if_fail(dest != NULL, -1); g_return_val_if_fail(file_list != NULL, -1); session = imap_session_get(folder); if (!session) return -1; g_get_current_time(&tv_prev); ui_update(); ok = imap_status(session, IMAP_FOLDER(folder), dest->path, &messages, &recent, &uid_next, &uid_validity, &unseen); if (ok != IMAP_SUCCESS) { g_warning("can't append messages\n"); return -1; } destdir = imap_get_real_path(IMAP_FOLDER(folder), dest->path); if (!session->uidplus) last_uid = uid_next - 1; if (first) *first = uid_next; total = g_slist_length(file_list); for (cur = file_list; cur != NULL; cur = cur->next) { IMAPFlags iflags = 0; guint32 new_uid = 0; fileinfo = (MsgFileInfo *)cur->data; if (fileinfo->flags) { if (MSG_IS_MARKED(*fileinfo->flags)) iflags |= IMAP_FLAG_FLAGGED; if (MSG_IS_REPLIED(*fileinfo->flags)) iflags |= IMAP_FLAG_ANSWERED; if (!MSG_IS_UNREAD(*fileinfo->flags)) iflags |= IMAP_FLAG_SEEN; } if (dest->stype == F_OUTBOX || dest->stype == F_QUEUE || dest->stype == F_DRAFT) iflags |= IMAP_FLAG_SEEN; g_get_current_time(&tv_cur); if (tv_cur.tv_sec > tv_prev.tv_sec || tv_cur.tv_usec - tv_prev.tv_usec > PROGRESS_UPDATE_INTERVAL * 1000) { status_print(_("Appending messages to %s (%d / %d)"), dest->path, count, total); progress_show(count, total); ui_update(); tv_prev = tv_cur; } ++count; ok = imap_cmd_append(session, destdir, fileinfo->file, iflags, &new_uid); if (ok != IMAP_SUCCESS) { g_warning("can't append message %s\n", fileinfo->file); g_free(destdir); progress_show(0, 0); return -1; } if (!session->uidplus) last_uid++; else if (last_uid < new_uid) last_uid = new_uid; dest->last_num = last_uid; dest->total++; dest->updated = TRUE; if (fileinfo->flags) { if (MSG_IS_UNREAD(*fileinfo->flags)) dest->unread++; } else dest->unread++; } progress_show(0, 0); g_free(destdir); if (remove_source) { for (cur = file_list; cur != NULL; cur = cur->next) { fileinfo = (MsgFileInfo *)cur->data; if (g_unlink(fileinfo->file) < 0) FILE_OP_ERROR(fileinfo->file, "unlink"); } } return last_uid; } static gint imap_do_copy_msgs(Folder *folder, FolderItem *dest, GSList *msglist, gboolean remove_source) { FolderItem *src; gchar *destdir; GSList *seq_list, *cur; MsgInfo *msginfo; IMAPSession *session; gint count = 0, total; gint ok = IMAP_SUCCESS; g_return_val_if_fail(folder != NULL, -1); g_return_val_if_fail(dest != NULL, -1); g_return_val_if_fail(msglist != NULL, -1); session = imap_session_get(folder); if (!session) return -1; ui_update(); msginfo = (MsgInfo *)msglist->data; src = msginfo->folder; if (src == dest) { g_warning("the src folder is identical to the dest.\n"); return -1; } ok = imap_select(session, IMAP_FOLDER(folder), src->path, NULL, NULL, NULL, NULL); if (ok != IMAP_SUCCESS) return ok; destdir = imap_get_real_path(IMAP_FOLDER(folder), dest->path); total = g_slist_length(msglist); seq_list = imap_get_seq_set_from_msglist(msglist, IMAP_COPY_LIMIT); for (cur = seq_list; cur != NULL; cur = cur->next) { gchar *seq_set = (gchar *)cur->data; count += imap_seq_set_get_count(seq_set); if (remove_source) { status_print(_("Moving messages %s to %s ..."), seq_set, dest->path); debug_print("Moving message %s%c[%s] to %s ...\n", src->path, G_DIR_SEPARATOR, seq_set, dest->path); } else { status_print(_("Copying messages %s to %s ..."), seq_set, dest->path); debug_print("Copying message %s%c[%s] to %s ...\n", src->path, G_DIR_SEPARATOR, seq_set, dest->path); } progress_show(count, total); ui_update(); ok = imap_cmd_copy(session, seq_set, destdir); if (ok != IMAP_SUCCESS) { imap_seq_set_free(seq_list); progress_show(0, 0); return -1; } } progress_show(0, 0); dest->updated = TRUE; imap_seq_set_free(seq_list); g_free(destdir); for (cur = msglist; cur != NULL; cur = cur->next) { msginfo = (MsgInfo *)cur->data; dest->total++; if (MSG_IS_NEW(msginfo->flags)) dest->new++; if (MSG_IS_UNREAD(msginfo->flags)) dest->unread++; } if (remove_source) { ok = imap_remove_msgs(folder, src, msglist); if (ok != IMAP_SUCCESS) return ok; } if (ok == IMAP_SUCCESS) return 0; else return -1; } static gint imap_move_msg(Folder *folder, FolderItem *dest, MsgInfo *msginfo) { GSList msglist; g_return_val_if_fail(msginfo != NULL, -1); msglist.data = msginfo; msglist.next = NULL; return imap_move_msgs(folder, dest, &msglist); } static gint imap_move_msgs(Folder *folder, FolderItem *dest, GSList *msglist) { MsgInfo *msginfo; GSList *file_list; gint ret = 0; g_return_val_if_fail(folder != NULL, -1); g_return_val_if_fail(dest != NULL, -1); g_return_val_if_fail(msglist != NULL, -1); msginfo = (MsgInfo *)msglist->data; g_return_val_if_fail(msginfo->folder != NULL, -1); if (folder == msginfo->folder->folder) return imap_do_copy_msgs(folder, dest, msglist, TRUE); file_list = procmsg_get_message_file_list(msglist); g_return_val_if_fail(file_list != NULL, -1); ret = imap_add_msgs(folder, dest, file_list, FALSE, NULL); procmsg_message_file_list_free(file_list); if (ret != -1) ret = folder_item_remove_msgs(msginfo->folder, msglist); return ret; } static gint imap_copy_msg(Folder *folder, FolderItem *dest, MsgInfo *msginfo) { GSList msglist; g_return_val_if_fail(msginfo != NULL, -1); msglist.data = msginfo; msglist.next = NULL; return imap_copy_msgs(folder, dest, &msglist); } static gint imap_copy_msgs(Folder *folder, FolderItem *dest, GSList *msglist) { MsgInfo *msginfo; GSList *file_list; gint ret; g_return_val_if_fail(folder != NULL, -1); g_return_val_if_fail(dest != NULL, -1); g_return_val_if_fail(msglist != NULL, -1); msginfo = (MsgInfo *)msglist->data; g_return_val_if_fail(msginfo->folder != NULL, -1); if (folder == msginfo->folder->folder) return imap_do_copy_msgs(folder, dest, msglist, FALSE); file_list = procmsg_get_message_file_list(msglist); g_return_val_if_fail(file_list != NULL, -1); ret = imap_add_msgs(folder, dest, file_list, FALSE, NULL); procmsg_message_file_list_free(file_list); return ret; } static gint imap_remove_msgs_by_seq_set(Folder *folder, FolderItem *item, GSList *seq_list) { gint ok; IMAPSession *session; GSList *cur; g_return_val_if_fail(seq_list != NULL, -1); session = imap_session_get(folder); if (!session) return -1; for (cur = seq_list; cur != NULL; cur = cur->next) { gchar *seq_set = (gchar *)cur->data; status_print(_("Removing messages %s"), seq_set); ui_update(); ok = imap_set_message_flags(session, seq_set, IMAP_FLAG_DELETED, TRUE); if (ok != IMAP_SUCCESS) { log_warning(_("can't set deleted flags: %s\n"), seq_set); return ok; } } ok = imap_cmd_expunge(session); if (ok != IMAP_SUCCESS) log_warning(_("can't expunge\n")); item->updated = TRUE; return ok; } static gint imap_remove_msg(Folder *folder, FolderItem *item, MsgInfo *msginfo) { GSList msglist; g_return_val_if_fail(msginfo != NULL, -1); msglist.data = msginfo; msglist.next = NULL; return imap_remove_msgs(folder, item, &msglist); } static gint imap_remove_msgs(Folder *folder, FolderItem *item, GSList *msglist) { gint ok; IMAPSession *session; GSList *seq_list, *cur; gchar *dir; gboolean dir_exist; g_return_val_if_fail(folder != NULL, -1); g_return_val_if_fail(FOLDER_TYPE(folder) == F_IMAP, -1); g_return_val_if_fail(item != NULL, -1); g_return_val_if_fail(msglist != NULL, -1); session = imap_session_get(folder); if (!session) return -1; ok = imap_select(session, IMAP_FOLDER(folder), item->path, NULL, NULL, NULL, NULL); if (ok != IMAP_SUCCESS) return ok; seq_list = imap_get_seq_set_from_msglist(msglist, 0); ok = imap_remove_msgs_by_seq_set(folder, item, seq_list); imap_seq_set_free(seq_list); if (ok != IMAP_SUCCESS) return ok; dir = folder_item_get_path(item); dir_exist = is_dir_exist(dir); for (cur = msglist; cur != NULL; cur = cur->next) { MsgInfo *msginfo = (MsgInfo *)cur->data; guint32 uid = msginfo->msgnum; if (dir_exist) remove_numbered_files(dir, uid, uid); item->total--; if (MSG_IS_NEW(msginfo->flags)) item->new--; if (MSG_IS_UNREAD(msginfo->flags)) item->unread--; MSG_SET_TMP_FLAGS(msginfo->flags, MSG_INVALID); } g_free(dir); return IMAP_SUCCESS; } static gint imap_remove_all_msg(Folder *folder, FolderItem *item) { gint ok; IMAPSession *session; gchar *dir; g_return_val_if_fail(folder != NULL, -1); g_return_val_if_fail(item != NULL, -1); session = imap_session_get(folder); if (!session) return -1; ok = imap_select(session, IMAP_FOLDER(folder), item->path, NULL, NULL, NULL, NULL); if (ok != IMAP_SUCCESS) return ok; status_print(_("Removing all messages in %s"), item->path); ui_update(); imap_cmd_gen_send(session, "STORE 1:* +FLAGS.SILENT (\\Deleted)"); ok = imap_cmd_ok(session, NULL); if (ok != IMAP_SUCCESS) { log_warning(_("can't set deleted flags: 1:*\n")); return ok; } ok = imap_cmd_expunge(session); if (ok != IMAP_SUCCESS) { log_warning(_("can't expunge\n")); return ok; } item->new = item->unread = item->total = 0; item->updated = TRUE; dir = folder_item_get_path(item); if (is_dir_exist(dir)) remove_all_numbered_files(dir); g_free(dir); return IMAP_SUCCESS; } static gboolean imap_is_msg_changed(Folder *folder, FolderItem *item, MsgInfo *msginfo) { /* TODO: properly implement this method */ return FALSE; } static gint imap_close(Folder *folder, FolderItem *item) { gint ok; IMAPSession *session; g_return_val_if_fail(folder != NULL, -1); if (!item->path) return 0; if (!REMOTE_FOLDER(folder)->session) return 0; session = imap_session_get(folder); if (!session) return -1; if (session->mbox) { if (strcmp2(session->mbox, item->path) != 0) return -1; ok = imap_cmd_close(session); if (ok != IMAP_SUCCESS) log_warning(_("can't close folder\n")); g_free(session->mbox); session->mbox = NULL; return ok; } else return 0; } static gint imap_scan_folder(Folder *folder, FolderItem *item) { IMAPSession *session; gint messages, recent, unseen; guint32 uid_next, uid_validity; gint ok; g_return_val_if_fail(folder != NULL, -1); g_return_val_if_fail(item != NULL, -1); session = imap_session_get(folder); if (!session) return -1; ok = imap_status(session, IMAP_FOLDER(folder), item->path, &messages, &recent, &uid_next, &uid_validity, &unseen); if (ok != IMAP_SUCCESS) return -1; item->new = unseen > 0 ? recent : 0; item->unread = unseen; item->total = messages; item->last_num = (messages > 0 && uid_next > 0) ? uid_next - 1 : 0; /* item->mtime = uid_validity; */ item->updated = TRUE; return 0; } static gint imap_scan_tree(Folder *folder) { FolderItem *item = NULL; IMAPSession *session; gchar *root_folder = NULL; g_return_val_if_fail(folder != NULL, -1); g_return_val_if_fail(folder->account != NULL, -1); session = imap_session_get(folder); if (!session) { if (!folder->node) { folder_tree_destroy(folder); item = folder_item_new(folder->name, NULL); item->folder = folder; folder->node = item->node = g_node_new(item); } return -1; } if (folder->account->imap_dir && *folder->account->imap_dir) { gchar *real_path; GPtrArray *argbuf; gint ok; Xstrdup_a(root_folder, folder->account->imap_dir, return -1); extract_quote(root_folder, '"'); subst_char(root_folder, imap_get_path_separator(IMAP_FOLDER(folder), root_folder), '/'); strtailchomp(root_folder, '/'); real_path = imap_get_real_path (IMAP_FOLDER(folder), root_folder); debug_print("IMAP root directory: %s\n", real_path); /* check if root directory exist */ argbuf = g_ptr_array_new(); ok = imap_cmd_list(session, NULL, real_path, argbuf); if (ok != IMAP_SUCCESS || search_array_str(argbuf, "LIST ") == NULL) { log_warning(_("root folder %s not exist\n"), real_path); g_ptr_array_free(argbuf, TRUE); g_free(real_path); return -1; } g_ptr_array_free(argbuf, TRUE); g_free(real_path); } if (folder->node) item = FOLDER_ITEM(folder->node->data); if (!item || ((item->path || root_folder) && strcmp2(item->path, root_folder) != 0)) { folder_tree_destroy(folder); item = folder_item_new(folder->name, root_folder); item->folder = folder; folder->node = item->node = g_node_new(item); } imap_scan_tree_recursive(session, FOLDER_ITEM(folder->node->data)); imap_create_missing_folders(folder); return 0; } static gint imap_scan_tree_recursive(IMAPSession *session, FolderItem *item) { Folder *folder; IMAPFolder *imapfolder; FolderItem *new_item; GSList *item_list, *cur; GNode *node; gchar *real_path; gchar *wildcard_path; gchar separator; gchar wildcard[3]; g_return_val_if_fail(item != NULL, -1); g_return_val_if_fail(item->folder != NULL, -1); g_return_val_if_fail(item->no_sub == FALSE, -1); folder = item->folder; imapfolder = IMAP_FOLDER(folder); separator = imap_get_path_separator(imapfolder, item->path); if (folder->ui_func) folder->ui_func(folder, item, folder->ui_func_data); if (item->path) { wildcard[0] = separator; wildcard[1] = '%'; wildcard[2] = '\0'; real_path = imap_get_real_path(imapfolder, item->path); } else { wildcard[0] = '%'; wildcard[1] = '\0'; real_path = g_strdup(""); } Xstrcat_a(wildcard_path, real_path, wildcard, {g_free(real_path); return IMAP_ERROR;}); QUOTE_IF_REQUIRED(wildcard_path, wildcard_path); imap_cmd_gen_send(session, "LIST \"\" %s", wildcard_path); strtailchomp(real_path, separator); item_list = imap_parse_list(session, real_path, NULL); g_free(real_path); node = item->node->children; while (node != NULL) { FolderItem *old_item = FOLDER_ITEM(node->data); GNode *next = node->next; new_item = NULL; for (cur = item_list; cur != NULL; cur = cur->next) { FolderItem *cur_item = FOLDER_ITEM(cur->data); if (!strcmp2(old_item->path, cur_item->path)) { new_item = cur_item; break; } } if (!new_item) { if (old_item->stype != F_VIRTUAL) { debug_print("folder '%s' not found. removing...\n", old_item->path); folder_item_remove(old_item); } } else if (old_item->stype == F_VIRTUAL) { debug_print("IMAP4 folder found at the location of virtual folder '%s'. removing virtual folder...\n", old_item->path); virtual_get_class()->remove_folder (folder, old_item); } else { old_item->no_sub = new_item->no_sub; old_item->no_select = new_item->no_select; if (old_item->no_select == TRUE) old_item->new = old_item->unread = old_item->total = 0; if (old_item->no_sub == TRUE && node->children) { debug_print("folder '%s' doesn't have " "subfolders. removing...\n", old_item->path); folder_item_remove_children(old_item); } } node = next; } for (cur = item_list; cur != NULL; cur = cur->next) { FolderItem *cur_item = FOLDER_ITEM(cur->data); new_item = NULL; for (node = item->node->children; node != NULL; node = node->next) { if (!strcmp2(FOLDER_ITEM(node->data)->path, cur_item->path)) { new_item = FOLDER_ITEM(node->data); folder_item_destroy(cur_item); cur_item = NULL; break; } } if (!new_item) { new_item = cur_item; debug_print("new folder '%s' found.\n", new_item->path); folder_item_append(item, new_item); } if (!strcmp(new_item->path, "INBOX")) { new_item->stype = F_INBOX; folder->inbox = new_item; } else if (!item->parent || item->stype == F_INBOX) { const gchar *base; base = g_basename(new_item->path); if (!folder->outbox && !g_ascii_strcasecmp(base, "Sent")) { new_item->stype = F_OUTBOX; folder->outbox = new_item; } else if (!folder->draft && !g_ascii_strcasecmp(base, "Drafts")) { new_item->stype = F_DRAFT; folder->draft = new_item; } else if (!folder->queue && !g_ascii_strcasecmp(base, "Queue")) { new_item->stype = F_QUEUE; folder->queue = new_item; } else if (!folder->trash && !g_ascii_strcasecmp(base, "Trash")) { new_item->stype = F_TRASH; folder->trash = new_item; } } #if 0 if (new_item->no_select == FALSE) imap_scan_folder(folder, new_item); #endif if (new_item->no_sub == FALSE) imap_scan_tree_recursive(session, new_item); } g_slist_free(item_list); return IMAP_SUCCESS; } static GSList *imap_parse_list(IMAPSession *session, const gchar *real_path, gchar *separator) { gchar buf[IMAPBUFSIZE]; gchar flags[256]; gchar separator_str[16]; gchar *p; const gchar *name; gchar *loc_name, *loc_path; GSList *item_list = NULL; GString *str; FolderItem *new_item; debug_print("getting list of %s ...\n", *real_path ? real_path : "\"\""); str = g_string_new(NULL); for (;;) { if (sock_gets(SESSION(session)->sock, buf, sizeof(buf)) <= 0) { log_warning(_("error occurred while getting LIST.\n")); break; } strretchomp(buf); if (buf[0] != '*' || buf[1] != ' ') { log_print("IMAP4< %s\n", buf); if (sscanf(buf, "%*d %16s", buf) < 1 || strcmp(buf, "OK") != 0) log_warning(_("error occurred while getting LIST.\n")); break; } debug_print("IMAP4< %s\n", buf); g_string_assign(str, buf); p = str->str + 2; if (strncmp(p, "LIST ", 5) != 0) continue; p += 5; if (*p != '(') continue; p++; p = strchr_cpy(p, ')', flags, sizeof(flags)); if (!p) continue; while (*p == ' ') p++; p = strchr_cpy(p, ' ', separator_str, sizeof(separator_str)); if (!p) continue; extract_quote(separator_str, '"'); if (!strcmp(separator_str, "NIL")) separator_str[0] = '\0'; if (separator) *separator = separator_str[0]; buf[0] = '\0'; while (*p == ' ') p++; if ((*p == '~' && *(p + 1) == '{') || *p == '{' || *p == '"') p = imap_parse_atom(session, p, buf, sizeof(buf), str); else strncpy2(buf, p, sizeof(buf)); strtailchomp(buf, separator_str[0]); if (buf[0] == '\0') continue; if (!strcmp(buf, real_path)) continue; if (separator_str[0] != '\0') subst_char(buf, separator_str[0], '/'); name = g_basename(buf); if (name[0] == '.') continue; loc_name = imap_modified_utf7_to_utf8(name); loc_path = imap_modified_utf7_to_utf8(buf); new_item = folder_item_new(loc_name, loc_path); if (strcasestr(flags, "\\Noinferiors") != NULL) new_item->no_sub = TRUE; if (strcmp(buf, "INBOX") != 0 && strcasestr(flags, "\\Noselect") != NULL) new_item->no_select = TRUE; item_list = g_slist_append(item_list, new_item); debug_print("folder '%s' found.\n", loc_path); g_free(loc_path); g_free(loc_name); } g_string_free(str, TRUE); return item_list; } static gint imap_create_tree(Folder *folder) { g_return_val_if_fail(folder != NULL, -1); g_return_val_if_fail(folder->node != NULL, -1); g_return_val_if_fail(folder->node->data != NULL, -1); g_return_val_if_fail(folder->account != NULL, -1); imap_scan_tree(folder); imap_create_missing_folders(folder); return 0; } static void imap_create_missing_folders(Folder *folder) { g_return_if_fail(folder != NULL); if (!folder->inbox) folder->inbox = imap_create_special_folder (folder, F_INBOX, "INBOX"); #if 0 if (!folder->outbox) folder->outbox = imap_create_special_folder (folder, F_OUTBOX, "Sent"); if (!folder->draft) folder->draft = imap_create_special_folder (folder, F_DRAFT, "Drafts"); if (!folder->queue) folder->queue = imap_create_special_folder (folder, F_QUEUE, "Queue"); #endif if (!folder->trash) folder->trash = imap_create_special_folder (folder, F_TRASH, "Trash"); } static FolderItem *imap_create_special_folder(Folder *folder, SpecialFolderItemType stype, const gchar *name) { FolderItem *item; FolderItem *new_item; g_return_val_if_fail(folder != NULL, NULL); g_return_val_if_fail(folder->node != NULL, NULL); g_return_val_if_fail(folder->node->data != NULL, NULL); g_return_val_if_fail(folder->account != NULL, NULL); g_return_val_if_fail(name != NULL, NULL); item = FOLDER_ITEM(folder->node->data); new_item = imap_create_folder(folder, item, name); if (!new_item) { g_warning(_("Can't create '%s'\n"), name); if (!folder->inbox) return NULL; new_item = imap_create_folder(folder, folder->inbox, name); if (!new_item) g_warning(_("Can't create '%s' under INBOX\n"), name); else new_item->stype = stype; } else new_item->stype = stype; return new_item; } static FolderItem *imap_create_folder(Folder *folder, FolderItem *parent, const gchar *name) { gchar *dirpath, *imap_path; IMAPSession *session; FolderItem *new_item; gchar separator; gchar *new_name; const gchar *p; gint ok; g_return_val_if_fail(folder != NULL, NULL); g_return_val_if_fail(folder->account != NULL, NULL); g_return_val_if_fail(parent != NULL, NULL); g_return_val_if_fail(name != NULL, NULL); session = imap_session_get(folder); if (!session) return NULL; if (!parent->parent && strcmp(name, "INBOX") == 0) dirpath = g_strdup(name); else if (parent->path) dirpath = g_strconcat(parent->path, "/", name, NULL); else if ((p = strchr(name, '/')) != NULL && *(p + 1) != '\0') dirpath = g_strdup(name); else if (folder->account->imap_dir && *folder->account->imap_dir) { gchar *imap_dir; Xstrdup_a(imap_dir, folder->account->imap_dir, return NULL); strtailchomp(imap_dir, '/'); dirpath = g_strconcat(imap_dir, "/", name, NULL); } else dirpath = g_strdup(name); /* keep trailing directory separator to create a folder that contains sub folder */ imap_path = imap_utf8_to_modified_utf7(dirpath); strtailchomp(dirpath, '/'); Xstrdup_a(new_name, name, {g_free(dirpath); return NULL;}); strtailchomp(new_name, '/'); separator = imap_get_path_separator(IMAP_FOLDER(folder), imap_path); imap_path_separator_subst(imap_path, separator); subst_char(new_name, '/', separator); if (strcmp(name, "INBOX") != 0) { GPtrArray *argbuf; gint i; gboolean exist = FALSE; argbuf = g_ptr_array_new(); ok = imap_cmd_list(session, NULL, imap_path, argbuf); if (ok != IMAP_SUCCESS) { log_warning(_("can't create mailbox: LIST failed\n")); g_free(imap_path); g_free(dirpath); g_ptr_array_free(argbuf, TRUE); return NULL; } for (i = 0; i < argbuf->len; i++) { gchar *str; str = g_ptr_array_index(argbuf, i); if (!strncmp(str, "LIST ", 5)) { exist = TRUE; break; } } g_ptr_array_free(argbuf, TRUE); if (!exist) { ok = imap_cmd_create(session, imap_path); if (ok != IMAP_SUCCESS) { log_warning(_("can't create mailbox\n")); g_free(imap_path); g_free(dirpath); return NULL; } } } new_item = folder_item_new(new_name, dirpath); folder_item_append(parent, new_item); g_free(imap_path); g_free(dirpath); dirpath = folder_item_get_path(new_item); if (!is_dir_exist(dirpath)) make_dir_hier(dirpath); g_free(dirpath); return new_item; } static gint imap_rename_folder_real(Folder *folder, FolderItem *item, FolderItem *new_parent, const gchar *name) { gchar *newpath; gchar *real_oldpath; gchar *real_newpath; gchar *paths[2]; gchar *old_cache_dir; gchar *new_cache_dir; IMAPSession *session; gchar separator; gint ok; gint exists, recent, unseen; guint32 uid_validity; g_return_val_if_fail(folder != NULL, -1); g_return_val_if_fail(item != NULL, -1); g_return_val_if_fail(folder == item->folder, -1); g_return_val_if_fail(item->path != NULL, -1); g_return_val_if_fail(new_parent != NULL || name != NULL, -1); if (new_parent) { g_return_val_if_fail(item != new_parent, -1); g_return_val_if_fail(item->parent != new_parent, -1); g_return_val_if_fail(item->folder == new_parent->folder, -1); if (g_node_is_ancestor(item->node, new_parent->node)) { g_warning("folder to be moved is ancestor of new parent\n"); return -1; } } session = imap_session_get(folder); if (!session) return -1; real_oldpath = imap_get_real_path(IMAP_FOLDER(folder), item->path); g_free(session->mbox); session->mbox = NULL; ok = imap_cmd_examine(session, "INBOX", &exists, &recent, &unseen, &uid_validity); if (ok != IMAP_SUCCESS) { g_free(real_oldpath); return -1; } separator = imap_get_path_separator(IMAP_FOLDER(folder), item->path); if (new_parent) { if (name) { if (new_parent->path) newpath = g_strconcat(new_parent->path, G_DIR_SEPARATOR_S, name, NULL); else newpath = g_strdup(name); } else { gchar *name_; name_ = g_path_get_basename(item->path); if (new_parent->path) newpath = g_strconcat(new_parent->path, G_DIR_SEPARATOR_S, name_, NULL); else newpath = g_strdup(name_); AUTORELEASE_STR(name_, ); name = name_; } } else { if (strchr(item->path, G_DIR_SEPARATOR)) { gchar *dirpath; dirpath = g_dirname(item->path); newpath = g_strconcat(dirpath, G_DIR_SEPARATOR_S, name, NULL); g_free(dirpath); } else newpath = g_strdup(name); } real_newpath = imap_utf8_to_modified_utf7(newpath); imap_path_separator_subst(real_newpath, separator); ok = imap_cmd_rename(session, real_oldpath, real_newpath); if (ok != IMAP_SUCCESS) { log_warning(_("can't rename mailbox: %s to %s\n"), real_oldpath, real_newpath); g_free(real_oldpath); g_free(newpath); g_free(real_newpath); return -1; } if (new_parent) { g_node_unlink(item->node); g_node_append(new_parent->node, item->node); item->parent = new_parent; } g_free(item->name); item->name = g_strdup(name); old_cache_dir = folder_item_get_path(item); paths[0] = g_strdup(item->path); paths[1] = newpath; g_node_traverse(item->node, G_PRE_ORDER, G_TRAVERSE_ALL, -1, imap_rename_folder_func, paths); if (is_dir_exist(old_cache_dir)) { new_cache_dir = folder_item_get_path(item); if (g_rename(old_cache_dir, new_cache_dir) < 0) { FILE_OP_ERROR(old_cache_dir, "rename"); } g_free(new_cache_dir); } g_free(old_cache_dir); g_free(paths[0]); g_free(newpath); g_free(real_oldpath); g_free(real_newpath); return 0; } static gint imap_rename_folder(Folder *folder, FolderItem *item, const gchar *name) { return imap_rename_folder_real(folder, item, NULL, name); } static gint imap_move_folder(Folder *folder, FolderItem *item, FolderItem *new_parent) { return imap_rename_folder_real(folder, item, new_parent, NULL); } static gint imap_remove_folder(Folder *folder, FolderItem *item) { gint ok; IMAPSession *session; gchar *path; gchar *cache_dir; gint exists, recent, unseen; guint32 uid_validity; g_return_val_if_fail(folder != NULL, -1); g_return_val_if_fail(item != NULL, -1); g_return_val_if_fail(item->path != NULL, -1); session = imap_session_get(folder); if (!session) return -1; path = imap_get_real_path(IMAP_FOLDER(folder), item->path); ok = imap_cmd_examine(session, "INBOX", &exists, &recent, &unseen, &uid_validity); if (ok != IMAP_SUCCESS) { g_free(path); return -1; } ok = imap_cmd_delete(session, path); if (ok != IMAP_SUCCESS) { log_warning(_("can't delete mailbox\n")); g_free(path); return -1; } g_free(path); cache_dir = folder_item_get_path(item); if (is_dir_exist(cache_dir) && remove_dir_recursive(cache_dir) < 0) g_warning("can't remove directory '%s'\n", cache_dir); g_free(cache_dir); folder_item_remove(item); return 0; } static GSList *imap_get_uncached_messages(IMAPSession *session, FolderItem *item, guint32 first_uid, guint32 last_uid, gint exists, gboolean update_count) { gchar *tmp; GSList *newlist = NULL; GSList *llast = NULL; GString *str; MsgInfo *msginfo; gchar seq_set[22]; gint count = 1; GTimeVal tv_prev, tv_cur; g_return_val_if_fail(session != NULL, NULL); g_return_val_if_fail(item != NULL, NULL); g_return_val_if_fail(item->folder != NULL, NULL); g_return_val_if_fail(FOLDER_TYPE(item->folder) == F_IMAP, NULL); g_return_val_if_fail(first_uid <= last_uid, NULL); g_get_current_time(&tv_prev); ui_update(); if (first_uid == 0 && last_uid == 0) strcpy(seq_set, "1:*"); else g_snprintf(seq_set, sizeof(seq_set), "%u:%u", first_uid, last_uid); if (imap_cmd_envelope(session, seq_set) != IMAP_SUCCESS) { log_warning(_("can't get envelope\n")); return NULL; } str = g_string_new(NULL); for (;;) { if (exists > 0) { g_get_current_time(&tv_cur); if (tv_cur.tv_sec > tv_prev.tv_sec || tv_cur.tv_usec - tv_prev.tv_usec > PROGRESS_UPDATE_INTERVAL * 1000) { status_print (_("Getting message headers (%d / %d)"), count, exists); progress_show(count, exists); ui_update(); tv_prev = tv_cur; } } ++count; if (sock_getline(SESSION(session)->sock, &tmp) < 0) { log_warning(_("error occurred while getting envelope.\n")); g_string_free(str, TRUE); progress_show(0, 0); return newlist; } strretchomp(tmp); if (tmp[0] != '*' || tmp[1] != ' ') { log_print("IMAP4< %s\n", tmp); g_free(tmp); break; } if (strstr(tmp, "FETCH") == NULL) { log_print("IMAP4< %s\n", tmp); g_free(tmp); continue; } log_print("IMAP4< %s\n", tmp); g_string_assign(str, tmp); g_free(tmp); msginfo = imap_parse_envelope(session, item, str); if (!msginfo) { log_warning(_("can't parse envelope: %s\n"), str->str); continue; } if (update_count) { if (MSG_IS_NEW(msginfo->flags)) item->new++; if (MSG_IS_UNREAD(msginfo->flags)) item->unread++; } if (item->stype == F_QUEUE) { MSG_SET_TMP_FLAGS(msginfo->flags, MSG_QUEUED); } else if (item->stype == F_DRAFT) { MSG_SET_TMP_FLAGS(msginfo->flags, MSG_DRAFT); } msginfo->folder = item; if (!newlist) llast = newlist = g_slist_append(newlist, msginfo); else { llast = g_slist_append(llast, msginfo); llast = llast->next; } if (update_count) item->total++; } progress_show(0, 0); g_string_free(str, TRUE); session_set_access_time(SESSION(session)); return newlist; } static void imap_delete_cached_message(FolderItem *item, guint32 uid) { gchar *dir; gchar *file; g_return_if_fail(item != NULL); g_return_if_fail(item->folder != NULL); g_return_if_fail(FOLDER_TYPE(item->folder) == F_IMAP); dir = folder_item_get_path(item); file = g_strdup_printf("%s%c%u", dir, G_DIR_SEPARATOR, uid); debug_print("Deleting cached message: %s\n", file); g_unlink(file); g_free(file); g_free(dir); } static GSList *imap_delete_cached_messages(GSList *mlist, FolderItem *item, guint32 first_uid, guint32 last_uid) { GSList *cur, *next; MsgInfo *msginfo; gchar *dir; g_return_val_if_fail(item != NULL, mlist); g_return_val_if_fail(item->folder != NULL, mlist); g_return_val_if_fail(FOLDER_TYPE(item->folder) == F_IMAP, mlist); if (first_uid == 0 && last_uid == 0) return mlist; debug_print("Deleting cached messages %u - %u ... ", first_uid, last_uid); dir = folder_item_get_path(item); if (is_dir_exist(dir)) remove_numbered_files(dir, first_uid, last_uid); g_free(dir); for (cur = mlist; cur != NULL; ) { next = cur->next; msginfo = (MsgInfo *)cur->data; if (msginfo != NULL && first_uid <= msginfo->msgnum && msginfo->msgnum <= last_uid) { procmsg_msginfo_free(msginfo); mlist = g_slist_remove(mlist, msginfo); } cur = next; } debug_print("done.\n"); return mlist; } static void imap_delete_all_cached_messages(FolderItem *item) { gchar *dir; g_return_if_fail(item != NULL); g_return_if_fail(item->folder != NULL); g_return_if_fail(FOLDER_TYPE(item->folder) == F_IMAP); debug_print("Deleting all cached messages... "); dir = folder_item_get_path(item); if (is_dir_exist(dir)) remove_all_numbered_files(dir); g_free(dir); debug_print("done.\n"); } #if USE_SSL static SockInfo *imap_open(const gchar *server, gushort port, SSLType ssl_type) #else static SockInfo *imap_open(const gchar *server, gushort port) #endif { SockInfo *sock; if ((sock = sock_connect(server, port)) == NULL) { log_warning(_("Can't connect to IMAP4 server: %s:%d\n"), server, port); return NULL; } #if USE_SSL if (ssl_type == SSL_TUNNEL && !ssl_init_socket(sock)) { log_warning(_("Can't establish IMAP4 session with: %s:%d\n"), server, port); sock_close(sock); return NULL; } #endif return sock; } static GList *imap_parse_namespace_str(gchar *str) { gchar *p = str; gchar *name; gchar *separator; IMAPNameSpace *namespace; GList *ns_list = NULL; while (*p != '\0') { /* parse ("#foo" "/") */ while (*p && *p != '(') p++; if (*p == '\0') break; p++; while (*p && *p != '"') p++; if (*p == '\0') break; p++; name = p; while (*p && *p != '"') p++; if (*p == '\0') break; *p = '\0'; p++; while (*p && g_ascii_isspace(*p)) p++; if (*p == '\0') break; if (strncmp(p, "NIL", 3) == 0) separator = NULL; else if (*p == '"') { p++; separator = p; while (*p && *p != '"') p++; if (*p == '\0') break; *p = '\0'; p++; } else break; while (*p && *p != ')') p++; if (*p == '\0') break; p++; namespace = g_new(IMAPNameSpace, 1); namespace->name = g_strdup(name); namespace->separator = separator ? separator[0] : '\0'; ns_list = g_list_append(ns_list, namespace); } return ns_list; } static void imap_parse_namespace(IMAPSession *session, IMAPFolder *folder) { gchar *ns_str = NULL; gchar **str_array; g_return_if_fail(session != NULL); g_return_if_fail(folder != NULL); if (folder->ns_personal != NULL || folder->ns_others != NULL || folder->ns_shared != NULL) return; if (imap_cmd_namespace(session, &ns_str) != IMAP_SUCCESS) { log_warning(_("can't get namespace\n")); imap_get_namespace_by_list(session, folder); return; } str_array = strsplit_parenthesis(ns_str, '(', ')', 3); if (str_array[0]) folder->ns_personal = imap_parse_namespace_str(str_array[0]); if (str_array[0] && str_array[1]) folder->ns_others = imap_parse_namespace_str(str_array[1]); if (str_array[0] && str_array[1] && str_array[2]) folder->ns_shared = imap_parse_namespace_str(str_array[2]); g_strfreev(str_array); g_free(ns_str); } static void imap_get_namespace_by_list(IMAPSession *session, IMAPFolder *folder) { GSList *item_list, *cur; gchar separator = '\0'; IMAPNameSpace *namespace; g_return_if_fail(session != NULL); g_return_if_fail(folder != NULL); if (folder->ns_personal != NULL || folder->ns_others != NULL || folder->ns_shared != NULL) return; imap_cmd_gen_send(session, "LIST \"\" \"\""); item_list = imap_parse_list(session, "", &separator); for (cur = item_list; cur != NULL; cur = cur->next) folder_item_destroy(FOLDER_ITEM(cur->data)); g_slist_free(item_list); namespace = g_new(IMAPNameSpace, 1); namespace->name = g_strdup(""); namespace->separator = separator; folder->ns_personal = g_list_append(NULL, namespace); } static IMAPNameSpace *imap_find_namespace_from_list(GList *ns_list, const gchar *path) { IMAPNameSpace *namespace = NULL; gchar *tmp_path, *name; if (!path) path = ""; for (; ns_list != NULL; ns_list = ns_list->next) { IMAPNameSpace *tmp_ns = ns_list->data; Xstrcat_a(tmp_path, path, "/", return namespace); Xstrdup_a(name, tmp_ns->name, return namespace); if (tmp_ns->separator && tmp_ns->separator != '/') { subst_char(tmp_path, tmp_ns->separator, '/'); subst_char(name, tmp_ns->separator, '/'); } if (strncmp(tmp_path, name, strlen(name)) == 0) namespace = tmp_ns; } return namespace; } static IMAPNameSpace *imap_find_namespace(IMAPFolder *folder, const gchar *path) { IMAPNameSpace *namespace; g_return_val_if_fail(folder != NULL, NULL); namespace = imap_find_namespace_from_list(folder->ns_personal, path); if (namespace) return namespace; namespace = imap_find_namespace_from_list(folder->ns_others, path); if (namespace) return namespace; namespace = imap_find_namespace_from_list(folder->ns_shared, path); if (namespace) return namespace; return NULL; } static gchar imap_get_path_separator(IMAPFolder *folder, const gchar *path) { IMAPNameSpace *namespace; gchar separator = '/'; namespace = imap_find_namespace(folder, path); if (namespace && namespace->separator) separator = namespace->separator; return separator; } static gchar *imap_get_real_path(IMAPFolder *folder, const gchar *path) { gchar *real_path; gchar separator; g_return_val_if_fail(folder != NULL, NULL); g_return_val_if_fail(path != NULL, NULL); real_path = imap_utf8_to_modified_utf7(path); separator = imap_get_path_separator(folder, path); imap_path_separator_subst(real_path, separator); return real_path; } static gchar *imap_parse_atom(IMAPSession *session, gchar *src, gchar *dest, gint dest_len, GString *str) { gchar *cur_pos = src; gchar *nextline; g_return_val_if_fail(str != NULL, cur_pos); /* read the next line if the current response buffer is empty */ while (g_ascii_isspace(*cur_pos)) cur_pos++; while (*cur_pos == '\0') { if (sock_getline(SESSION(session)->sock, &nextline) < 0) return cur_pos; g_string_assign(str, nextline); cur_pos = str->str; strretchomp(nextline); /* log_print("IMAP4< %s\n", nextline); */ debug_print("IMAP4< %s\n", nextline); g_free(nextline); while (g_ascii_isspace(*cur_pos)) cur_pos++; } if (*cur_pos == '~' && *(cur_pos + 1) == '{') cur_pos++; if (!strncmp(cur_pos, "NIL", 3)) { *dest = '\0'; cur_pos += 3; } else if (*cur_pos == '\"') { gchar *p; p = get_quoted(cur_pos, '\"', dest, dest_len); cur_pos = p ? p : cur_pos + 2; } else if (*cur_pos == '{') { gchar buf[32]; gint len; gint block_len = 0; cur_pos = strchr_cpy(cur_pos + 1, '}', buf, sizeof(buf)); len = atoi(buf); g_return_val_if_fail(len >= 0, cur_pos); g_string_truncate(str, 0); cur_pos = str->str; do { gint cur_len; cur_len = sock_getline(SESSION(session)->sock, &nextline); if (cur_len < 0) return cur_pos; block_len += cur_len; subst_null(nextline, cur_len, ' '); g_string_append(str, nextline); cur_pos = str->str; strretchomp(nextline); /* log_print("IMAP4< %s\n", nextline); */ debug_print("IMAP4< %s\n", nextline); g_free(nextline); } while (block_len < len); memcpy(dest, cur_pos, MIN(len, dest_len - 1)); dest[MIN(len, dest_len - 1)] = '\0'; cur_pos += len; } return cur_pos; } static gchar *imap_get_header(IMAPSession *session, gchar *cur_pos, gchar **headers, GString *str) { gchar *nextline; gchar buf[32]; gint len; gint block_len = 0; *headers = NULL; g_return_val_if_fail(str != NULL, cur_pos); while (g_ascii_isspace(*cur_pos)) cur_pos++; if (*cur_pos == '~' && *(cur_pos + 1) == '{') cur_pos++; g_return_val_if_fail(*cur_pos == '{', cur_pos); cur_pos = strchr_cpy(cur_pos + 1, '}', buf, sizeof(buf)); len = atoi(buf); g_return_val_if_fail(len >= 0, cur_pos); g_string_truncate(str, 0); cur_pos = str->str; do { gint cur_len; cur_len = sock_getline(SESSION(session)->sock, &nextline); if (cur_len < 0) return cur_pos; block_len += cur_len; subst_null(nextline, cur_len, ' '); g_string_append(str, nextline); cur_pos = str->str; /* strretchomp(nextline); */ /* debug_print("IMAP4< %s\n", nextline); */ g_free(nextline); } while (block_len < len); debug_print("IMAP4< [contents of RFC822.HEADER]\n"); *headers = g_strndup(cur_pos, len); cur_pos += len; while (g_ascii_isspace(*cur_pos)) cur_pos++; while (*cur_pos == '\0') { if (sock_getline(SESSION(session)->sock, &nextline) < 0) return cur_pos; g_string_assign(str, nextline); cur_pos = str->str; strretchomp(nextline); debug_print("IMAP4< %s\n", nextline); g_free(nextline); while (g_ascii_isspace(*cur_pos)) cur_pos++; } return cur_pos; } static MsgFlags imap_parse_flags(const gchar *flag_str) { const gchar *p = flag_str; MsgFlags flags = {0, 0}; flags.perm_flags = MSG_UNREAD; while ((p = strchr(p, '\\')) != NULL) { p++; if (g_ascii_strncasecmp(p, "Recent", 6) == 0 && MSG_IS_UNREAD(flags)) { MSG_SET_PERM_FLAGS(flags, MSG_NEW); } else if (g_ascii_strncasecmp(p, "Seen", 4) == 0) { MSG_UNSET_PERM_FLAGS(flags, MSG_NEW|MSG_UNREAD); } else if (g_ascii_strncasecmp(p, "Deleted", 7) == 0) { MSG_SET_PERM_FLAGS(flags, MSG_DELETED); } else if (g_ascii_strncasecmp(p, "Flagged", 7) == 0) { MSG_SET_PERM_FLAGS(flags, MSG_MARKED); } else if (g_ascii_strncasecmp(p, "Answered", 8) == 0) { MSG_SET_PERM_FLAGS(flags, MSG_REPLIED); } } return flags; } static IMAPFlags imap_parse_imap_flags(const gchar *flag_str) { const gchar *p = flag_str; IMAPFlags flags = 0; while ((p = strchr(p, '\\')) != NULL) { p++; if (g_ascii_strncasecmp(p, "Seen", 4) == 0) { flags |= IMAP_FLAG_SEEN; } else if (g_ascii_strncasecmp(p, "Deleted", 7) == 0) { flags |= IMAP_FLAG_DELETED; } else if (g_ascii_strncasecmp(p, "Flagged", 7) == 0) { flags |= IMAP_FLAG_FLAGGED; } else if (g_ascii_strncasecmp(p, "Answered", 8) == 0) { flags |= IMAP_FLAG_ANSWERED; } } return flags; } static MsgInfo *imap_parse_envelope(IMAPSession *session, FolderItem *item, GString *line_str) { gchar buf[IMAPBUFSIZE]; MsgInfo *msginfo = NULL; gchar *cur_pos; gint msgnum; guint32 uid = 0; size_t size = 0; MsgFlags flags = {0, 0}, imap_flags = {0, 0}; g_return_val_if_fail(line_str != NULL, NULL); g_return_val_if_fail(line_str->str[0] == '*' && line_str->str[1] == ' ', NULL); MSG_SET_TMP_FLAGS(flags, MSG_IMAP); if (item->stype == F_QUEUE) { MSG_SET_TMP_FLAGS(flags, MSG_QUEUED); } else if (item->stype == F_DRAFT) { MSG_SET_TMP_FLAGS(flags, MSG_DRAFT); } cur_pos = line_str->str + 2; #define PARSE_ONE_ELEMENT(ch) \ { \ cur_pos = strchr_cpy(cur_pos, ch, buf, sizeof(buf)); \ if (cur_pos == NULL) { \ g_warning("cur_pos == NULL\n"); \ procmsg_msginfo_free(msginfo); \ return NULL; \ } \ } PARSE_ONE_ELEMENT(' '); msgnum = atoi(buf); PARSE_ONE_ELEMENT(' '); g_return_val_if_fail(!strcmp(buf, "FETCH"), NULL); g_return_val_if_fail(*cur_pos == '(', NULL); cur_pos++; while (*cur_pos != '\0' && *cur_pos != ')') { while (*cur_pos == ' ') cur_pos++; if (!strncmp(cur_pos, "UID ", 4)) { cur_pos += 4; uid = strtoul(cur_pos, &cur_pos, 10); } else if (!strncmp(cur_pos, "FLAGS ", 6)) { cur_pos += 6; if (*cur_pos != '(') { g_warning("*cur_pos != '('\n"); procmsg_msginfo_free(msginfo); return NULL; } cur_pos++; PARSE_ONE_ELEMENT(')'); imap_flags = imap_parse_flags(buf); } else if (!strncmp(cur_pos, "RFC822.SIZE ", 12)) { cur_pos += 12; size = strtol(cur_pos, &cur_pos, 10); } else if (!strncmp(cur_pos, "RFC822.HEADER ", 14)) { gchar *headers; cur_pos += 14; cur_pos = imap_get_header(session, cur_pos, &headers, line_str); msginfo = procheader_parse_str(headers, flags, FALSE); g_free(headers); } else { g_warning("invalid FETCH response: %s\n", cur_pos); break; } } #undef PARSE_ONE_ELEMENT if (msginfo) { msginfo->msgnum = uid; msginfo->size = size; msginfo->flags.tmp_flags |= imap_flags.tmp_flags; msginfo->flags.perm_flags = imap_flags.perm_flags; } return msginfo; } static gint imap_msg_list_change_perm_flags(GSList *msglist, MsgPermFlags flags, gboolean is_set) { Folder *folder; IMAPSession *session; IMAPFlags iflags = 0; MsgInfo *msginfo; GSList *seq_list, *cur; gint ok = IMAP_SUCCESS; if (msglist == NULL) return IMAP_SUCCESS; msginfo = (MsgInfo *)msglist->data; g_return_val_if_fail(msginfo != NULL, -1); g_return_val_if_fail(MSG_IS_IMAP(msginfo->flags), -1); g_return_val_if_fail(msginfo->folder != NULL, -1); g_return_val_if_fail(msginfo->folder->folder != NULL, -1); folder = msginfo->folder->folder; g_return_val_if_fail(FOLDER_TYPE(folder) == F_IMAP, -1); session = imap_session_get(folder); if (!session) return -1; ok = imap_select(session, IMAP_FOLDER(folder), msginfo->folder->path, NULL, NULL, NULL, NULL); if (ok != IMAP_SUCCESS) return ok; seq_list = imap_get_seq_set_from_msglist(msglist, 0); if (flags & MSG_MARKED) iflags |= IMAP_FLAG_FLAGGED; if (flags & MSG_REPLIED) iflags |= IMAP_FLAG_ANSWERED; for (cur = seq_list; cur != NULL; cur = cur->next) { gchar *seq_set = (gchar *)cur->data; if (iflags) { ok = imap_set_message_flags(session, seq_set, iflags, is_set); if (ok != IMAP_SUCCESS) break; } if (flags & MSG_UNREAD) { ok = imap_set_message_flags(session, seq_set, IMAP_FLAG_SEEN, !is_set); if (ok != IMAP_SUCCESS) break; } } imap_seq_set_free(seq_list); return ok; } gint imap_msg_set_perm_flags(MsgInfo *msginfo, MsgPermFlags flags) { GSList msglist; msglist.data = msginfo; msglist.next = NULL; return imap_msg_list_change_perm_flags(&msglist, flags, TRUE); } gint imap_msg_unset_perm_flags(MsgInfo *msginfo, MsgPermFlags flags) { GSList msglist; msglist.data = msginfo; msglist.next = NULL; return imap_msg_list_change_perm_flags(&msglist, flags, FALSE); } gint imap_msg_list_set_perm_flags(GSList *msglist, MsgPermFlags flags) { return imap_msg_list_change_perm_flags(msglist, flags, TRUE); } gint imap_msg_list_unset_perm_flags(GSList *msglist, MsgPermFlags flags) { return imap_msg_list_change_perm_flags(msglist, flags, FALSE); } static gchar *imap_get_flag_str(IMAPFlags flags) { GString *str; gchar *ret; str = g_string_new(NULL); if (IMAP_IS_SEEN(flags)) g_string_append(str, "\\Seen "); if (IMAP_IS_ANSWERED(flags)) g_string_append(str, "\\Answered "); if (IMAP_IS_FLAGGED(flags)) g_string_append(str, "\\Flagged "); if (IMAP_IS_DELETED(flags)) g_string_append(str, "\\Deleted "); if (IMAP_IS_DRAFT(flags)) g_string_append(str, "\\Draft"); if (str->len > 0 && str->str[str->len - 1] == ' ') g_string_truncate(str, str->len - 1); ret = str->str; g_string_free(str, FALSE); return ret; } static gint imap_set_message_flags(IMAPSession *session, const gchar *seq_set, IMAPFlags flags, gboolean is_set) { gchar *cmd; gchar *flag_str; gint ok; flag_str = imap_get_flag_str(flags); cmd = g_strconcat(is_set ? "+FLAGS.SILENT (" : "-FLAGS.SILENT (", flag_str, ")", NULL); g_free(flag_str); ok = imap_cmd_store(session, seq_set, cmd); g_free(cmd); return ok; } static gint imap_select(IMAPSession *session, IMAPFolder *folder, const gchar *path, gint *exists, gint *recent, gint *unseen, guint32 *uid_validity) { gchar *real_path; gint ok; gint exists_, recent_, unseen_; guint32 uid_validity_; if (!exists || !recent || !unseen || !uid_validity) { if (session->mbox && strcmp(session->mbox, path) == 0) return IMAP_SUCCESS; exists = &exists_; recent = &recent_; unseen = &unseen_; uid_validity = &uid_validity_; } g_free(session->mbox); session->mbox = NULL; real_path = imap_get_real_path(folder, path); ok = imap_cmd_select(session, real_path, exists, recent, unseen, uid_validity); if (ok != IMAP_SUCCESS) log_warning(_("can't select folder: %s\n"), real_path); else session->mbox = g_strdup(path); g_free(real_path); return ok; } #define THROW(err) { ok = err; goto catch; } static gint imap_status(IMAPSession *session, IMAPFolder *folder, const gchar *path, gint *messages, gint *recent, guint32 *uid_next, guint32 *uid_validity, gint *unseen) { gchar *real_path; gchar *real_path_; gint ok; GPtrArray *argbuf = NULL; gchar *str; if (messages && recent && uid_next && uid_validity && unseen) { *messages = *recent = *uid_next = *uid_validity = *unseen = 0; argbuf = g_ptr_array_new(); } real_path = imap_get_real_path(folder, path); QUOTE_IF_REQUIRED(real_path_, real_path); imap_cmd_gen_send(session, "STATUS %s " "(MESSAGES RECENT UIDNEXT UIDVALIDITY UNSEEN)", real_path_); ok = imap_cmd_ok(session, argbuf); if (ok != IMAP_SUCCESS) log_warning(_("error on imap command: STATUS\n")); if (ok != IMAP_SUCCESS || !argbuf) THROW(ok); str = search_array_str(argbuf, "STATUS"); if (!str) THROW(IMAP_ERROR); str = strchr(str, '('); if (!str) THROW(IMAP_ERROR); str++; while (*str != '\0' && *str != ')') { while (*str == ' ') str++; if (!strncmp(str, "MESSAGES ", 9)) { str += 9; *messages = strtol(str, &str, 10); } else if (!strncmp(str, "RECENT ", 7)) { str += 7; *recent = strtol(str, &str, 10); } else if (!strncmp(str, "UIDNEXT ", 8)) { str += 8; *uid_next = strtoul(str, &str, 10); } else if (!strncmp(str, "UIDVALIDITY ", 12)) { str += 12; *uid_validity = strtoul(str, &str, 10); } else if (!strncmp(str, "UNSEEN ", 7)) { str += 7; *unseen = strtol(str, &str, 10); } else { g_warning("invalid STATUS response: %s\n", str); break; } } catch: g_free(real_path); if (argbuf) { ptr_array_free_strings(argbuf); g_ptr_array_free(argbuf, TRUE); } return ok; } #undef THROW static gboolean imap_has_capability(IMAPSession *session, const gchar *capability) { gchar **p; for (p = session->capability; *p != NULL; ++p) { if (!g_ascii_strcasecmp(*p, capability)) return TRUE; } return FALSE; } static void imap_capability_free(IMAPSession *session) { if (session->capability) { g_strfreev(session->capability); session->capability = NULL; } } /* low-level IMAP4rev1 commands */ #define THROW(err) { ok = err; goto catch; } static gint imap_cmd_capability(IMAPSession *session) { gint ok; GPtrArray *argbuf; gchar *capability; argbuf = g_ptr_array_new(); imap_cmd_gen_send(session, "CAPABILITY"); if ((ok = imap_cmd_ok(session, argbuf)) != IMAP_SUCCESS) THROW(ok); capability = search_array_str(argbuf, "CAPABILITY "); if (!capability) THROW(IMAP_ERROR); capability += strlen("CAPABILITY "); imap_capability_free(session); session->capability = g_strsplit(capability, " ", -1); catch: ptr_array_free_strings(argbuf); g_ptr_array_free(argbuf, TRUE); return ok; } #undef THROW static gint imap_cmd_auth_plain(IMAPSession *session, const gchar *user, const gchar *pass) { gchar *p; gchar *response; gchar *response64; gint ok; p = response = g_malloc(strlen(user) * 2 + 2 + strlen(pass) + 1); strcpy(p, user); p += strlen(user) + 1; strcpy(p, user); p += strlen(user) + 1; strcpy(p, pass); p += strlen(pass); response64 = g_malloc((p - response) * 2 + 1); base64_encode(response64, (guchar *)response, p - response); g_free(response); log_print("IMAP4> ****************\n"); sock_puts(SESSION(session)->sock, response64); ok = imap_cmd_ok(session, NULL); if (ok != IMAP_SUCCESS) log_warning(_("IMAP4 authentication failed.\n")); g_free(response64); return ok; } static gint imap_cmd_auth_cram_md5(IMAPSession *session, const gchar *user, const gchar *pass, const gchar *challenge64) { gchar *challenge; gint challenge_len; gchar hexdigest[33]; gchar *response; gchar *response64; gint ok; challenge = g_malloc(strlen(challenge64 + 2) + 1); challenge_len = base64_decode((guchar *)challenge, challenge64 + 2, -1); challenge[challenge_len] = '\0'; log_print("IMAP< [Decoded: %s]\n", challenge); md5_hex_hmac(hexdigest, (guchar *)challenge, challenge_len, (guchar *)pass, strlen(pass)); g_free(challenge); response = g_strdup_printf("%s %s", user, hexdigest); log_print("IMAP> [Encoded: %s]\n", response); response64 = g_malloc((strlen(response) + 3) * 2 + 1); base64_encode(response64, (guchar *)response, strlen(response)); g_free(response); log_print("IMAP> %s\n", response64); sock_puts(SESSION(session)->sock, response64); ok = imap_cmd_ok(session, NULL); if (ok != IMAP_SUCCESS) log_warning(_("IMAP4 authentication failed.\n")); return ok; } static gint imap_cmd_authenticate(IMAPSession *session, const gchar *user, const gchar *pass, IMAPAuthType type) { gchar *auth_type; gint ok; gchar *buf = NULL; g_return_val_if_fail((type == 0 || type == IMAP_AUTH_CRAM_MD5 || type == IMAP_AUTH_PLAIN), IMAP_ERROR); if (type == IMAP_AUTH_PLAIN) auth_type = "PLAIN"; else auth_type = "CRAM-MD5"; imap_cmd_gen_send(session, "AUTHENTICATE %s", auth_type); ok = imap_cmd_gen_recv(session, &buf); if (ok != IMAP_SUCCESS || buf[0] != '+' || buf[1] != ' ') { g_free(buf); return IMAP_ERROR; } if (type == IMAP_AUTH_PLAIN) ok = imap_cmd_auth_plain(session, user, pass); else ok = imap_cmd_auth_cram_md5(session, user, pass, buf); g_free(buf); return ok; } static gint imap_cmd_login(IMAPSession *session, const gchar *user, const gchar *pass) { gchar *user_, *pass_; gint ok; QUOTE_IF_REQUIRED(user_, user); QUOTE_IF_REQUIRED(pass_, pass); imap_cmd_gen_send(session, "LOGIN %s %s", user_, pass_); ok = imap_cmd_ok(session, NULL); if (ok != IMAP_SUCCESS) log_warning(_("IMAP4 login failed.\n")); return ok; } static gint imap_cmd_logout(IMAPSession *session) { imap_cmd_gen_send(session, "LOGOUT"); return imap_cmd_ok(session, NULL); } static gint imap_cmd_noop(IMAPSession *session) { imap_cmd_gen_send(session, "NOOP"); return imap_cmd_ok(session, NULL); } #if USE_SSL static gint imap_cmd_starttls(IMAPSession *session) { imap_cmd_gen_send(session, "STARTTLS"); return imap_cmd_ok(session, NULL); } #endif #define THROW(err) { ok = err; goto catch; } static gint imap_cmd_namespace(IMAPSession *session, gchar **ns_str) { gint ok; GPtrArray *argbuf; gchar *str; argbuf = g_ptr_array_new(); imap_cmd_gen_send(session, "NAMESPACE"); if ((ok = imap_cmd_ok(session, argbuf)) != IMAP_SUCCESS) THROW(ok); str = search_array_str(argbuf, "NAMESPACE"); if (!str) THROW(IMAP_ERROR); *ns_str = g_strdup(str); catch: ptr_array_free_strings(argbuf); g_ptr_array_free(argbuf, TRUE); return ok; } #undef THROW static gint imap_cmd_list(IMAPSession *session, const gchar *ref, const gchar *mailbox, GPtrArray *argbuf) { gchar *ref_, *mailbox_; if (!ref) ref = "\"\""; if (!mailbox) mailbox = "\"\""; QUOTE_IF_REQUIRED(ref_, ref); QUOTE_IF_REQUIRED(mailbox_, mailbox); imap_cmd_gen_send(session, "LIST %s %s", ref_, mailbox_); return imap_cmd_ok(session, argbuf); } #define THROW goto catch static gint imap_cmd_do_select(IMAPSession *session, const gchar *folder, gboolean examine, gint *exists, gint *recent, gint *unseen, guint32 *uid_validity) { gint ok; gchar *resp_str; GPtrArray *argbuf; gchar *select_cmd; gchar *folder_; guint uid_validity_; *exists = *recent = *unseen = *uid_validity = 0; argbuf = g_ptr_array_new(); if (examine) select_cmd = "EXAMINE"; else select_cmd = "SELECT"; QUOTE_IF_REQUIRED(folder_, folder); imap_cmd_gen_send(session, "%s %s", select_cmd, folder_); if ((ok = imap_cmd_ok(session, argbuf)) != IMAP_SUCCESS) THROW; resp_str = search_array_contain_str(argbuf, "EXISTS"); if (resp_str) { if (sscanf(resp_str,"%d EXISTS", exists) != 1) { g_warning("imap_cmd_select(): invalid EXISTS line.\n"); THROW; } } resp_str = search_array_contain_str(argbuf, "RECENT"); if (resp_str) { if (sscanf(resp_str, "%d RECENT", recent) != 1) { g_warning("imap_cmd_select(): invalid RECENT line.\n"); THROW; } } resp_str = search_array_contain_str(argbuf, "UIDVALIDITY"); if (resp_str) { if (sscanf(resp_str, "OK [UIDVALIDITY %u] ", &uid_validity_) != 1) { g_warning("imap_cmd_select(): invalid UIDVALIDITY line.\n"); THROW; } *uid_validity = uid_validity_; } resp_str = search_array_contain_str(argbuf, "UNSEEN"); if (resp_str) { if (sscanf(resp_str, "OK [UNSEEN %d] ", unseen) != 1) { g_warning("imap_cmd_select(): invalid UNSEEN line.\n"); THROW; } } catch: ptr_array_free_strings(argbuf); g_ptr_array_free(argbuf, TRUE); return ok; } static gint imap_cmd_select(IMAPSession *session, const gchar *folder, gint *exists, gint *recent, gint *unseen, guint32 *uid_validity) { return imap_cmd_do_select(session, folder, FALSE, exists, recent, unseen, uid_validity); } static gint imap_cmd_examine(IMAPSession *session, const gchar *folder, gint *exists, gint *recent, gint *unseen, guint32 *uid_validity) { return imap_cmd_do_select(session, folder, TRUE, exists, recent, unseen, uid_validity); } #undef THROW static gint imap_cmd_create(IMAPSession *session, const gchar *folder) { gchar *folder_; QUOTE_IF_REQUIRED(folder_, folder); imap_cmd_gen_send(session, "CREATE %s", folder_); return imap_cmd_ok(session, NULL); } static gint imap_cmd_rename(IMAPSession *session, const gchar *old_folder, const gchar *new_folder) { gchar *old_folder_, *new_folder_; QUOTE_IF_REQUIRED(old_folder_, old_folder); QUOTE_IF_REQUIRED(new_folder_, new_folder); imap_cmd_gen_send(session, "RENAME %s %s", old_folder_, new_folder_); return imap_cmd_ok(session, NULL); } static gint imap_cmd_delete(IMAPSession *session, const gchar *folder) { gchar *folder_; QUOTE_IF_REQUIRED(folder_, folder); imap_cmd_gen_send(session, "DELETE %s", folder_); return imap_cmd_ok(session, NULL); } #define THROW(err) { ok = err; goto catch; } static gint imap_cmd_search(IMAPSession *session, const gchar *criteria, GArray **result) { gint ok; GPtrArray *argbuf; GArray *array; gchar *str; gchar *p, *ep; gint i; guint32 uid; g_return_val_if_fail(criteria != NULL, IMAP_ERROR); g_return_val_if_fail(result != NULL, IMAP_ERROR); argbuf = g_ptr_array_new(); imap_cmd_gen_send(session, "UID SEARCH %s", criteria); if ((ok = imap_cmd_ok(session, argbuf)) != IMAP_SUCCESS) THROW(ok); array = g_array_new(FALSE, FALSE, sizeof(guint32)); for (i = 0; i < argbuf->len; i++) { str = g_ptr_array_index(argbuf, i); if (strncmp(str, "SEARCH", 6) != 0) continue; p = str + 6; while (*p != '\0') { uid = strtoul(p, &ep, 10); if (p < ep && uid > 0) { g_array_append_val(array, uid); p = ep; } else break; } } *result = array; catch: ptr_array_free_strings(argbuf); g_ptr_array_free(argbuf, TRUE); return ok; } static gint imap_cmd_fetch(IMAPSession *session, guint32 uid, const gchar *filename) { gint ok; gchar *buf; gchar *cur_pos; gchar size_str[32]; glong size_num; gint ret; g_return_val_if_fail(filename != NULL, IMAP_ERROR); imap_cmd_gen_send(session, "UID FETCH %d BODY.PEEK[]", uid); while ((ok = imap_cmd_gen_recv(session, &buf)) == IMAP_SUCCESS) { if (buf[0] != '*' || buf[1] != ' ') { g_free(buf); return IMAP_ERROR; } if (strstr(buf, "FETCH") != NULL) break; g_free(buf); } if (ok != IMAP_SUCCESS) return ok; #define RETURN_ERROR_IF_FAIL(cond) \ if (!(cond)) { \ g_free(buf); \ return IMAP_ERROR; \ } cur_pos = strchr(buf, '{'); RETURN_ERROR_IF_FAIL(cur_pos != NULL); cur_pos = strchr_cpy(cur_pos + 1, '}', size_str, sizeof(size_str)); RETURN_ERROR_IF_FAIL(cur_pos != NULL); size_num = atol(size_str); RETURN_ERROR_IF_FAIL(size_num >= 0); RETURN_ERROR_IF_FAIL(*cur_pos == '\0'); #undef RETURN_ERROR_IF_FAIL g_free(buf); if ((ret = recv_bytes_write_to_file(SESSION(session)->sock, size_num, filename)) != 0) { if (ret == -2) return IMAP_SOCKET; } if (imap_cmd_gen_recv(session, &buf) != IMAP_SUCCESS) return IMAP_ERROR; if (buf[0] == '\0' || buf[strlen(buf) - 1] != ')') { g_free(buf); return IMAP_ERROR; } g_free(buf); ok = imap_cmd_ok(session, NULL); if (ret != 0) return IMAP_ERROR; return ok; } static gint imap_cmd_append(IMAPSession *session, const gchar *destfolder, const gchar *file, IMAPFlags flags, guint32 *new_uid) { gint ok; gint size; gchar *destfolder_; gchar *flag_str; guint new_uid_; gchar *ret = NULL; gchar buf[BUFFSIZE]; FILE *fp; FILE *tmp; size_t read_len; GPtrArray *argbuf; gchar *resp_str; g_return_val_if_fail(file != NULL, IMAP_ERROR); if ((fp = g_fopen(file, "rb")) == NULL) { FILE_OP_ERROR(file, "fopen"); return -1; } tmp = canonicalize_file_stream(fp, &size); fclose(fp); if (!tmp) return -1; QUOTE_IF_REQUIRED(destfolder_, destfolder); flag_str = imap_get_flag_str(flags); imap_cmd_gen_send(session, "APPEND %s (%s) {%d}", destfolder_, flag_str, size); g_free(flag_str); ok = imap_cmd_gen_recv(session, &ret); if (ok != IMAP_SUCCESS || ret[0] != '+' || ret[1] != ' ') { log_warning(_("can't append %s to %s\n"), file, destfolder_); g_free(ret); fclose(tmp); return IMAP_ERROR; } g_free(ret); log_print("IMAP4> %s\n", _("(sending file...)")); while ((read_len = fread(buf, 1, sizeof(buf), tmp)) > 0) { if (read_len < sizeof(buf) && ferror(tmp)) break; if (sock_write_all(SESSION(session)->sock, buf, read_len) < 0) { fclose(tmp); return -1; } } if (ferror(tmp)) { FILE_OP_ERROR(file, "fread"); fclose(tmp); return -1; } sock_puts(SESSION(session)->sock, ""); fclose(tmp); if (new_uid != NULL) *new_uid = 0; if (new_uid != NULL && session->uidplus) { argbuf = g_ptr_array_new(); ok = imap_cmd_ok(session, argbuf); if (ok != IMAP_SUCCESS) log_warning(_("can't append message to %s\n"), destfolder_); else if (argbuf->len > 0) { resp_str = g_ptr_array_index(argbuf, argbuf->len - 1); if (resp_str && sscanf(resp_str, "%*u OK [APPENDUID %*u %u]", &new_uid_) == 1) { *new_uid = new_uid_; } } ptr_array_free_strings(argbuf); g_ptr_array_free(argbuf, TRUE); } else ok = imap_cmd_ok(session, NULL); return ok; } static gint imap_cmd_copy(IMAPSession *session, const gchar *seq_set, const gchar *destfolder) { gint ok; gchar *destfolder_; g_return_val_if_fail(destfolder != NULL, IMAP_ERROR); QUOTE_IF_REQUIRED(destfolder_, destfolder); imap_cmd_gen_send(session, "UID COPY %s %s", seq_set, destfolder_); ok = imap_cmd_ok(session, NULL); if (ok != IMAP_SUCCESS) { log_warning(_("can't copy %s to %s\n"), seq_set, destfolder_); return -1; } return ok; } gint imap_cmd_envelope(IMAPSession *session, const gchar *seq_set) { imap_cmd_gen_send (session, "UID FETCH %s (UID FLAGS RFC822.SIZE RFC822.HEADER)", seq_set); return IMAP_SUCCESS; } static gint imap_cmd_store(IMAPSession *session, const gchar *seq_set, const gchar *sub_cmd) { gint ok; imap_cmd_gen_send(session, "UID STORE %s %s", seq_set, sub_cmd); if ((ok = imap_cmd_ok(session, NULL)) != IMAP_SUCCESS) { log_warning(_("error while imap command: STORE %s %s\n"), seq_set, sub_cmd); return ok; } return IMAP_SUCCESS; } static gint imap_cmd_expunge(IMAPSession *session) { gint ok; imap_cmd_gen_send(session, "EXPUNGE"); if ((ok = imap_cmd_ok(session, NULL)) != IMAP_SUCCESS) { log_warning(_("error while imap command: EXPUNGE\n")); return ok; } return IMAP_SUCCESS; } static gint imap_cmd_close(IMAPSession *session) { gint ok; imap_cmd_gen_send(session, "CLOSE"); if ((ok = imap_cmd_ok(session, NULL)) != IMAP_SUCCESS) log_warning(_("error while imap command: CLOSE\n")); return ok; } static gint imap_cmd_ok(IMAPSession *session, GPtrArray *argbuf) { gint ok; gchar *buf; gint cmd_num; gchar cmd_status[IMAPBUFSIZE + 1]; GString *str; gchar *p; gchar obuf[32]; gint len; gchar *literal; str = g_string_sized_new(256); while ((ok = imap_cmd_gen_recv(session, &buf)) == IMAP_SUCCESS) { g_string_append(str, buf); if ((p = strrchr_with_skip_quote(buf, '"', '{'))) { /* literal */ p = strchr_cpy(p + 1, '}', obuf, sizeof(obuf)); len = atoi(obuf); if (len < 0 || p == NULL || *p != '\0') { g_free(buf); ok = IMAP_ERROR; break; } literal = recv_bytes(SESSION(session)->sock, len); if (!literal) { g_free(buf); ok = IMAP_SOCKET; break; } if (memchr(literal, '\n', len)) log_print("IMAP4< (literal: %d bytes)\n", len); else log_print("IMAP4< %s\n", literal); g_string_append(str, "\r\n"); g_string_append_len(str, literal, len); g_free(literal); g_free(buf); continue; } g_free(buf); if (str->str[0] == '*' && str->str[1] == ' ') { if (argbuf) g_ptr_array_add(argbuf, g_strdup(str->str + 2)); g_string_truncate(str, 0); continue; } else if (sscanf(str->str, "%d %" Xstr(IMAPBUFSIZE) "s", &cmd_num, cmd_status) < 2) { ok = IMAP_ERROR; } else if (cmd_num == session->cmd_count && !strcmp(cmd_status, "OK")) { if (argbuf) g_ptr_array_add(argbuf, g_strdup(str->str)); } else { ok = IMAP_ERROR; } break; } g_string_free(str, TRUE); return ok; } static void imap_cmd_gen_send(IMAPSession *session, const gchar *format, ...) { gchar buf[IMAPBUFSIZE]; gchar tmp[IMAPBUFSIZE]; gchar *p; va_list args; va_start(args, format); g_vsnprintf(tmp, sizeof(tmp), format, args); va_end(args); session->cmd_count++; g_snprintf(buf, sizeof(buf), "%d %s\r\n", session->cmd_count, tmp); if (!g_ascii_strncasecmp(tmp, "LOGIN ", 6) && (p = strchr(tmp + 6, ' '))) { *p = '\0'; log_print("IMAP4> %d %s ********\n", session->cmd_count, tmp); } else log_print("IMAP4> %d %s\n", session->cmd_count, tmp); sock_write_all(SESSION(session)->sock, buf, strlen(buf)); } static gint imap_cmd_gen_recv(IMAPSession *session, gchar **ret) { gint len; if ((len = sock_getline(SESSION(session)->sock, ret)) < 0) return IMAP_SOCKET; strretchomp(*ret); if (len > 1000) { gchar *str; str = trim_string(*ret, 1000); log_print("IMAP4< %s\n", str); g_free(str); } else log_print("IMAP4< %s\n", *ret); session_set_access_time(SESSION(session)); return IMAP_SUCCESS; } /* misc utility functions */ static gchar *strchr_cpy(const gchar *src, gchar ch, gchar *dest, gint len) { gchar *tmp; dest[0] = '\0'; tmp = strchr(src, ch); if (!tmp) return NULL; memcpy(dest, src, MIN(tmp - src, len - 1)); dest[MIN(tmp - src, len - 1)] = '\0'; return tmp + 1; } static gchar *get_quoted(const gchar *src, gchar ch, gchar *dest, gint len) { const gchar *p = src; gint n = 0; g_return_val_if_fail(*p == ch, NULL); *dest = '\0'; p++; while (*p != '\0' && *p != ch) { if (n < len - 1) { if (*p == '\\' && *(p + 1) != '\0') p++; *dest++ = *p++; } else p++; n++; } *dest = '\0'; return (gchar *)(*p == ch ? p + 1 : p); } static gchar *search_array_contain_str(GPtrArray *array, gchar *str) { gint i; for (i = 0; i < array->len; i++) { gchar *tmp; tmp = g_ptr_array_index(array, i); if (strstr(tmp, str) != NULL) return tmp; } return NULL; } static gchar *search_array_str(GPtrArray *array, gchar *str) { gint i; gint len; len = strlen(str); for (i = 0; i < array->len; i++) { gchar *tmp; tmp = g_ptr_array_index(array, i); if (!strncmp(tmp, str, len)) return tmp; } return NULL; } static void imap_path_separator_subst(gchar *str, gchar separator) { gchar *p; gboolean in_escape = FALSE; if (!separator || separator == '/') return; for (p = str; *p != '\0'; p++) { if (*p == '/' && !in_escape) *p = separator; else if (*p == '&' && *(p + 1) != '-' && !in_escape) in_escape = TRUE; else if (*p == '-' && in_escape) in_escape = FALSE; } } static gchar *imap_modified_utf7_to_utf8(const gchar *mutf7_str) { static iconv_t cd = (iconv_t)-1; static gboolean iconv_ok = TRUE; GString *norm_utf7; gchar *norm_utf7_p; size_t norm_utf7_len; const gchar *p; gchar *to_str, *to_p; size_t to_len; gboolean in_escape = FALSE; if (!iconv_ok) return g_strdup(mutf7_str); if (cd == (iconv_t)-1) { cd = iconv_open(CS_INTERNAL, CS_UTF_7); if (cd == (iconv_t)-1) { g_warning("iconv cannot convert UTF-7 to %s\n", CS_INTERNAL); iconv_ok = FALSE; return g_strdup(mutf7_str); } } /* modified UTF-7 to normal UTF-7 conversion */ norm_utf7 = g_string_new(NULL); for (p = mutf7_str; *p != '\0'; p++) { /* replace: '&' -> '+', "&-" -> '&', "+" -> "+-", escaped ',' -> '/' */ if (!in_escape && *p == '&') { if (*(p + 1) != '-') { g_string_append_c(norm_utf7, '+'); in_escape = TRUE; } else { g_string_append_c(norm_utf7, '&'); p++; } } else if (!in_escape && *p == '+') { g_string_append(norm_utf7, "+-"); } else if (in_escape && *p == ',') { g_string_append_c(norm_utf7, '/'); } else if (in_escape && *p == '-') { g_string_append_c(norm_utf7, '-'); in_escape = FALSE; } else { g_string_append_c(norm_utf7, *p); } } /* somehow iconv() returns error when the last of the string is "+-" */ g_string_append_c(norm_utf7, '\n'); norm_utf7_p = norm_utf7->str; norm_utf7_len = norm_utf7->len; to_len = strlen(mutf7_str) * 5; to_p = to_str = g_malloc(to_len + 1); if (iconv(cd, (ICONV_CONST gchar **)&norm_utf7_p, &norm_utf7_len, &to_p, &to_len) == -1) { g_warning(_("iconv cannot convert UTF-7 to %s\n"), CS_INTERNAL); g_string_free(norm_utf7, TRUE); g_free(to_str); return g_strdup(mutf7_str); } /* second iconv() call for flushing */ iconv(cd, NULL, NULL, &to_p, &to_len); g_string_free(norm_utf7, TRUE); *to_p = '\0'; strretchomp(to_str); return to_str; } static gchar *imap_utf8_to_modified_utf7(const gchar *from) { static iconv_t cd = (iconv_t)-1; static gboolean iconv_ok = TRUE; gchar *norm_utf7, *norm_utf7_p; size_t from_len, norm_utf7_len; GString *to_str; gchar *from_tmp, *to, *p; gboolean in_escape = FALSE; if (!iconv_ok) return g_strdup(from); if (cd == (iconv_t)-1) { cd = iconv_open(CS_UTF_7, CS_INTERNAL); if (cd == (iconv_t)-1) { g_warning(_("iconv cannot convert %s to UTF-7\n"), CS_INTERNAL); iconv_ok = FALSE; return g_strdup(from); } } /* UTF-8 to normal UTF-7 conversion */ Xstrdup_a(from_tmp, from, return g_strdup(from)); from_len = strlen(from); norm_utf7_len = from_len * 5; Xalloca(norm_utf7, norm_utf7_len + 1, return g_strdup(from)); norm_utf7_p = norm_utf7; while (from_len > 0) { if (*from_tmp == '+') { *norm_utf7_p++ = '+'; *norm_utf7_p++ = '-'; norm_utf7_len -= 2; from_tmp++; from_len--; } else if (g_ascii_isprint(*from_tmp)) { /* printable ascii char */ *norm_utf7_p = *from_tmp; norm_utf7_p++; norm_utf7_len--; from_tmp++; from_len--; } else { size_t conv_len = 0; /* unprintable char: convert to UTF-7 */ p = from_tmp; while (!g_ascii_isprint(*p) && conv_len < from_len) { conv_len += g_utf8_skip[*(guchar *)p]; p += g_utf8_skip[*(guchar *)p]; } from_len -= conv_len; if (iconv(cd, (ICONV_CONST gchar **)&from_tmp, &conv_len, &norm_utf7_p, &norm_utf7_len) == -1) { g_warning("iconv cannot convert %s to UTF-7\n", CS_INTERNAL); return g_strdup(from); } /* second iconv() call for flushing */ iconv(cd, NULL, NULL, &norm_utf7_p, &norm_utf7_len); } } *norm_utf7_p = '\0'; to_str = g_string_new(NULL); for (p = norm_utf7; p < norm_utf7_p; p++) { /* replace: '&' -> "&-", '+' -> '&', "+-" -> '+', BASE64 '/' -> ',' */ if (!in_escape && *p == '&') { g_string_append(to_str, "&-"); } else if (!in_escape && *p == '+') { if (*(p + 1) == '-') { g_string_append_c(to_str, '+'); p++; } else { g_string_append_c(to_str, '&'); in_escape = TRUE; } } else if (in_escape && *p == '/') { g_string_append_c(to_str, ','); } else if (in_escape && *p == '-') { g_string_append_c(to_str, '-'); in_escape = FALSE; } else { g_string_append_c(to_str, *p); } } if (in_escape) { in_escape = FALSE; g_string_append_c(to_str, '-'); } to = to_str->str; g_string_free(to_str, FALSE); return to; } static GSList *imap_get_seq_set_from_msglist(GSList *msglist, gint limit) { GString *str; GSList *sorted_list, *cur; guint first, last, next; gchar *ret_str; GSList *ret_list = NULL; gint count = 0; if (msglist == NULL) return NULL; str = g_string_sized_new(256); sorted_list = g_slist_copy(msglist); sorted_list = procmsg_sort_msg_list(sorted_list, SORT_BY_NUMBER, SORT_ASCENDING); first = ((MsgInfo *)sorted_list->data)->msgnum; for (cur = sorted_list; cur != NULL; cur = cur->next) { ++count; last = ((MsgInfo *)cur->data)->msgnum; if (cur->next) next = ((MsgInfo *)cur->next->data)->msgnum; else next = 0; if (limit > 0 && count >= limit) { if (str->len > 0) g_string_append_c(str, ','); if (first == last) g_string_sprintfa(str, "%u", first); else g_string_sprintfa(str, "%u:%u", first, last); first = next; ret_str = g_strdup(str->str); ret_list = g_slist_append(ret_list, ret_str); g_string_truncate(str, 0); count = 0; continue; } if (last + 1 != next || next == 0) { if (str->len > 0) g_string_append_c(str, ','); if (first == last) g_string_sprintfa(str, "%u", first); else g_string_sprintfa(str, "%u:%u", first, last); first = next; if (str->len > IMAP_CMD_LIMIT) { ret_str = g_strdup(str->str); ret_list = g_slist_append(ret_list, ret_str); g_string_truncate(str, 0); } } } if (str->len > 0) { ret_str = g_strdup(str->str); ret_list = g_slist_append(ret_list, ret_str); } g_slist_free(sorted_list); g_string_free(str, TRUE); return ret_list; } static gint imap_seq_set_get_count(const gchar *seq_set) { gint count = 0; guint first, last; gchar *tmp, *p, *q; p = q = tmp = g_strdup(seq_set); while (*p) { if (*p == ',') { *p = '\0'; if (sscanf(q, "%u:%u", &first, &last) == 2) count += last - first + 1; else if (sscanf(q, "%u", &first) == 1) count++; q = ++p; } else ++p; } if (q != p) { if (sscanf(q, "%u:%u", &first, &last) == 2) count += last - first + 1; else if (sscanf(q, "%u", &first) == 1) count++; } g_free(tmp); return count; } static void imap_seq_set_free(GSList *seq_list) { slist_free_strings(seq_list); g_slist_free(seq_list); } static GHashTable *imap_get_uid_table(GArray *array) { GHashTable *table; gint i; guint32 uid; g_return_val_if_fail(array != NULL, NULL); table = g_hash_table_new(NULL, g_direct_equal); for (i = 0; i < array->len; i++) { uid = g_array_index(array, guint32, i); g_hash_table_insert(table, GUINT_TO_POINTER(uid), GINT_TO_POINTER(i + 1)); } return table; } static gboolean imap_rename_folder_func(GNode *node, gpointer data) { FolderItem *item = node->data; gchar **paths = data; const gchar *oldpath = paths[0]; const gchar *newpath = paths[1]; gchar *base; gchar *new_itempath; gint oldpathlen; oldpathlen = strlen(oldpath); if (strncmp(oldpath, item->path, oldpathlen) != 0) { g_warning("path doesn't match: %s, %s\n", oldpath, item->path); return TRUE; } base = item->path + oldpathlen; while (*base == G_DIR_SEPARATOR) base++; if (*base == '\0') new_itempath = g_strdup(newpath); else new_itempath = g_strconcat(newpath, G_DIR_SEPARATOR_S, base, NULL); g_free(item->path); item->path = new_itempath; return FALSE; } libsylph-1.1.0/libsylph/mbox.c0000644000175000017500000002366710504175325013237 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "defs.h" #include #include #include #include #include #include #include #include #include #include "mbox.h" #include "procmsg.h" #include "folder.h" #include "filter.h" #include "prefs_common.h" #include "prefs_account.h" #include "account.h" #include "utils.h" #define MSGBUFSIZE 8192 #define FPUTS_TO_TMP_ABORT_IF_FAIL(s) \ { \ if (fputs(s, tmp_fp) == EOF) { \ g_warning(_("can't write to temporary file\n")); \ fclose(tmp_fp); \ fclose(mbox_fp); \ g_unlink(tmp_file); \ g_free(tmp_file); \ return -1; \ } \ } gint proc_mbox(FolderItem *dest, const gchar *mbox, GHashTable *folder_table) { FILE *mbox_fp; gchar buf[MSGBUFSIZE], from_line[MSGBUFSIZE]; gchar *tmp_file; gint msgs = 0; g_return_val_if_fail(dest != NULL, -1); g_return_val_if_fail(mbox != NULL, -1); debug_print(_("Getting messages from %s into %s...\n"), mbox, dest->path); if ((mbox_fp = g_fopen(mbox, "rb")) == NULL) { FILE_OP_ERROR(mbox, "fopen"); return -1; } /* ignore empty lines on the head */ do { if (fgets(buf, sizeof(buf), mbox_fp) == NULL) { g_warning(_("can't read mbox file.\n")); fclose(mbox_fp); return -1; } } while (buf[0] == '\n' || buf[0] == '\r'); if (strncmp(buf, "From ", 5) != 0) { g_warning(_("invalid mbox format: %s\n"), mbox); fclose(mbox_fp); return -1; } strcpy(from_line, buf); if (fgets(buf, sizeof(buf), mbox_fp) == NULL) { g_warning(_("malformed mbox: %s\n"), mbox); fclose(mbox_fp); return -1; } tmp_file = get_tmp_file(); do { FILE *tmp_fp; GSList *cur; gchar *startp, *endp, *rpath; gint empty_line; gboolean is_next_msg = FALSE; FilterInfo *fltinfo; if ((tmp_fp = g_fopen(tmp_file, "wb")) == NULL) { FILE_OP_ERROR(tmp_file, "fopen"); g_warning(_("can't open temporary file\n")); g_free(tmp_file); fclose(mbox_fp); return -1; } if (change_file_mode_rw(tmp_fp, tmp_file) < 0) FILE_OP_ERROR(tmp_file, "chmod"); /* convert unix From into Return-Path */ startp = from_line + 5; endp = strchr(startp, ' '); if (endp == NULL) rpath = g_strdup(startp); else rpath = g_strndup(startp, endp - startp); g_strstrip(rpath); g_snprintf(from_line, sizeof(from_line), "Return-Path: %s\n", rpath); g_free(rpath); FPUTS_TO_TMP_ABORT_IF_FAIL(from_line); FPUTS_TO_TMP_ABORT_IF_FAIL(buf); from_line[0] = '\0'; empty_line = 0; while (fgets(buf, sizeof(buf), mbox_fp) != NULL) { if (buf[0] == '\n' || buf[0] == '\r') { empty_line++; buf[0] = '\0'; continue; } /* From separator */ while (!strncmp(buf, "From ", 5)) { strcpy(from_line, buf); if (fgets(buf, sizeof(buf), mbox_fp) == NULL) { buf[0] = '\0'; break; } if (is_header_line(buf)) { is_next_msg = TRUE; break; } else if (!strncmp(buf, "From ", 5)) { continue; } else if (!strncmp(buf, ">From ", 6)) { g_memmove(buf, buf + 1, strlen(buf)); is_next_msg = TRUE; break; } else { g_warning(_("unescaped From found:\n%s"), from_line); break; } } if (is_next_msg) break; if (empty_line > 0) { while (empty_line--) FPUTS_TO_TMP_ABORT_IF_FAIL("\n"); empty_line = 0; } if (from_line[0] != '\0') { FPUTS_TO_TMP_ABORT_IF_FAIL(from_line); from_line[0] = '\0'; } if (buf[0] != '\0') { if (!strncmp(buf, ">From ", 6)) { FPUTS_TO_TMP_ABORT_IF_FAIL(buf + 1); } else FPUTS_TO_TMP_ABORT_IF_FAIL(buf); buf[0] = '\0'; } } if (empty_line > 0) { while (--empty_line) FPUTS_TO_TMP_ABORT_IF_FAIL("\n"); } if (fclose(tmp_fp) == EOF) { FILE_OP_ERROR(tmp_file, "fclose"); g_warning(_("can't write to temporary file\n")); g_unlink(tmp_file); g_free(tmp_file); fclose(mbox_fp); return -1; } fltinfo = filter_info_new(); fltinfo->flags.perm_flags = MSG_NEW|MSG_UNREAD; fltinfo->flags.tmp_flags = MSG_RECEIVED; if (folder_table) filter_apply(prefs_common.fltlist, tmp_file, fltinfo); if (fltinfo->actions[FLT_ACTION_MOVE] == FALSE && fltinfo->actions[FLT_ACTION_DELETE] == FALSE) { if (folder_item_add_msg(dest, tmp_file, &fltinfo->flags, FALSE) < 0) { filter_info_free(fltinfo); g_unlink(tmp_file); g_free(tmp_file); fclose(mbox_fp); return -1; } fltinfo->dest_list = g_slist_append(fltinfo->dest_list, dest); } for (cur = fltinfo->dest_list; cur != NULL; cur = cur->next) { FolderItem *drop_folder = (FolderItem *)cur->data; gint val = 0; if (folder_table) { val = GPOINTER_TO_INT(g_hash_table_lookup (folder_table, drop_folder)); } if (val == 0) { if (folder_table) { g_hash_table_insert(folder_table, drop_folder, GINT_TO_POINTER(1)); } } } filter_info_free(fltinfo); g_unlink(tmp_file); msgs++; } while (from_line[0] != '\0'); g_free(tmp_file); fclose(mbox_fp); debug_print(_("%d messages found.\n"), msgs); return msgs; } gint lock_mbox(const gchar *base, LockType type) { #ifdef G_OS_UNIX gint retval = 0; if (type == LOCK_FILE) { gchar *lockfile, *locklink; gint retry = 0; FILE *lockfp; lockfile = g_strdup_printf("%s.%d", base, getpid()); if ((lockfp = g_fopen(lockfile, "wb")) == NULL) { FILE_OP_ERROR(lockfile, "fopen"); g_warning(_("can't create lock file %s\n"), lockfile); g_warning(_("use 'flock' instead of 'file' if possible.\n")); g_free(lockfile); return -1; } fprintf(lockfp, "%d\n", getpid()); fclose(lockfp); locklink = g_strconcat(base, ".lock", NULL); while (link(lockfile, locklink) < 0) { FILE_OP_ERROR(lockfile, "link"); if (retry >= 5) { g_warning(_("can't create %s\n"), lockfile); g_unlink(lockfile); g_free(lockfile); return -1; } if (retry == 0) g_warning(_("mailbox is owned by another" " process, waiting...\n")); retry++; sleep(5); } g_unlink(lockfile); g_free(lockfile); } else if (type == LOCK_FLOCK) { gint lockfd; #if HAVE_FLOCK if ((lockfd = open(base, O_RDONLY)) < 0) { #else if ((lockfd = open(base, O_RDWR)) < 0) { #endif FILE_OP_ERROR(base, "open"); return -1; } #if HAVE_FLOCK if (flock(lockfd, LOCK_EX|LOCK_NB) < 0) { perror("flock"); #else #if HAVE_LOCKF if (lockf(lockfd, F_TLOCK, 0) < 0) { perror("lockf"); #else { #endif #endif /* HAVE_FLOCK */ g_warning(_("can't lock %s\n"), base); if (close(lockfd) < 0) perror("close"); return -1; } retval = lockfd; } else { g_warning(_("invalid lock type\n")); return -1; } return retval; #else return -1; #endif /* G_OS_UNIX */ } gint unlock_mbox(const gchar *base, gint fd, LockType type) { if (type == LOCK_FILE) { gchar *lockfile; lockfile = g_strconcat(base, ".lock", NULL); if (g_unlink(lockfile) < 0) { FILE_OP_ERROR(lockfile, "unlink"); g_free(lockfile); return -1; } g_free(lockfile); return 0; } else if (type == LOCK_FLOCK) { #if HAVE_FLOCK if (flock(fd, LOCK_UN) < 0) { perror("flock"); #else #if HAVE_LOCKF if (lockf(fd, F_ULOCK, 0) < 0) { perror("lockf"); #else { #endif #endif /* HAVE_FLOCK */ g_warning(_("can't unlock %s\n"), base); if (close(fd) < 0) perror("close"); return -1; } if (close(fd) < 0) { perror("close"); return -1; } return 0; } g_warning(_("invalid lock type\n")); return -1; } gint copy_mbox(const gchar *src, const gchar *dest) { return copy_file(src, dest, TRUE); } void empty_mbox(const gchar *mbox) { #if HAVE_TRUNCATE if (truncate(mbox, 0) < 0) { #endif FILE *fp; #if HAVE_TRUNCATE FILE_OP_ERROR(mbox, "truncate"); #endif if ((fp = g_fopen(mbox, "wb")) == NULL) { FILE_OP_ERROR(mbox, "fopen"); g_warning(_("can't truncate mailbox to zero.\n")); return; } fclose(fp); #if HAVE_TRUNCATE } #endif } /* read all messages in SRC, and store them into one MBOX file. */ gint export_to_mbox(FolderItem *src, const gchar *mbox) { GSList *mlist; GSList *cur; MsgInfo *msginfo; FILE *msg_fp; FILE *mbox_fp; gchar buf[BUFFSIZE]; PrefsAccount *cur_ac; g_return_val_if_fail(src != NULL, -1); g_return_val_if_fail(src->folder != NULL, -1); g_return_val_if_fail(mbox != NULL, -1); debug_print(_("Exporting messages from %s into %s...\n"), src->path, mbox); if ((mbox_fp = g_fopen(mbox, "wb")) == NULL) { FILE_OP_ERROR(mbox, "fopen"); return -1; } cur_ac = account_get_current_account(); mlist = folder_item_get_msg_list(src, TRUE); for (cur = mlist; cur != NULL; cur = cur->next) { msginfo = (MsgInfo *)cur->data; msg_fp = procmsg_open_message(msginfo); if (!msg_fp) { procmsg_msginfo_free(msginfo); continue; } strncpy2(buf, msginfo->from ? msginfo->from : cur_ac && cur_ac->address ? cur_ac->address : "unknown", sizeof(buf)); extract_address(buf); fprintf(mbox_fp, "From %s %s", buf, ctime(&msginfo->date_t)); while (fgets(buf, sizeof(buf), msg_fp) != NULL) { if (!strncmp(buf, "From ", 5)) fputc('>', mbox_fp); fputs(buf, mbox_fp); } fputc('\n', mbox_fp); fclose(msg_fp); procmsg_msginfo_free(msginfo); } g_slist_free(mlist); fclose(mbox_fp); return 0; } libsylph-1.1.0/libsylph/md5.c0000644000175000017500000003533010457702533012751 00000000000000/* GNet API added by David Helder 2000-6-11. All additions and changes placed in the public domain. Files originally from: http://www.gxsnmp.org/CVS/gxsnmp/ Modified the prefix of functions to prevent conflict with original GNet. */ /* * This code implements the MD5 message-digest algorithm. * The algorithm is due to Ron Rivest. This code was * written by Colin Plumb in 1993, no copyright is claimed. * This code is in the public domain; do with it what you wish. * * Equivalent code is available from RSA Data Security, Inc. * This code has been tested against that, and is equivalent, * except that you don't need to include two pages of legalese * with every copy. * * To compute the message digest of a chunk of bytes, declare an * MD5Context structure, pass it to MD5Init, call MD5Update as * needed on buffers full of bytes, and then call MD5Final, which * will fill a supplied 16-byte array with the digest. */ #include "md5.h" #include #include /* ************************************************************ */ /* Code below is from Colin Plumb implementation */ struct MD5Context { guint32 buf[4]; guint32 bits[2]; guchar in[64]; int doByteReverse; }; static void MD5Init(struct MD5Context *context); static void MD5Update(struct MD5Context *context, guchar const *buf, guint len); static void MD5Final(guchar digest[16], struct MD5Context *context); static void MD5Transform(guint32 buf[4], guint32 const in[16]); /* * This is needed to make RSAREF happy on some MS-DOS compilers. */ typedef struct MD5Context MD5_CTX; static void byteReverse(guint8 *buf, guint longs); /* * Note: this code is harmless on little-endian machines. */ void byteReverse(guint8 *buf, guint longs) { guint32 t; do { t = (guint32) ((guint) buf[3] << 8 | buf[2]) << 16 | ((guint) buf[1] << 8 | buf[0]); *(guint32 *) buf = t; buf += 4; } while (--longs); } /* * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious * initialization constants. */ void MD5Init(struct MD5Context *ctx) { ctx->buf[0] = 0x67452301; ctx->buf[1] = 0xefcdab89; ctx->buf[2] = 0x98badcfe; ctx->buf[3] = 0x10325476; ctx->bits[0] = 0; ctx->bits[1] = 0; #if (G_BYTE_ORDER == G_BIG_ENDIAN) ctx->doByteReverse = 1; #else ctx->doByteReverse = 0; #endif } /* * Update context to reflect the concatenation of another buffer full * of bytes. */ void MD5Update(struct MD5Context *ctx, guint8 const *buf, guint len) { guint32 t; /* Update bitcount */ t = ctx->bits[0]; if ((ctx->bits[0] = t + ((guint32) len << 3)) < t) ctx->bits[1]++; /* Carry from low to high */ ctx->bits[1] += len >> 29; t = (t >> 3) & 0x3f; /* Bytes already in shsInfo->data */ /* Handle any leading odd-sized chunks */ if (t) { guint8 *p = (guint8 *) ctx->in + t; t = 64 - t; if (len < t) { g_memmove(p, buf, len); return; } g_memmove(p, buf, t); if (ctx->doByteReverse) byteReverse(ctx->in, 16); MD5Transform(ctx->buf, (guint32 *) ctx->in); buf += t; len -= t; } /* Process data in 64-byte chunks */ while (len >= 64) { g_memmove(ctx->in, buf, 64); if (ctx->doByteReverse) byteReverse(ctx->in, 16); MD5Transform(ctx->buf, (guint32 *) ctx->in); buf += 64; len -= 64; } /* Handle any remaining bytes of data. */ g_memmove(ctx->in, buf, len); } /* * Final wrapup - pad to 64-byte boundary with the bit pattern * 1 0* (64-bit count of bits processed, MSB-first) */ void MD5Final(guint8 digest[16], struct MD5Context *ctx) { guint count; guint8 *p; /* Compute number of bytes mod 64 */ count = (ctx->bits[0] >> 3) & 0x3F; /* Set the first char of padding to 0x80. This is safe since there is always at least one byte free */ p = ctx->in + count; *p++ = 0x80; /* Bytes of padding needed to make 64 bytes */ count = 64 - 1 - count; /* Pad out to 56 mod 64 */ if (count < 8) { /* Two lots of padding: Pad the first block to 64 bytes */ memset(p, 0, count); if (ctx->doByteReverse) byteReverse(ctx->in, 16); MD5Transform(ctx->buf, (guint32 *) ctx->in); /* Now fill the next block with 56 bytes */ memset(ctx->in, 0, 56); } else { /* Pad block to 56 bytes */ memset(p, 0, count - 8); } if (ctx->doByteReverse) byteReverse(ctx->in, 14); /* Append length in bits and transform */ ((guint32 *) ctx->in)[14] = ctx->bits[0]; ((guint32 *) ctx->in)[15] = ctx->bits[1]; MD5Transform(ctx->buf, (guint32 *) ctx->in); if (ctx->doByteReverse) byteReverse((guint8 *) ctx->buf, 4); g_memmove(digest, ctx->buf, 16); memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */ } /* The four core functions - F1 is optimized somewhat */ /* #define F1(x, y, z) (x & y | ~x & z) */ #define F1(x, y, z) (z ^ (x & (y ^ z))) #define F2(x, y, z) F1(z, x, y) #define F3(x, y, z) (x ^ y ^ z) #define F4(x, y, z) (y ^ (x | ~z)) /* This is the central step in the MD5 algorithm. */ #define MD5STEP(f, w, x, y, z, data, s) \ ( w += f(x, y, z) + data, w = w<>(32-s), w += x ) /* * The core of the MD5 algorithm, this alters an existing MD5 hash to * reflect the addition of 16 longwords of new data. MD5Update blocks * the data and converts bytes into longwords for this routine. */ void MD5Transform(guint32 buf[4], guint32 const in[16]) { register guint32 a, b, c, d; a = buf[0]; b = buf[1]; c = buf[2]; d = buf[3]; MD5STEP(F1, a, b, c, d, in[0] + 0xd76aa478, 7); MD5STEP(F1, d, a, b, c, in[1] + 0xe8c7b756, 12); MD5STEP(F1, c, d, a, b, in[2] + 0x242070db, 17); MD5STEP(F1, b, c, d, a, in[3] + 0xc1bdceee, 22); MD5STEP(F1, a, b, c, d, in[4] + 0xf57c0faf, 7); MD5STEP(F1, d, a, b, c, in[5] + 0x4787c62a, 12); MD5STEP(F1, c, d, a, b, in[6] + 0xa8304613, 17); MD5STEP(F1, b, c, d, a, in[7] + 0xfd469501, 22); MD5STEP(F1, a, b, c, d, in[8] + 0x698098d8, 7); MD5STEP(F1, d, a, b, c, in[9] + 0x8b44f7af, 12); MD5STEP(F1, c, d, a, b, in[10] + 0xffff5bb1, 17); MD5STEP(F1, b, c, d, a, in[11] + 0x895cd7be, 22); MD5STEP(F1, a, b, c, d, in[12] + 0x6b901122, 7); MD5STEP(F1, d, a, b, c, in[13] + 0xfd987193, 12); MD5STEP(F1, c, d, a, b, in[14] + 0xa679438e, 17); MD5STEP(F1, b, c, d, a, in[15] + 0x49b40821, 22); MD5STEP(F2, a, b, c, d, in[1] + 0xf61e2562, 5); MD5STEP(F2, d, a, b, c, in[6] + 0xc040b340, 9); MD5STEP(F2, c, d, a, b, in[11] + 0x265e5a51, 14); MD5STEP(F2, b, c, d, a, in[0] + 0xe9b6c7aa, 20); MD5STEP(F2, a, b, c, d, in[5] + 0xd62f105d, 5); MD5STEP(F2, d, a, b, c, in[10] + 0x02441453, 9); MD5STEP(F2, c, d, a, b, in[15] + 0xd8a1e681, 14); MD5STEP(F2, b, c, d, a, in[4] + 0xe7d3fbc8, 20); MD5STEP(F2, a, b, c, d, in[9] + 0x21e1cde6, 5); MD5STEP(F2, d, a, b, c, in[14] + 0xc33707d6, 9); MD5STEP(F2, c, d, a, b, in[3] + 0xf4d50d87, 14); MD5STEP(F2, b, c, d, a, in[8] + 0x455a14ed, 20); MD5STEP(F2, a, b, c, d, in[13] + 0xa9e3e905, 5); MD5STEP(F2, d, a, b, c, in[2] + 0xfcefa3f8, 9); MD5STEP(F2, c, d, a, b, in[7] + 0x676f02d9, 14); MD5STEP(F2, b, c, d, a, in[12] + 0x8d2a4c8a, 20); MD5STEP(F3, a, b, c, d, in[5] + 0xfffa3942, 4); MD5STEP(F3, d, a, b, c, in[8] + 0x8771f681, 11); MD5STEP(F3, c, d, a, b, in[11] + 0x6d9d6122, 16); MD5STEP(F3, b, c, d, a, in[14] + 0xfde5380c, 23); MD5STEP(F3, a, b, c, d, in[1] + 0xa4beea44, 4); MD5STEP(F3, d, a, b, c, in[4] + 0x4bdecfa9, 11); MD5STEP(F3, c, d, a, b, in[7] + 0xf6bb4b60, 16); MD5STEP(F3, b, c, d, a, in[10] + 0xbebfbc70, 23); MD5STEP(F3, a, b, c, d, in[13] + 0x289b7ec6, 4); MD5STEP(F3, d, a, b, c, in[0] + 0xeaa127fa, 11); MD5STEP(F3, c, d, a, b, in[3] + 0xd4ef3085, 16); MD5STEP(F3, b, c, d, a, in[6] + 0x04881d05, 23); MD5STEP(F3, a, b, c, d, in[9] + 0xd9d4d039, 4); MD5STEP(F3, d, a, b, c, in[12] + 0xe6db99e5, 11); MD5STEP(F3, c, d, a, b, in[15] + 0x1fa27cf8, 16); MD5STEP(F3, b, c, d, a, in[2] + 0xc4ac5665, 23); MD5STEP(F4, a, b, c, d, in[0] + 0xf4292244, 6); MD5STEP(F4, d, a, b, c, in[7] + 0x432aff97, 10); MD5STEP(F4, c, d, a, b, in[14] + 0xab9423a7, 15); MD5STEP(F4, b, c, d, a, in[5] + 0xfc93a039, 21); MD5STEP(F4, a, b, c, d, in[12] + 0x655b59c3, 6); MD5STEP(F4, d, a, b, c, in[3] + 0x8f0ccc92, 10); MD5STEP(F4, c, d, a, b, in[10] + 0xffeff47d, 15); MD5STEP(F4, b, c, d, a, in[1] + 0x85845dd1, 21); MD5STEP(F4, a, b, c, d, in[8] + 0x6fa87e4f, 6); MD5STEP(F4, d, a, b, c, in[15] + 0xfe2ce6e0, 10); MD5STEP(F4, c, d, a, b, in[6] + 0xa3014314, 15); MD5STEP(F4, b, c, d, a, in[13] + 0x4e0811a1, 21); MD5STEP(F4, a, b, c, d, in[4] + 0xf7537e82, 6); MD5STEP(F4, d, a, b, c, in[11] + 0xbd3af235, 10); MD5STEP(F4, c, d, a, b, in[2] + 0x2ad7d2bb, 15); MD5STEP(F4, b, c, d, a, in[9] + 0xeb86d391, 21); buf[0] += a; buf[1] += b; buf[2] += c; buf[3] += d; } /* ************************************************************ */ /* Code below is David Helder's API for GNet */ struct _SMD5 { struct MD5Context ctx; gchar digest[S_GNET_MD5_HASH_LENGTH]; }; /** * s_gnet_md5_new: * @buffer: buffer to hash * @length: length of @buffer * * Creates a #SMD5 from @buffer. * * Returns: a new #SMD5. * **/ SMD5* s_gnet_md5_new (const guchar* buffer, guint length) { SMD5* md5; md5 = g_new0 (SMD5, 1); MD5Init (&md5->ctx); MD5Update (&md5->ctx, buffer, length); MD5Final ((gpointer) &md5->digest, &md5->ctx); return md5; } /** * s_gnet_md5_new_string: * @str: hexidecimal string * * Creates a #SMD5 from @str. @str is a hexidecimal string * representing the digest. * * Returns: a new #SMD5. * **/ SMD5* s_gnet_md5_new_string (const gchar* str) { SMD5* md5; guint i; g_return_val_if_fail (str, NULL); g_return_val_if_fail (strlen(str) >= (S_GNET_MD5_HASH_LENGTH * 2), NULL); md5 = g_new0 (SMD5, 1); for (i = 0; i < (S_GNET_MD5_HASH_LENGTH * 2); ++i) { guint val = 0; switch (str[i]) { case '0': val = 0; break; case '1': val = 1; break; case '2': val = 2; break; case '3': val = 3; break; case '4': val = 4; break; case '5': val = 5; break; case '6': val = 6; break; case '7': val = 7; break; case '8': val = 8; break; case '9': val = 9; break; case 'A': case 'a': val = 10; break; case 'B': case 'b': val = 11; break; case 'C': case 'c': val = 12; break; case 'D': case 'd': val = 13; break; case 'E': case 'e': val = 14; break; case 'F': case 'f': val = 15; break; default: g_return_val_if_fail (FALSE, NULL); } if (i % 2) md5->digest[i / 2] |= val; else md5->digest[i / 2] = val << 4; } return md5; } /** * s_gnet_md5_clone * @md5: a #SMD5 * * Copies a #SMD5. * * Returns: a copy of @md5. * **/ SMD5* s_gnet_md5_clone (const SMD5* md5) { SMD5* md52; g_return_val_if_fail (md5, NULL); md52 = g_new0 (SMD5, 1); md52->ctx = md5->ctx; memcpy (md52->digest, md5->digest, sizeof(md5->digest)); return md52; } /** * s_gnet_md5_delete * @md5: a #SMD5 * * Deletes a #SMD5. * **/ void s_gnet_md5_delete (SMD5* md5) { if (md5) g_free (md5); } /** * s_gnet_md5_new_incremental * * Creates a #SMD5 incrementally. After creating a #SMD5, call * s_gnet_md5_update() one or more times to hash data. Finally, call * s_gnet_md5_final() to compute the final hash value. * * Returns: a new #SMD5. * **/ SMD5* s_gnet_md5_new_incremental (void) { SMD5* md5; md5 = g_new0 (SMD5, 1); MD5Init (&md5->ctx); return md5; } /** * s_gnet_md5_update * @md5: a #SMD5 * @buffer: buffer to add * @length: length of @buffer * * Updates the hash with @buffer. This may be called several times * on a hash created by s_gnet_md5_new_incremental() before being * finalized by calling s_gnet_md5_final(). * **/ void s_gnet_md5_update (SMD5* md5, const guchar* buffer, guint length) { g_return_if_fail (md5); MD5Update (&md5->ctx, buffer, length); } /** * s_gnet_md5_final * @md5: a #SMD5 * * Calcuates the final hash value of a #SMD5. This should only be * called on an #SMD5 created by s_gnet_md5_new_incremental(). * **/ void s_gnet_md5_final (SMD5* md5) { g_return_if_fail (md5); MD5Final ((gpointer) &md5->digest, &md5->ctx); } /* **************************************** */ /** * s_gnet_md5_equal * @p1: first #SMD5. * @p2: second #SMD5. * * Compares two #SMD5's for equality. * * Returns: TRUE if they are equal; FALSE otherwise. * **/ gint s_gnet_md5_equal (gconstpointer p1, gconstpointer p2) { SMD5* md5a = (SMD5*) p1; SMD5* md5b = (SMD5*) p2; guint i; for (i = 0; i < S_GNET_MD5_HASH_LENGTH; ++i) if (md5a->digest[i] != md5b->digest[i]) return FALSE; return TRUE; } /** * s_gnet_md5_hash * @p: a #SMD5 * * Creates a hash code for a #SMD5 for use with GHashTable. This * hash value is not the same as the MD5 digest. * * Returns: the hash code for @p. * **/ guint s_gnet_md5_hash (gconstpointer p) { const SMD5* md5 = (const SMD5*) p; const guint* q; g_return_val_if_fail (md5, 0); q = (const guint*) md5->digest; return (q[0] ^ q[1] ^ q[2] ^ q[3]); } /** * s_gnet_md5_get_digest * @md5: a #SMD5 * * Gets the raw MD5 digest. * * Returns: a callee-owned buffer containing the MD5 hash digest. * The buffer is %S_GNET_MD5_HASH_LENGTH bytes long. * **/ gchar* s_gnet_md5_get_digest (const SMD5* md5) { g_return_val_if_fail (md5, NULL); return (gchar*) md5->digest; } static gchar bits2hex[16] = { '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f' }; /** * s_gnet_md5_get_string * @md5: a #SMD5 * * Gets the digest represented a human-readable string. * * Returns: a hexadecimal string representing the digest. The string * is 2 * %S_GNET_MD5_HASH_LENGTH bytes long and NULL terminated. The * string is caller owned. * **/ gchar* s_gnet_md5_get_string (const SMD5* md5) { gchar* str; guint i; g_return_val_if_fail (md5, NULL); str = g_new (gchar, S_GNET_MD5_HASH_LENGTH * 2 + 1); str[S_GNET_MD5_HASH_LENGTH * 2] = '\0'; for (i = 0; i < S_GNET_MD5_HASH_LENGTH; ++i) { str[i * 2] = bits2hex[(md5->digest[i] & 0xF0) >> 4]; str[(i * 2) + 1] = bits2hex[(md5->digest[i] & 0x0F) ]; } return str; } /** * s_gnet_md5_copy_string * @md5: a #SMD5 * @buffer: buffer at least 2 * %S_GNET_MD5_HASH_LENGTH bytes long * * Copies the digest, represented as a string, into @buffer. The * string is not NULL terminated. * **/ void s_gnet_md5_copy_string (const SMD5* md5, gchar* buffer) { guint i; g_return_if_fail (md5); g_return_if_fail (buffer); for (i = 0; i < S_GNET_MD5_HASH_LENGTH; ++i) { buffer[i * 2] = bits2hex[(md5->digest[i] & 0xF0) >> 4]; buffer[(i * 2) + 1] = bits2hex[(md5->digest[i] & 0x0F) ]; } } libsylph-1.1.0/libsylph/md5_hmac.c0000644000175000017500000000706010462011635013730 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2006 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include "md5.h" #include "md5_hmac.h" /* ** Function: md5_hmac_get ** taken from the file rfc2104.txt ** originally written by Martin Schaaf ** rewritten by Hiroyuki Yamamoto */ static SMD5* md5_hmac_get(const guchar *text, gint text_len, const guchar *key, gint key_len) { SMD5 *md5; guchar k_ipad[64]; /* inner padding - * key XORd with ipad */ guchar k_opad[64]; /* outer padding - * key XORd with opad */ guchar digest[S_GNET_MD5_HASH_LENGTH]; gint i; /* start out by storing key in pads */ memset(k_ipad, 0, sizeof k_ipad); memset(k_opad, 0, sizeof k_opad); if (key_len > 64) { /* if key is longer than 64 bytes reset it to key=MD5(key) */ SMD5 *tmd5; tmd5 = s_gnet_md5_new(key, key_len); memcpy(k_ipad, s_gnet_md5_get_digest(tmd5), S_GNET_MD5_HASH_LENGTH); memcpy(k_opad, s_gnet_md5_get_digest(tmd5), S_GNET_MD5_HASH_LENGTH); s_gnet_md5_delete(tmd5); } else { memcpy(k_ipad, key, key_len); memcpy(k_opad, key, key_len); } /* * the HMAC_MD5 transform looks like: * * MD5(K XOR opad, MD5(K XOR ipad, text)) * * where K is an n byte key * ipad is the byte 0x36 repeated 64 times * opad is the byte 0x5c repeated 64 times * and text is the data being protected */ /* XOR key with ipad and opad values */ for (i = 0; i < 64; i++) { k_ipad[i] ^= 0x36; k_opad[i] ^= 0x5c; } /* * perform inner MD5 */ md5 = s_gnet_md5_new_incremental(); /* init context for 1st * pass */ s_gnet_md5_update(md5, k_ipad, 64); /* start with inner pad */ s_gnet_md5_update(md5, text, text_len); /* then text of datagram */ s_gnet_md5_final(md5); /* finish up 1st pass */ memcpy(digest, s_gnet_md5_get_digest(md5), S_GNET_MD5_HASH_LENGTH); s_gnet_md5_delete(md5); /* * perform outer MD5 */ md5 = s_gnet_md5_new_incremental(); /* init context for 2nd * pass */ s_gnet_md5_update(md5, k_opad, 64); /* start with outer pad */ s_gnet_md5_update(md5, digest, 16); /* then results of 1st * hash */ s_gnet_md5_final(md5); /* finish up 2nd pass */ return md5; } void md5_hmac(guchar *digest, const guchar *text, gint text_len, const guchar *key, gint key_len) { SMD5 *md5; md5 = md5_hmac_get(text, text_len, key, key_len); memcpy(digest, s_gnet_md5_get_digest(md5), S_GNET_MD5_HASH_LENGTH); s_gnet_md5_delete(md5); } void md5_hex_hmac(gchar *hexdigest, const guchar *text, gint text_len, const guchar *key, gint key_len) { SMD5 *md5; md5 = md5_hmac_get(text, text_len, key, key_len); s_gnet_md5_copy_string(md5, hexdigest); hexdigest[S_GNET_MD5_HASH_LENGTH * 2] = '\0'; s_gnet_md5_delete(md5); } libsylph-1.1.0/libsylph/mh.c0000644000175000017500000011034210457702533012665 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2006 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "defs.h" #include #include #include #include #include #include #include #include #ifdef G_OS_WIN32 # include #endif #undef MEASURE_TIME #include "folder.h" #include "mh.h" #include "procmsg.h" #include "procheader.h" #include "utils.h" #include "prefs_common.h" static void mh_folder_init (Folder *folder, const gchar *name, const gchar *path); static Folder *mh_folder_new (const gchar *name, const gchar *path); static void mh_folder_destroy (Folder *folder); static GSList *mh_get_msg_list (Folder *folder, FolderItem *item, gboolean use_cache); static gchar *mh_fetch_msg (Folder *folder, FolderItem *item, gint num); static MsgInfo *mh_get_msginfo (Folder *folder, FolderItem *item, gint num); static gint mh_add_msg (Folder *folder, FolderItem *dest, const gchar *file, MsgFlags *flags, gboolean remove_source); static gint mh_add_msgs (Folder *folder, FolderItem *dest, GSList *file_list, gboolean remove_source, gint *first); static gint mh_move_msg (Folder *folder, FolderItem *dest, MsgInfo *msginfo); static gint mh_move_msgs (Folder *folder, FolderItem *dest, GSList *msglist); static gint mh_copy_msg (Folder *folder, FolderItem *dest, MsgInfo *msginfo); static gint mh_copy_msgs (Folder *folder, FolderItem *dest, GSList *msglist); static gint mh_remove_msg (Folder *folder, FolderItem *item, MsgInfo *msginfo); static gint mh_remove_all_msg (Folder *folder, FolderItem *item); static gboolean mh_is_msg_changed (Folder *folder, FolderItem *item, MsgInfo *msginfo); static gint mh_close (Folder *folder, FolderItem *item); static gint mh_scan_folder_full (Folder *folder, FolderItem *item, gboolean count_sum); static gint mh_scan_folder (Folder *folder, FolderItem *item); static gint mh_scan_tree (Folder *folder); static gint mh_create_tree (Folder *folder); static FolderItem *mh_create_folder (Folder *folder, FolderItem *parent, const gchar *name); static gint mh_rename_folder (Folder *folder, FolderItem *item, const gchar *name); static gint mh_move_folder (Folder *folder, FolderItem *item, FolderItem *new_parent); static gint mh_remove_folder (Folder *folder, FolderItem *item); static gchar *mh_get_new_msg_filename (FolderItem *dest); static gint mh_do_move_msgs (Folder *folder, FolderItem *dest, GSList *msglist); static time_t mh_get_mtime (FolderItem *item); static GSList *mh_get_uncached_msgs (GHashTable *msg_table, FolderItem *item); static MsgInfo *mh_parse_msg (const gchar *file, FolderItem *item); static void mh_remove_missing_folder_items (Folder *folder); static void mh_scan_tree_recursive (FolderItem *item); static gboolean mh_rename_folder_func (GNode *node, gpointer data); static FolderClass mh_class = { F_MH, mh_folder_new, mh_folder_destroy, mh_scan_tree, mh_create_tree, mh_get_msg_list, mh_fetch_msg, mh_get_msginfo, mh_add_msg, mh_add_msgs, mh_move_msg, mh_move_msgs, mh_copy_msg, mh_copy_msgs, mh_remove_msg, NULL, mh_remove_all_msg, mh_is_msg_changed, mh_close, mh_scan_folder, mh_create_folder, mh_rename_folder, mh_move_folder, mh_remove_folder, }; FolderClass *mh_get_class(void) { return &mh_class; } static Folder *mh_folder_new(const gchar *name, const gchar *path) { Folder *folder; folder = (Folder *)g_new0(MHFolder, 1); mh_folder_init(folder, name, path); return folder; } static void mh_folder_destroy(Folder *folder) { folder_local_folder_destroy(LOCAL_FOLDER(folder)); } static void mh_folder_init(Folder *folder, const gchar *name, const gchar *path) { folder->klass = mh_get_class(); folder_local_folder_init(folder, name, path); } static GSList *mh_get_msg_list(Folder *folder, FolderItem *item, gboolean use_cache) { GSList *mlist; GHashTable *msg_table; time_t cur_mtime; #ifdef MEASURE_TIME GTimer *timer; #endif g_return_val_if_fail(item != NULL, NULL); #ifdef MEASURE_TIME timer = g_timer_new(); #endif cur_mtime = mh_get_mtime(item); if (use_cache && item->mtime == cur_mtime) { debug_print("Folder is not modified.\n"); mlist = procmsg_read_cache(item, FALSE); if (!mlist) { mlist = mh_get_uncached_msgs(NULL, item); if (mlist) item->cache_dirty = TRUE; } } else if (use_cache) { GSList *newlist, *cur, *next; gboolean strict_cache_check = prefs_common.strict_cache_check; if (item->stype == F_QUEUE || item->stype == F_DRAFT) strict_cache_check = TRUE; mlist = procmsg_read_cache(item, strict_cache_check); msg_table = procmsg_msg_hash_table_create(mlist); newlist = mh_get_uncached_msgs(msg_table, item); if (newlist) item->cache_dirty = TRUE; if (msg_table) g_hash_table_destroy(msg_table); if (!strict_cache_check) { /* remove nonexistent messages */ for (cur = mlist; cur != NULL; cur = next) { MsgInfo *msginfo = (MsgInfo *)cur->data; next = cur->next; if (!MSG_IS_CACHED(msginfo->flags)) { debug_print("removing nonexistent message %d from cache\n", msginfo->msgnum); mlist = g_slist_remove(mlist, msginfo); procmsg_msginfo_free(msginfo); item->cache_dirty = TRUE; item->mark_dirty = TRUE; } } } mlist = g_slist_concat(mlist, newlist); } else { mlist = mh_get_uncached_msgs(NULL, item); item->cache_dirty = TRUE; } procmsg_set_flags(mlist, item); mlist = procmsg_sort_msg_list(mlist, item->sort_key, item->sort_type); if (item->mark_queue) item->mark_dirty = TRUE; #ifdef MEASURE_TIME g_timer_stop(timer); g_print("%s: %s: elapsed time: %f sec\n", G_STRFUNC, item->path, g_timer_elapsed(timer, NULL)); g_timer_destroy(timer); #endif debug_print("cache_dirty: %d, mark_dirty: %d\n", item->cache_dirty, item->mark_dirty); if (!item->opened) { item->mtime = cur_mtime; if (item->cache_dirty) procmsg_write_cache_list(item, mlist); if (item->mark_dirty) procmsg_write_flags_list(item, mlist); } return mlist; } static gchar *mh_fetch_msg(Folder *folder, FolderItem *item, gint num) { gchar *path; gchar *file; g_return_val_if_fail(item != NULL, NULL); g_return_val_if_fail(num > 0, NULL); if (item->last_num < 0 || num > item->last_num) { mh_scan_folder(folder, item); if (item->last_num < 0) return NULL; } g_return_val_if_fail(num <= item->last_num, NULL); path = folder_item_get_path(item); file = g_strconcat(path, G_DIR_SEPARATOR_S, itos(num), NULL); g_free(path); if (!is_file_exist(file)) { g_free(file); return NULL; } return file; } static MsgInfo *mh_get_msginfo(Folder *folder, FolderItem *item, gint num) { MsgInfo *msginfo; gchar *file; g_return_val_if_fail(item != NULL, NULL); g_return_val_if_fail(num > 0, NULL); file = mh_fetch_msg(folder, item, num); if (!file) return NULL; msginfo = mh_parse_msg(file, item); if (msginfo) msginfo->msgnum = num; g_free(file); return msginfo; } static gchar *mh_get_new_msg_filename(FolderItem *dest) { gchar *destfile; gchar *destpath; destpath = folder_item_get_path(dest); g_return_val_if_fail(destpath != NULL, NULL); if (!is_dir_exist(destpath)) make_dir_hier(destpath); for (;;) { destfile = g_strdup_printf("%s%c%d", destpath, G_DIR_SEPARATOR, dest->last_num + 1); if (is_file_entry_exist(destfile)) { dest->last_num++; g_free(destfile); } else break; } g_free(destpath); return destfile; } #define SET_DEST_MSG_FLAGS(fp, dest, n, fl) \ { \ MsgInfo newmsginfo; \ \ newmsginfo.msgnum = n; \ newmsginfo.flags = fl; \ if (dest->stype == F_OUTBOX || \ dest->stype == F_QUEUE || \ dest->stype == F_DRAFT) { \ MSG_UNSET_PERM_FLAGS(newmsginfo.flags, \ MSG_NEW|MSG_UNREAD|MSG_DELETED); \ } else if (dest->stype == F_TRASH) { \ MSG_UNSET_PERM_FLAGS(newmsginfo.flags, MSG_DELETED); \ } \ \ if (fp) \ procmsg_write_flags(&newmsginfo, fp); \ else if (dest->opened) \ procmsg_add_flags(dest, n, newmsginfo.flags); \ } static gint mh_add_msg(Folder *folder, FolderItem *dest, const gchar *file, MsgFlags *flags, gboolean remove_source) { GSList file_list; MsgFileInfo fileinfo; g_return_val_if_fail(file != NULL, -1); fileinfo.file = (gchar *)file; fileinfo.flags = flags; file_list.data = &fileinfo; file_list.next = NULL; return mh_add_msgs(folder, dest, &file_list, remove_source, NULL); } static gint mh_add_msgs(Folder *folder, FolderItem *dest, GSList *file_list, gboolean remove_source, gint *first) { gchar *destfile; GSList *cur; MsgFileInfo *fileinfo; gint first_ = 0; FILE *fp; g_return_val_if_fail(dest != NULL, -1); g_return_val_if_fail(file_list != NULL, -1); if (dest->last_num < 0) { mh_scan_folder(folder, dest); if (dest->last_num < 0) return -1; } if ((((MsgFileInfo *)file_list->data)->flags == NULL && file_list->next == NULL) || dest->opened) fp = NULL; else if ((fp = procmsg_open_mark_file(dest, DATA_APPEND)) == NULL) g_warning("Can't open mark file.\n"); for (cur = file_list; cur != NULL; cur = cur->next) { fileinfo = (MsgFileInfo *)cur->data; destfile = mh_get_new_msg_filename(dest); if (destfile == NULL) return -1; if (first_ == 0 || first_ > dest->last_num + 1) first_ = dest->last_num + 1; #ifdef G_OS_UNIX if (link(fileinfo->file, destfile) < 0) { #endif if (copy_file(fileinfo->file, destfile, TRUE) < 0) { g_warning(_("can't copy message %s to %s\n"), fileinfo->file, destfile); g_free(destfile); return -1; } #ifdef G_OS_UNIX } #endif g_free(destfile); dest->last_num++; dest->total++; dest->updated = TRUE; dest->mtime = 0; if (fileinfo->flags) { if (MSG_IS_RECEIVED(*fileinfo->flags)) { if (dest->unmarked_num == 0) dest->new = 0; dest->unmarked_num++; procmsg_add_mark_queue(dest, dest->last_num, *fileinfo->flags); } else { SET_DEST_MSG_FLAGS(fp, dest, dest->last_num, *fileinfo->flags); } if (MSG_IS_NEW(*fileinfo->flags)) dest->new++; if (MSG_IS_UNREAD(*fileinfo->flags)) dest->unread++; } else { if (dest->unmarked_num == 0) dest->new = 0; dest->unmarked_num++; dest->new++; dest->unread++; } } if (fp) fclose(fp); if (first) *first = first_; if (remove_source) { for (cur = file_list; cur != NULL; cur = cur->next) { fileinfo = (MsgFileInfo *)cur->data; if (g_unlink(fileinfo->file) < 0) FILE_OP_ERROR(fileinfo->file, "unlink"); } } return dest->last_num; } static gint mh_do_move_msgs(Folder *folder, FolderItem *dest, GSList *msglist) { FolderItem *src; gchar *srcfile; gchar *destfile; FILE *fp; GSList *cur; MsgInfo *msginfo; g_return_val_if_fail(dest != NULL, -1); g_return_val_if_fail(msglist != NULL, -1); if (dest->last_num < 0) { mh_scan_folder(folder, dest); if (dest->last_num < 0) return -1; } if (dest->opened) fp = NULL; else if ((fp = procmsg_open_mark_file(dest, DATA_APPEND)) == NULL) g_warning(_("Can't open mark file.\n")); for (cur = msglist; cur != NULL; cur = cur->next) { msginfo = (MsgInfo *)cur->data; src = msginfo->folder; if (src == dest) { g_warning(_("the src folder is identical to the dest.\n")); continue; } debug_print("Moving message %s%c%d to %s ...\n", src->path, G_DIR_SEPARATOR, msginfo->msgnum, dest->path); destfile = mh_get_new_msg_filename(dest); if (!destfile) break; srcfile = procmsg_get_message_file(msginfo); if (move_file(srcfile, destfile, FALSE) < 0) { g_free(srcfile); g_free(destfile); break; } g_free(srcfile); g_free(destfile); src->total--; src->updated = TRUE; src->mtime = 0; dest->last_num++; dest->total++; dest->updated = TRUE; dest->mtime = 0; if (fp) { SET_DEST_MSG_FLAGS(fp, dest, dest->last_num, msginfo->flags); } if (MSG_IS_NEW(msginfo->flags)) { src->new--; dest->new++; } if (MSG_IS_UNREAD(msginfo->flags)) { src->unread--; dest->unread++; } MSG_SET_TMP_FLAGS(msginfo->flags, MSG_INVALID); } if (fp) fclose(fp); return dest->last_num; } static gint mh_move_msg(Folder *folder, FolderItem *dest, MsgInfo *msginfo) { GSList msglist; g_return_val_if_fail(msginfo != NULL, -1); msglist.data = msginfo; msglist.next = NULL; return mh_move_msgs(folder, dest, &msglist); } static gint mh_move_msgs(Folder *folder, FolderItem *dest, GSList *msglist) { MsgInfo *msginfo; GSList *file_list; gint ret = 0; gint first; msginfo = (MsgInfo *)msglist->data; if (folder == msginfo->folder->folder) return mh_do_move_msgs(folder, dest, msglist); file_list = procmsg_get_message_file_list(msglist); g_return_val_if_fail(file_list != NULL, -1); ret = mh_add_msgs(folder, dest, file_list, FALSE, &first); procmsg_message_file_list_free(file_list); if (ret != -1) ret = folder_item_remove_msgs(msginfo->folder, msglist); return ret; } static gint mh_copy_msg(Folder *folder, FolderItem *dest, MsgInfo *msginfo) { GSList msglist; g_return_val_if_fail(msginfo != NULL, -1); msglist.data = msginfo; msglist.next = NULL; return mh_copy_msgs(folder, dest, &msglist); } static gint mh_copy_msgs(Folder *folder, FolderItem *dest, GSList *msglist) { gchar *srcfile; gchar *destfile; FILE *fp; GSList *cur; MsgInfo *msginfo; g_return_val_if_fail(dest != NULL, -1); g_return_val_if_fail(msglist != NULL, -1); if (dest->last_num < 0) { mh_scan_folder(folder, dest); if (dest->last_num < 0) return -1; } if (dest->opened) fp = NULL; else if ((fp = procmsg_open_mark_file(dest, DATA_APPEND)) == NULL) g_warning(_("Can't open mark file.\n")); for (cur = msglist; cur != NULL; cur = cur->next) { msginfo = (MsgInfo *)cur->data; if (msginfo->folder == dest) { g_warning(_("the src folder is identical to the dest.\n")); continue; } debug_print(_("Copying message %s%c%d to %s ...\n"), msginfo->folder->path, G_DIR_SEPARATOR, msginfo->msgnum, dest->path); destfile = mh_get_new_msg_filename(dest); if (!destfile) break; srcfile = procmsg_get_message_file(msginfo); if (copy_file(srcfile, destfile, TRUE) < 0) { FILE_OP_ERROR(srcfile, "copy"); g_free(srcfile); g_free(destfile); break; } g_free(srcfile); g_free(destfile); dest->last_num++; dest->total++; dest->updated = TRUE; dest->mtime = 0; if (fp) { SET_DEST_MSG_FLAGS(fp, dest, dest->last_num, msginfo->flags); } if (MSG_IS_NEW(msginfo->flags)) dest->new++; if (MSG_IS_UNREAD(msginfo->flags)) dest->unread++; } if (fp) fclose(fp); return dest->last_num; } static gint mh_remove_msg(Folder *folder, FolderItem *item, MsgInfo *msginfo) { gchar *file; g_return_val_if_fail(item != NULL, -1); file = mh_fetch_msg(folder, item, msginfo->msgnum); g_return_val_if_fail(file != NULL, -1); if (g_unlink(file) < 0) { FILE_OP_ERROR(file, "unlink"); g_free(file); return -1; } g_free(file); item->total--; item->updated = TRUE; item->mtime = 0; if (MSG_IS_NEW(msginfo->flags)) item->new--; if (MSG_IS_UNREAD(msginfo->flags)) item->unread--; MSG_SET_TMP_FLAGS(msginfo->flags, MSG_INVALID); if (msginfo->msgnum == item->last_num) mh_scan_folder_full(folder, item, FALSE); return 0; } static gint mh_remove_all_msg(Folder *folder, FolderItem *item) { gchar *path; gint val; g_return_val_if_fail(item != NULL, -1); path = folder_item_get_path(item); g_return_val_if_fail(path != NULL, -1); val = remove_all_numbered_files(path); g_free(path); if (val == 0) { item->new = item->unread = item->total = 0; item->last_num = 0; item->updated = TRUE; item->mtime = 0; } return val; } static gboolean mh_is_msg_changed(Folder *folder, FolderItem *item, MsgInfo *msginfo) { struct stat s; if (g_stat(itos(msginfo->msgnum), &s) < 0 || msginfo->size != s.st_size || msginfo->mtime != s.st_mtime) return TRUE; return FALSE; } static gint mh_close(Folder *folder, FolderItem *item) { return 0; } #ifdef G_OS_WIN32 struct wfddata { WIN32_FIND_DATAA wfda; WIN32_FIND_DATAW wfdw; DWORD file_attr; gchar *file_name; }; static HANDLE find_first_file(const gchar *path, struct wfddata *wfd) { HANDLE hfind; if (G_WIN32_HAVE_WIDECHAR_API()) { if (path) { gchar *wildcard_path; wchar_t *wpath; wildcard_path = g_strconcat(path, "\\*", NULL); wpath = g_utf8_to_utf16(wildcard_path, -1, NULL, NULL, NULL); if (wpath) { hfind = FindFirstFileW(wpath, &wfd->wfdw); g_free(wpath); } else hfind = INVALID_HANDLE_VALUE; g_free(wildcard_path); } else hfind = FindFirstFileW(L"*", &wfd->wfdw); if (hfind != INVALID_HANDLE_VALUE) { wfd->file_attr = wfd->wfdw.dwFileAttributes; wfd->file_name = g_utf16_to_utf8(wfd->wfdw.cFileName, -1, NULL, NULL, NULL); } } else { if (path) { gchar *wildcard_path; gchar *cp_path; wildcard_path = g_strconcat(path, "\\*", NULL); cp_path = g_locale_from_utf8(wildcard_path, -1, NULL, NULL, NULL); if (cp_path) { hfind = FindFirstFileA(cp_path, &wfd->wfda); g_free(cp_path); } else hfind = INVALID_HANDLE_VALUE; g_free(wildcard_path); } else hfind = FindFirstFileA("*", &wfd->wfda); if (hfind != INVALID_HANDLE_VALUE) { wfd->file_attr = wfd->wfda.dwFileAttributes; wfd->file_name = g_locale_to_utf8(wfd->wfda.cFileName, -1, NULL, NULL, NULL); } } return hfind; } static BOOL find_next_file(HANDLE hfind, struct wfddata *wfd) { BOOL retval; if (G_WIN32_HAVE_WIDECHAR_API()) { retval = FindNextFileW(hfind, &wfd->wfdw); if (retval) { wfd->file_attr = wfd->wfdw.dwFileAttributes; wfd->file_name = g_utf16_to_utf8(wfd->wfdw.cFileName, -1, NULL, NULL, NULL); } } else { retval = FindNextFileA(hfind, &wfd->wfda); if (retval) { wfd->file_attr = wfd->wfda.dwFileAttributes; wfd->file_name = g_locale_to_utf8(wfd->wfda.cFileName, -1, NULL, NULL, NULL); } } return retval; } #endif static gint mh_scan_folder_full(Folder *folder, FolderItem *item, gboolean count_sum) { gchar *path; #ifdef G_OS_WIN32 struct wfddata wfd; HANDLE hfind; #else DIR *dp; struct dirent *d; #endif gint max = 0; gint num; gint n_msg = 0; g_return_val_if_fail(item != NULL, -1); debug_print("mh_scan_folder(): Scanning %s ...\n", item->path); path = folder_item_get_path(item); g_return_val_if_fail(path != NULL, -1); if (change_dir(path) < 0) { g_free(path); return -1; } g_free(path); #ifdef G_OS_WIN32 if ((hfind = find_first_file(NULL, &wfd)) == INVALID_HANDLE_VALUE) { g_warning("failed to open directory\n"); #else if ((dp = opendir(".")) == NULL) { FILE_OP_ERROR(item->path, "opendir"); #endif return -1; } if (folder->ui_func) folder->ui_func(folder, item, folder->ui_func_data); #ifdef G_OS_WIN32 do { if ((wfd.file_attr & (FILE_ATTRIBUTE_DIRECTORY | FILE_ATTRIBUTE_DEVICE)) == 0) { if (wfd.file_name) { if ((num = to_number(wfd.file_name)) > 0) { n_msg++; if (max < num) max = num; } } } if (wfd.file_name) { g_free(wfd.file_name); wfd.file_name = NULL; } } while (find_next_file(hfind, &wfd)); FindClose(hfind); #else while ((d = readdir(dp)) != NULL) { if ((num = to_number(d->d_name)) > 0 && dirent_is_regular_file(d)) { n_msg++; if (max < num) max = num; } } closedir(dp); #endif if (n_msg == 0) item->new = item->unread = item->total = 0; else if (count_sum) { gint new, unread, total, min, max_; procmsg_get_mark_sum (item, &new, &unread, &total, &min, &max_, 0); if (n_msg > total) { item->unmarked_num = new = n_msg - total; unread += n_msg - total; } else item->unmarked_num = 0; item->new = new; item->unread = unread; item->total = n_msg; } item->updated = TRUE; item->mtime = 0; debug_print("Last number in dir %s = %d\n", item->path, max); item->last_num = max; return 0; } static gint mh_scan_folder(Folder *folder, FolderItem *item) { return mh_scan_folder_full(folder, item, TRUE); } static gint mh_scan_tree(Folder *folder) { FolderItem *item; gchar *rootpath; g_return_val_if_fail(folder != NULL, -1); if (!folder->node) { item = folder_item_new(folder->name, NULL); item->folder = folder; folder->node = item->node = g_node_new(item); } else item = FOLDER_ITEM(folder->node->data); rootpath = folder_item_get_path(item); if (change_dir(rootpath) < 0) { g_free(rootpath); return -1; } g_free(rootpath); mh_create_tree(folder); mh_remove_missing_folder_items(folder); mh_scan_tree_recursive(item); return 0; } #define MAKE_DIR_IF_NOT_EXIST(dir) \ { \ if (!is_dir_exist(dir)) { \ if (is_file_exist(dir)) { \ g_warning(_("File `%s' already exists.\n" \ "Can't create folder."), dir); \ return -1; \ } \ if (make_dir(dir) < 0) \ return -1; \ } \ } #define MAKE_DIR_HIER_IF_NOT_EXIST(dir) \ { \ if (!is_dir_exist(dir)) { \ if (is_file_exist(dir)) { \ g_warning(_("File `%s' already exists.\n" \ "Can't create folder."), dir); \ return -1; \ } \ if (make_dir_hier(dir) < 0) \ return -1; \ } \ } static gint mh_create_tree(Folder *folder) { gchar *rootpath; g_return_val_if_fail(folder != NULL, -1); CHDIR_RETURN_VAL_IF_FAIL(get_mail_base_dir(), -1); rootpath = LOCAL_FOLDER(folder)->rootpath; MAKE_DIR_HIER_IF_NOT_EXIST(rootpath); CHDIR_RETURN_VAL_IF_FAIL(rootpath, -1); MAKE_DIR_IF_NOT_EXIST(INBOX_DIR); MAKE_DIR_IF_NOT_EXIST(OUTBOX_DIR); MAKE_DIR_IF_NOT_EXIST(QUEUE_DIR); MAKE_DIR_IF_NOT_EXIST(DRAFT_DIR); MAKE_DIR_IF_NOT_EXIST(TRASH_DIR); return 0; } #undef MAKE_DIR_IF_NOT_EXIST #undef MAKE_DIR_HIER_IF_NOT_EXIST static FolderItem *mh_create_folder(Folder *folder, FolderItem *parent, const gchar *name) { gchar *path; gchar *fs_name; gchar *fullpath; FolderItem *new_item; g_return_val_if_fail(folder != NULL, NULL); g_return_val_if_fail(parent != NULL, NULL); g_return_val_if_fail(name != NULL, NULL); path = folder_item_get_path(parent); fs_name = g_filename_from_utf8(name, -1, NULL, NULL, NULL); fullpath = g_strconcat(path, G_DIR_SEPARATOR_S, fs_name ? fs_name : name, NULL); g_free(fs_name); g_free(path); if (make_dir_hier(fullpath) < 0) { g_free(fullpath); return NULL; } g_free(fullpath); if (parent->path) path = g_strconcat(parent->path, G_DIR_SEPARATOR_S, name, NULL); else path = g_strdup(name); new_item = folder_item_new(name, path); folder_item_append(parent, new_item); g_free(path); return new_item; } static gint mh_move_folder_real(Folder *folder, FolderItem *item, FolderItem *new_parent, const gchar *name) { gchar *rootpath; gchar *oldpath; gchar *newpath; gchar *dirname; gchar *new_dir; gchar *name_; gchar *utf8_name; gchar *paths[2]; g_return_val_if_fail(folder != NULL, -1); g_return_val_if_fail(item != NULL, -1); g_return_val_if_fail(folder == item->folder, -1); g_return_val_if_fail(item->path != NULL, -1); g_return_val_if_fail(new_parent != NULL || name != NULL, -1); if (new_parent) { g_return_val_if_fail(item != new_parent, -1); g_return_val_if_fail(item->parent != new_parent, -1); g_return_val_if_fail(item->folder == new_parent->folder, -1); if (g_node_is_ancestor(item->node, new_parent->node)) { g_warning("folder to be moved is ancestor of new parent\n"); return -1; } } oldpath = folder_item_get_path(item); if (new_parent) { if (name) { name_ = g_filename_from_utf8(name, -1, NULL, NULL, NULL); if (!name_) name_ = g_strdup(name); utf8_name = g_strdup(name); } else { name_ = g_path_get_basename(oldpath); utf8_name = g_filename_to_utf8(name_, -1, NULL, NULL, NULL); if (!utf8_name) utf8_name = g_strdup(name_); } new_dir = folder_item_get_path(new_parent); newpath = g_strconcat(new_dir, G_DIR_SEPARATOR_S, name_, NULL); g_free(new_dir); } else { name_ = g_filename_from_utf8(name, -1, NULL, NULL, NULL); utf8_name = g_strdup(name); dirname = g_dirname(oldpath); newpath = g_strconcat(dirname, G_DIR_SEPARATOR_S, name_ ? name_ : name, NULL); g_free(dirname); } g_free(name_); if (is_file_entry_exist(newpath)) { g_warning("%s already exists\n", newpath); g_free(oldpath); g_free(newpath); g_free(utf8_name); return -1; } rootpath = folder_get_path(folder); if (change_dir(rootpath) < 0) { g_free(rootpath); g_free(oldpath); g_free(newpath); g_free(utf8_name); return -1; } g_free(rootpath); debug_print("mh_move_folder: rename(%s, %s)\n", oldpath, newpath); if (g_rename(oldpath, newpath) < 0) { FILE_OP_ERROR(oldpath, "rename"); g_free(oldpath); g_free(newpath); g_free(utf8_name); return -1; } g_free(oldpath); g_free(newpath); if (new_parent) { g_node_unlink(item->node); g_node_append(new_parent->node, item->node); item->parent = new_parent; if (new_parent->path != NULL) { newpath = g_strconcat(new_parent->path, G_DIR_SEPARATOR_S, utf8_name, NULL); g_free(utf8_name); } else newpath = utf8_name; } else { if (strchr(item->path, G_DIR_SEPARATOR) != NULL) { dirname = g_dirname(item->path); newpath = g_strconcat(dirname, G_DIR_SEPARATOR_S, utf8_name, NULL); g_free(dirname); g_free(utf8_name); } else newpath = utf8_name; } if (name) { g_free(item->name); item->name = g_strdup(name); } paths[0] = g_strdup(item->path); paths[1] = newpath; g_node_traverse(item->node, G_PRE_ORDER, G_TRAVERSE_ALL, -1, mh_rename_folder_func, paths); g_free(paths[0]); g_free(paths[1]); return 0; } static gint mh_move_folder(Folder *folder, FolderItem *item, FolderItem *new_parent) { return mh_move_folder_real(folder, item, new_parent, NULL); } static gint mh_rename_folder(Folder *folder, FolderItem *item, const gchar *name) { return mh_move_folder_real(folder, item, NULL, name); } static gint mh_remove_folder(Folder *folder, FolderItem *item) { gchar *path; g_return_val_if_fail(folder != NULL, -1); g_return_val_if_fail(item != NULL, -1); g_return_val_if_fail(item->path != NULL, -1); path = folder_item_get_path(item); if (remove_dir_recursive(path) < 0) { g_warning("can't remove directory `%s'\n", path); g_free(path); return -1; } g_free(path); folder_item_remove(item); return 0; } static time_t mh_get_mtime(FolderItem *item) { gchar *path; struct stat s; path = folder_item_get_path(item); if (g_stat(path, &s) < 0) { FILE_OP_ERROR(path, "stat"); return -1; } else { return MAX(s.st_mtime, s.st_ctime); } } static GSList *mh_get_uncached_msgs(GHashTable *msg_table, FolderItem *item) { gchar *path; GDir *dp; const gchar *dir_name; GSList *newlist = NULL; GSList *last = NULL; MsgInfo *msginfo; gint n_newmsg = 0; gint num; g_return_val_if_fail(item != NULL, NULL); path = folder_item_get_path(item); g_return_val_if_fail(path != NULL, NULL); if (change_dir(path) < 0) { g_free(path); return NULL; } g_free(path); if ((dp = g_dir_open(".", 0, NULL)) == NULL) { FILE_OP_ERROR(item->path, "opendir"); return NULL; } debug_print("Searching uncached messages...\n"); if (msg_table) { while ((dir_name = g_dir_read_name(dp)) != NULL) { if ((num = to_number(dir_name)) <= 0) continue; msginfo = g_hash_table_lookup (msg_table, GUINT_TO_POINTER(num)); if (msginfo) { MSG_SET_TMP_FLAGS(msginfo->flags, MSG_CACHED); } else { /* not found in the cache (uncached message) */ msginfo = mh_parse_msg(dir_name, item); if (!msginfo) continue; if (!newlist) last = newlist = g_slist_append(NULL, msginfo); else { last = g_slist_append(last, msginfo); last = last->next; } n_newmsg++; } } } else { /* discard all previous cache */ while ((dir_name = g_dir_read_name(dp)) != NULL) { if (to_number(dir_name) <= 0) continue; msginfo = mh_parse_msg(dir_name, item); if (!msginfo) continue; if (!newlist) last = newlist = g_slist_append(NULL, msginfo); else { last = g_slist_append(last, msginfo); last = last->next; } n_newmsg++; } } g_dir_close(dp); if (n_newmsg) debug_print("%d uncached message(s) found.\n", n_newmsg); else debug_print("done.\n"); /* sort new messages in numerical order */ if (newlist && item->sort_key == SORT_BY_NONE) { debug_print("Sorting uncached messages in numerical order...\n"); newlist = g_slist_sort (newlist, (GCompareFunc)procmsg_cmp_msgnum_for_sort); debug_print("done.\n"); } return newlist; } static MsgInfo *mh_parse_msg(const gchar *file, FolderItem *item) { MsgInfo *msginfo; MsgFlags flags; g_return_val_if_fail(item != NULL, NULL); g_return_val_if_fail(file != NULL, NULL); flags.perm_flags = MSG_NEW|MSG_UNREAD; flags.tmp_flags = 0; if (item->stype == F_QUEUE) { MSG_SET_TMP_FLAGS(flags, MSG_QUEUED); } else if (item->stype == F_DRAFT) { MSG_SET_TMP_FLAGS(flags, MSG_DRAFT); } msginfo = procheader_parse_file(file, flags, FALSE); if (!msginfo) return NULL; msginfo->msgnum = atoi(file); msginfo->folder = item; return msginfo; } #if 0 static gboolean mh_is_maildir_one(const gchar *path, const gchar *dir) { gchar *entry; gboolean result; entry = g_strconcat(path, G_DIR_SEPARATOR_S, dir, NULL); result = is_dir_exist(entry); g_free(entry); return result; } /* * check whether PATH is a Maildir style mailbox. * This is the case if the 3 subdir: new, cur, tmp are existing. * This functon assumes that entry is an directory */ static gboolean mh_is_maildir(const gchar *path) { return mh_is_maildir_one(path, "new") && mh_is_maildir_one(path, "cur") && mh_is_maildir_one(path, "tmp"); } #endif static gboolean mh_remove_missing_folder_items_func(GNode *node, gpointer data) { FolderItem *item; gchar *path; g_return_val_if_fail(node->data != NULL, FALSE); if (G_NODE_IS_ROOT(node)) return FALSE; item = FOLDER_ITEM(node->data); #if 0 if (item->path && strchr(item->path, '/')) { debug_print("folder '%s' includes Unix path separator. removing...\n", item->path); folder_item_remove(item); return FALSE; } #endif path = folder_item_get_path(item); if (!is_dir_exist(path)) { debug_print("folder '%s' not found. removing...\n", path); folder_item_remove(item); } g_free(path); return FALSE; } static void mh_remove_missing_folder_items(Folder *folder) { g_return_if_fail(folder != NULL); debug_print("searching missing folders...\n"); g_node_traverse(folder->node, G_POST_ORDER, G_TRAVERSE_ALL, -1, mh_remove_missing_folder_items_func, folder); } static void mh_scan_tree_recursive(FolderItem *item) { Folder *folder; #ifdef G_OS_WIN32 struct wfddata wfd; HANDLE hfind; #else DIR *dp; struct dirent *d; struct stat s; #endif const gchar *dir_name; gchar *fs_path; gchar *entry; gchar *utf8entry; gchar *utf8name; gint n_msg = 0; g_return_if_fail(item != NULL); g_return_if_fail(item->folder != NULL); if (item->stype == F_VIRTUAL) return; folder = item->folder; fs_path = item->path ? g_filename_from_utf8(item->path, -1, NULL, NULL, NULL) : g_strdup("."); if (!fs_path) fs_path = g_strdup(item->path); #ifdef G_OS_WIN32 hfind = find_first_file(fs_path, &wfd); if (hfind == INVALID_HANDLE_VALUE) { g_warning("failed to open directory: %s\n", fs_path); g_free(fs_path); return; } #else dp = opendir(fs_path); if (!dp) { FILE_OP_ERROR(fs_path, "opendir"); g_free(fs_path); return; } #endif g_free(fs_path); debug_print("scanning %s ...\n", item->path ? item->path : LOCAL_FOLDER(item->folder)->rootpath); if (folder->ui_func) folder->ui_func(folder, item, folder->ui_func_data); #ifdef G_OS_WIN32 do { if (!wfd.file_name) continue; if (wfd.file_name[0] == '.') { g_free(wfd.file_name); wfd.file_name = NULL; continue; } dir_name = utf8name = wfd.file_name; wfd.file_name = NULL; #else while ((d = readdir(dp)) != NULL) { dir_name = d->d_name; if (dir_name[0] == '.') continue; utf8name = g_filename_to_utf8(dir_name, -1, NULL, NULL, NULL); if (!utf8name) utf8name = g_strdup(dir_name); #endif if (item->path) utf8entry = g_strconcat(item->path, G_DIR_SEPARATOR_S, utf8name, NULL); else utf8entry = g_strdup(utf8name); entry = g_filename_from_utf8(utf8entry, -1, NULL, NULL, NULL); if (!entry) entry = g_strdup(utf8entry); if ( #ifdef G_OS_WIN32 (wfd.file_attr & FILE_ATTRIBUTE_DIRECTORY) != 0 #else #if HAVE_DIRENT_D_TYPE d->d_type == DT_DIR || (d->d_type == DT_UNKNOWN && #endif g_stat(entry, &s) == 0 && S_ISDIR(s.st_mode) #if HAVE_DIRENT_D_TYPE ) #endif #endif /* G_OS_WIN32 */ ) { FolderItem *new_item = NULL; GNode *node; #ifndef G_OS_WIN32 if (g_utf8_validate(utf8name, -1, NULL) == FALSE) { g_warning(_("Directory name\n" "'%s' is not a valid UTF-8 string.\n" "Maybe the locale encoding is used for filename.\n" "If that is the case, you must set the following environmental variable\n" "(see README for detail):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n"), utf8name); g_free(entry); g_free(utf8entry); g_free(utf8name); continue; } #endif /* G_OS_WIN32 */ node = item->node; for (node = node->children; node != NULL; node = node->next) { FolderItem *cur_item = FOLDER_ITEM(node->data); #ifdef G_OS_WIN32 if (!path_cmp(cur_item->path, utf8entry)) { #else if (!strcmp2(cur_item->path, utf8entry)) { #endif new_item = cur_item; break; } } if (!new_item) { debug_print("new folder '%s' found.\n", entry); new_item = folder_item_new(utf8name, utf8entry); folder_item_append(item, new_item); } if (!item->path) { if (!folder->inbox && !strcmp(dir_name, INBOX_DIR)) { new_item->stype = F_INBOX; folder->inbox = new_item; } else if (!folder->outbox && !strcmp(dir_name, OUTBOX_DIR)) { new_item->stype = F_OUTBOX; folder->outbox = new_item; } else if (!folder->draft && !strcmp(dir_name, DRAFT_DIR)) { new_item->stype = F_DRAFT; folder->draft = new_item; } else if (!folder->queue && !strcmp(dir_name, QUEUE_DIR)) { new_item->stype = F_QUEUE; folder->queue = new_item; } else if (!folder->trash && !strcmp(dir_name, TRASH_DIR)) { new_item->stype = F_TRASH; folder->trash = new_item; } } mh_scan_tree_recursive(new_item); } else if (to_number(dir_name) > 0) n_msg++; g_free(entry); g_free(utf8entry); g_free(utf8name); #ifdef G_OS_WIN32 } while (find_next_file(hfind, &wfd)); #else } #endif #ifdef G_OS_WIN32 FindClose(hfind); #else closedir(dp); #endif if (item->path) { gint new, unread, total, min, max; procmsg_get_mark_sum (item, &new, &unread, &total, &min, &max, 0); if (n_msg > total) { new += n_msg - total; unread += n_msg - total; } item->new = new; item->unread = unread; item->total = n_msg; item->updated = TRUE; item->mtime = 0; } } static gboolean mh_rename_folder_func(GNode *node, gpointer data) { FolderItem *item = node->data; gchar **paths = data; const gchar *oldpath = paths[0]; const gchar *newpath = paths[1]; gchar *base; gchar *new_itempath; gint oldpathlen; oldpathlen = strlen(oldpath); if (strncmp(oldpath, item->path, oldpathlen) != 0) { g_warning("path doesn't match: %s, %s\n", oldpath, item->path); return TRUE; } base = item->path + oldpathlen; while (*base == G_DIR_SEPARATOR) base++; if (*base == '\0') new_itempath = g_strdup(newpath); else new_itempath = g_strconcat(newpath, G_DIR_SEPARATOR_S, base, NULL); g_free(item->path); item->path = new_itempath; return FALSE; } libsylph-1.1.0/libsylph/news.c0000644000175000017500000006027110457702533013242 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2006 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "defs.h" #include #include #include #include #include #include #include #include #include "news.h" #include "nntp.h" #include "socket.h" #include "recv.h" #include "procmsg.h" #include "procheader.h" #include "folder.h" #include "session.h" #include "codeconv.h" #include "utils.h" #include "prefs_common.h" #include "prefs_account.h" #if USE_SSL # include "ssl.h" #endif #define NNTP_PORT 119 #if USE_SSL #define NNTPS_PORT 563 #endif static void news_folder_init (Folder *folder, const gchar *name, const gchar *path); static Folder *news_folder_new (const gchar *name, const gchar *folder); static void news_folder_destroy (Folder *folder); static GSList *news_get_article_list (Folder *folder, FolderItem *item, gboolean use_cache); static gchar *news_fetch_msg (Folder *folder, FolderItem *item, gint num); static MsgInfo *news_get_msginfo (Folder *folder, FolderItem *item, gint num); static gint news_close (Folder *folder, FolderItem *item); static gint news_scan_group (Folder *folder, FolderItem *item); #if USE_SSL static Session *news_session_new (const gchar *server, gushort port, const gchar *userid, const gchar *passwd, SSLType ssl_type); #else static Session *news_session_new (const gchar *server, gushort port, const gchar *userid, const gchar *passwd); #endif static gint news_get_article_cmd (NNTPSession *session, const gchar *cmd, gint num, gchar *filename); static gint news_get_article (NNTPSession *session, gint num, gchar *filename); #if 0 static gint news_get_header (NNTPSession *session, gint num, gchar *filename); #endif static gint news_select_group (NNTPSession *session, const gchar *group, gint *num, gint *first, gint *last); static GSList *news_get_uncached_articles(NNTPSession *session, FolderItem *item, gint cache_last, gint *rfirst, gint *rlast); static MsgInfo *news_parse_xover (const gchar *xover_str); static gchar *news_parse_xhdr (const gchar *xhdr_str, MsgInfo *msginfo); static GSList *news_delete_old_articles (GSList *alist, FolderItem *item, gint first); static void news_delete_all_articles (FolderItem *item); static void news_delete_expired_caches (GSList *alist, FolderItem *item); static FolderClass news_class = { F_NEWS, news_folder_new, news_folder_destroy, NULL, NULL, news_get_article_list, news_fetch_msg, news_get_msginfo, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, news_close, news_scan_group, NULL, NULL, NULL, NULL }; FolderClass *news_get_class(void) { return &news_class; } static Folder *news_folder_new(const gchar *name, const gchar *path) { Folder *folder; folder = (Folder *)g_new0(NewsFolder, 1); news_folder_init(folder, name, path); return folder; } static void news_folder_destroy(Folder *folder) { gchar *dir; dir = folder_get_path(folder); if (is_dir_exist(dir)) remove_dir_recursive(dir); g_free(dir); folder_remote_folder_destroy(REMOTE_FOLDER(folder)); } static void news_folder_init(Folder *folder, const gchar *name, const gchar *path) { folder->klass = news_get_class(); folder_remote_folder_init(folder, name, path); } #if USE_SSL static Session *news_session_new(const gchar *server, gushort port, const gchar *userid, const gchar *passwd, SSLType ssl_type) #else static Session *news_session_new(const gchar *server, gushort port, const gchar *userid, const gchar *passwd) #endif { gchar buf[NNTPBUFSIZE]; Session *session; g_return_val_if_fail(server != NULL, NULL); log_message(_("creating NNTP connection to %s:%d ...\n"), server, port); #if USE_SSL session = nntp_session_new(server, port, buf, userid, passwd, ssl_type); #else session = nntp_session_new(server, port, buf, userid, passwd); #endif return session; } static Session *news_session_new_for_folder(Folder *folder) { Session *session; PrefsAccount *ac; const gchar *userid = NULL; gchar *passwd = NULL; gushort port; g_return_val_if_fail(folder != NULL, NULL); g_return_val_if_fail(folder->account != NULL, NULL); ac = folder->account; if (ac->use_nntp_auth && ac->userid && ac->userid[0]) { userid = ac->userid; if (ac->passwd && ac->passwd[0]) passwd = g_strdup(ac->passwd); else passwd = input_query_password(ac->nntp_server, userid); } #if USE_SSL port = ac->set_nntpport ? ac->nntpport : ac->ssl_nntp ? NNTPS_PORT : NNTP_PORT; session = news_session_new(ac->nntp_server, port, userid, passwd, ac->ssl_nntp); #else port = ac->set_nntpport ? ac->nntpport : NNTP_PORT; session = news_session_new(ac->nntp_server, port, userid, passwd); #endif g_free(passwd); return session; } static NNTPSession *news_session_get(Folder *folder) { RemoteFolder *rfolder = REMOTE_FOLDER(folder); g_return_val_if_fail(folder != NULL, NULL); g_return_val_if_fail(FOLDER_TYPE(folder) == F_NEWS, NULL); g_return_val_if_fail(folder->account != NULL, NULL); if (!prefs_common.online_mode) return NULL; if (!rfolder->session) { rfolder->session = news_session_new_for_folder(folder); return NNTP_SESSION(rfolder->session); } if (time(NULL) - rfolder->session->last_access_time < SESSION_TIMEOUT_INTERVAL) { return NNTP_SESSION(rfolder->session); } if (nntp_mode(NNTP_SESSION(rfolder->session), FALSE) != NN_SUCCESS) { log_warning(_("NNTP connection to %s:%d has been" " disconnected. Reconnecting...\n"), folder->account->nntp_server, folder->account->set_nntpport ? folder->account->nntpport : NNTP_PORT); session_destroy(rfolder->session); rfolder->session = news_session_new_for_folder(folder); } if (rfolder->session) session_set_access_time(rfolder->session); return NNTP_SESSION(rfolder->session); } static GSList *news_get_article_list(Folder *folder, FolderItem *item, gboolean use_cache) { GSList *alist; NNTPSession *session; g_return_val_if_fail(folder != NULL, NULL); g_return_val_if_fail(item != NULL, NULL); g_return_val_if_fail(FOLDER_TYPE(folder) == F_NEWS, NULL); session = news_session_get(folder); if (!session) { alist = procmsg_read_cache(item, FALSE); item->last_num = procmsg_get_last_num_in_msg_list(alist); } else if (use_cache) { GSList *newlist; gint cache_last; gint first, last; alist = procmsg_read_cache(item, FALSE); cache_last = procmsg_get_last_num_in_msg_list(alist); newlist = news_get_uncached_articles (session, item, cache_last, &first, &last); if (newlist) item->cache_dirty = TRUE; if (first == 0 && last == 0) { news_delete_all_articles(item); procmsg_msg_list_free(alist); alist = NULL; item->cache_dirty = TRUE; } else { alist = news_delete_old_articles(alist, item, first); news_delete_expired_caches(alist, item); } alist = g_slist_concat(alist, newlist); item->last_num = last; } else { gint last; alist = news_get_uncached_articles (session, item, 0, NULL, &last); news_delete_all_articles(item); item->last_num = last; item->cache_dirty = TRUE; } procmsg_set_flags(alist, item); alist = procmsg_sort_msg_list(alist, item->sort_key, item->sort_type); if (item->mark_queue) item->mark_dirty = TRUE; debug_print("cache_dirty: %d, mark_dirty: %d\n", item->cache_dirty, item->mark_dirty); if (!item->opened) { if (item->cache_dirty) procmsg_write_cache_list(item, alist); if (item->mark_dirty) procmsg_write_flags_list(item, alist); } return alist; } static gchar *news_fetch_msg(Folder *folder, FolderItem *item, gint num) { gchar *path, *filename; NNTPSession *session; gint ok; g_return_val_if_fail(folder != NULL, NULL); g_return_val_if_fail(item != NULL, NULL); path = folder_item_get_path(item); if (!is_dir_exist(path)) make_dir_hier(path); filename = g_strconcat(path, G_DIR_SEPARATOR_S, itos(num), NULL); g_free(path); if (is_file_exist(filename)) { debug_print(_("article %d has been already cached.\n"), num); return filename; } session = news_session_get(folder); if (!session) { g_free(filename); return NULL; } ok = news_select_group(session, item->path, NULL, NULL, NULL); if (ok != NN_SUCCESS) { if (ok == NN_SOCKET) { session_destroy(SESSION(session)); REMOTE_FOLDER(folder)->session = NULL; } g_free(filename); return NULL; } debug_print(_("getting article %d...\n"), num); ok = news_get_article(NNTP_SESSION(REMOTE_FOLDER(folder)->session), num, filename); if (ok != NN_SUCCESS) { g_warning(_("can't read article %d\n"), num); if (ok == NN_SOCKET) { session_destroy(SESSION(session)); REMOTE_FOLDER(folder)->session = NULL; } g_free(filename); return NULL; } return filename; } static MsgInfo *news_get_msginfo(Folder *folder, FolderItem *item, gint num) { MsgInfo *msginfo; MsgFlags flags = {0, 0}; gchar *file; g_return_val_if_fail(folder != NULL, NULL); g_return_val_if_fail(item != NULL, NULL); file = news_fetch_msg(folder, item, num); if (!file) return NULL; msginfo = procheader_parse_file(file, flags, FALSE); g_free(file); return msginfo; } static gint news_close(Folder *folder, FolderItem *item) { return 0; } static gint news_scan_group(Folder *folder, FolderItem *item) { NNTPSession *session; gint num = 0, first = 0, last = 0; gint new = 0, unread = 0, total = 0; gint min = 0, max = 0; gint ok; g_return_val_if_fail(folder != NULL, -1); g_return_val_if_fail(item != NULL, -1); session = news_session_get(folder); if (!session) return -1; ok = news_select_group(session, item->path, &num, &first, &last); if (ok != NN_SUCCESS) { if (ok == NN_SOCKET) { session_destroy(SESSION(session)); REMOTE_FOLDER(folder)->session = NULL; } return -1; } if (num == 0) { item->new = item->unread = item->total = item->last_num = 0; return 0; } procmsg_get_mark_sum(item, &new, &unread, &total, &min, &max, first); if (max < first || last < min) new = unread = total = num; else { if (min < first) min = first; if (last < max) max = last; else if (max < last) { new += last - max; unread += last - max; } if (new > num) new = num; if (unread > num) unread = num; } item->new = new; item->unread = unread; item->total = num; item->last_num = last; return 0; } static NewsGroupInfo *news_group_info_new(const gchar *name, gint first, gint last, gchar type) { NewsGroupInfo *ginfo; ginfo = g_new(NewsGroupInfo, 1); ginfo->name = g_strdup(name); ginfo->first = first; ginfo->last = last; ginfo->type = type; ginfo->subscribed = FALSE; return ginfo; } static void news_group_info_free(NewsGroupInfo *ginfo) { g_free(ginfo->name); g_free(ginfo); } static gint news_group_info_compare(NewsGroupInfo *ginfo1, NewsGroupInfo *ginfo2) { return g_ascii_strcasecmp(ginfo1->name, ginfo2->name); } GSList *news_get_group_list(Folder *folder) { gchar *path, *filename; FILE *fp; GSList *list = NULL; GSList *last = NULL; gchar buf[NNTPBUFSIZE]; g_return_val_if_fail(folder != NULL, NULL); g_return_val_if_fail(FOLDER_TYPE(folder) == F_NEWS, NULL); path = folder_item_get_path(FOLDER_ITEM(folder->node->data)); if (!is_dir_exist(path)) make_dir_hier(path); filename = g_strconcat(path, G_DIR_SEPARATOR_S, NEWSGROUP_LIST, NULL); g_free(path); if ((fp = g_fopen(filename, "rb")) == NULL) { NNTPSession *session; gint ok; session = news_session_get(folder); if (!session) { g_free(filename); return NULL; } ok = nntp_list(session); if (ok != NN_SUCCESS) { if (ok == NN_SOCKET) { session_destroy(SESSION(session)); REMOTE_FOLDER(folder)->session = NULL; } g_free(filename); return NULL; } if (recv_write_to_file(SESSION(session)->sock, filename) < 0) { log_warning("can't retrieve newsgroup list\n"); session_destroy(SESSION(session)); REMOTE_FOLDER(folder)->session = NULL; g_free(filename); return NULL; } if ((fp = g_fopen(filename, "rb")) == NULL) { FILE_OP_ERROR(filename, "fopen"); g_free(filename); return NULL; } } while (fgets(buf, sizeof(buf), fp) != NULL) { gchar *p = buf; gchar *name; gint last_num; gint first_num; gchar type; NewsGroupInfo *ginfo; p = strchr(p, ' '); if (!p) { strretchomp(buf); log_warning("invalid LIST response: %s\n", buf); continue; } *p = '\0'; p++; name = buf; if (sscanf(p, "%d %d %c", &last_num, &first_num, &type) < 3) { strretchomp(p); log_warning("invalid LIST response: %s %s\n", name, p); continue; } ginfo = news_group_info_new(name, first_num, last_num, type); if (!last) last = list = g_slist_append(NULL, ginfo); else { last = g_slist_append(last, ginfo); last = last->next; } } fclose(fp); g_free(filename); list = g_slist_sort(list, (GCompareFunc)news_group_info_compare); return list; } void news_group_list_free(GSList *group_list) { GSList *cur; if (!group_list) return; for (cur = group_list; cur != NULL; cur = cur->next) news_group_info_free((NewsGroupInfo *)cur->data); g_slist_free(group_list); } void news_remove_group_list_cache(Folder *folder) { gchar *path, *filename; g_return_if_fail(folder != NULL); g_return_if_fail(FOLDER_TYPE(folder) == F_NEWS); path = folder_item_get_path(FOLDER_ITEM(folder->node->data)); filename = g_strconcat(path, G_DIR_SEPARATOR_S, NEWSGROUP_LIST, NULL); g_free(path); if (is_file_exist(filename)) { if (remove(filename) < 0) FILE_OP_ERROR(filename, "remove"); } g_free(filename); } gint news_post(Folder *folder, const gchar *file) { FILE *fp; gint ok; g_return_val_if_fail(folder != NULL, -1); g_return_val_if_fail(FOLDER_TYPE(folder) == F_NEWS, -1); g_return_val_if_fail(file != NULL, -1); if ((fp = g_fopen(file, "rb")) == NULL) { FILE_OP_ERROR(file, "fopen"); return -1; } ok = news_post_stream(folder, fp); fclose(fp); return ok; } gint news_post_stream(Folder *folder, FILE *fp) { NNTPSession *session; gint ok; g_return_val_if_fail(folder != NULL, -1); g_return_val_if_fail(FOLDER_TYPE(folder) == F_NEWS, -1); g_return_val_if_fail(fp != NULL, -1); session = news_session_get(folder); if (!session) return -1; ok = nntp_post(session, fp); if (ok != NN_SUCCESS) { log_warning(_("can't post article.\n")); if (ok == NN_SOCKET) { session_destroy(SESSION(session)); REMOTE_FOLDER(folder)->session = NULL; } return -1; } return 0; } static gint news_get_article_cmd(NNTPSession *session, const gchar *cmd, gint num, gchar *filename) { gchar *msgid; gint ok; ok = nntp_get_article(session, cmd, num, &msgid); if (ok != NN_SUCCESS) return ok; debug_print("Message-Id = %s, num = %d\n", msgid, num); g_free(msgid); ok = recv_write_to_file(SESSION(session)->sock, filename); if (ok < 0) { log_warning(_("can't retrieve article %d\n"), num); if (ok == -2) return NN_SOCKET; else return NN_IOERR; } return NN_SUCCESS; } static gint news_get_article(NNTPSession *session, gint num, gchar *filename) { return news_get_article_cmd(session, "ARTICLE", num, filename); } #if 0 static gint news_get_header(NNTPSession *session, gint num, gchar *filename) { return news_get_article_cmd(session, "HEAD", num, filename); } #endif /** * news_select_group: * @session: Active NNTP session. * @group: Newsgroup name. * @num: Estimated number of articles. * @first: First article number. * @last: Last article number. * * Select newsgroup @group with the GROUP command if it is not already * selected in @session, or article numbers need to be returned. * * Return value: NNTP result code. **/ static gint news_select_group(NNTPSession *session, const gchar *group, gint *num, gint *first, gint *last) { gint ok; gint num_, first_, last_; if (!num || !first || !last) { if (session->group && g_ascii_strcasecmp(session->group, group) == 0) return NN_SUCCESS; num = &num_; first = &first_; last = &last_; } g_free(session->group); session->group = NULL; ok = nntp_group(session, group, num, first, last); if (ok == NN_SUCCESS) session->group = g_strdup(group); else log_warning(_("can't select group: %s\n"), group); return ok; } static GSList *news_get_uncached_articles(NNTPSession *session, FolderItem *item, gint cache_last, gint *rfirst, gint *rlast) { gint ok; gint num = 0, first = 0, last = 0, begin = 0, end = 0; gchar buf[NNTPBUFSIZE]; GSList *newlist = NULL; GSList *llast = NULL; MsgInfo *msginfo; gint max_articles; if (rfirst) *rfirst = -1; if (rlast) *rlast = -1; g_return_val_if_fail(session != NULL, NULL); g_return_val_if_fail(item != NULL, NULL); g_return_val_if_fail(item->folder != NULL, NULL); g_return_val_if_fail(item->folder->account != NULL, NULL); g_return_val_if_fail(FOLDER_TYPE(item->folder) == F_NEWS, NULL); ok = news_select_group(session, item->path, &num, &first, &last); if (ok != NN_SUCCESS) { if (ok == NN_SOCKET) { session_destroy(SESSION(session)); REMOTE_FOLDER(item->folder)->session = NULL; } return NULL; } /* calculate getting overview range */ if (first > last) { log_warning(_("invalid article range: %d - %d\n"), first, last); return NULL; } if (rfirst) *rfirst = first; if (rlast) *rlast = last; if (cache_last < first) begin = first; else if (last < cache_last) begin = first; else if (last == cache_last) { debug_print(_("no new articles.\n")); return NULL; } else begin = cache_last + 1; end = last; max_articles = item->folder->account->max_nntp_articles; if (max_articles > 0 && end - begin + 1 > max_articles) begin = end - max_articles + 1; log_message(_("getting xover %d - %d in %s...\n"), begin, end, item->path); ok = nntp_xover(session, begin, end); if (ok != NN_SUCCESS) { log_warning(_("can't get xover\n")); if (ok == NN_SOCKET) { session_destroy(SESSION(session)); REMOTE_FOLDER(item->folder)->session = NULL; } return NULL; } for (;;) { if (sock_gets(SESSION(session)->sock, buf, sizeof(buf)) < 0) { log_warning(_("error occurred while getting xover.\n")); session_destroy(SESSION(session)); REMOTE_FOLDER(item->folder)->session = NULL; return newlist; } if (buf[0] == '.' && buf[1] == '\r') break; msginfo = news_parse_xover(buf); if (!msginfo) { log_warning(_("invalid xover line: %s\n"), buf); continue; } msginfo->folder = item; msginfo->flags.perm_flags = MSG_NEW|MSG_UNREAD; msginfo->flags.tmp_flags = MSG_NEWS; msginfo->newsgroups = g_strdup(item->path); if (!newlist) llast = newlist = g_slist_append(newlist, msginfo); else { llast = g_slist_append(llast, msginfo); llast = llast->next; } } ok = nntp_xhdr(session, "to", begin, end); if (ok != NN_SUCCESS) { log_warning(_("can't get xhdr\n")); if (ok == NN_SOCKET) { session_destroy(SESSION(session)); REMOTE_FOLDER(item->folder)->session = NULL; } return newlist; } llast = newlist; for (;;) { if (sock_gets(SESSION(session)->sock, buf, sizeof(buf)) < 0) { log_warning(_("error occurred while getting xhdr.\n")); session_destroy(SESSION(session)); REMOTE_FOLDER(item->folder)->session = NULL; return newlist; } if (buf[0] == '.' && buf[1] == '\r') break; if (!llast) { g_warning("llast == NULL\n"); continue; } msginfo = (MsgInfo *)llast->data; msginfo->to = news_parse_xhdr(buf, msginfo); llast = llast->next; } ok = nntp_xhdr(session, "cc", begin, end); if (ok != NN_SUCCESS) { log_warning(_("can't get xhdr\n")); if (ok == NN_SOCKET) { session_destroy(SESSION(session)); REMOTE_FOLDER(item->folder)->session = NULL; } return newlist; } llast = newlist; for (;;) { if (sock_gets(SESSION(session)->sock, buf, sizeof(buf)) < 0) { log_warning(_("error occurred while getting xhdr.\n")); session_destroy(SESSION(session)); REMOTE_FOLDER(item->folder)->session = NULL; return newlist; } if (buf[0] == '.' && buf[1] == '\r') break; if (!llast) { g_warning("llast == NULL\n"); continue; } msginfo = (MsgInfo *)llast->data; msginfo->cc = news_parse_xhdr(buf, msginfo); llast = llast->next; } session_set_access_time(SESSION(session)); return newlist; } #define PARSE_ONE_PARAM(p, srcp) \ { \ p = strchr(srcp, '\t'); \ if (!p) return NULL; \ else \ *p++ = '\0'; \ } static MsgInfo *news_parse_xover(const gchar *xover_str) { MsgInfo *msginfo; gchar *subject, *sender, *size, *line, *date, *msgid, *ref, *tmp; gchar *p; gint num, size_int, line_int; gchar *xover_buf; Xstrdup_a(xover_buf, xover_str, return NULL); PARSE_ONE_PARAM(subject, xover_buf); PARSE_ONE_PARAM(sender, subject); PARSE_ONE_PARAM(date, sender); PARSE_ONE_PARAM(msgid, date); PARSE_ONE_PARAM(ref, msgid); PARSE_ONE_PARAM(size, ref); PARSE_ONE_PARAM(line, size); tmp = strchr(line, '\t'); if (!tmp) tmp = strchr(line, '\r'); if (!tmp) tmp = strchr(line, '\n'); if (tmp) *tmp = '\0'; num = atoi(xover_str); size_int = atoi(size); line_int = atoi(line); /* set MsgInfo */ msginfo = g_new0(MsgInfo, 1); msginfo->msgnum = num; msginfo->size = size_int; msginfo->date = g_strdup(date); msginfo->date_t = procheader_date_parse(NULL, date, 0); msginfo->from = conv_unmime_header(sender, NULL); msginfo->fromname = procheader_get_fromname(msginfo->from); msginfo->subject = conv_unmime_header(subject, NULL); extract_parenthesis(msgid, '<', '>'); remove_space(msgid); if (*msgid != '\0') msginfo->msgid = g_strdup(msgid); eliminate_parenthesis(ref, '(', ')'); if ((p = strrchr(ref, '<')) != NULL) { extract_parenthesis(p, '<', '>'); remove_space(p); if (*p != '\0') msginfo->inreplyto = g_strdup(p); } return msginfo; } static gchar *news_parse_xhdr(const gchar *xhdr_str, MsgInfo *msginfo) { gchar *p; gchar *tmp; gint num; p = strchr(xhdr_str, ' '); if (!p) return NULL; else p++; num = atoi(xhdr_str); if (msginfo->msgnum != num) return NULL; tmp = strchr(p, '\r'); if (!tmp) tmp = strchr(p, '\n'); if (tmp) return g_strndup(p, tmp - p); else return g_strdup(p); } static GSList *news_delete_old_articles(GSList *alist, FolderItem *item, gint first) { GSList *cur, *next; MsgInfo *msginfo; gchar *dir; g_return_val_if_fail(item != NULL, alist); g_return_val_if_fail(item->folder != NULL, alist); g_return_val_if_fail(FOLDER_TYPE(item->folder) == F_NEWS, alist); if (first < 2) return alist; debug_print("Deleting cached articles 1 - %d ...\n", first - 1); dir = folder_item_get_path(item); remove_numbered_files(dir, 1, first - 1); g_free(dir); for (cur = alist; cur != NULL; ) { next = cur->next; msginfo = (MsgInfo *)cur->data; if (msginfo && msginfo->msgnum < first) { procmsg_msginfo_free(msginfo); alist = g_slist_remove(alist, msginfo); item->cache_dirty = TRUE; } cur = next; } return alist; } static void news_delete_all_articles(FolderItem *item) { gchar *dir; g_return_if_fail(item != NULL); g_return_if_fail(item->folder != NULL); g_return_if_fail(FOLDER_TYPE(item->folder) == F_NEWS); debug_print("Deleting all cached articles...\n"); dir = folder_item_get_path(item); remove_all_numbered_files(dir); g_free(dir); } static void news_delete_expired_caches(GSList *alist, FolderItem *item) { gchar *dir; g_return_if_fail(item != NULL); g_return_if_fail(item->folder != NULL); g_return_if_fail(FOLDER_TYPE(item->folder) == F_NEWS); debug_print("Deleting expired cached articles...\n"); dir = folder_item_get_path(item); remove_expired_files(dir, 24 * 7); g_free(dir); } libsylph-1.1.0/libsylph/nntp.c0000644000175000017500000002220510457702534013241 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include #include #include "nntp.h" #include "socket.h" #include "utils.h" #if USE_SSL # include "ssl.h" #endif static gint verbose = 1; static void nntp_session_destroy(Session *session); static gint nntp_ok (SockInfo *sock, gchar *argbuf); static gint nntp_gen_send (SockInfo *sock, const gchar *format, ...); static gint nntp_gen_recv (SockInfo *sock, gchar *buf, gint size); static gint nntp_gen_command (NNTPSession *session, gchar *argbuf, const gchar *format, ...); #if USE_SSL Session *nntp_session_new(const gchar *server, gushort port, gchar *buf, const gchar *userid, const gchar *passwd, SSLType ssl_type) #else Session *nntp_session_new(const gchar *server, gushort port, gchar *buf, const gchar *userid, const gchar *passwd) #endif { NNTPSession *session; SockInfo *sock; if ((sock = sock_connect(server, port)) == NULL) { log_warning(_("Can't connect to NNTP server: %s:%d\n"), server, port); return NULL; } #if USE_SSL if (ssl_type == SSL_TUNNEL && !ssl_init_socket(sock)) { sock_close(sock); return NULL; } #endif if (nntp_ok(sock, buf) != NN_SUCCESS) { sock_close(sock); return NULL; } session = g_new0(NNTPSession, 1); session_init(SESSION(session)); SESSION(session)->type = SESSION_NEWS; SESSION(session)->server = g_strdup(server); SESSION(session)->sock = sock; SESSION(session)->last_access_time = time(NULL); SESSION(session)->data = NULL; SESSION(session)->destroy = nntp_session_destroy; session->group = NULL; if (userid && passwd) { gint ok; session->userid = g_strdup(userid); session->passwd = g_strdup(passwd); ok = nntp_gen_send(sock, "AUTHINFO USER %s", session->userid); if (ok != NN_SUCCESS) { session_destroy(SESSION(session)); return NULL; } ok = nntp_ok(sock, NULL); if (ok == NN_AUTHCONT) { ok = nntp_gen_send(sock, "AUTHINFO PASS %s", session->passwd); if (ok != NN_SUCCESS) { session_destroy(SESSION(session)); return NULL; } ok = nntp_ok(sock, NULL); if (ok != NN_SUCCESS) session->auth_failed = TRUE; } if (ok == NN_SOCKET) { session_destroy(SESSION(session)); return NULL; } } session_set_access_time(SESSION(session)); return SESSION(session); } static void nntp_session_destroy(Session *session) { NNTPSession *nntp_session = NNTP_SESSION(session); g_return_if_fail(session != NULL); g_free(nntp_session->group); g_free(nntp_session->userid); g_free(nntp_session->passwd); } gint nntp_group(NNTPSession *session, const gchar *group, gint *num, gint *first, gint *last) { gint ok; gint resp; gchar buf[NNTPBUFSIZE]; ok = nntp_gen_command(session, buf, "GROUP %s", group); if (ok != NN_SUCCESS && ok != NN_SOCKET && ok != NN_AUTHREQ) { ok = nntp_mode(session, FALSE); if (ok == NN_SUCCESS) ok = nntp_gen_command(session, buf, "GROUP %s", group); } if (ok != NN_SUCCESS) return ok; if (sscanf(buf, "%d %d %d %d", &resp, num, first, last) != 4) { log_warning(_("protocol error: %s\n"), buf); return NN_PROTOCOL; } return NN_SUCCESS; } gint nntp_get_article(NNTPSession *session, const gchar *cmd, gint num, gchar **msgid) { gint ok; gchar buf[NNTPBUFSIZE]; if (num > 0) ok = nntp_gen_command(session, buf, "%s %d", cmd, num); else ok = nntp_gen_command(session, buf, cmd); if (ok != NN_SUCCESS) return ok; extract_parenthesis(buf, '<', '>'); if (buf[0] == '\0') { log_warning(_("protocol error\n")); *msgid = g_strdup("0"); } else *msgid = g_strdup(buf); return NN_SUCCESS; } gint nntp_article(NNTPSession *session, gint num, gchar **msgid) { return nntp_get_article(session, "ARTICLE", num, msgid); } gint nntp_body(NNTPSession *session, gint num, gchar **msgid) { return nntp_get_article(session, "BODY", num, msgid); } gint nntp_head(NNTPSession *session, gint num, gchar **msgid) { return nntp_get_article(session, "HEAD", num, msgid); } gint nntp_stat(NNTPSession *session, gint num, gchar **msgid) { return nntp_get_article(session, "STAT", num, msgid); } gint nntp_next(NNTPSession *session, gint *num, gchar **msgid) { gint ok; gint resp; gchar buf[NNTPBUFSIZE]; ok = nntp_gen_command(session, buf, "NEXT"); if (ok != NN_SUCCESS) return ok; if (sscanf(buf, "%d %d", &resp, num) != 2) { log_warning(_("protocol error: %s\n"), buf); return NN_PROTOCOL; } extract_parenthesis(buf, '<', '>'); if (buf[0] == '\0') { log_warning(_("protocol error\n")); return NN_PROTOCOL; } *msgid = g_strdup(buf); return NN_SUCCESS; } gint nntp_xover(NNTPSession *session, gint first, gint last) { gint ok; gchar buf[NNTPBUFSIZE]; ok = nntp_gen_command(session, buf, "XOVER %d-%d", first, last); if (ok != NN_SUCCESS) return ok; return NN_SUCCESS; } gint nntp_xhdr(NNTPSession *session, const gchar *header, gint first, gint last) { gint ok; gchar buf[NNTPBUFSIZE]; ok = nntp_gen_command(session, buf, "XHDR %s %d-%d", header, first, last); if (ok != NN_SUCCESS) return ok; return NN_SUCCESS; } gint nntp_list(NNTPSession *session) { return nntp_gen_command(session, NULL, "LIST"); } gint nntp_post(NNTPSession *session, FILE *fp) { gint ok; gchar buf[NNTPBUFSIZE]; gchar *msg; ok = nntp_gen_command(session, buf, "POST"); if (ok != NN_SUCCESS) return ok; msg = get_outgoing_rfc2822_str(fp); if (sock_write_all(SESSION(session)->sock, msg, strlen(msg)) < 0) { log_warning(_("Error occurred while posting\n")); g_free(msg); return NN_SOCKET; } g_free(msg); sock_write_all(SESSION(session)->sock, ".\r\n", 3); if ((ok = nntp_ok(SESSION(session)->sock, buf)) != NN_SUCCESS) return ok; session_set_access_time(SESSION(session)); return NN_SUCCESS; } gint nntp_newgroups(NNTPSession *session) { return NN_SUCCESS; } gint nntp_newnews(NNTPSession *session) { return NN_SUCCESS; } gint nntp_mode(NNTPSession *session, gboolean stream) { gint ok; ok = nntp_gen_command(session, NULL, "MODE %s", stream ? "STREAM" : "READER"); return ok; } static gint nntp_ok(SockInfo *sock, gchar *argbuf) { gint ok; gchar buf[NNTPBUFSIZE]; if ((ok = nntp_gen_recv(sock, buf, sizeof(buf))) == NN_SUCCESS) { if (strlen(buf) < 3) return NN_ERROR; if ((buf[0] == '1' || buf[0] == '2' || buf[0] == '3') && (buf[3] == ' ' || buf[3] == '\0')) { if (argbuf) strcpy(argbuf, buf); if (!strncmp(buf, "381", 3)) return NN_AUTHCONT; return NN_SUCCESS; } else if (!strncmp(buf, "480", 3)) return NN_AUTHREQ; else return NN_ERROR; } return ok; } static gint nntp_gen_send(SockInfo *sock, const gchar *format, ...) { gchar buf[NNTPBUFSIZE]; va_list args; va_start(args, format); g_vsnprintf(buf, sizeof(buf), format, args); va_end(args); if (verbose) { if (!g_ascii_strncasecmp(buf, "AUTHINFO PASS", 13)) log_print("NNTP> AUTHINFO PASS ********\n"); else log_print("NNTP> %s\n", buf); } strcat(buf, "\r\n"); if (sock_write_all(sock, buf, strlen(buf)) < 0) { log_warning(_("Error occurred while sending command\n")); return NN_SOCKET; } return NN_SUCCESS; } static gint nntp_gen_recv(SockInfo *sock, gchar *buf, gint size) { if (sock_gets(sock, buf, size) == -1) return NN_SOCKET; strretchomp(buf); if (verbose) log_print("NNTP< %s\n", buf); return NN_SUCCESS; } static gint nntp_gen_command(NNTPSession *session, gchar *argbuf, const gchar *format, ...) { gchar buf[NNTPBUFSIZE]; va_list args; gint ok; SockInfo *sock; va_start(args, format); g_vsnprintf(buf, sizeof(buf), format, args); va_end(args); sock = SESSION(session)->sock; ok = nntp_gen_send(sock, "%s", buf); if (ok != NN_SUCCESS) return ok; ok = nntp_ok(sock, argbuf); if (ok == NN_AUTHREQ) { if (!session->userid || !session->passwd) { session->auth_failed = TRUE; return ok; } ok = nntp_gen_send(sock, "AUTHINFO USER %s", session->userid); if (ok != NN_SUCCESS) return ok; ok = nntp_ok(sock, NULL); if (ok == NN_AUTHCONT) { ok = nntp_gen_send(sock, "AUTHINFO PASS %s", session->passwd); if (ok != NN_SUCCESS) return ok; ok = nntp_ok(sock, NULL); } if (ok != NN_SUCCESS) { session->auth_failed = TRUE; return ok; } ok = nntp_gen_send(sock, "%s", buf); if (ok != NN_SUCCESS) return ok; ok = nntp_ok(sock, argbuf); } session_set_access_time(SESSION(session)); return ok; } libsylph-1.1.0/libsylph/pop.c0000644000175000017500000005273210734635723013073 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2006 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "defs.h" #include #include #include #include #include #include #include #include #include #include "pop.h" #include "md5.h" #include "prefs.h" #include "prefs_account.h" #include "utils.h" #include "recv.h" static gint pop3_greeting_recv (Pop3Session *session, const gchar *msg); static gint pop3_getauth_user_send (Pop3Session *session); static gint pop3_getauth_pass_send (Pop3Session *session); static gint pop3_getauth_apop_send (Pop3Session *session); #if USE_SSL static gint pop3_stls_send (Pop3Session *session); static gint pop3_stls_recv (Pop3Session *session); #endif static gint pop3_getrange_stat_send (Pop3Session *session); static gint pop3_getrange_stat_recv (Pop3Session *session, const gchar *msg); static gint pop3_getrange_last_send (Pop3Session *session); static gint pop3_getrange_last_recv (Pop3Session *session, const gchar *msg); static gint pop3_getrange_uidl_send (Pop3Session *session); static gint pop3_getrange_uidl_recv (Pop3Session *session, const gchar *data, guint len); static gint pop3_getsize_list_send (Pop3Session *session); static gint pop3_getsize_list_recv (Pop3Session *session, const gchar *data, guint len); static gint pop3_retr_send (Pop3Session *session); static gint pop3_retr_recv (Pop3Session *session, FILE *fp, guint len); static gint pop3_delete_send (Pop3Session *session); static gint pop3_delete_recv (Pop3Session *session); static gint pop3_logout_send (Pop3Session *session); static void pop3_gen_send (Pop3Session *session, const gchar *format, ...); static void pop3_session_destroy (Session *session); static gint pop3_write_msg_to_file (const gchar *file, FILE *src_fp, guint len); static Pop3State pop3_lookup_next (Pop3Session *session); static Pop3ErrorValue pop3_ok (Pop3Session *session, const gchar *msg); static gint pop3_session_recv_msg (Session *session, const gchar *msg); static gint pop3_session_recv_data_finished (Session *session, guchar *data, guint len); static gint pop3_session_recv_data_as_file_finished (Session *session, FILE *fp, guint len); static gint pop3_greeting_recv(Pop3Session *session, const gchar *msg) { session->state = POP3_GREETING; session->greeting = g_strdup(msg); return PS_SUCCESS; } #if USE_SSL static gint pop3_stls_send(Pop3Session *session) { session->state = POP3_STLS; pop3_gen_send(session, "STLS"); return PS_SUCCESS; } static gint pop3_stls_recv(Pop3Session *session) { if (session_start_tls(SESSION(session)) < 0) { session->error_val = PS_SOCKET; return -1; } return PS_SUCCESS; } #endif /* USE_SSL */ static gint pop3_getauth_user_send(Pop3Session *session) { g_return_val_if_fail(session->user != NULL, -1); session->state = POP3_GETAUTH_USER; pop3_gen_send(session, "USER %s", session->user); return PS_SUCCESS; } static gint pop3_getauth_pass_send(Pop3Session *session) { g_return_val_if_fail(session->pass != NULL, -1); session->state = POP3_GETAUTH_PASS; pop3_gen_send(session, "PASS %s", session->pass); return PS_SUCCESS; } static gint pop3_getauth_apop_send(Pop3Session *session) { gchar *start, *end; gchar *apop_str; SMD5 *md5; gchar *md5sum; g_return_val_if_fail(session->user != NULL, -1); g_return_val_if_fail(session->pass != NULL, -1); session->state = POP3_GETAUTH_APOP; if ((start = strchr(session->greeting, '<')) == NULL) { log_warning(_("Required APOP timestamp not found " "in greeting\n")); session->error_val = PS_PROTOCOL; return -1; } if ((end = strchr(start, '>')) == NULL || end == start + 1) { log_warning(_("Timestamp syntax error in greeting\n")); session->error_val = PS_PROTOCOL; return -1; } *(end + 1) = '\0'; if (!is_ascii_str(start) || strchr(start, '@') == NULL) { log_warning(_("Invalid timestamp in greeting\n")); session->error_val = PS_PROTOCOL; return -1; } apop_str = g_strconcat(start, session->pass, NULL); md5 = s_gnet_md5_new((guchar *)apop_str, strlen(apop_str)); md5sum = s_gnet_md5_get_string(md5); pop3_gen_send(session, "APOP %s %s", session->user, md5sum); g_free(md5sum); s_gnet_md5_delete(md5); g_free(apop_str); return PS_SUCCESS; } static gint pop3_getrange_stat_send(Pop3Session *session) { session->state = POP3_GETRANGE_STAT; pop3_gen_send(session, "STAT"); return PS_SUCCESS; } static gint pop3_getrange_stat_recv(Pop3Session *session, const gchar *msg) { if (sscanf(msg, "%d %lld", &session->count, &session->total_bytes) != 2) { log_warning(_("POP3 protocol error\n")); session->error_val = PS_PROTOCOL; return -1; } else { if (session->count == 0) { session->uidl_is_valid = TRUE; } else { session->msg = g_new0(Pop3MsgInfo, session->count + 1); session->cur_msg = 1; } } return PS_SUCCESS; } static gint pop3_getrange_last_send(Pop3Session *session) { session->state = POP3_GETRANGE_LAST; pop3_gen_send(session, "LAST"); return PS_SUCCESS; } static gint pop3_getrange_last_recv(Pop3Session *session, const gchar *msg) { gint last; if (sscanf(msg, "%d", &last) == 0) { log_warning(_("POP3 protocol error\n")); session->error_val = PS_PROTOCOL; return -1; } else { if (session->count > last) { session->new_msg_exist = TRUE; session->cur_msg = last + 1; } else session->cur_msg = 0; } return PS_SUCCESS; } static gint pop3_getrange_uidl_send(Pop3Session *session) { session->state = POP3_GETRANGE_UIDL; pop3_gen_send(session, "UIDL"); return PS_SUCCESS; } static gint pop3_getrange_uidl_recv(Pop3Session *session, const gchar *data, guint len) { gchar id[IDLEN + 1]; gchar buf[POPBUFSIZE]; gint buf_len; gint num; time_t recv_time; const gchar *p = data; const gchar *lastp = data + len; const gchar *newline; while (p < lastp) { if ((newline = memchr(p, '\r', lastp - p)) == NULL) return -1; buf_len = MIN(newline - p, sizeof(buf) - 1); memcpy(buf, p, buf_len); buf[buf_len] = '\0'; p = newline + 1; if (p < lastp && *p == '\n') p++; if (sscanf(buf, "%d %" Xstr(IDLEN) "s", &num, id) != 2 || num <= 0 || num > session->count) { log_warning(_("invalid UIDL response: %s\n"), buf); continue; } session->msg[num].uidl = g_strdup(id); recv_time = (time_t)g_hash_table_lookup(session->uidl_table, id); session->msg[num].recv_time = recv_time; if (!session->ac_prefs->getall && recv_time != RECV_TIME_NONE) session->msg[num].received = TRUE; if (!session->new_msg_exist && (session->ac_prefs->getall || recv_time == RECV_TIME_NONE || session->ac_prefs->rmmail)) { session->cur_msg = num; session->new_msg_exist = TRUE; } } session->uidl_is_valid = TRUE; return PS_SUCCESS; } static gint pop3_getsize_list_send(Pop3Session *session) { session->state = POP3_GETSIZE_LIST; pop3_gen_send(session, "LIST"); return PS_SUCCESS; } static gint pop3_getsize_list_recv(Pop3Session *session, const gchar *data, guint len) { gchar buf[POPBUFSIZE]; gint buf_len; guint num, size; const gchar *p = data; const gchar *lastp = data + len; const gchar *newline; while (p < lastp) { if ((newline = memchr(p, '\r', lastp - p)) == NULL) return -1; buf_len = MIN(newline - p, sizeof(buf) - 1); memcpy(buf, p, buf_len); buf[buf_len] = '\0'; p = newline + 1; if (p < lastp && *p == '\n') p++; if (sscanf(buf, "%u %u", &num, &size) != 2) { session->error_val = PS_PROTOCOL; return -1; } if (num > 0 && num <= session->count) session->msg[num].size = size; if (num > 0 && num < session->cur_msg) session->cur_total_bytes += size; } return PS_SUCCESS; } static gint pop3_retr_send(Pop3Session *session) { session->state = POP3_RETR; pop3_gen_send(session, "RETR %d", session->cur_msg); return PS_SUCCESS; } static gint pop3_retr_recv(Pop3Session *session, FILE *fp, guint len) { gchar *file; gint drop_ok; file = get_tmp_file(); if (pop3_write_msg_to_file(file, fp, len) < 0) { g_free(file); session->error_val = PS_IOERR; return -1; } drop_ok = session->drop_message(session, file); g_unlink(file); g_free(file); if (drop_ok < 0) { session->error_val = PS_IOERR; return -1; } session->cur_total_bytes += session->msg[session->cur_msg].size; session->cur_total_recv_bytes += session->msg[session->cur_msg].size; session->cur_total_num++; session->msg[session->cur_msg].received = TRUE; session->msg[session->cur_msg].recv_time = drop_ok == DROP_DONT_RECEIVE ? RECV_TIME_KEEP : drop_ok == DROP_DELETE ? RECV_TIME_DELETE : session->current_time; return PS_SUCCESS; } static gint pop3_delete_send(Pop3Session *session) { session->state = POP3_DELETE; pop3_gen_send(session, "DELE %d", session->cur_msg); return PS_SUCCESS; } static gint pop3_delete_recv(Pop3Session *session) { session->msg[session->cur_msg].recv_time = RECV_TIME_DELETE; session->msg[session->cur_msg].deleted = TRUE; return PS_SUCCESS; } static gint pop3_logout_send(Pop3Session *session) { session->state = POP3_LOGOUT; pop3_gen_send(session, "QUIT"); return PS_SUCCESS; } static void pop3_gen_send(Pop3Session *session, const gchar *format, ...) { gchar buf[POPBUFSIZE + 1]; va_list args; va_start(args, format); g_vsnprintf(buf, sizeof(buf) - 2, format, args); va_end(args); if (!g_ascii_strncasecmp(buf, "PASS ", 5)) log_print("POP3> PASS ********\n"); else log_print("POP3> %s\n", buf); session_send_msg(SESSION(session), SESSION_MSG_NORMAL, buf); } Session *pop3_session_new(PrefsAccount *account) { Pop3Session *session; g_return_val_if_fail(account != NULL, NULL); session = g_new0(Pop3Session, 1); session_init(SESSION(session)); SESSION(session)->type = SESSION_POP3; SESSION(session)->recv_msg = pop3_session_recv_msg; SESSION(session)->send_data_finished = NULL; SESSION(session)->recv_data_finished = pop3_session_recv_data_finished; SESSION(session)->recv_data_as_file_finished = pop3_session_recv_data_as_file_finished; SESSION(session)->destroy = pop3_session_destroy; session->state = POP3_READY; session->ac_prefs = account; session->uidl_table = pop3_get_uidl_table(account); session->current_time = time(NULL); session->error_val = PS_SUCCESS; session->error_msg = NULL; return SESSION(session); } static void pop3_session_destroy(Session *session) { Pop3Session *pop3_session = POP3_SESSION(session); gint n; g_return_if_fail(session != NULL); for (n = 1; n <= pop3_session->count; n++) g_free(pop3_session->msg[n].uidl); g_free(pop3_session->msg); if (pop3_session->uidl_table) { hash_free_strings(pop3_session->uidl_table); g_hash_table_destroy(pop3_session->uidl_table); } g_free(pop3_session->greeting); g_free(pop3_session->user); g_free(pop3_session->pass); g_free(pop3_session->error_msg); } GHashTable *pop3_get_uidl_table(PrefsAccount *ac_prefs) { GHashTable *table; gchar *path; FILE *fp; gchar buf[POPBUFSIZE]; gchar uidl[POPBUFSIZE]; time_t recv_time; time_t now; gchar *uid; table = g_hash_table_new(g_str_hash, g_str_equal); uid = uriencode_for_filename(ac_prefs->userid); path = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, UIDL_DIR, G_DIR_SEPARATOR_S, ac_prefs->recv_server, "-", uid, NULL); g_free(uid); if ((fp = g_fopen(path, "rb")) == NULL) { if (ENOENT != errno) FILE_OP_ERROR(path, "fopen"); g_free(path); return table; } g_free(path); now = time(NULL); while (fgets(buf, sizeof(buf), fp) != NULL) { strretchomp(buf); recv_time = RECV_TIME_NONE; if (sscanf(buf, "%s\t%ld", uidl, &recv_time) != 2) { if (sscanf(buf, "%s", uidl) != 1) continue; else recv_time = now; } if (recv_time == RECV_TIME_NONE) recv_time = RECV_TIME_RECEIVED; g_hash_table_insert(table, g_strdup(uidl), GINT_TO_POINTER(recv_time)); } fclose(fp); return table; } gint pop3_write_uidl_list(Pop3Session *session) { gchar *path; PrefFile *pfile; Pop3MsgInfo *msg; gint n; gchar *uid; if (!session->uidl_is_valid) return 0; uid = uriencode_for_filename(session->ac_prefs->userid); path = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, UIDL_DIR, G_DIR_SEPARATOR_S, session->ac_prefs->recv_server, "-", uid, NULL); g_free(uid); if ((pfile = prefs_file_open(path)) == NULL) { g_free(path); return -1; } for (n = 1; n <= session->count; n++) { msg = &session->msg[n]; if (!msg->uidl || !msg->received) continue; if (session->state == POP3_DONE && msg->deleted) continue; fprintf(pfile->fp, "%s\t%ld\n", msg->uidl, msg->recv_time); } if (prefs_file_close(pfile) < 0) g_warning("%s: failed to write UIDL list.\n", path); g_free(path); return 0; } static gint pop3_write_msg_to_file(const gchar *file, FILE *src_fp, guint len) { FILE *fp; gchar buf[BUFFSIZE]; gchar last_ch = '\0'; g_return_val_if_fail(file != NULL, -1); if ((fp = g_fopen(file, "wb")) == NULL) { FILE_OP_ERROR(file, "fopen"); return -1; } if (change_file_mode_rw(fp, file) < 0) FILE_OP_ERROR(file, "chmod"); while (fgets(buf, sizeof(buf), src_fp) != NULL) { gchar *p = buf; gint len; len = strlen(buf); if (len > 0) { last_ch = buf[len - 1]; if (last_ch == '\n' && len > 1 && buf[len - 2] == '\r') { buf[len - 2] = '\n'; buf[len - 1] = '\0'; } else if (last_ch == '\r') buf[len - 1] = '\0'; } else last_ch = '\0'; if ((last_ch == '\0' || last_ch == '\n') && *p == '.' && *(p + 1) == '.') p++; if (fputs(p, fp) == EOF) { FILE_OP_ERROR(file, "fputs"); g_warning("can't write to file: %s\n", file); fclose(fp); g_unlink(file); return -1; } } if (ferror(src_fp)) { FILE_OP_ERROR(file, "fgets"); fclose(fp); g_unlink(file); return -1; } if (fclose(fp) == EOF) { FILE_OP_ERROR(file, "fclose"); g_unlink(file); return -1; } return 0; } static Pop3State pop3_lookup_next(Pop3Session *session) { Pop3MsgInfo *msg; PrefsAccount *ac = session->ac_prefs; gint size; gboolean size_limit_over; for (;;) { msg = &session->msg[session->cur_msg]; size = msg->size; size_limit_over = (ac->enable_size_limit && ac->size_limit > 0 && size > ac->size_limit * 1024); if (msg->recv_time == RECV_TIME_DELETE || (ac->rmmail && msg->recv_time != RECV_TIME_NONE && msg->recv_time != RECV_TIME_KEEP && session->current_time - msg->recv_time >= ac->msg_leave_time * 24 * 60 * 60)) { log_print(_("POP3: Deleting expired message %d\n"), session->cur_msg); session->cur_total_bytes += size; pop3_delete_send(session); return POP3_DELETE; } if (size_limit_over && !msg->received) { log_print (_("POP3: Skipping message %d (%d bytes)\n"), session->cur_msg, size); session->skipped_num++; } if (size == 0 || msg->received || size_limit_over) { session->cur_total_bytes += size; if (session->cur_msg == session->count) { pop3_logout_send(session); return POP3_LOGOUT; } else session->cur_msg++; } else break; } pop3_retr_send(session); return POP3_RETR; } static Pop3ErrorValue pop3_ok(Pop3Session *session, const gchar *msg) { Pop3ErrorValue ok; log_print("POP3< %s\n", msg); if (!strncmp(msg, "+OK", 3)) ok = PS_SUCCESS; else if (!strncmp(msg, "-ERR", 4)) { if (strstr(msg + 4, "lock") || strstr(msg + 4, "Lock") || strstr(msg + 4, "LOCK") || strstr(msg + 4, "wait")) { log_warning(_("mailbox is locked\n")); ok = PS_LOCKBUSY; } else if (strcasestr(msg + 4, "timeout")) { log_warning(_("session timeout\n")); ok = PS_ERROR; } else { switch (session->state) { #if USE_SSL case POP3_STLS: log_warning(_("can't start TLS session\n")); ok = PS_ERROR; break; #endif case POP3_GETAUTH_USER: case POP3_GETAUTH_PASS: case POP3_GETAUTH_APOP: log_warning(_("error occurred on authentication\n")); ok = PS_AUTHFAIL; break; case POP3_GETRANGE_LAST: case POP3_GETRANGE_UIDL: log_warning(_("command not supported\n")); ok = PS_NOTSUPPORTED; break; default: log_warning(_("error occurred on POP3 session\n")); ok = PS_ERROR; } } g_free(session->error_msg); session->error_msg = g_strdup(msg); fprintf(stderr, "POP3: %s\n", msg); } else ok = PS_PROTOCOL; session->error_val = ok; return ok; } static gint pop3_session_recv_msg(Session *session, const gchar *msg) { Pop3Session *pop3_session = POP3_SESSION(session); gint val = PS_SUCCESS; const gchar *body; body = msg; if (pop3_session->state != POP3_GETRANGE_UIDL_RECV && pop3_session->state != POP3_GETSIZE_LIST_RECV) { val = pop3_ok(pop3_session, msg); if (val != PS_SUCCESS) { if (val != PS_NOTSUPPORTED) { pop3_session->state = POP3_ERROR; return -1; } } if (*body == '+' || *body == '-') body++; while (g_ascii_isalpha(*body)) body++; while (g_ascii_isspace(*body)) body++; } switch (pop3_session->state) { case POP3_READY: case POP3_GREETING: val = pop3_greeting_recv(pop3_session, body); #if USE_SSL if (pop3_session->ac_prefs->ssl_pop == SSL_STARTTLS) val = pop3_stls_send(pop3_session); else #endif if (pop3_session->ac_prefs->use_apop_auth) val = pop3_getauth_apop_send(pop3_session); else val = pop3_getauth_user_send(pop3_session); break; #if USE_SSL case POP3_STLS: if ((val = pop3_stls_recv(pop3_session)) != PS_SUCCESS) return -1; if (pop3_session->ac_prefs->use_apop_auth) val = pop3_getauth_apop_send(pop3_session); else val = pop3_getauth_user_send(pop3_session); break; #endif case POP3_GETAUTH_USER: val = pop3_getauth_pass_send(pop3_session); break; case POP3_GETAUTH_PASS: case POP3_GETAUTH_APOP: if (pop3_session->auth_only) val = pop3_logout_send(pop3_session); else val = pop3_getrange_stat_send(pop3_session); break; case POP3_GETRANGE_STAT: if ((val = pop3_getrange_stat_recv(pop3_session, body)) < 0) return -1; if (pop3_session->count > 0) val = pop3_getrange_uidl_send(pop3_session); else val = pop3_logout_send(pop3_session); break; case POP3_GETRANGE_LAST: if (val == PS_NOTSUPPORTED) pop3_session->error_val = PS_SUCCESS; else if ((val = pop3_getrange_last_recv (pop3_session, body)) < 0) return -1; if (pop3_session->cur_msg > 0) val = pop3_getsize_list_send(pop3_session); else val = pop3_logout_send(pop3_session); break; case POP3_GETRANGE_UIDL: if (val == PS_NOTSUPPORTED) { pop3_session->error_val = PS_SUCCESS; val = pop3_getrange_last_send(pop3_session); } else { pop3_session->state = POP3_GETRANGE_UIDL_RECV; val = session_recv_data(session, 0, ".\r\n"); } break; case POP3_GETSIZE_LIST: pop3_session->state = POP3_GETSIZE_LIST_RECV; val = session_recv_data(session, 0, ".\r\n"); break; case POP3_RETR: pop3_session->state = POP3_RETR_RECV; val = session_recv_data_as_file(session, 0, ".\r\n"); break; case POP3_DELETE: val = pop3_delete_recv(pop3_session); if (pop3_session->cur_msg == pop3_session->count) val = pop3_logout_send(pop3_session); else { pop3_session->cur_msg++; if (pop3_lookup_next(pop3_session) == POP3_ERROR) return -1; } break; case POP3_LOGOUT: pop3_session->state = POP3_DONE; session_disconnect(session); break; case POP3_ERROR: default: return -1; } if (val == PS_SUCCESS) return 0; else return -1; } static gint pop3_session_recv_data_finished(Session *session, guchar *data, guint len) { Pop3Session *pop3_session = POP3_SESSION(session); Pop3ErrorValue val = PS_SUCCESS; switch (pop3_session->state) { case POP3_GETRANGE_UIDL_RECV: val = pop3_getrange_uidl_recv(pop3_session, (gchar *)data, len); if (val == PS_SUCCESS) { if (pop3_session->new_msg_exist) pop3_getsize_list_send(pop3_session); else pop3_logout_send(pop3_session); } else return -1; break; case POP3_GETSIZE_LIST_RECV: val = pop3_getsize_list_recv(pop3_session, (gchar *)data, len); if (val == PS_SUCCESS) { if (pop3_lookup_next(pop3_session) == POP3_ERROR) return -1; } else return -1; break; case POP3_ERROR: default: return -1; } return 0; } static gint pop3_session_recv_data_as_file_finished(Session *session, FILE *fp, guint len) { Pop3Session *pop3_session = POP3_SESSION(session); g_return_val_if_fail(pop3_session->state == POP3_RETR_RECV, -1); if (pop3_retr_recv(pop3_session, fp, len) < 0) return -1; if (pop3_session->msg[pop3_session->cur_msg].recv_time == RECV_TIME_DELETE || (pop3_session->ac_prefs->rmmail && pop3_session->ac_prefs->msg_leave_time == 0 && pop3_session->msg[pop3_session->cur_msg].recv_time != RECV_TIME_KEEP)) pop3_delete_send(pop3_session); else if (pop3_session->cur_msg == pop3_session->count) pop3_logout_send(pop3_session); else { pop3_session->cur_msg++; if (pop3_lookup_next(pop3_session) == POP3_ERROR) return -1; } return 0; } libsylph-1.1.0/libsylph/prefs.c0000644000175000017500000002575510457702534013416 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include #include #include #include #include #include "prefs.h" #include "codeconv.h" #include "utils.h" typedef enum { DUMMY_PARAM } DummyEnum; static void prefs_config_parse_one_line (GHashTable *param_table, const gchar *buf); GHashTable *prefs_param_table_get(PrefParam *param) { GHashTable *table; gint i; g_return_val_if_fail(param != NULL, NULL); table = g_hash_table_new(g_str_hash, g_str_equal); for (i = 0; param[i].name != NULL; i++) { g_hash_table_insert(table, param[i].name, ¶m[i]); } return table; } void prefs_param_table_destroy(GHashTable *param_table) { g_hash_table_destroy(param_table); } void prefs_read_config(PrefParam *param, const gchar *label, const gchar *rcfile, const gchar *encoding) { FILE *fp; gchar buf[PREFSBUFSIZE]; gchar *block_label; GHashTable *param_table; g_return_if_fail(param != NULL); g_return_if_fail(label != NULL); g_return_if_fail(rcfile != NULL); debug_print("Reading configuration...\n"); prefs_set_default(param); if ((fp = g_fopen(rcfile, "rb")) == NULL) { if (ENOENT != errno) FILE_OP_ERROR(rcfile, "fopen"); return; } block_label = g_strdup_printf("[%s]", label); /* search aiming block */ while (fgets(buf, sizeof(buf), fp) != NULL) { gint val; if (encoding) { gchar *conv_str; conv_str = conv_codeset_strdup (buf, encoding, CS_INTERNAL); if (!conv_str) conv_str = g_strdup(buf); val = strncmp (conv_str, block_label, strlen(block_label)); g_free(conv_str); } else val = strncmp(buf, block_label, strlen(block_label)); if (val == 0) { debug_print("Found %s\n", block_label); break; } } g_free(block_label); param_table = prefs_param_table_get(param); while (fgets(buf, sizeof(buf), fp) != NULL) { strretchomp(buf); if (buf[0] == '\0') continue; /* reached next block */ if (buf[0] == '[') break; if (encoding) { gchar *conv_str; conv_str = conv_codeset_strdup (buf, encoding, CS_INTERNAL); if (!conv_str) conv_str = g_strdup(buf); prefs_config_parse_one_line(param_table, conv_str); g_free(conv_str); } else prefs_config_parse_one_line(param_table, buf); } prefs_param_table_destroy(param_table); debug_print("Finished reading configuration.\n"); fclose(fp); } static void prefs_config_parse_one_line(GHashTable *param_table, const gchar *buf) { PrefParam *param; const gchar *p = buf; gchar *name; const gchar *value; while (*p && *p != '=') p++; if (*p != '=') { g_warning("invalid pref line: %s\n", buf); return; } name = g_strndup(buf, p - buf); value = p + 1; /* debug_print("%s = %s\n", name, value); */ param = g_hash_table_lookup(param_table, name); if (!param) { debug_print("pref key '%s' (value '%s') not found\n", name, value); g_free(name); return; } switch (param->type) { case P_STRING: g_free(*((gchar **)param->data)); *((gchar **)param->data) = *value ? g_strdup(value) : NULL; break; case P_INT: *((gint *)param->data) = (gint)atoi(value); break; case P_BOOL: *((gboolean *)param->data) = (*value == '0' || *value == '\0') ? FALSE : TRUE; break; case P_ENUM: *((DummyEnum *)param->data) = (DummyEnum)atoi(value); break; case P_USHORT: *((gushort *)param->data) = (gushort)atoi(value); break; default: break; } g_free(name); } #define TRY(func) \ if (!(func)) \ { \ g_warning(_("failed to write configuration to file\n")); \ if (orig_fp) fclose(orig_fp); \ prefs_file_close_revert(pfile); \ g_free(rcpath); \ g_free(block_label); \ return; \ } \ void prefs_write_config(PrefParam *param, const gchar *label, const gchar *rcfile) { FILE *orig_fp; PrefFile *pfile; gchar *rcpath; gchar buf[PREFSBUFSIZE]; gchar *block_label = NULL; gboolean block_matched = FALSE; g_return_if_fail(param != NULL); g_return_if_fail(label != NULL); g_return_if_fail(rcfile != NULL); rcpath = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, rcfile, NULL); if ((orig_fp = g_fopen(rcpath, "rb")) == NULL) { if (ENOENT != errno) FILE_OP_ERROR(rcpath, "fopen"); } if ((pfile = prefs_file_open(rcpath)) == NULL) { g_warning(_("failed to write configuration to file\n")); if (orig_fp) fclose(orig_fp); g_free(rcpath); return; } block_label = g_strdup_printf("[%s]", label); /* search aiming block */ if (orig_fp) { while (fgets(buf, sizeof(buf), orig_fp) != NULL) { gint val; val = strncmp(buf, block_label, strlen(block_label)); if (val == 0) { debug_print(_("Found %s\n"), block_label); block_matched = TRUE; break; } else TRY(fputs(buf, pfile->fp) != EOF); } } TRY(fprintf(pfile->fp, "%s\n", block_label) > 0); g_free(block_label); block_label = NULL; /* write all param data to file */ TRY(prefs_file_write_param(pfile, param) == 0); if (block_matched) { while (fgets(buf, sizeof(buf), orig_fp) != NULL) { /* next block */ if (buf[0] == '[') { TRY(fputc('\n', pfile->fp) != EOF && fputs(buf, pfile->fp) != EOF); break; } } while (fgets(buf, sizeof(buf), orig_fp) != NULL) TRY(fputs(buf, pfile->fp) != EOF); } if (orig_fp) fclose(orig_fp); if (prefs_file_close(pfile) < 0) g_warning(_("failed to write configuration to file\n")); g_free(rcpath); debug_print(_("Configuration is saved.\n")); } gint prefs_file_write_param(PrefFile *pfile, PrefParam *param) { gint i; gchar buf[PREFSBUFSIZE]; for (i = 0; param[i].name != NULL; i++) { switch (param[i].type) { case P_STRING: g_snprintf(buf, sizeof(buf), "%s=%s\n", param[i].name, *((gchar **)param[i].data) ? *((gchar **)param[i].data) : ""); break; case P_INT: g_snprintf(buf, sizeof(buf), "%s=%d\n", param[i].name, *((gint *)param[i].data)); break; case P_BOOL: g_snprintf(buf, sizeof(buf), "%s=%d\n", param[i].name, *((gboolean *)param[i].data)); break; case P_ENUM: g_snprintf(buf, sizeof(buf), "%s=%d\n", param[i].name, *((DummyEnum *)param[i].data)); break; case P_USHORT: g_snprintf(buf, sizeof(buf), "%s=%d\n", param[i].name, *((gushort *)param[i].data)); break; default: buf[0] = '\0'; } if (buf[0] != '\0') { if (fputs(buf, pfile->fp) == EOF) { perror("fputs"); return -1; } } } return 0; } PrefFile *prefs_file_open(const gchar *path) { PrefFile *pfile; gchar *tmppath; FILE *fp; g_return_val_if_fail(path != NULL, NULL); tmppath = g_strconcat(path, ".tmp", NULL); if ((fp = g_fopen(tmppath, "wb")) == NULL) { FILE_OP_ERROR(tmppath, "fopen"); g_free(tmppath); return NULL; } if (change_file_mode_rw(fp, tmppath) < 0) FILE_OP_ERROR(tmppath, "chmod"); g_free(tmppath); pfile = g_new(PrefFile, 1); pfile->fp = fp; pfile->path = g_strdup(path); return pfile; } gint prefs_file_close(PrefFile *pfile) { FILE *fp; gchar *path; gchar *tmppath; gchar *bakpath = NULL; g_return_val_if_fail(pfile != NULL, -1); fp = pfile->fp; path = pfile->path; g_free(pfile); tmppath = g_strconcat(path, ".tmp", NULL); if (fclose(fp) == EOF) { FILE_OP_ERROR(tmppath, "fclose"); g_unlink(tmppath); g_free(path); g_free(tmppath); return -1; } if (is_file_exist(path)) { bakpath = g_strconcat(path, ".bak", NULL); if (rename_force(path, bakpath) < 0) { FILE_OP_ERROR(path, "rename"); g_unlink(tmppath); g_free(path); g_free(tmppath); g_free(bakpath); return -1; } } if (rename_force(tmppath, path) < 0) { FILE_OP_ERROR(tmppath, "rename"); g_unlink(tmppath); g_free(path); g_free(tmppath); g_free(bakpath); return -1; } g_free(path); g_free(tmppath); g_free(bakpath); return 0; } gint prefs_file_close_revert(PrefFile *pfile) { gchar *tmppath; g_return_val_if_fail(pfile != NULL, -1); tmppath = g_strconcat(pfile->path, ".tmp", NULL); fclose(pfile->fp); if (g_unlink(tmppath) < 0) FILE_OP_ERROR(tmppath, "unlink"); g_free(tmppath); g_free(pfile->path); g_free(pfile); return 0; } void prefs_set_default(PrefParam *param) { gint i; g_return_if_fail(param != NULL); for (i = 0; param[i].name != NULL; i++) { if (!param[i].data) continue; switch (param[i].type) { case P_STRING: if (param[i].defval != NULL) { if (!g_ascii_strncasecmp(param[i].defval, "ENV_", 4)) { const gchar *envstr; gchar *tmp = NULL; envstr = g_getenv(param[i].defval + 4); #ifdef G_OS_WIN32 tmp = g_strdup(envstr); #else if (envstr) { tmp = conv_codeset_strdup (envstr, conv_get_locale_charset_str(), CS_UTF_8); if (!tmp) { g_warning("failed to convert character set."); tmp = g_strdup(envstr); } } #endif *((gchar **)param[i].data) = tmp; } else if (param[i].defval[0] == '~') *((gchar **)param[i].data) = #ifdef G_OS_WIN32 g_strconcat(get_rc_dir(), #else g_strconcat(get_home_dir(), #endif param[i].defval + 1, NULL); else if (param[i].defval[0] != '\0') *((gchar **)param[i].data) = g_strdup(param[i].defval); else *((gchar **)param[i].data) = NULL; } else *((gchar **)param[i].data) = NULL; break; case P_INT: if (param[i].defval != NULL) *((gint *)param[i].data) = (gint)atoi(param[i].defval); else *((gint *)param[i].data) = 0; break; case P_BOOL: if (param[i].defval != NULL) { if (!g_ascii_strcasecmp(param[i].defval, "TRUE")) *((gboolean *)param[i].data) = TRUE; else *((gboolean *)param[i].data) = atoi(param[i].defval) ? TRUE : FALSE; } else *((gboolean *)param[i].data) = FALSE; break; case P_ENUM: if (param[i].defval != NULL) *((DummyEnum*)param[i].data) = (DummyEnum)atoi(param[i].defval); else *((DummyEnum *)param[i].data) = 0; break; case P_USHORT: if (param[i].defval != NULL) *((gushort *)param[i].data) = (gushort)atoi(param[i].defval); else *((gushort *)param[i].data) = 0; break; default: break; } } } void prefs_free(PrefParam *param) { gint i; g_return_if_fail(param != NULL); for (i = 0; param[i].name != NULL; i++) { if (!param[i].data) continue; switch (param[i].type) { case P_STRING: g_free(*((gchar **)param[i].data)); break; default: break; } } } libsylph-1.1.0/libsylph/prefs_account.c0000644000175000017500000002070610457702534015121 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2006 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "defs.h" #include #include #include #include #include #include "prefs.h" #include "prefs_account.h" #include "customheader.h" #include "account.h" #include "utils.h" static PrefsAccount tmp_ac_prefs; static PrefParam param[] = { /* Basic */ {"account_name", NULL, &tmp_ac_prefs.account_name, P_STRING}, {"is_default", "FALSE", &tmp_ac_prefs.is_default, P_BOOL}, {"name", NULL, &tmp_ac_prefs.name, P_STRING}, {"address", NULL, &tmp_ac_prefs.address, P_STRING}, {"organization", NULL, &tmp_ac_prefs.organization, P_STRING}, {"protocol", NULL, &tmp_ac_prefs.protocol, P_ENUM}, {"receive_server", NULL, &tmp_ac_prefs.recv_server, P_STRING}, {"smtp_server", NULL, &tmp_ac_prefs.smtp_server, P_STRING}, {"nntp_server", NULL, &tmp_ac_prefs.nntp_server, P_STRING}, {"use_nntp_auth", "FALSE", &tmp_ac_prefs.use_nntp_auth, P_BOOL}, {"user_id", "ENV_USER", &tmp_ac_prefs.userid, P_STRING}, {"password", NULL, &tmp_ac_prefs.passwd, P_STRING}, {"inbox", "inbox", &tmp_ac_prefs.inbox, P_STRING}, /* Receive */ {"use_apop_auth", "FALSE", &tmp_ac_prefs.use_apop_auth, P_BOOL}, {"remove_mail", "TRUE", &tmp_ac_prefs.rmmail, P_BOOL}, {"message_leave_time", "0", &tmp_ac_prefs.msg_leave_time, P_INT}, {"get_all_mail", "FALSE", &tmp_ac_prefs.getall, P_BOOL}, {"enable_size_limit", "FALSE", &tmp_ac_prefs.enable_size_limit, P_BOOL}, {"size_limit", "1024", &tmp_ac_prefs.size_limit, P_INT}, {"filter_on_receive", "TRUE", &tmp_ac_prefs.filter_on_recv, P_BOOL}, {"imap_check_inbox_only", "FALSE", &tmp_ac_prefs.imap_check_inbox_only, P_BOOL}, {"imap_auth_method", "0", &tmp_ac_prefs.imap_auth_type, P_ENUM}, {"max_nntp_articles", "300", &tmp_ac_prefs.max_nntp_articles, P_INT}, {"receive_at_get_all", "TRUE", &tmp_ac_prefs.recv_at_getall, P_BOOL}, /* Send */ {"add_date", "TRUE", &tmp_ac_prefs.add_date, P_BOOL}, {"generate_msgid", "TRUE", &tmp_ac_prefs.gen_msgid, P_BOOL}, {"add_custom_header", "FALSE", &tmp_ac_prefs.add_customhdr, P_BOOL}, {"use_smtp_auth", "FALSE", &tmp_ac_prefs.use_smtp_auth, P_BOOL}, {"smtp_auth_method", "0", &tmp_ac_prefs.smtp_auth_type, P_ENUM}, {"smtp_user_id", NULL, &tmp_ac_prefs.smtp_userid, P_STRING}, {"smtp_password", NULL, &tmp_ac_prefs.smtp_passwd, P_STRING}, {"pop_before_smtp", "FALSE", &tmp_ac_prefs.pop_before_smtp, P_BOOL}, /* Compose */ {"signature_type", "0", &tmp_ac_prefs.sig_type, P_ENUM}, {"signature_path", "~" G_DIR_SEPARATOR_S DEFAULT_SIGNATURE, &tmp_ac_prefs.sig_path, P_STRING}, {"set_autocc", "FALSE", &tmp_ac_prefs.set_autocc, P_BOOL}, {"auto_cc", NULL, &tmp_ac_prefs.auto_cc, P_STRING}, {"set_autobcc", "FALSE", &tmp_ac_prefs.set_autobcc, P_BOOL}, {"auto_bcc", NULL, &tmp_ac_prefs.auto_bcc, P_STRING}, {"set_autoreplyto", "FALSE", &tmp_ac_prefs.set_autoreplyto, P_BOOL}, {"auto_replyto", NULL, &tmp_ac_prefs.auto_replyto, P_STRING}, /* Privacy */ {"default_sign", "FALSE", &tmp_ac_prefs.default_sign, P_BOOL}, {"default_encrypt", "FALSE", &tmp_ac_prefs.default_encrypt, P_BOOL}, {"encrypt_reply", "TRUE", &tmp_ac_prefs.encrypt_reply, P_BOOL}, {"ascii_armored", "FALSE", &tmp_ac_prefs.ascii_armored, P_BOOL}, {"clearsign", "FALSE", &tmp_ac_prefs.clearsign, P_BOOL}, {"sign_key", NULL, &tmp_ac_prefs.sign_key, P_ENUM}, {"sign_key_id", NULL, &tmp_ac_prefs.sign_key_id, P_STRING}, /* SSL */ {"ssl_pop", "0", &tmp_ac_prefs.ssl_pop, P_ENUM}, {"ssl_imap", "0", &tmp_ac_prefs.ssl_imap, P_ENUM}, {"ssl_nntp", "0", &tmp_ac_prefs.ssl_nntp, P_ENUM}, {"ssl_smtp", "0", &tmp_ac_prefs.ssl_smtp, P_ENUM}, {"use_nonblocking_ssl", "1", &tmp_ac_prefs.use_nonblocking_ssl, P_BOOL}, /* Advanced */ {"set_smtpport", "FALSE", &tmp_ac_prefs.set_smtpport, P_BOOL}, {"smtp_port", "25", &tmp_ac_prefs.smtpport, P_USHORT}, {"set_popport", "FALSE", &tmp_ac_prefs.set_popport, P_BOOL}, {"pop_port", "110", &tmp_ac_prefs.popport, P_USHORT}, {"set_imapport", "FALSE", &tmp_ac_prefs.set_imapport, P_BOOL}, {"imap_port", "143", &tmp_ac_prefs.imapport, P_USHORT}, {"set_nntpport", "FALSE", &tmp_ac_prefs.set_nntpport, P_BOOL}, {"nntp_port", "119", &tmp_ac_prefs.nntpport, P_USHORT}, {"set_domain", "FALSE", &tmp_ac_prefs.set_domain, P_BOOL}, {"domain", NULL, &tmp_ac_prefs.domain, P_STRING}, {"imap_directory", NULL, &tmp_ac_prefs.imap_dir, P_STRING}, {"imap_clear_cache_on_exit", "FALSE", &tmp_ac_prefs.imap_clear_cache_on_exit, P_BOOL}, {"set_sent_folder", "FALSE", &tmp_ac_prefs.set_sent_folder, P_BOOL}, {"sent_folder", NULL, &tmp_ac_prefs.sent_folder, P_STRING}, {"set_draft_folder", "FALSE", &tmp_ac_prefs.set_draft_folder, P_BOOL}, {"draft_folder", NULL, &tmp_ac_prefs.draft_folder, P_STRING}, {"set_queue_folder", "FALSE", &tmp_ac_prefs.set_queue_folder, P_BOOL}, {"queue_folder", NULL, &tmp_ac_prefs.queue_folder, P_STRING}, {"set_trash_folder", "FALSE", &tmp_ac_prefs.set_trash_folder, P_BOOL}, {"trash_folder", NULL, &tmp_ac_prefs.trash_folder, P_STRING}, {NULL, NULL, NULL, P_OTHER} }; static gint prefs_account_get_new_id(void); PrefsAccount *prefs_account_get_tmp_prefs(void) { return &tmp_ac_prefs; } void prefs_account_set_tmp_prefs(PrefsAccount *ac_prefs) { tmp_ac_prefs = *ac_prefs; } void prefs_account_apply_tmp_prefs(PrefsAccount *ac_prefs) { *ac_prefs = tmp_ac_prefs; } PrefParam *prefs_account_get_params(void) { return param; } PrefsAccount *prefs_account_new(void) { PrefsAccount *ac_prefs; ac_prefs = g_new0(PrefsAccount, 1); memset(&tmp_ac_prefs, 0, sizeof(PrefsAccount)); prefs_set_default(param); *ac_prefs = tmp_ac_prefs; ac_prefs->account_id = prefs_account_get_new_id(); return ac_prefs; } void prefs_account_read_config(PrefsAccount *ac_prefs, const gchar *label) { const gchar *p = label; gchar *rcpath; gint id; g_return_if_fail(ac_prefs != NULL); g_return_if_fail(label != NULL); memset(&tmp_ac_prefs, 0, sizeof(PrefsAccount)); rcpath = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, ACCOUNT_RC, NULL); prefs_read_config(param, label, rcpath, NULL); g_free(rcpath); *ac_prefs = tmp_ac_prefs; while (*p && !g_ascii_isdigit(*p)) p++; id = atoi(p); if (id < 0) g_warning("wrong account id: %d\n", id); ac_prefs->account_id = id; if (ac_prefs->protocol == A_APOP) { debug_print("converting protocol A_APOP to new prefs.\n"); ac_prefs->protocol = A_POP3; ac_prefs->use_apop_auth = TRUE; } custom_header_read_config(ac_prefs); } void prefs_account_write_config_all(GList *account_list) { GList *cur; gchar *rcpath; PrefFile *pfile; rcpath = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, ACCOUNT_RC, NULL); if ((pfile = prefs_file_open(rcpath)) == NULL) { g_free(rcpath); return; } g_free(rcpath); for (cur = account_list; cur != NULL; cur = cur->next) { tmp_ac_prefs = *(PrefsAccount *)cur->data; if (fprintf(pfile->fp, "[Account: %d]\n", tmp_ac_prefs.account_id) <= 0 || prefs_file_write_param(pfile, param) < 0) { g_warning(_("failed to write configuration to file\n")); prefs_file_close_revert(pfile); return; } if (cur->next) { if (fputc('\n', pfile->fp) == EOF) { FILE_OP_ERROR(rcpath, "fputc"); prefs_file_close_revert(pfile); return; } } } if (prefs_file_close(pfile) < 0) g_warning(_("failed to write configuration to file\n")); } void prefs_account_free(PrefsAccount *ac_prefs) { if (!ac_prefs) return; tmp_ac_prefs = *ac_prefs; prefs_free(param); if (ac_prefs->tmp_pass) g_free(ac_prefs->tmp_pass); g_free(ac_prefs); } static gint prefs_account_get_new_id(void) { GList *ac_list; PrefsAccount *ac; static gint last_id = 0; for (ac_list = account_get_list(); ac_list != NULL; ac_list = ac_list->next) { ac = (PrefsAccount *)ac_list->data; if (last_id < ac->account_id) last_id = ac->account_id; } return last_id + 1; } libsylph-1.1.0/libsylph/prefs_common.c0000644000175000017500000004472210522312345014747 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2006 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "defs.h" #include #include #include #include #include "prefs.h" #include "prefs_common.h" #include "filter.h" #include "codeconv.h" #include "utils.h" PrefsCommon prefs_common; static PrefParam param[] = { /* Receive */ {"autochk_newmail", "FALSE", &prefs_common.autochk_newmail, P_BOOL}, {"autochk_interval", "10", &prefs_common.autochk_itv, P_INT}, {"check_on_startup", "FALSE", &prefs_common.chk_on_startup, P_BOOL}, {"scan_all_after_inc", "FALSE", &prefs_common.scan_all_after_inc, P_BOOL}, {"enable_newmsg_notify", "FALSE", &prefs_common.enable_newmsg_notify, P_BOOL}, {"newmsg_notify_command", NULL, &prefs_common.newmsg_notify_cmd, P_STRING}, {"inc_local", "FALSE", &prefs_common.inc_local, P_BOOL}, {"filter_on_inc_local", "TRUE", &prefs_common.filter_on_inc, P_BOOL}, {"spool_path", DEFAULT_SPOOL_PATH, &prefs_common.spool_path, P_STRING}, /* Send */ {"save_message", "TRUE", &prefs_common.savemsg, P_BOOL}, {"filter_sent_message", "FALSE", &prefs_common.filter_sent, P_BOOL}, {"encoding_method", "0", &prefs_common.encoding_method, P_ENUM}, {"mime_filename_encoding_method", "0", &prefs_common.mime_fencoding_method, P_ENUM}, {"allow_jisx0201_kana", "FALSE", &prefs_common.allow_jisx0201_kana, P_BOOL}, /* Compose */ {"auto_signature", "TRUE", &prefs_common.auto_sig, P_BOOL}, {"signature_separator", "-- ", &prefs_common.sig_sep, P_STRING}, {"auto_ext_editor", "FALSE", &prefs_common.auto_exteditor, P_BOOL}, {"undo_level", "50", &prefs_common.undolevels, P_INT}, {"linewrap_length", "72", &prefs_common.linewrap_len, P_INT}, {"linewrap_quotation", "FALSE", &prefs_common.linewrap_quote, P_BOOL}, {"linewrap_auto", "FALSE", &prefs_common.autowrap, P_BOOL}, {"enable_autosave", "FALSE", &prefs_common.enable_autosave, P_BOOL}, {"autosave_interval", "5", &prefs_common.autosave_itv, P_INT}, {"reply_with_quote", "TRUE", &prefs_common.reply_with_quote, P_BOOL}, {"reply_account_autoselect", "TRUE", &prefs_common.reply_account_autosel, P_BOOL}, {"default_reply_list", "TRUE", &prefs_common.default_reply_list, P_BOOL}, {"show_ruler", "TRUE", &prefs_common.show_ruler, P_BOOL}, /* Quote */ {"reply_quote_mark", "> ", &prefs_common.quotemark, P_STRING}, {"reply_quote_format", "On %d\\n%f wrote:\\n\\n%Q", &prefs_common.quotefmt, P_STRING}, {"forward_quote_mark", "> ", &prefs_common.fw_quotemark, P_STRING}, {"forward_quote_format", "\\n\\nBegin forwarded message:\\n\\n" "?d{Date: %d\\n}?f{From: %f\\n}?t{To: %t\\n}?c{Cc: %c\\n}" "?n{Newsgroups: %n\\n}?s{Subject: %s\\n}\\n\\n%M", &prefs_common.fw_quotefmt, P_STRING}, /* Spelling */ {"check_spell", "FALSE", &prefs_common.check_spell, P_BOOL}, {"spell_lang", "en", &prefs_common.spell_lang, P_STRING}, /* Display */ {"message_font_name", DEFAULT_MESSAGE_FONT, &prefs_common.textfont, P_STRING}, {"display_folder_unread_num", "TRUE", &prefs_common.display_folder_unread, P_BOOL}, {"display_folder_num_columns", "FALSE", &prefs_common.display_folder_num_columns, P_BOOL}, {"newsgroup_abbrev_len", "16", &prefs_common.ng_abbrev_len, P_INT}, {"translate_header", "TRUE", &prefs_common.trans_hdr, P_BOOL}, /* Display: Summary View */ {"enable_swap_from", "FALSE", &prefs_common.swap_from, P_BOOL}, {"date_format", "%y/%m/%d(%a) %H:%M", &prefs_common.date_format, P_STRING}, {"expand_thread", "TRUE", &prefs_common.expand_thread, P_BOOL}, {"enable_rules_hint", "TRUE", &prefs_common.enable_rules_hint, P_BOOL}, {"bold_unread", "TRUE", &prefs_common.bold_unread, P_BOOL}, {"toolbar_style", "3", &prefs_common.toolbar_style, P_ENUM}, {"show_searchbar", "TRUE", &prefs_common.show_searchbar, P_BOOL}, {"show_statusbar", "TRUE", &prefs_common.show_statusbar, P_BOOL}, {"summary_col_show_mark", "TRUE", &prefs_common.summary_col_visible[S_COL_MARK], P_BOOL}, {"summary_col_show_unread", "TRUE", &prefs_common.summary_col_visible[S_COL_UNREAD], P_BOOL}, {"summary_col_show_mime", "TRUE", &prefs_common.summary_col_visible[S_COL_MIME], P_BOOL}, {"summary_col_show_subject", "TRUE", &prefs_common.summary_col_visible[S_COL_SUBJECT], P_BOOL}, {"summary_col_show_from", "TRUE", &prefs_common.summary_col_visible[S_COL_FROM], P_BOOL}, {"summary_col_show_date", "TRUE", &prefs_common.summary_col_visible[S_COL_DATE], P_BOOL}, {"summary_col_show_size", "TRUE", &prefs_common.summary_col_visible[S_COL_SIZE], P_BOOL}, {"summary_col_show_number", "FALSE", &prefs_common.summary_col_visible[S_COL_NUMBER], P_BOOL}, {"summary_col_pos_mark", "0", &prefs_common.summary_col_pos[S_COL_MARK], P_INT}, {"summary_col_pos_unread", "1", &prefs_common.summary_col_pos[S_COL_UNREAD], P_INT}, {"summary_col_pos_mime", "2", &prefs_common.summary_col_pos[S_COL_MIME], P_INT}, {"summary_col_pos_subject", "3", &prefs_common.summary_col_pos[S_COL_SUBJECT], P_INT}, {"summary_col_pos_from", "4", &prefs_common.summary_col_pos[S_COL_FROM], P_INT}, {"summary_col_pos_date", "5", &prefs_common.summary_col_pos[S_COL_DATE], P_INT}, {"summary_col_pos_size", "6", &prefs_common.summary_col_pos[S_COL_SIZE], P_INT}, {"summary_col_pos_number", "7", &prefs_common.summary_col_pos[S_COL_NUMBER], P_INT}, {"summary_col_size_mark", "10", &prefs_common.summary_col_size[S_COL_MARK], P_INT}, {"summary_col_size_unread", "13", &prefs_common.summary_col_size[S_COL_UNREAD], P_INT}, {"summary_col_size_mime", "10", &prefs_common.summary_col_size[S_COL_MIME], P_INT}, {"summary_col_size_subject", "200", &prefs_common.summary_col_size[S_COL_SUBJECT], P_INT}, {"summary_col_size_from", "120", &prefs_common.summary_col_size[S_COL_FROM], P_INT}, {"summary_col_size_date", "118", &prefs_common.summary_col_size[S_COL_DATE], P_INT}, {"summary_col_size_size", "45", &prefs_common.summary_col_size[S_COL_SIZE], P_INT}, {"summary_col_size_number", "40", &prefs_common.summary_col_size[S_COL_NUMBER], P_INT}, /* Widget size */ {"folderwin_x", "16", &prefs_common.folderwin_x, P_INT}, {"folderwin_y", "16", &prefs_common.folderwin_y, P_INT}, {"folderview_width", "179", &prefs_common.folderview_width, P_INT}, {"folderview_height", "450", &prefs_common.folderview_height, P_INT}, {"folderview_visible", "TRUE", &prefs_common.folderview_visible, P_BOOL}, {"folder_col_folder", "150", &prefs_common.folder_col_folder, P_INT}, {"folder_col_new", "32", &prefs_common.folder_col_new, P_INT}, {"folder_col_unread", "32", &prefs_common.folder_col_unread, P_INT}, {"folder_col_total", "32", &prefs_common.folder_col_total, P_INT}, {"summaryview_width", "600", &prefs_common.summaryview_width, P_INT}, {"summaryview_height", "180", &prefs_common.summaryview_height, P_INT}, {"main_messagewin_x", "256", &prefs_common.main_msgwin_x, P_INT}, {"main_messagewin_y", "210", &prefs_common.main_msgwin_y, P_INT}, {"messageview_width", "600", &prefs_common.msgview_width, P_INT}, {"messageview_height", "300", &prefs_common.msgview_height, P_INT}, {"messageview_visible", "TRUE", &prefs_common.msgview_visible, P_BOOL}, {"mainview_x", "64", &prefs_common.mainview_x, P_INT}, {"mainview_y", "64", &prefs_common.mainview_y, P_INT}, {"mainview_width", "600", &prefs_common.mainview_width, P_INT}, {"mainview_height", "600", &prefs_common.mainview_height, P_INT}, {"mainwin_x", "64", &prefs_common.mainwin_x, P_INT}, {"mainwin_y", "64", &prefs_common.mainwin_y, P_INT}, {"mainwin_width", "800", &prefs_common.mainwin_width, P_INT}, {"mainwin_height", "600", &prefs_common.mainwin_height, P_INT}, {"messagewin_width", "600", &prefs_common.msgwin_width, P_INT}, {"messagewin_height", "540", &prefs_common.msgwin_height, P_INT}, {"mainwin_maximized", "FALSE", &prefs_common.mainwin_maximized, P_BOOL}, {"sourcewin_width", "600", &prefs_common.sourcewin_width, P_INT}, {"sourcewin_height", "500", &prefs_common.sourcewin_height, P_INT}, {"compose_x", "32", &prefs_common.compose_x, P_INT}, {"compose_y", "32", &prefs_common.compose_y, P_INT}, {"compose_width", "600", &prefs_common.compose_width, P_INT}, {"compose_height", "560", &prefs_common.compose_height, P_INT}, {"addressbook_x", "32", &prefs_common.addressbook_x, P_INT}, {"addressbook_y", "32", &prefs_common.addressbook_y, P_INT}, {"addressbook_width", "620", &prefs_common.addressbook_width, P_INT}, {"addressbook_height", "360", &prefs_common.addressbook_height, P_INT}, /* Message */ {"enable_color", "TRUE", &prefs_common.enable_color, P_BOOL}, {"quote_level1_color", "179", &prefs_common.quote_level1_col, P_INT}, {"quote_level2_color", "179", &prefs_common.quote_level2_col, P_INT}, {"quote_level3_color", "179", &prefs_common.quote_level3_col, P_INT}, {"uri_color", "32512", &prefs_common.uri_col, P_INT}, {"signature_color", "0", &prefs_common.sig_col, P_USHORT}, {"recycle_quote_colors", "FALSE", &prefs_common.recycle_quote_colors, P_BOOL}, {"convert_mb_alnum", "FALSE", &prefs_common.conv_mb_alnum, P_BOOL}, {"display_header_pane", "TRUE", &prefs_common.display_header_pane, P_BOOL}, {"display_header", "TRUE", &prefs_common.display_header, P_BOOL}, {"render_html", "TRUE", &prefs_common.render_html, P_BOOL}, {"line_space", "2", &prefs_common.line_space, P_INT}, {"textview_cursor_visible", "FALSE", &prefs_common.textview_cursor_visible, P_BOOL}, {"enable_smooth_scroll", "FALSE", &prefs_common.enable_smooth_scroll, P_BOOL}, {"scroll_step", "1", &prefs_common.scroll_step, P_INT}, {"scroll_half_page", "FALSE", &prefs_common.scroll_halfpage, P_BOOL}, {"resize_image", "TRUE", &prefs_common.resize_image, P_BOOL}, {"inline_image", "TRUE", &prefs_common.inline_image, P_BOOL}, /* Encoding */ {"default_encoding", NULL, &prefs_common.default_encoding, P_STRING}, {"outgoing_charset", NULL, &prefs_common.outgoing_charset, P_STRING}, {"show_other_header", "FALSE", &prefs_common.show_other_header, P_BOOL}, /* MIME viewer */ {"mime_image_viewer", NULL, &prefs_common.mime_image_viewer, P_STRING}, {"mime_audio_player", NULL, &prefs_common.mime_audio_player, P_STRING}, #ifdef G_OS_WIN32 {"mime_open_command", "notepad '%s'", &prefs_common.mime_open_cmd, #else {"mime_open_command", "gedit '%s'", &prefs_common.mime_open_cmd, #endif P_STRING}, {"mime_command", NULL, &prefs_common.mime_cmd, P_STRING}, /* Junk mail */ {"enable_junk", "FALSE", &prefs_common.enable_junk, P_BOOL}, #ifdef G_OS_WIN32 {"junk_learn_command", "bsfilterw -su", &prefs_common.junk_learncmd, P_STRING}, {"nojunk_learn_command", "bsfilterw -cu", &prefs_common.nojunk_learncmd, P_STRING}, {"junk_classify_command", "bsfilterw", &prefs_common.junk_classify_cmd, P_STRING}, #else {"junk_learn_command", "bogofilter -s -I", &prefs_common.junk_learncmd, P_STRING}, {"nojunk_learn_command", "bogofilter -n -I", &prefs_common.nojunk_learncmd, P_STRING}, {"junk_classify_command", "bogofilter -I", &prefs_common.junk_classify_cmd, P_STRING}, #endif {"junk_folder", NULL, &prefs_common.junk_folder, P_STRING}, {"filter_junk_on_receive", "FALSE", &prefs_common.filter_junk_on_recv, P_BOOL}, {"filter_junk_before", "FALSE", &prefs_common.filter_junk_before, P_BOOL}, {"delete_junk_on_receive", "TRUE", &prefs_common.delete_junk_on_recv, P_BOOL}, {"mark_junk_as_read", "FALSE", &prefs_common.mark_junk_as_read, P_BOOL}, /* Privacy */ {"auto_check_signatures", "TRUE", &prefs_common.auto_check_signatures, P_BOOL}, {"gpg_signature_popup", "FALSE", &prefs_common.gpg_signature_popup, P_BOOL}, {"store_passphrase", "FALSE", &prefs_common.store_passphrase, P_BOOL}, {"store_passphrase_timeout", "0", &prefs_common.store_passphrase_timeout, P_INT}, {"passphrase_grab", "FALSE", &prefs_common.passphrase_grab, P_BOOL}, #ifdef G_OS_WIN32 {"show_gpg_warning", "FALSE", &prefs_common.gpg_warning, P_BOOL}, #else {"show_gpg_warning", "TRUE", &prefs_common.gpg_warning, P_BOOL}, #endif /* Interface */ {"separate_folder", "FALSE", &prefs_common.sep_folder, P_BOOL}, {"separate_message", "FALSE", &prefs_common.sep_msg, P_BOOL}, {"always_show_message_when_selected", "FALSE", &prefs_common.always_show_msg, P_BOOL}, {"open_unread_on_enter", "FALSE", &prefs_common.open_unread_on_enter, P_BOOL}, {"remember_last_selected", "FALSE", &prefs_common.remember_last_selected, P_BOOL}, {"mark_as_read_on_new_window", "FALSE", &prefs_common.mark_as_read_on_new_window, P_BOOL}, {"open_inbox_on_inc", "FALSE", &prefs_common.open_inbox_on_inc, P_BOOL}, {"open_inbox_on_startup", "FALSE", &prefs_common.open_inbox_on_startup, P_BOOL}, {"immediate_execution", "TRUE", &prefs_common.immediate_exec, P_BOOL}, #ifdef G_OS_WIN32 {"comply_gnome_hig", "FALSE", &prefs_common.comply_gnome_hig, P_BOOL}, #else {"comply_gnome_hig", "TRUE", &prefs_common.comply_gnome_hig, P_BOOL}, #endif {"show_trayicon", "TRUE", &prefs_common.show_trayicon, P_BOOL}, {"minimize_to_tray", "FALSE", &prefs_common.minimize_to_tray, P_BOOL}, /* Other */ {"receive_dialog_mode", "1", &prefs_common.recv_dialog_mode, P_ENUM}, {"no_receive_error_panel", "FALSE", &prefs_common.no_recv_err_panel, P_BOOL}, {"close_receive_dialog", "TRUE", &prefs_common.close_recv_dialog, P_BOOL}, {"add_address_by_click", "FALSE", &prefs_common.add_address_by_click, P_BOOL}, {"confirm_on_exit", "FALSE", &prefs_common.confirm_on_exit, P_BOOL}, {"clean_trash_on_exit", "FALSE", &prefs_common.clean_on_exit, P_BOOL}, {"ask_on_cleaning", "TRUE", &prefs_common.ask_on_clean, P_BOOL}, {"warn_queued_on_exit", "TRUE", &prefs_common.warn_queued_on_exit, P_BOOL}, {"logwindow_line_limit", "1000", &prefs_common.logwin_line_limit, P_INT}, /* External commands */ #ifdef G_OS_WIN32 {"uri_open_command", NULL, &prefs_common.uri_cmd, #else {"uri_open_command", DEFAULT_BROWSER_CMD, &prefs_common.uri_cmd, #endif P_STRING}, #ifdef G_OS_WIN32 {"print_command", NULL, &prefs_common.print_cmd, P_STRING}, #else {"print_command", "lpr %s", &prefs_common.print_cmd, P_STRING}, #endif #ifdef G_OS_WIN32 {"ext_editor_command", "notepad '%s'", &prefs_common.ext_editor_cmd, #else {"ext_editor_command", "gedit %s", &prefs_common.ext_editor_cmd, #endif P_STRING}, {"use_ext_inc", "FALSE", &prefs_common.use_extinc, P_BOOL}, {"ext_inc_path", DEFAULT_INC_PATH, &prefs_common.extinc_cmd, P_STRING}, {"use_ext_sendmail", "FALSE", &prefs_common.use_extsend, P_BOOL}, {"ext_sendmail_cmd", DEFAULT_SENDMAIL_CMD, &prefs_common.extsend_cmd, P_STRING}, /* Advanced */ {"strict_cache_check", "FALSE", &prefs_common.strict_cache_check, P_BOOL}, {"io_timeout_secs", "60", &prefs_common.io_timeout_secs, P_INT}, {NULL, NULL, NULL, P_OTHER} }; PrefsCommon *prefs_common_get(void) { return &prefs_common; } PrefParam *prefs_common_get_params(void) { return param; } void prefs_common_read_config(void) { FILE *fp; gchar *path; gchar buf[PREFSBUFSIZE]; path = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, COMMON_RC, NULL); prefs_read_config(param, "Common", path, NULL); #ifdef G_OS_WIN32 if (!is_file_exist(path)) { if (conv_is_ja_locale()) { g_free(prefs_common.textfont); prefs_common.textfont = g_strdup("MS Gothic 12"); } } #endif g_free(path); prefs_common.online_mode = TRUE; prefs_common_junk_filter_list_set(); path = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, COMMAND_HISTORY, NULL); if ((fp = g_fopen(path, "rb")) == NULL) { if (ENOENT != errno) FILE_OP_ERROR(path, "fopen"); g_free(path); return; } g_free(path); while (fgets(buf, sizeof(buf), fp) != NULL) { g_strstrip(buf); if (buf[0] == '\0') continue; prefs_common.mime_open_cmd_history = add_history(prefs_common.mime_open_cmd_history, buf); } fclose(fp); prefs_common.mime_open_cmd_history = g_list_reverse(prefs_common.mime_open_cmd_history); } void prefs_common_write_config(void) { GList *cur; FILE *fp; gchar *path; prefs_write_config(param, "Common", COMMON_RC); path = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, COMMAND_HISTORY, NULL); if ((fp = g_fopen(path, "wb")) == NULL) { FILE_OP_ERROR(path, "fopen"); g_free(path); return; } for (cur = prefs_common.mime_open_cmd_history; cur != NULL; cur = cur->next) { fputs((gchar *)cur->data, fp); fputc('\n', fp); } fclose(fp); g_free(path); } static FilterRule *prefs_common_junk_filter_rule_create(gboolean is_manual) { FilterRule *rule; FilterCond *cond; FilterAction *action; GSList *cond_list = NULL, *action_list = NULL; cond = filter_cond_new(FLT_COND_CMD_TEST, 0, 0, NULL, prefs_common.junk_classify_cmd); cond_list = g_slist_append(NULL, cond); if (prefs_common.delete_junk_on_recv && !is_manual) { action = filter_action_new(FLT_ACTION_COPY, prefs_common.junk_folder); action_list = g_slist_append(NULL, action); action = filter_action_new(FLT_ACTION_DELETE, NULL); action_list = g_slist_append(action_list, action); } else { action = filter_action_new(FLT_ACTION_MOVE, prefs_common.junk_folder); action_list = g_slist_append(NULL, action); } if (prefs_common.mark_junk_as_read) { action = filter_action_new(FLT_ACTION_MARK_READ, NULL); action_list = g_slist_append(action_list, action); } if (is_manual) rule = filter_rule_new(_("Junk mail filter (manual)"), FLT_OR, cond_list, action_list); else rule = filter_rule_new(_("Junk mail filter"), FLT_OR, cond_list, action_list); return rule; } void prefs_common_junk_filter_list_set(void) { FilterRule *rule; if (prefs_common.junk_fltlist) { filter_rule_list_free(prefs_common.junk_fltlist); prefs_common.junk_fltlist = NULL; } if (prefs_common.manual_junk_fltlist) { filter_rule_list_free(prefs_common.manual_junk_fltlist); prefs_common.manual_junk_fltlist = NULL; } if (!prefs_common.junk_classify_cmd || !prefs_common.junk_folder) return; rule = prefs_common_junk_filter_rule_create(FALSE); prefs_common.junk_fltlist = g_slist_append(NULL, rule); rule = prefs_common_junk_filter_rule_create(TRUE); prefs_common.manual_junk_fltlist = g_slist_append(NULL, rule); } libsylph-1.1.0/libsylph/procheader.c0000644000175000017500000004574410457702533014412 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include #include #include #include #include #include "procheader.h" #include "procmsg.h" #include "codeconv.h" #include "displayheader.h" #include "prefs_common.h" #include "utils.h" #define BUFFSIZE 8192 gint procheader_get_one_field(gchar *buf, size_t len, FILE *fp, HeaderEntry hentry[]) { gint nexthead; gint hnum = 0; HeaderEntry *hp = NULL; if (hentry != NULL) { /* skip non-required headers */ do { do { if (fgets(buf, len, fp) == NULL) return -1; if (buf[0] == '\r' || buf[0] == '\n') return -1; } while (buf[0] == ' ' || buf[0] == '\t'); for (hp = hentry, hnum = 0; hp->name != NULL; hp++, hnum++) { if (!g_ascii_strncasecmp(hp->name, buf, strlen(hp->name))) break; } } while (hp->name == NULL); } else { if (fgets(buf, len, fp) == NULL) return -1; if (buf[0] == '\r' || buf[0] == '\n') return -1; } /* unfold the specified folded line */ if (hp && hp->unfold) { gboolean folded = FALSE; gchar *bufp = buf + strlen(buf); for (; bufp > buf && (*(bufp - 1) == '\n' || *(bufp - 1) == '\r'); bufp--) *(bufp - 1) = '\0'; while (1) { nexthead = fgetc(fp); /* folded */ if (nexthead == ' ' || nexthead == '\t') folded = TRUE; else if (nexthead == EOF) break; else if (folded == TRUE) { if ((len - (bufp - buf)) <= 2) break; if (nexthead == '\n') { folded = FALSE; continue; } /* replace return code on the tail end with space */ *bufp++ = ' '; *bufp++ = nexthead; *bufp = '\0'; /* concatenate next line */ if (fgets(bufp, len - (bufp - buf), fp) == NULL) break; bufp += strlen(bufp); for (; bufp > buf && (*(bufp - 1) == '\n' || *(bufp - 1) == '\r'); bufp--) *(bufp - 1) = '\0'; folded = FALSE; } else { ungetc(nexthead, fp); break; } } return hnum; } while (1) { nexthead = fgetc(fp); if (nexthead == ' ' || nexthead == '\t') { size_t buflen = strlen(buf); /* concatenate next line */ if ((len - buflen) > 2) { gchar *p = buf + buflen; *p++ = nexthead; *p = '\0'; buflen++; if (fgets(p, len - buflen, fp) == NULL) break; } else break; } else { if (nexthead != EOF) ungetc(nexthead, fp); break; } } /* remove trailing return code */ strretchomp(buf); return hnum; } gchar *procheader_get_unfolded_line(gchar *buf, size_t len, FILE *fp) { gboolean folded = FALSE; gint nexthead; gchar *bufp; if (fgets(buf, len, fp) == NULL) return NULL; if (buf[0] == '\r' || buf[0] == '\n') return NULL; bufp = buf + strlen(buf); for (; bufp > buf && (*(bufp - 1) == '\n' || *(bufp - 1) == '\r'); bufp--) *(bufp - 1) = '\0'; while (1) { nexthead = fgetc(fp); /* folded */ if (nexthead == ' ' || nexthead == '\t') folded = TRUE; else if (nexthead == EOF) break; else if (folded == TRUE) { if ((len - (bufp - buf)) <= 2) break; if (nexthead == '\n') { folded = FALSE; continue; } /* replace return code on the tail end with space */ *bufp++ = ' '; *bufp++ = nexthead; *bufp = '\0'; /* concatenate next line */ if (fgets(bufp, len - (bufp - buf), fp) == NULL) break; bufp += strlen(bufp); for (; bufp > buf && (*(bufp - 1) == '\n' || *(bufp - 1) == '\r'); bufp--) *(bufp - 1) = '\0'; folded = FALSE; } else { ungetc(nexthead, fp); break; } } /* remove trailing return code */ strretchomp(buf); return buf; } GSList *procheader_get_header_list_from_file(const gchar *file) { FILE *fp; GSList *hlist; if ((fp = g_fopen(file, "rb")) == NULL) { FILE_OP_ERROR(file, "fopen"); return NULL; } hlist = procheader_get_header_list(fp); fclose(fp); return hlist; } GSList *procheader_get_header_list(FILE *fp) { gchar buf[BUFFSIZE]; gchar *p; GSList *hlist = NULL; Header *header; g_return_val_if_fail(fp != NULL, NULL); while (procheader_get_unfolded_line(buf, sizeof(buf), fp) != NULL) { if (*buf == ':') continue; for (p = buf; *p && *p != ' '; p++) { if (*p == ':') { header = g_new(Header, 1); header->name = g_strndup(buf, p - buf); p++; while (*p == ' ' || *p == '\t') p++; header->body = conv_unmime_header(p, NULL); hlist = g_slist_append(hlist, header); break; } } } return hlist; } GSList *procheader_get_header_list_from_msginfo(MsgInfo *msginfo) { GSList *hlist = NULL; g_return_val_if_fail(msginfo != NULL, NULL); if (msginfo->subject) hlist = procheader_add_header_list(hlist, "Subject", msginfo->subject); if (msginfo->from) hlist = procheader_add_header_list(hlist, "From", msginfo->from); if (msginfo->to) hlist = procheader_add_header_list(hlist, "To", msginfo->to); if (msginfo->cc) hlist = procheader_add_header_list(hlist, "Cc", msginfo->cc); if (msginfo->newsgroups) hlist = procheader_add_header_list(hlist, "Newsgroups", msginfo->newsgroups); if (msginfo->date) hlist = procheader_add_header_list(hlist, "Date", msginfo->date); return hlist; } GSList *procheader_add_header_list(GSList *hlist, const gchar *header_name, const gchar *body) { Header *header; g_return_val_if_fail(header_name != NULL, hlist); header = g_new(Header, 1); header->name = g_strdup(header_name); header->body = g_strdup(body); return g_slist_append(hlist, header); } GSList *procheader_merge_header_list(GSList *hlist1, GSList *hlist2) { GSList *cur; for (cur = hlist2; cur != NULL; cur = cur->next) { Header *header = (Header *)cur->data; if (procheader_find_header_list(hlist1, header->name) < 0) hlist1 = g_slist_append(hlist1, header); } return hlist1; } gint procheader_find_header_list(GSList *hlist, const gchar *header_name) { GSList *cur; gint index = 0; Header *header; g_return_val_if_fail(header_name != NULL, -1); for (cur = hlist; cur != NULL; cur = cur->next, index++) { header = (Header *)cur->data; if (g_ascii_strcasecmp(header->name, header_name) == 0) return index; } return -1; } GPtrArray *procheader_get_header_array(FILE *fp, const gchar *encoding) { gchar buf[BUFFSIZE]; gchar *p; GPtrArray *headers; Header *header; g_return_val_if_fail(fp != NULL, NULL); headers = g_ptr_array_new(); while (procheader_get_unfolded_line(buf, sizeof(buf), fp) != NULL) { if (*buf == ':') continue; for (p = buf; *p && *p != ' '; p++) { if (*p == ':') { header = g_new(Header, 1); header->name = g_strndup(buf, p - buf); p++; while (*p == ' ' || *p == '\t') p++; header->body = conv_unmime_header(p, encoding); g_ptr_array_add(headers, header); break; } } } return headers; } GPtrArray *procheader_get_header_array_asis(FILE *fp, const gchar *encoding) { gchar buf[BUFFSIZE]; gchar *p; GPtrArray *headers; Header *header; g_return_val_if_fail(fp != NULL, NULL); headers = g_ptr_array_new(); while (procheader_get_one_field(buf, sizeof(buf), fp, NULL) != -1) { if (*buf == ':') continue; for (p = buf; *p && *p != ' '; p++) { if (*p == ':') { header = g_new(Header, 1); header->name = g_strndup(buf, p - buf); p++; header->body = conv_unmime_header(p, encoding); g_ptr_array_add(headers, header); break; } } } return headers; } GPtrArray *procheader_get_header_array_for_display(FILE *fp, const gchar *encoding) { GPtrArray *headers, *sorted_headers; GSList *disphdr_list; Header *header; gint i; g_return_val_if_fail(fp != NULL, NULL); headers = procheader_get_header_array_asis(fp, encoding); sorted_headers = g_ptr_array_new(); for (disphdr_list = prefs_common.disphdr_list; disphdr_list != NULL; disphdr_list = disphdr_list->next) { DisplayHeaderProp *dp = (DisplayHeaderProp *)disphdr_list->data; for (i = 0; i < headers->len; i++) { header = g_ptr_array_index(headers, i); if (!g_ascii_strcasecmp(header->name, dp->name)) { if (dp->hidden) procheader_header_free(header); else g_ptr_array_add(sorted_headers, header); g_ptr_array_remove_index(headers, i); i--; } } } if (prefs_common.show_other_header) { for (i = 0; i < headers->len; i++) { header = g_ptr_array_index(headers, i); g_ptr_array_add(sorted_headers, header); } g_ptr_array_free(headers, TRUE); } else procheader_header_array_destroy(headers); return sorted_headers; } void procheader_header_list_destroy(GSList *hlist) { Header *header; while (hlist != NULL) { header = hlist->data; procheader_header_free(header); hlist = g_slist_remove(hlist, header); } } void procheader_header_array_destroy(GPtrArray *harray) { gint i; Header *header; for (i = 0; i < harray->len; i++) { header = g_ptr_array_index(harray, i); procheader_header_free(header); } g_ptr_array_free(harray, TRUE); } void procheader_header_free(Header *header) { if (!header) return; g_free(header->name); g_free(header->body); g_free(header); } void procheader_get_header_fields(FILE *fp, HeaderEntry hentry[]) { gchar buf[BUFFSIZE]; HeaderEntry *hp; gint hnum; gchar *p; if (hentry == NULL) return; while ((hnum = procheader_get_one_field(buf, sizeof(buf), fp, hentry)) != -1) { hp = hentry + hnum; p = buf + strlen(hp->name); while (*p == ' ' || *p == '\t') p++; if (hp->body == NULL) hp->body = g_strdup(p); else if (!g_ascii_strcasecmp(hp->name, "To:") || !g_ascii_strcasecmp(hp->name, "Cc:")) { gchar *tp = hp->body; hp->body = g_strconcat(tp, ", ", p, NULL); g_free(tp); } } } MsgInfo *procheader_parse_file(const gchar *file, MsgFlags flags, gboolean full) { struct stat s; FILE *fp; MsgInfo *msginfo; if (g_stat(file, &s) < 0) { FILE_OP_ERROR(file, "stat"); return NULL; } if (!S_ISREG(s.st_mode)) return NULL; if ((fp = g_fopen(file, "rb")) == NULL) { FILE_OP_ERROR(file, "fopen"); return NULL; } msginfo = procheader_parse_stream(fp, flags, full); fclose(fp); if (msginfo) { msginfo->size = s.st_size; msginfo->mtime = s.st_mtime; } return msginfo; } MsgInfo *procheader_parse_str(const gchar *str, MsgFlags flags, gboolean full) { FILE *fp; MsgInfo *msginfo; if ((fp = str_open_as_stream(str)) == NULL) return NULL; msginfo = procheader_parse_stream(fp, flags, full); fclose(fp); return msginfo; } enum { H_DATE = 0, H_FROM = 1, H_TO = 2, H_NEWSGROUPS = 3, H_SUBJECT = 4, H_MSG_ID = 5, H_REFERENCES = 6, H_IN_REPLY_TO = 7, H_CONTENT_TYPE = 8, H_SEEN = 9, H_CC = 10, H_X_FACE = 11 }; MsgInfo *procheader_parse_stream(FILE *fp, MsgFlags flags, gboolean full) { static HeaderEntry hentry_full[] = {{"Date:", NULL, FALSE}, {"From:", NULL, TRUE}, {"To:", NULL, TRUE}, {"Newsgroups:", NULL, TRUE}, {"Subject:", NULL, TRUE}, {"Message-Id:", NULL, FALSE}, {"References:", NULL, FALSE}, {"In-Reply-To:", NULL, FALSE}, {"Content-Type:", NULL, FALSE}, {"Seen:", NULL, FALSE}, {"Cc:", NULL, TRUE}, {"X-Face:", NULL, FALSE}, {NULL, NULL, FALSE}}; static HeaderEntry hentry_short[] = {{"Date:", NULL, FALSE}, {"From:", NULL, TRUE}, {"To:", NULL, TRUE}, {"Newsgroups:", NULL, TRUE}, {"Subject:", NULL, TRUE}, {"Message-Id:", NULL, FALSE}, {"References:", NULL, FALSE}, {"In-Reply-To:", NULL, FALSE}, {"Content-Type:", NULL, FALSE}, {"Seen:", NULL, FALSE}, {NULL, NULL, FALSE}}; MsgInfo *msginfo; gchar buf[BUFFSIZE]; gchar *p; gchar *hp; HeaderEntry *hentry; gint hnum; gchar *from = NULL, *to = NULL, *subject = NULL, *cc = NULL; gchar *charset = NULL; hentry = full ? hentry_full : hentry_short; if (MSG_IS_QUEUED(flags)) { while (fgets(buf, sizeof(buf), fp) != NULL) if (buf[0] == '\r' || buf[0] == '\n') break; } msginfo = g_new0(MsgInfo, 1); msginfo->flags = flags; msginfo->references = NULL; msginfo->inreplyto = NULL; while ((hnum = procheader_get_one_field(buf, sizeof(buf), fp, hentry)) != -1) { hp = buf + strlen(hentry[hnum].name); while (*hp == ' ' || *hp == '\t') hp++; switch (hnum) { case H_DATE: if (msginfo->date) break; msginfo->date_t = procheader_date_parse(NULL, hp, 0); msginfo->date = g_strdup(hp); break; case H_FROM: if (from) break; from = g_strdup(hp); break; case H_TO: if (to) { p = to; to = g_strconcat(p, ", ", hp, NULL); g_free(p); } else to = g_strdup(hp); break; case H_NEWSGROUPS: if (msginfo->newsgroups) { p = msginfo->newsgroups; msginfo->newsgroups = g_strconcat(p, ",", hp, NULL); g_free(p); } else msginfo->newsgroups = g_strdup(buf + 12); break; case H_SUBJECT: if (msginfo->subject) break; subject = g_strdup(hp); break; case H_MSG_ID: if (msginfo->msgid) break; extract_parenthesis(hp, '<', '>'); remove_space(hp); msginfo->msgid = g_strdup(hp); break; case H_REFERENCES: msginfo->references = references_list_prepend(msginfo->references, hp); break; case H_IN_REPLY_TO: if (msginfo->inreplyto) break; eliminate_parenthesis(hp, '(', ')'); if ((p = strrchr(hp, '<')) != NULL && strchr(p + 1, '>') != NULL) { extract_parenthesis(p, '<', '>'); remove_space(p); if (*p != '\0') msginfo->inreplyto = g_strdup(p); } break; case H_CONTENT_TYPE: if (!g_ascii_strncasecmp(hp, "multipart", 9)) { MSG_SET_TMP_FLAGS(msginfo->flags, MSG_MIME); } else if (!charset) { procmime_scan_content_type_str (hp, NULL, &charset, NULL, NULL); } break; case H_SEEN: /* mnews Seen header */ MSG_UNSET_PERM_FLAGS(msginfo->flags, MSG_NEW|MSG_UNREAD); break; case H_CC: if (cc) { p = cc; cc = g_strconcat(p, ", ", hp, NULL); g_free(p); } else cc = g_strdup(hp); break; case H_X_FACE: if (msginfo->xface) break; msginfo->xface = g_strdup(hp); break; default: break; } } if (from) { msginfo->from = conv_unmime_header(from, charset); subst_control(msginfo->from, ' '); msginfo->fromname = procheader_get_fromname(msginfo->from); g_free(from); } if (to) { msginfo->to = conv_unmime_header(to, charset); subst_control(msginfo->to, ' '); g_free(to); } if (subject) { msginfo->subject = conv_unmime_header(subject, charset); subst_control(msginfo->subject, ' '); g_free(subject); } if (cc) { msginfo->cc = conv_unmime_header(cc, charset); subst_control(msginfo->cc, ' '); g_free(cc); } if (!msginfo->inreplyto && msginfo->references) msginfo->inreplyto = g_strdup((gchar *)msginfo->references->data); g_free(charset); return msginfo; } gchar *procheader_get_fromname(const gchar *str) { gchar *tmp, *name; Xstrdup_a(tmp, str, return NULL); if (*tmp == '\"') { extract_quote(tmp, '\"'); g_strstrip(tmp); } else if (strchr(tmp, '<')) { eliminate_parenthesis(tmp, '<', '>'); g_strstrip(tmp); if (*tmp == '\0') { strcpy(tmp, str); extract_parenthesis(tmp, '<', '>'); g_strstrip(tmp); } } else if (strchr(tmp, '(')) { extract_parenthesis(tmp, '(', ')'); g_strstrip(tmp); } if (*tmp == '\0') name = g_strdup(str); else name = g_strdup(tmp); return name; } static gint procheader_scan_date_string(const gchar *str, gchar *weekday, gint *day, gchar *month, gint *year, gint *hh, gint *mm, gint *ss, gchar *zone) { gint result; result = sscanf(str, "%10s %d %9s %d %2d:%2d:%2d %5s", weekday, day, month, year, hh, mm, ss, zone); if (result == 8) return 0; result = sscanf(str, "%3s,%d %9s %d %2d:%2d:%2d %5s", weekday, day, month, year, hh, mm, ss, zone); if (result == 8) return 0; result = sscanf(str, "%d %9s %d %2d:%2d:%2d %5s", day, month, year, hh, mm, ss, zone); if (result == 7) return 0; *zone = '\0'; result = sscanf(str, "%10s %d %9s %d %2d:%2d:%2d", weekday, day, month, year, hh, mm, ss); if (result == 7) return 0; result = sscanf(str, "%d %9s %d %2d:%2d:%2d", day, month, year, hh, mm, ss); if (result == 6) return 0; *ss = 0; result = sscanf(str, "%10s %d %9s %d %2d:%2d %5s", weekday, day, month, year, hh, mm, zone); if (result == 7) return 0; result = sscanf(str, "%d %9s %d %2d:%2d %5s", day, month, year, hh, mm, zone); if (result == 6) return 0; *zone = '\0'; result = sscanf(str, "%10s %d %9s %d %2d:%2d", weekday, day, month, year, hh, mm); if (result == 6) return 0; result = sscanf(str, "%d %9s %d %2d:%2d", day, month, year, hh, mm); if (result == 5) return 0; return -1; } time_t procheader_date_parse(gchar *dest, const gchar *src, gint len) { static gchar monthstr[] = "JanFebMarAprMayJunJulAugSepOctNovDec"; gchar weekday[11]; gint day; gchar month[10]; gint year; gint hh, mm, ss; gchar zone[6]; GDateMonth dmonth = G_DATE_BAD_MONTH; struct tm t; gchar *p; time_t timer; time_t tz_offset; if (procheader_scan_date_string(src, weekday, &day, month, &year, &hh, &mm, &ss, zone) < 0) { if (dest && len > 0) strncpy2(dest, src, len); return 0; } /* Y2K compliant :) */ if (year < 1000) { if (year < 50) year += 2000; else year += 1900; } month[3] = '\0'; for (p = monthstr; *p != '\0'; p += 3) { if (!g_ascii_strncasecmp(p, month, 3)) { dmonth = (gint)(p - monthstr) / 3 + 1; break; } } t.tm_sec = ss; t.tm_min = mm; t.tm_hour = hh; t.tm_mday = day; t.tm_mon = dmonth - 1; t.tm_year = year - 1900; t.tm_wday = 0; t.tm_yday = 0; t.tm_isdst = -1; timer = mktime(&t); if (timer == -1) { if (dest) dest[0] = '\0'; return 0; } tz_offset = remote_tzoffset_sec(zone); if (tz_offset != -1) timer += tzoffset_sec(&timer) - tz_offset; if (dest) procheader_date_get_localtime(dest, len, timer); return timer; } void procheader_date_get_localtime(gchar *dest, gint len, const time_t timer) { struct tm *lt; gchar *default_format = "%y/%m/%d(%a) %H:%M"; gchar *tmp, *buf; Xalloca(tmp, len + 1, dest[0] = '\0'; return;); lt = localtime(&timer); if (!lt) { g_warning("can't get localtime of %ld\n", timer); dest[0] = '\0'; return; } if (prefs_common.date_format) strftime(tmp, len, prefs_common.date_format, lt); else strftime(tmp, len, default_format, lt); buf = conv_localetodisp(tmp, NULL); strncpy2(dest, buf, len); g_free(buf); } libsylph-1.1.0/libsylph/procmime.c0000644000175000017500000011430010674355770014102 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2007 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "defs.h" #include #include #include #include #include #include #include "procmime.h" #include "procheader.h" #include "base64.h" #include "quoted-printable.h" #include "uuencode.h" #include "html.h" #include "codeconv.h" #include "utils.h" #include "prefs_common.h" #define MAX_MIME_LEVEL 64 static GHashTable *procmime_get_mime_type_table (void); static GList *procmime_get_mime_type_list (const gchar *file); MimeInfo *procmime_mimeinfo_new(void) { MimeInfo *mimeinfo; mimeinfo = g_new0(MimeInfo, 1); mimeinfo->mime_type = MIME_UNKNOWN; mimeinfo->encoding_type = ENC_UNKNOWN; return mimeinfo; } void procmime_mimeinfo_free_all(MimeInfo *mimeinfo) { while (mimeinfo != NULL) { MimeInfo *next; g_free(mimeinfo->encoding); g_free(mimeinfo->content_type); g_free(mimeinfo->charset); g_free(mimeinfo->name); g_free(mimeinfo->boundary); g_free(mimeinfo->content_disposition); g_free(mimeinfo->filename); g_free(mimeinfo->sigstatus); g_free(mimeinfo->sigstatus_full); procmime_mimeinfo_free_all(mimeinfo->sub); procmime_mimeinfo_free_all(mimeinfo->children); procmime_mimeinfo_free_all(mimeinfo->plaintext); next = mimeinfo->next; g_free(mimeinfo); mimeinfo = next; } } MimeInfo *procmime_mimeinfo_insert(MimeInfo *parent, MimeInfo *mimeinfo) { MimeInfo *child = parent->children; if (!child) parent->children = mimeinfo; else { while (child->next != NULL) child = child->next; child->next = mimeinfo; } mimeinfo->parent = parent; mimeinfo->level = parent->level + 1; return mimeinfo; } #if 0 void procmime_mimeinfo_replace(MimeInfo *old, MimeInfo *new) { MimeInfo *parent = old->parent; MimeInfo *child; g_return_if_fail(parent != NULL); g_return_if_fail(new->next == NULL); for (child = parent->children; child && child != old; child = child->next) ; if (!child) { g_warning("oops: parent can't find it's own child"); return; } procmime_mimeinfo_free_all(old); if (child == parent->children) { new->next = parent->children->next; parent->children = new; } else { new->next = child->next; child = new; } } #endif MimeInfo *procmime_mimeinfo_next(MimeInfo *mimeinfo) { if (!mimeinfo) return NULL; if (mimeinfo->children) return mimeinfo->children; if (mimeinfo->sub) return mimeinfo->sub; if (mimeinfo->next) return mimeinfo->next; if (mimeinfo->main) { mimeinfo = mimeinfo->main; if (mimeinfo->next) return mimeinfo->next; } for (mimeinfo = mimeinfo->parent; mimeinfo != NULL; mimeinfo = mimeinfo->parent) { if (mimeinfo->next) return mimeinfo->next; if (mimeinfo->main) { mimeinfo = mimeinfo->main; if (mimeinfo->next) return mimeinfo->next; } } return NULL; } #if 0 void procmime_dump_mimeinfo(MimeInfo *mimeinfo) { gint i; g_print("\n"); for (; mimeinfo != NULL; mimeinfo = procmime_mimeinfo_next(mimeinfo)) { for (i = 0; i < mimeinfo->level; i++) g_print(" "); g_print("%s%s\n", mimeinfo->main ? "sub: " : "", mimeinfo->content_type); } } #endif MimeInfo *procmime_scan_message(MsgInfo *msginfo) { FILE *fp; MimeInfo *mimeinfo; g_return_val_if_fail(msginfo != NULL, NULL); if ((fp = procmsg_open_message_decrypted(msginfo, &mimeinfo)) == NULL) return NULL; if (mimeinfo) { mimeinfo->size = msginfo->size; mimeinfo->content_size = get_left_file_size(fp); if (mimeinfo->encoding_type == ENC_BASE64) mimeinfo->content_size = mimeinfo->content_size / 4 * 3; if (mimeinfo->mime_type == MIME_MULTIPART || mimeinfo->mime_type == MIME_MESSAGE_RFC822) procmime_scan_multipart_message(mimeinfo, fp); } fclose(fp); return mimeinfo; } void procmime_scan_multipart_message(MimeInfo *mimeinfo, FILE *fp) { gchar *p; gchar *boundary; gint boundary_len = 0; gchar *buf; glong fpos, prev_fpos; g_return_if_fail(mimeinfo != NULL); g_return_if_fail(mimeinfo->mime_type == MIME_MULTIPART || mimeinfo->mime_type == MIME_MESSAGE_RFC822); if (mimeinfo->mime_type == MIME_MULTIPART) { g_return_if_fail(mimeinfo->boundary != NULL); g_return_if_fail(mimeinfo->sub == NULL); } g_return_if_fail(fp != NULL); buf = g_malloc(BUFFSIZE); boundary = mimeinfo->boundary; if (boundary) { boundary_len = strlen(boundary); /* look for first boundary */ while ((p = fgets(buf, BUFFSIZE, fp)) != NULL) if (IS_BOUNDARY(buf, boundary, boundary_len)) break; if (!p) { g_free(buf); return; } } else if (mimeinfo->parent && mimeinfo->parent->boundary) { boundary = mimeinfo->parent->boundary; boundary_len = strlen(boundary); } if ((fpos = ftell(fp)) < 0) { perror("ftell"); g_free(buf); return; } debug_print("level = %d\n", mimeinfo->level); for (;;) { MimeInfo *partinfo; gboolean eom = FALSE; glong content_pos; gboolean is_base64; gint len; guint b64_content_len = 0; gint b64_pad_len = 0; prev_fpos = fpos; debug_print("prev_fpos: %ld\n", fpos); /* scan part header */ if (mimeinfo->mime_type == MIME_MESSAGE_RFC822) { MimeInfo *sub; mimeinfo->sub = sub = procmime_scan_mime_header(fp); if (!sub) break; debug_print("message/rfc822 part (content-type: %s)\n", sub->content_type); sub->level = mimeinfo->level + 1; sub->parent = mimeinfo->parent; sub->main = mimeinfo; partinfo = sub; } else { partinfo = procmime_scan_mime_header(fp); if (!partinfo) break; procmime_mimeinfo_insert(mimeinfo, partinfo); debug_print("content-type: %s\n", partinfo->content_type); } /* begin content */ content_pos = ftell(fp); debug_print("content_pos: %ld\n", content_pos); if (partinfo->mime_type == MIME_MULTIPART || partinfo->mime_type == MIME_MESSAGE_RFC822) { if (partinfo->level < MAX_MIME_LEVEL) procmime_scan_multipart_message(partinfo, fp); } /* look for next boundary */ buf[0] = '\0'; is_base64 = partinfo->encoding_type == ENC_BASE64; while ((p = fgets(buf, BUFFSIZE, fp)) != NULL) { if (IS_BOUNDARY(buf, boundary, boundary_len)) { if (buf[2 + boundary_len] == '-' && buf[2 + boundary_len + 1] == '-') eom = TRUE; break; } else if (is_base64) { const gchar *s; for (s = buf; *s && *s != '\r' && *s != '\n'; ++s) if (*s == '=') ++b64_pad_len; b64_content_len += s - buf; } } if (p == NULL) { /* broken MIME, or single part MIME message */ buf[0] = '\0'; eom = TRUE; } debug_print("boundary: %s\n", buf); fpos = ftell(fp); debug_print("fpos: %ld\n", fpos); len = strlen(buf); partinfo->size = fpos - prev_fpos - len; if (is_base64) partinfo->content_size = b64_content_len / 4 * 3 - b64_pad_len; else partinfo->content_size = fpos - content_pos - len; debug_print("partinfo->size: %d\n", partinfo->size); debug_print("partinfo->content_size: %d\n", partinfo->content_size); if (partinfo->sub && !partinfo->sub->sub && !partinfo->sub->children) { partinfo->sub->size = fpos - partinfo->sub->fpos - strlen(buf); debug_print("partinfo->sub->size: %d\n", partinfo->sub->size); } if (mimeinfo->mime_type == MIME_MESSAGE_RFC822) { if (len > 0 && fseek(fp, fpos - len, SEEK_SET) < 0) perror("fseek"); break; } if (eom) break; } g_free(buf); } void procmime_scan_encoding(MimeInfo *mimeinfo, const gchar *encoding) { gchar *buf; Xstrdup_a(buf, encoding, return); g_free(mimeinfo->encoding); mimeinfo->encoding = g_strdup(g_strstrip(buf)); if (!g_ascii_strcasecmp(buf, "7bit")) mimeinfo->encoding_type = ENC_7BIT; else if (!g_ascii_strcasecmp(buf, "8bit")) mimeinfo->encoding_type = ENC_8BIT; else if (!g_ascii_strcasecmp(buf, "quoted-printable")) mimeinfo->encoding_type = ENC_QUOTED_PRINTABLE; else if (!g_ascii_strcasecmp(buf, "base64")) mimeinfo->encoding_type = ENC_BASE64; else if (!g_ascii_strcasecmp(buf, "x-uuencode")) mimeinfo->encoding_type = ENC_X_UUENCODE; else mimeinfo->encoding_type = ENC_UNKNOWN; } void procmime_scan_content_type(MimeInfo *mimeinfo, const gchar *content_type) { g_free(mimeinfo->content_type); g_free(mimeinfo->charset); g_free(mimeinfo->name); g_free(mimeinfo->boundary); mimeinfo->content_type = NULL; mimeinfo->charset = NULL; mimeinfo->name = NULL; mimeinfo->boundary = NULL; procmime_scan_content_type_str(content_type, &mimeinfo->content_type, &mimeinfo->charset, &mimeinfo->name, &mimeinfo->boundary); mimeinfo->mime_type = procmime_scan_mime_type(mimeinfo->content_type); if (mimeinfo->mime_type == MIME_MULTIPART && !mimeinfo->boundary) mimeinfo->mime_type = MIME_TEXT; } typedef struct { gchar *name; gchar *value; } MimeParam; typedef struct { gchar *hvalue; GSList *plist; } MimeParams; static gchar *procmime_find_parameter_delimiter(const gchar *param, const gchar **eq) { register const gchar *p = param; gboolean quoted = FALSE; const gchar *delim = NULL; while (*p) { if (*p == '=') break; else if (*p == ';' || *p == '\r' || *p == '\n') { delim = p; break; } ++p; } if (*p != '=') { *eq = NULL; return (gchar *)delim; } *eq = p; ++p; while (g_ascii_isspace(*p)) ++p; if (*p == '"') { quoted = TRUE; ++p; } while (*p) { if (quoted == TRUE) { if (*p == '"') quoted = FALSE; } else if (*p == ';' || *p == '\r' || *p == '\n') { delim = p; break; } ++p; } return (gchar *)delim; } static gchar *procmime_convert_value(const gchar *value, const gchar *charset) { if (charset) { gchar *utf8_value; utf8_value = conv_codeset_strdup(value, charset, CS_INTERNAL); if (utf8_value) return utf8_value; } return g_strdup(value); } static MimeParams *procmime_parse_mime_parameter(const gchar *str) { gchar *hvalue; gchar *param, *name, *value; gchar *charset = NULL, *lang = NULL; const gchar *p, *delim; gint count, prev_count; gchar *cont_name; gchar *cont_value; MimeParam *mparam; MimeParams *mparams; GSList *plist = NULL; if ((p = strchr(str, ';'))) hvalue = g_strndup(str, p - str); else hvalue = g_strdup(str); g_strstrip(hvalue); mparams = g_new(MimeParams, 1); mparams->hvalue = hvalue; mparams->plist = NULL; if (!p) return mparams; ++p; count = prev_count = -1; cont_name = cont_value = NULL; for (;;) { gboolean encoded = FALSE; gchar *begin; gchar *dec_value; const gchar *eq; gchar *ast = NULL; while (*p == ';' || g_ascii_isspace(*p)) ++p; if (*p == '\0') break; delim = procmime_find_parameter_delimiter(p, &eq); if (!eq) break; if (delim) param = g_strndup(p, delim - p); else param = g_strdup(p); name = g_strndup(p, eq - p); g_strchomp(name); if (*name != '*' && (ast = strchr(name, '*'))) { const gchar *next = ast + 1; if (*next == '\0') { encoded = TRUE; } else if (g_ascii_isdigit(*next)) { count = atoi(next); while (g_ascii_isdigit(*next)) ++next; if (*next == '*') encoded = TRUE; if (prev_count + 1 != count) { g_warning("procmime_parse_mime_parameter(): invalid count: %s\n", str); g_free(name); g_free(param); break; } } else { g_warning("procmime_parse_mime_parameter(): invalid name: %s\n", str); g_free(name); g_free(param); break; } *ast = '\0'; } value = g_strdup(param + (eq - p) + 1); g_strstrip(value); if (*value == '"') extract_quote(value, '"'); begin = value; if (encoded) { gchar *sq1, *sq2; if ((sq1 = strchr(value, '\''))) { if (sq1 > value) { if (charset) g_free(charset); charset = g_strndup(value, sq1 - value); } if ((sq2 = strchr(sq1 + 1, '\''))) { if (sq2 > sq1 + 1) { if (lang) g_free(lang); lang = g_strndup(sq1 + 1, sq2 - sq1 - 1); } begin = sq2 + 1; } } } #define CONCAT_CONT_VALUE(s) \ { \ if (cont_value) { \ gchar *tmp; \ tmp = g_strconcat(cont_value, s, NULL); \ g_free(cont_value); \ cont_value = tmp; \ } else \ cont_value = g_strdup(s); \ } if (count >= 0) { if (count > 0 && cont_name) { if (strcmp(cont_name, name) != 0) { g_warning("procmime_parse_mime_parameter(): mismatch parameter name: %s\n", str); g_free(name); g_free(value); g_free(param); break; } } else cont_name = g_strdup(name); if (encoded) { dec_value = g_malloc(strlen(begin) + 1); decode_xdigit_encoded_str(dec_value, begin); CONCAT_CONT_VALUE(dec_value); g_free(dec_value); } else { CONCAT_CONT_VALUE(begin); } } #undef CONCAT_CONT_VALUE if (count == -1 && cont_name && cont_value) { mparam = g_new(MimeParam, 1); mparam->name = cont_name; cont_name = NULL; mparam->value = procmime_convert_value (cont_value, charset); g_free(cont_value); cont_value = NULL; plist = g_slist_prepend(plist, mparam); } if (count == -1) { mparam = g_new(MimeParam, 1); mparam->name = name; if (encoded) { dec_value = g_malloc(strlen(begin) + 1); decode_xdigit_encoded_str(dec_value, begin); mparam->value = procmime_convert_value (dec_value, charset); g_free(dec_value); } else { if (!ast && (!g_ascii_strcasecmp(name, "name") || !g_ascii_strcasecmp(name, "filename"))) mparam->value = conv_unmime_header(begin, NULL); else mparam->value = g_strdup(begin); } name = NULL; plist = g_slist_prepend(plist, mparam); } g_free(name); g_free(value); g_free(param); prev_count = count; count = -1; if (delim) p = delim + 1; else break; } if (cont_name && cont_value) { mparam = g_new(MimeParam, 1); mparam->name = cont_name; cont_name = NULL; mparam->value = procmime_convert_value(cont_value, charset); plist = g_slist_prepend(plist, mparam); } g_free(cont_name); g_free(cont_value); g_free(lang); g_free(charset); plist = g_slist_reverse(plist); mparams->plist = plist; return mparams; } static void procmime_mime_params_free(MimeParams *mparams) { GSList *cur; if (!mparams) return; g_free(mparams->hvalue); for (cur = mparams->plist; cur != NULL; cur = cur->next) { MimeParam *mparam = (MimeParam *)cur->data; g_free(mparam->name); g_free(mparam->value); g_free(mparam); } g_slist_free(mparams->plist); g_free(mparams); } void procmime_scan_content_type_str(const gchar *content_type, gchar **mime_type, gchar **charset, gchar **name, gchar **boundary) { MimeParams *mparams; GSList *cur; mparams = procmime_parse_mime_parameter(content_type); if (mime_type) *mime_type = g_strdup(mparams->hvalue); for (cur = mparams->plist; cur != NULL; cur = cur->next) { MimeParam *param = (MimeParam *)cur->data; if (charset && !g_ascii_strcasecmp(param->name, "charset")) { *charset = g_strdup(param->value); charset = NULL; } else if (name && !g_ascii_strcasecmp(param->name, "name")) { *name = g_strdup(param->value); name = NULL; } else if (boundary && !g_ascii_strcasecmp(param->name, "boundary")) { *boundary = g_strdup(param->value); boundary = NULL; } } procmime_mime_params_free(mparams); } void procmime_scan_content_disposition(MimeInfo *mimeinfo, const gchar *content_disposition) { MimeParams *mparams; GSList *cur; mparams = procmime_parse_mime_parameter(content_disposition); mimeinfo->content_disposition = g_strdup(mparams->hvalue); for (cur = mparams->plist; cur != NULL; cur = cur->next) { MimeParam *param = (MimeParam *)cur->data; if (!g_ascii_strcasecmp(param->name, "filename")) { mimeinfo->filename = g_strdup(param->value); break; } } procmime_mime_params_free(mparams); } enum { H_CONTENT_TRANSFER_ENCODING = 0, H_CONTENT_TYPE = 1, H_CONTENT_DISPOSITION = 2 }; MimeInfo *procmime_scan_mime_header(FILE *fp) { static HeaderEntry hentry[] = {{"Content-Transfer-Encoding:", NULL, FALSE}, {"Content-Type:", NULL, TRUE}, {"Content-Disposition:", NULL, TRUE}, {NULL, NULL, FALSE}}; gchar buf[BUFFSIZE]; gint hnum; HeaderEntry *hp; MimeInfo *mimeinfo; g_return_val_if_fail(fp != NULL, NULL); mimeinfo = procmime_mimeinfo_new(); mimeinfo->mime_type = MIME_TEXT; mimeinfo->encoding_type = ENC_7BIT; mimeinfo->fpos = ftell(fp); while ((hnum = procheader_get_one_field(buf, sizeof(buf), fp, hentry)) != -1) { hp = hentry + hnum; if (H_CONTENT_TRANSFER_ENCODING == hnum) { procmime_scan_encoding (mimeinfo, buf + strlen(hp->name)); } else if (H_CONTENT_TYPE == hnum) { procmime_scan_content_type (mimeinfo, buf + strlen(hp->name)); } else if (H_CONTENT_DISPOSITION == hnum) { procmime_scan_content_disposition (mimeinfo, buf + strlen(hp->name)); } } if (mimeinfo->mime_type == MIME_APPLICATION_OCTET_STREAM && mimeinfo->name) { const gchar *type; type = procmime_get_mime_type(mimeinfo->name); if (type) mimeinfo->mime_type = procmime_scan_mime_type(type); } if (!mimeinfo->content_type) mimeinfo->content_type = g_strdup("text/plain"); return mimeinfo; } FILE *procmime_decode_content(FILE *outfp, FILE *infp, MimeInfo *mimeinfo) { gchar buf[BUFFSIZE]; gchar *boundary = NULL; gint boundary_len = 0; gboolean tmp_file = FALSE; gboolean normalize_lbreak = FALSE; ContentType content_type; g_return_val_if_fail(infp != NULL, NULL); g_return_val_if_fail(mimeinfo != NULL, NULL); if (!outfp) { outfp = my_tmpfile(); if (!outfp) { perror("tmpfile"); return NULL; } tmp_file = TRUE; } if (mimeinfo->parent && mimeinfo->parent->boundary) { boundary = mimeinfo->parent->boundary; boundary_len = strlen(boundary); } content_type = procmime_scan_mime_type(mimeinfo->content_type); if (content_type == MIME_TEXT || content_type == MIME_TEXT_HTML) { normalize_lbreak = TRUE; } if (mimeinfo->encoding_type == ENC_QUOTED_PRINTABLE) { FILE *tmpfp = outfp; if (normalize_lbreak) { tmpfp = my_tmpfile(); if (!tmpfp) { perror("tmpfile"); if (tmp_file) fclose(outfp); return NULL; } } while (fgets(buf, sizeof(buf), infp) != NULL && (!boundary || !IS_BOUNDARY(buf, boundary, boundary_len))) { gint len; len = qp_decode_line(buf); fwrite(buf, len, 1, tmpfp); } if (normalize_lbreak) { if (fflush(tmpfp) == EOF) { perror("fflush"); fclose(tmpfp); if (tmp_file) fclose(outfp); return NULL; } rewind(tmpfp); while (fgets(buf, sizeof(buf), tmpfp) != NULL) { #ifdef G_OS_WIN32 strretchomp(buf); fputs(buf, outfp); fputs("\r\n", outfp); #else strcrchomp(buf); fputs(buf, outfp); #endif } fclose(tmpfp); } } else if (mimeinfo->encoding_type == ENC_BASE64) { gchar outbuf[BUFFSIZE]; gint len; Base64Decoder *decoder; FILE *tmpfp = outfp; if (normalize_lbreak) { tmpfp = my_tmpfile(); if (!tmpfp) { perror("tmpfile"); if (tmp_file) fclose(outfp); return NULL; } } decoder = base64_decoder_new(); while (fgets(buf, sizeof(buf), infp) != NULL && (!boundary || !IS_BOUNDARY(buf, boundary, boundary_len))) { len = base64_decoder_decode(decoder, buf, (guchar *)outbuf); if (len < 0) { g_warning("Bad BASE64 content\n"); break; } fwrite(outbuf, sizeof(gchar), len, tmpfp); } base64_decoder_free(decoder); if (normalize_lbreak) { if (fflush(tmpfp) == EOF) { perror("fflush"); fclose(tmpfp); if (tmp_file) fclose(outfp); return NULL; } rewind(tmpfp); while (fgets(buf, sizeof(buf), tmpfp) != NULL) { #ifdef G_OS_WIN32 strretchomp(buf); fputs(buf, outfp); fputs("\r\n", outfp); #else strcrchomp(buf); fputs(buf, outfp); #endif } fclose(tmpfp); } } else if (mimeinfo->encoding_type == ENC_X_UUENCODE) { gchar outbuf[BUFFSIZE]; gint len; gboolean flag = FALSE; while (fgets(buf, sizeof(buf), infp) != NULL && (!boundary || !IS_BOUNDARY(buf, boundary, boundary_len))) { if(!flag && strncmp(buf,"begin ", 6)) continue; if (flag) { len = fromuutobits(outbuf, buf); if (len <= 0) { if (len < 0) g_warning("Bad UUENCODE content(%d)\n", len); break; } fwrite(outbuf, sizeof(gchar), len, outfp); } else flag = TRUE; } } else { while (fgets(buf, sizeof(buf), infp) != NULL && (!boundary || !IS_BOUNDARY(buf, boundary, boundary_len))) { if (normalize_lbreak) { #ifdef G_OS_WIN32 strretchomp(buf); fputs(buf, outfp); fputs("\r\n", outfp); #else strcrchomp(buf); fputs(buf, outfp); #endif } else fputs(buf, outfp); } } if (fflush(outfp) == EOF) perror("fflush"); if (ferror(outfp) != 0) { g_warning("procmime_decode_content(): Can't write to temporary file\n"); if (tmp_file) fclose(outfp); return NULL; } if (tmp_file) rewind(outfp); return outfp; } gint procmime_get_part(const gchar *outfile, const gchar *infile, MimeInfo *mimeinfo) { FILE *infp; gint ret; g_return_val_if_fail(outfile != NULL, -1); g_return_val_if_fail(infile != NULL, -1); g_return_val_if_fail(mimeinfo != NULL, -1); if ((infp = g_fopen(infile, "rb")) == NULL) { FILE_OP_ERROR(infile, "fopen"); return -1; } ret = procmime_get_part_fp(outfile, infp, mimeinfo); fclose(infp); return ret; } gint procmime_get_part_fp(const gchar *outfile, FILE *infp, MimeInfo *mimeinfo) { FILE *outfp; gchar buf[BUFFSIZE]; g_return_val_if_fail(outfile != NULL, -1); g_return_val_if_fail(infp != NULL, -1); g_return_val_if_fail(mimeinfo != NULL, -1); if (fseek(infp, mimeinfo->fpos, SEEK_SET) < 0) { FILE_OP_ERROR("procmime_get_part_fp()", "fseek"); return -1; } if ((outfp = g_fopen(outfile, "wb")) == NULL) { FILE_OP_ERROR(outfile, "fopen"); return -1; } while (fgets(buf, sizeof(buf), infp) != NULL) if (buf[0] == '\r' || buf[0] == '\n') break; if (procmime_decode_content(outfp, infp, mimeinfo) == NULL) { fclose(outfp); g_unlink(outfile); return -1; } if (fclose(outfp) == EOF) { FILE_OP_ERROR(outfile, "fclose"); g_unlink(outfile); return -1; } return 0; } gint procmime_get_all_parts(const gchar *dir, const gchar *infile, MimeInfo *mimeinfo) { FILE *fp; MimeInfo *partinfo; gchar *base, *filename; g_return_val_if_fail(dir != NULL, -1); g_return_val_if_fail(infile != NULL, -1); g_return_val_if_fail(mimeinfo != NULL, -1); if (!is_dir_exist(dir)) { g_warning("%s: directory not exist.\n", dir); return -1; } if ((fp = g_fopen(infile, "rb")) == NULL) { FILE_OP_ERROR(infile, "fopen"); return -1; } for (partinfo = mimeinfo; partinfo != NULL; partinfo = procmime_mimeinfo_next(partinfo)) { if (partinfo->filename || partinfo->name) { gint count = 1; base = procmime_get_part_file_name(partinfo); filename = g_strconcat(dir, G_DIR_SEPARATOR_S, base, NULL); while (is_file_entry_exist(filename)) { gchar *base_alt; base_alt = get_alt_filename(base, count++); g_free(filename); filename = g_strconcat (dir, G_DIR_SEPARATOR_S, base_alt, NULL); g_free(base_alt); } procmime_get_part_fp(filename, fp, partinfo); g_free(filename); g_free(base); } } fclose(fp); return 0; } FILE *procmime_get_text_content(MimeInfo *mimeinfo, FILE *infp, const gchar *encoding) { FILE *tmpfp, *outfp; const gchar *src_encoding; gboolean conv_fail = FALSE; gchar buf[BUFFSIZE]; g_return_val_if_fail(mimeinfo != NULL, NULL); g_return_val_if_fail(infp != NULL, NULL); g_return_val_if_fail(mimeinfo->mime_type == MIME_TEXT || mimeinfo->mime_type == MIME_TEXT_HTML, NULL); if (fseek(infp, mimeinfo->fpos, SEEK_SET) < 0) { perror("fseek"); return NULL; } while (fgets(buf, sizeof(buf), infp) != NULL) if (buf[0] == '\r' || buf[0] == '\n') break; tmpfp = procmime_decode_content(NULL, infp, mimeinfo); if (!tmpfp) return NULL; if ((outfp = my_tmpfile()) == NULL) { perror("tmpfile"); fclose(tmpfp); return NULL; } src_encoding = prefs_common.force_charset ? prefs_common.force_charset : mimeinfo->charset ? mimeinfo->charset : prefs_common.default_encoding; if (mimeinfo->mime_type == MIME_TEXT) { while (fgets(buf, sizeof(buf), tmpfp) != NULL) { gchar *str; str = conv_codeset_strdup(buf, src_encoding, encoding); if (str) { fputs(str, outfp); g_free(str); } else { conv_fail = TRUE; fputs(buf, outfp); } } } else if (mimeinfo->mime_type == MIME_TEXT_HTML) { HTMLParser *parser; CodeConverter *conv; const gchar *str; conv = conv_code_converter_new(src_encoding, encoding); parser = html_parser_new(tmpfp, conv); while ((str = html_parse(parser)) != NULL) { fputs(str, outfp); } html_parser_destroy(parser); conv_code_converter_destroy(conv); } if (conv_fail) g_warning(_("procmime_get_text_content(): Code conversion failed.\n")); fclose(tmpfp); if (fflush(outfp) == EOF) { perror("fflush"); fclose(outfp); return NULL; } rewind(outfp); return outfp; } /* search the first text part of (multipart) MIME message, decode, convert it and output to outfp. */ FILE *procmime_get_first_text_content(MsgInfo *msginfo, const gchar *encoding) { FILE *infp, *outfp = NULL; MimeInfo *mimeinfo, *partinfo; g_return_val_if_fail(msginfo != NULL, NULL); mimeinfo = procmime_scan_message(msginfo); if (!mimeinfo) return NULL; if ((infp = procmsg_open_message(msginfo)) == NULL) { procmime_mimeinfo_free_all(mimeinfo); return NULL; } partinfo = mimeinfo; while (partinfo && partinfo->mime_type != MIME_TEXT) partinfo = procmime_mimeinfo_next(partinfo); if (!partinfo) { partinfo = mimeinfo; while (partinfo && partinfo->mime_type != MIME_TEXT_HTML) partinfo = procmime_mimeinfo_next(partinfo); } if (partinfo) outfp = procmime_get_text_content(partinfo, infp, encoding); fclose(infp); procmime_mimeinfo_free_all(mimeinfo); return outfp; } gboolean procmime_find_string_part(MimeInfo *mimeinfo, const gchar *filename, const gchar *str, StrFindFunc find_func) { FILE *infp, *outfp; gchar buf[BUFFSIZE]; g_return_val_if_fail(mimeinfo != NULL, FALSE); g_return_val_if_fail(mimeinfo->mime_type == MIME_TEXT || mimeinfo->mime_type == MIME_TEXT_HTML, FALSE); g_return_val_if_fail(str != NULL, FALSE); g_return_val_if_fail(find_func != NULL, FALSE); if ((infp = g_fopen(filename, "rb")) == NULL) { FILE_OP_ERROR(filename, "fopen"); return FALSE; } outfp = procmime_get_text_content(mimeinfo, infp, NULL); fclose(infp); if (!outfp) return FALSE; while (fgets(buf, sizeof(buf), outfp) != NULL) { strretchomp(buf); if (find_func(buf, str)) { fclose(outfp); return TRUE; } } fclose(outfp); return FALSE; } gboolean procmime_find_string(MsgInfo *msginfo, const gchar *str, StrFindFunc find_func) { MimeInfo *mimeinfo; MimeInfo *partinfo; gchar *filename; gboolean found = FALSE; g_return_val_if_fail(msginfo != NULL, FALSE); g_return_val_if_fail(str != NULL, FALSE); g_return_val_if_fail(find_func != NULL, FALSE); filename = procmsg_get_message_file(msginfo); if (!filename) return FALSE; mimeinfo = procmime_scan_message(msginfo); for (partinfo = mimeinfo; partinfo != NULL; partinfo = procmime_mimeinfo_next(partinfo)) { if (partinfo->mime_type == MIME_TEXT || partinfo->mime_type == MIME_TEXT_HTML) { if (procmime_find_string_part (partinfo, filename, str, find_func) == TRUE) { found = TRUE; break; } } } procmime_mimeinfo_free_all(mimeinfo); g_free(filename); return found; } gchar *procmime_get_part_file_name(MimeInfo *mimeinfo) { gchar *base; const gchar *base_; base_ = mimeinfo->filename ? mimeinfo->filename : mimeinfo->name ? mimeinfo->name : "mimetmp"; base_ = g_basename(base_); if (*base_ == '\0') base_ = "mimetmp"; base = conv_filename_from_utf8(base_); subst_for_filename(base); return base; } gchar *procmime_get_tmp_file_name(MimeInfo *mimeinfo) { static guint32 id = 0; gchar *base; gchar *filename; gchar f_prefix[10]; g_return_val_if_fail(mimeinfo != NULL, NULL); g_snprintf(f_prefix, sizeof(f_prefix), "%08x.", id++); if (MIME_TEXT_HTML == mimeinfo->mime_type) base = g_strdup("mimetmp.html"); else base = procmime_get_part_file_name(mimeinfo); filename = g_strconcat(get_mime_tmp_dir(), G_DIR_SEPARATOR_S, f_prefix, base, NULL); g_free(base); return filename; } ContentType procmime_scan_mime_type(const gchar *mime_type) { ContentType type; if (!g_ascii_strncasecmp(mime_type, "text/html", 9)) type = MIME_TEXT_HTML; else if (!g_ascii_strncasecmp(mime_type, "text/", 5)) type = MIME_TEXT; else if (!g_ascii_strncasecmp(mime_type, "message/rfc822", 14)) type = MIME_MESSAGE_RFC822; else if (!g_ascii_strncasecmp(mime_type, "message/", 8)) type = MIME_TEXT; else if (!g_ascii_strncasecmp(mime_type, "application/octet-stream", 24)) type = MIME_APPLICATION_OCTET_STREAM; else if (!g_ascii_strncasecmp(mime_type, "application/", 12)) type = MIME_APPLICATION; else if (!g_ascii_strncasecmp(mime_type, "multipart/", 10)) type = MIME_MULTIPART; else if (!g_ascii_strncasecmp(mime_type, "image/", 6)) type = MIME_IMAGE; else if (!g_ascii_strncasecmp(mime_type, "audio/", 6)) type = MIME_AUDIO; else if (!g_ascii_strncasecmp(mime_type, "video/", 6)) type = MIME_VIDEO; else if (!g_ascii_strcasecmp(mime_type, "text")) type = MIME_TEXT; else type = MIME_UNKNOWN; return type; } static GList *mime_type_list = NULL; gchar *procmime_get_mime_type(const gchar *filename) { static GHashTable *mime_type_table = NULL; MimeType *mime_type; const gchar *p; gchar *ext; static gboolean no_mime_type_table = FALSE; if (no_mime_type_table) return NULL; if (!mime_type_table) { mime_type_table = procmime_get_mime_type_table(); if (!mime_type_table) { no_mime_type_table = TRUE; return NULL; } } filename = g_basename(filename); p = strrchr(filename, '.'); if (!p) return NULL; Xstrdup_a(ext, p + 1, return NULL); g_strdown(ext); mime_type = g_hash_table_lookup(mime_type_table, ext); if (mime_type) { gchar *str; str = g_strconcat(mime_type->type, "/", mime_type->sub_type, NULL); return str; } return NULL; } static GHashTable *procmime_get_mime_type_table(void) { GHashTable *table = NULL; GList *cur; MimeType *mime_type; gchar **exts; if (!mime_type_list) { GList *list; gchar *dir; #ifdef G_OS_WIN32 dir = g_strconcat(get_startup_dir(), G_DIR_SEPARATOR_S "etc" G_DIR_SEPARATOR_S "mime.types", NULL); mime_type_list = procmime_get_mime_type_list(dir); g_free(dir); #else mime_type_list = procmime_get_mime_type_list(SYSCONFDIR "/mime.types"); if (!mime_type_list) mime_type_list = procmime_get_mime_type_list("/etc/mime.types"); #endif dir = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, "mime.types", NULL); list = procmime_get_mime_type_list(dir); g_free(dir); mime_type_list = g_list_concat(mime_type_list, list); if (!mime_type_list) { debug_print("mime.types not found\n"); return NULL; } } table = g_hash_table_new(g_str_hash, g_str_equal); for (cur = mime_type_list; cur != NULL; cur = cur->next) { gint i; gchar *key; mime_type = (MimeType *)cur->data; if (!mime_type->extension) continue; exts = g_strsplit(mime_type->extension, " ", 16); for (i = 0; exts[i] != NULL; i++) { /* make the key case insensitive */ g_strdown(exts[i]); /* use previously dup'd key on overwriting */ if (g_hash_table_lookup(table, exts[i])) key = exts[i]; else key = g_strdup(exts[i]); g_hash_table_insert(table, key, mime_type); } g_strfreev(exts); } return table; } static GList *procmime_get_mime_type_list(const gchar *file) { GList *list = NULL; FILE *fp; gchar buf[BUFFSIZE]; gchar *p; gchar *delim; MimeType *mime_type; if ((fp = g_fopen(file, "rb")) == NULL) return NULL; debug_print("Reading %s ...\n", file); while (fgets(buf, sizeof(buf), fp) != NULL) { p = strchr(buf, '#'); if (p) *p = '\0'; g_strstrip(buf); p = buf; while (*p && !g_ascii_isspace(*p)) p++; if (*p) { *p = '\0'; p++; } delim = strchr(buf, '/'); if (delim == NULL) continue; *delim = '\0'; mime_type = g_new(MimeType, 1); mime_type->type = g_strdup(buf); mime_type->sub_type = g_strdup(delim + 1); while (*p && g_ascii_isspace(*p)) p++; if (*p) mime_type->extension = g_strdup(p); else mime_type->extension = NULL; list = g_list_append(list, mime_type); } fclose(fp); if (!list) g_warning("Can't read mime.types\n"); return list; } static GList *mailcap_list = NULL; static GList *procmime_parse_mailcap(const gchar *file) { GList *list = NULL; FILE *fp; gchar buf[BUFFSIZE]; MailCap *mailcap; if ((fp = g_fopen(file, "rb")) == NULL) return NULL; while (fgets(buf, sizeof(buf), fp) != NULL) { gint i; gchar *p; gchar **strv; p = strchr(buf, '#'); if (p) *p = '\0'; g_strstrip(buf); strv = strsplit_with_quote(buf, ";", 0); if (!strv) continue; for (i = 0; strv[i] != NULL; ++i) g_strstrip(strv[i]); if (!strv[0] || *strv[0] == '\0' || !strv[1] || *strv[1] == '\0') { g_strfreev(strv); continue; } mailcap = g_new(MailCap, 1); mailcap->mime_type = g_strdup(strv[0]); mailcap->cmdline_fmt = g_strdup(strv[1]); mailcap->needs_terminal = FALSE; for (i = 0; strv[i] != NULL; ++i) { if (strcmp(strv[i], "needsterminal") == 0) mailcap->needs_terminal = TRUE; } g_strfreev(strv); list = g_list_append(list, mailcap); } return list; } gint procmime_execute_open_file(const gchar *file, const gchar *mime_type) { gchar *mime_type_ = NULL; GList *cur; MailCap *mailcap; gchar *cmdline; gint ret = -1; static gboolean mailcap_list_init = FALSE; g_return_val_if_fail(file != NULL, -1); if (!mime_type || g_ascii_strcasecmp(mime_type, "application/octet-stream") == 0) { gchar *tmp; tmp = procmime_get_mime_type(file); if (!tmp) return -1; mime_type_ = g_ascii_strdown(tmp, -1); g_free(tmp); } else mime_type_ = g_ascii_strdown(mime_type, -1); if (!mailcap_list_init && !mailcap_list) { GList *list; gchar *path; path = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, "mailcap", NULL); mailcap_list = procmime_parse_mailcap(path); g_free(path); #ifdef G_OS_WIN32 path = g_strconcat(get_startup_dir(), G_DIR_SEPARATOR_S "etc" G_DIR_SEPARATOR_S "mailcap", NULL); list = procmime_parse_mailcap(path); g_free(path); #else if (!mailcap_list) { path = g_strconcat(get_home_dir(), G_DIR_SEPARATOR_S, ".mailcap", NULL); mailcap_list = procmime_parse_mailcap(path); g_free(path); } list = procmime_parse_mailcap(SYSCONFDIR "/mailcap"); if (!list) list = procmime_parse_mailcap("/etc/mailcap"); #endif mailcap_list = g_list_concat(mailcap_list, list); mailcap_list_init = TRUE; } for (cur = mailcap_list; cur != NULL; cur = cur->next) { mailcap = (MailCap *)cur->data; if (!g_pattern_match_simple(mailcap->mime_type, mime_type_)) continue; if (mailcap->needs_terminal) continue; if (str_find_format_times(mailcap->cmdline_fmt, 's') == 1) cmdline = g_strdup_printf(mailcap->cmdline_fmt, file); else cmdline = g_strconcat(mailcap->cmdline_fmt, " \"", file, "\"", NULL); ret = execute_command_line(cmdline, TRUE); g_free(cmdline); break; } g_free(mime_type_); return ret; } EncodingType procmime_get_encoding_for_charset(const gchar *charset) { if (!charset) return ENC_8BIT; else if (!g_ascii_strncasecmp(charset, "ISO-2022-", 9) || !g_ascii_strcasecmp(charset, "US-ASCII")) return ENC_7BIT; else if (!g_ascii_strcasecmp(charset, "ISO-8859-5") || !g_ascii_strncasecmp(charset, "KOI8-", 5) || !g_ascii_strcasecmp(charset, "Windows-1251")) return ENC_8BIT; else if (!g_ascii_strncasecmp(charset, "ISO-8859-", 9)) return ENC_QUOTED_PRINTABLE; else return ENC_8BIT; } EncodingType procmime_get_encoding_for_text_file(const gchar *file) { FILE *fp; guchar buf[BUFFSIZE]; size_t len; size_t octet_chars = 0; size_t total_len = 0; gfloat octet_percentage; if ((fp = g_fopen(file, "rb")) == NULL) { FILE_OP_ERROR(file, "fopen"); return ENC_UNKNOWN; } while ((len = fread(buf, sizeof(guchar), sizeof(buf), fp)) > 0) { guchar *p; gint i; for (p = buf, i = 0; i < len; ++p, ++i) { if (*p & 0x80) ++octet_chars; } total_len += len; } fclose(fp); if (total_len > 0) octet_percentage = (gfloat)octet_chars / (gfloat)total_len; else octet_percentage = 0.0; debug_print("procmime_get_encoding_for_text_file(): " "8bit chars: %d / %d (%f%%)\n", octet_chars, total_len, 100.0 * octet_percentage); if (octet_percentage > 0.20) { debug_print("using BASE64\n"); return ENC_BASE64; } else if (octet_chars > 0) { debug_print("using quoted-printable\n"); return ENC_QUOTED_PRINTABLE; } else { debug_print("using 7bit\n"); return ENC_7BIT; } } EncodingType procmime_get_encoding_for_str(const gchar *str) { const guchar *p; size_t octet_chars = 0; size_t total_len = 0; gfloat octet_percentage; total_len = strlen(str); for (p = (const guchar *)str; *p != '\0'; ++p) { if (*p & 0x80) ++octet_chars; } if (total_len > 0) octet_percentage = (gfloat)octet_chars / (gfloat)total_len; else octet_percentage = 0.0; debug_print("procmime_get_encoding_for_str(): " "8bit chars: %d / %d (%f%%)\n", octet_chars, total_len, 100.0 * octet_percentage); if (octet_percentage > 0.20) { debug_print("using BASE64\n"); return ENC_BASE64; } else if (octet_chars > 0) { debug_print("using quoted-printable\n"); return ENC_QUOTED_PRINTABLE; } else { debug_print("using 7bit\n"); return ENC_7BIT; } } const gchar *procmime_get_encoding_str(EncodingType encoding) { static const gchar *encoding_str[] = { "7bit", "8bit", "quoted-printable", "base64", "x-uuencode", NULL }; if (encoding >= ENC_7BIT && encoding <= ENC_UNKNOWN) return encoding_str[encoding]; else return NULL; } libsylph-1.1.0/libsylph/procmsg.c0000644000175000017500000011400610523552215013726 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2006 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include "defs.h" #include #include #include #include #include "utils.h" #include "procmsg.h" #include "procheader.h" #include "account.h" #include "procmime.h" #include "prefs_common.h" #include "folder.h" #include "codeconv.h" static void mark_sum_func (gpointer key, gpointer value, gpointer data); static GHashTable *procmsg_read_mark_file (FolderItem *item); static void procmsg_write_mark_file (FolderItem *item, GHashTable *mark_table); static FILE *procmsg_open_cache_file_with_buffer(FolderItem *item, DataOpenMode mode, gchar *buf, size_t buf_size); static gint procmsg_cmp_by_mark (gconstpointer a, gconstpointer b); static gint procmsg_cmp_by_unread (gconstpointer a, gconstpointer b); static gint procmsg_cmp_by_mime (gconstpointer a, gconstpointer b); static gint procmsg_cmp_by_label (gconstpointer a, gconstpointer b); static gint procmsg_cmp_by_number (gconstpointer a, gconstpointer b); static gint procmsg_cmp_by_size (gconstpointer a, gconstpointer b); static gint procmsg_cmp_by_date (gconstpointer a, gconstpointer b); static gint procmsg_cmp_by_from (gconstpointer a, gconstpointer b); static gint procmsg_cmp_by_to (gconstpointer a, gconstpointer b); static gint procmsg_cmp_by_subject (gconstpointer a, gconstpointer b); GHashTable *procmsg_msg_hash_table_create(GSList *mlist) { GHashTable *msg_table; if (mlist == NULL) return NULL; msg_table = g_hash_table_new(NULL, g_direct_equal); procmsg_msg_hash_table_append(msg_table, mlist); return msg_table; } void procmsg_msg_hash_table_append(GHashTable *msg_table, GSList *mlist) { GSList *cur; MsgInfo *msginfo; if (msg_table == NULL || mlist == NULL) return; for (cur = mlist; cur != NULL; cur = cur->next) { msginfo = (MsgInfo *)cur->data; g_hash_table_insert(msg_table, GUINT_TO_POINTER(msginfo->msgnum), msginfo); } } GHashTable *procmsg_to_folder_hash_table_create(GSList *mlist) { GHashTable *msg_table; GSList *cur; MsgInfo *msginfo; if (mlist == NULL) return NULL; msg_table = g_hash_table_new(NULL, g_direct_equal); for (cur = mlist; cur != NULL; cur = cur->next) { msginfo = (MsgInfo *)cur->data; g_hash_table_insert(msg_table, msginfo->to_folder, msginfo); } return msg_table; } gint procmsg_read_cache_data_str(FILE *fp, gchar **str) { gchar buf[BUFFSIZE]; gint ret = 0; guint32 len; if (fread(&len, sizeof(len), 1, fp) == 1) { if (len > G_MAXINT) ret = -1; else { gchar *tmp = NULL; while (len > 0) { size_t size = MIN(len, BUFFSIZE - 1); if (fread(buf, size, 1, fp) != 1) { ret = -1; if (tmp) g_free(tmp); *str = NULL; break; } buf[size] = '\0'; if (tmp) { *str = g_strconcat(tmp, buf, NULL); g_free(tmp); tmp = *str; } else tmp = *str = g_strdup(buf); len -= size; } } } else ret = -1; return ret; } #define READ_CACHE_DATA(data, fp) \ { \ if (procmsg_read_cache_data_str(fp, &data) < 0) { \ g_warning("Cache data is corrupted\n"); \ procmsg_msginfo_free(msginfo); \ procmsg_msg_list_free(mlist); \ fclose(fp); \ return NULL; \ } \ } #define READ_CACHE_DATA_INT(n, fp) \ { \ guint32 idata; \ \ if (fread(&idata, sizeof(idata), 1, fp) != 1) { \ g_warning("Cache data is corrupted\n"); \ procmsg_msginfo_free(msginfo); \ procmsg_msg_list_free(mlist); \ fclose(fp); \ return NULL; \ } else \ n = idata; \ } GSList *procmsg_read_cache(FolderItem *item, gboolean scan_file) { GSList *mlist = NULL; GSList *last = NULL; FILE *fp; MsgInfo *msginfo; MsgFlags default_flags; gchar file_buf[BUFFSIZE]; guint32 num; guint refnum; FolderType type; g_return_val_if_fail(item != NULL, NULL); g_return_val_if_fail(item->folder != NULL, NULL); type = FOLDER_TYPE(item->folder); default_flags.perm_flags = MSG_NEW|MSG_UNREAD; default_flags.tmp_flags = 0; if (type == F_MH || type == F_IMAP) { if (item->stype == F_QUEUE) { MSG_SET_TMP_FLAGS(default_flags, MSG_QUEUED); } else if (item->stype == F_DRAFT) { MSG_SET_TMP_FLAGS(default_flags, MSG_DRAFT); } } if (type == F_IMAP) { MSG_SET_TMP_FLAGS(default_flags, MSG_IMAP); } else if (type == F_NEWS) { MSG_SET_TMP_FLAGS(default_flags, MSG_NEWS); } if (type == F_MH) { gchar *path; path = folder_item_get_path(item); if (change_dir(path) < 0) { g_free(path); return NULL; } g_free(path); } if ((fp = procmsg_open_cache_file_with_buffer (item, DATA_READ, file_buf, sizeof(file_buf))) == NULL) { item->cache_dirty = TRUE; return NULL; } debug_print("Reading summary cache..."); while (fread(&num, sizeof(num), 1, fp) == 1) { msginfo = g_new0(MsgInfo, 1); msginfo->msgnum = num; READ_CACHE_DATA_INT(msginfo->size, fp); READ_CACHE_DATA_INT(msginfo->mtime, fp); READ_CACHE_DATA_INT(msginfo->date_t, fp); READ_CACHE_DATA_INT(msginfo->flags.tmp_flags, fp); READ_CACHE_DATA(msginfo->fromname, fp); READ_CACHE_DATA(msginfo->date, fp); READ_CACHE_DATA(msginfo->from, fp); READ_CACHE_DATA(msginfo->to, fp); READ_CACHE_DATA(msginfo->newsgroups, fp); READ_CACHE_DATA(msginfo->subject, fp); READ_CACHE_DATA(msginfo->msgid, fp); READ_CACHE_DATA(msginfo->inreplyto, fp); READ_CACHE_DATA_INT(refnum, fp); for (; refnum != 0; refnum--) { gchar *ref; READ_CACHE_DATA(ref, fp); msginfo->references = g_slist_prepend(msginfo->references, ref); } if (msginfo->references) msginfo->references = g_slist_reverse(msginfo->references); MSG_SET_PERM_FLAGS(msginfo->flags, default_flags.perm_flags); MSG_SET_TMP_FLAGS(msginfo->flags, default_flags.tmp_flags); /* if the message file doesn't exist or is changed, don't add the data */ if ((type == F_MH && scan_file && folder_item_is_msg_changed(item, msginfo)) || num == 0) { procmsg_msginfo_free(msginfo); item->cache_dirty = TRUE; } else { msginfo->folder = item; if (!mlist) last = mlist = g_slist_append(NULL, msginfo); else { last = g_slist_append(last, msginfo); last = last->next; } } } fclose(fp); debug_print("done.\n"); return mlist; } #undef READ_CACHE_DATA #undef READ_CACHE_DATA_INT static void mark_unset_new_func(gpointer key, gpointer value, gpointer data) { MSG_UNSET_PERM_FLAGS(*((MsgFlags *)value), MSG_NEW); } void procmsg_set_flags(GSList *mlist, FolderItem *item) { GSList *cur; gint new = 0, unread = 0, total = 0; gint lastnum = 0; gint unflagged = 0; gboolean mark_queue_exist; MsgInfo *msginfo; GHashTable *mark_table; MsgFlags *flags; g_return_if_fail(item != NULL); g_return_if_fail(item->folder != NULL); debug_print("Marking the messages...\n"); mark_queue_exist = (item->mark_queue != NULL); mark_table = procmsg_read_mark_file(item); if (!mark_table) { item->new = item->unread = item->total = g_slist_length(mlist); item->updated = TRUE; item->mark_dirty = TRUE; return; } /* unset new flags if new (unflagged) messages exist */ if (!mark_queue_exist) { for (cur = mlist; cur != NULL; cur = cur->next) { msginfo = (MsgInfo *)cur->data; flags = g_hash_table_lookup (mark_table, GUINT_TO_POINTER(msginfo->msgnum)); if (!flags) { g_hash_table_foreach(mark_table, mark_unset_new_func, NULL); item->mark_dirty = TRUE; break; } } } for (cur = mlist; cur != NULL; cur = cur->next) { msginfo = (MsgInfo *)cur->data; if (lastnum < msginfo->msgnum) lastnum = msginfo->msgnum; flags = g_hash_table_lookup (mark_table, GUINT_TO_POINTER(msginfo->msgnum)); if (flags != NULL) { /* add the permanent flags only */ msginfo->flags.perm_flags = flags->perm_flags; if (MSG_IS_NEW(*flags)) ++new; if (MSG_IS_UNREAD(*flags)) ++unread; if (FOLDER_TYPE(item->folder) == F_IMAP) { MSG_SET_TMP_FLAGS(msginfo->flags, MSG_IMAP); } else if (FOLDER_TYPE(item->folder) == F_NEWS) { MSG_SET_TMP_FLAGS(msginfo->flags, MSG_NEWS); } } else { ++unflagged; ++new; ++unread; } ++total; } item->new = new; item->unread = unread; item->total = total; item->unmarked_num = unflagged; item->last_num = lastnum; item->updated = TRUE; if (unflagged > 0) item->mark_dirty = TRUE; debug_print("new: %d unread: %d unflagged: %d total: %d\n", new, unread, unflagged, total); hash_free_value_mem(mark_table); g_hash_table_destroy(mark_table); } static void mark_all_read_func(gpointer key, gpointer value, gpointer data) { MSG_UNSET_PERM_FLAGS(*((MsgFlags *)value), MSG_NEW|MSG_UNREAD); } void procmsg_mark_all_read(FolderItem *item) { GHashTable *mark_table; debug_print("Marking all messages as read\n"); mark_table = procmsg_read_mark_file(item); if (mark_table) { g_hash_table_foreach(mark_table, mark_all_read_func, NULL); procmsg_write_mark_file(item, mark_table); hash_free_value_mem(mark_table); g_hash_table_destroy(mark_table); } if (item->mark_queue) { GSList *cur; MsgInfo *msginfo; for (cur = item->mark_queue; cur != NULL; cur = cur->next) { msginfo = (MsgInfo *)cur->data; MSG_UNSET_PERM_FLAGS (msginfo->flags, MSG_NEW|MSG_UNREAD); } item->mark_dirty = TRUE; } item->new = item->unread = 0; } static FolderSortType cmp_func_sort_type; GSList *procmsg_sort_msg_list(GSList *mlist, FolderSortKey sort_key, FolderSortType sort_type) { GCompareFunc cmp_func; switch (sort_key) { case SORT_BY_MARK: cmp_func = procmsg_cmp_by_mark; break; case SORT_BY_UNREAD: cmp_func = procmsg_cmp_by_unread; break; case SORT_BY_MIME: cmp_func = procmsg_cmp_by_mime; break; case SORT_BY_LABEL: cmp_func = procmsg_cmp_by_label; break; case SORT_BY_NUMBER: cmp_func = procmsg_cmp_by_number; break; case SORT_BY_SIZE: cmp_func = procmsg_cmp_by_size; break; case SORT_BY_DATE: cmp_func = procmsg_cmp_by_date; break; case SORT_BY_FROM: cmp_func = procmsg_cmp_by_from; break; case SORT_BY_SUBJECT: cmp_func = procmsg_cmp_by_subject; break; case SORT_BY_TO: cmp_func = procmsg_cmp_by_to; break; default: return mlist; } cmp_func_sort_type = sort_type; mlist = g_slist_sort(mlist, cmp_func); return mlist; } gint procmsg_get_last_num_in_msg_list(GSList *mlist) { GSList *cur; MsgInfo *msginfo; gint last = 0; for (cur = mlist; cur != NULL; cur = cur->next) { msginfo = (MsgInfo *)cur->data; if (msginfo && msginfo->msgnum > last) last = msginfo->msgnum; } return last; } void procmsg_msg_list_free(GSList *mlist) { GSList *cur; MsgInfo *msginfo; for (cur = mlist; cur != NULL; cur = cur->next) { msginfo = (MsgInfo *)cur->data; procmsg_msginfo_free(msginfo); } g_slist_free(mlist); } void procmsg_write_cache(MsgInfo *msginfo, FILE *fp) { MsgTmpFlags flags = msginfo->flags.tmp_flags & MSG_CACHED_FLAG_MASK; GSList *cur; WRITE_CACHE_DATA_INT(msginfo->msgnum, fp); WRITE_CACHE_DATA_INT(msginfo->size, fp); WRITE_CACHE_DATA_INT(msginfo->mtime, fp); WRITE_CACHE_DATA_INT(msginfo->date_t, fp); WRITE_CACHE_DATA_INT(flags, fp); WRITE_CACHE_DATA(msginfo->fromname, fp); WRITE_CACHE_DATA(msginfo->date, fp); WRITE_CACHE_DATA(msginfo->from, fp); WRITE_CACHE_DATA(msginfo->to, fp); WRITE_CACHE_DATA(msginfo->newsgroups, fp); WRITE_CACHE_DATA(msginfo->subject, fp); WRITE_CACHE_DATA(msginfo->msgid, fp); WRITE_CACHE_DATA(msginfo->inreplyto, fp); WRITE_CACHE_DATA_INT(g_slist_length(msginfo->references), fp); for (cur = msginfo->references; cur != NULL; cur = cur->next) { WRITE_CACHE_DATA((gchar *)cur->data, fp); } } void procmsg_write_flags(MsgInfo *msginfo, FILE *fp) { MsgPermFlags flags = msginfo->flags.perm_flags; WRITE_CACHE_DATA_INT(msginfo->msgnum, fp); WRITE_CACHE_DATA_INT(flags, fp); } void procmsg_write_cache_list(FolderItem *item, GSList *mlist) { FILE *fp; GSList *cur; g_return_if_fail(item != NULL); debug_print("Writing summary cache (%s)\n", item->path); fp = procmsg_open_cache_file(item, DATA_WRITE); if (fp == NULL) return; for (cur = mlist; cur != NULL; cur = cur->next) { MsgInfo *msginfo = (MsgInfo *)cur->data; procmsg_write_cache(msginfo, fp); } fclose(fp); item->cache_dirty = FALSE; } void procmsg_write_flags_list(FolderItem *item, GSList *mlist) { FILE *fp; GSList *cur; g_return_if_fail(item != NULL); debug_print("Writing summary flags (%s)\n", item->path); fp = procmsg_open_mark_file(item, DATA_WRITE); if (fp == NULL) return; for (cur = mlist; cur != NULL; cur = cur->next) { MsgInfo *msginfo = (MsgInfo *)cur->data; procmsg_write_flags(msginfo, fp); } if (item->mark_queue) procmsg_flush_mark_queue(item, fp); fclose(fp); item->mark_dirty = FALSE; } static gint cmp_by_item(gconstpointer a, gconstpointer b) { const MsgInfo *msginfo1 = a; const MsgInfo *msginfo2 = b; if (msginfo1->folder == msginfo2->folder) return msginfo1->msgnum - msginfo2->msgnum; return msginfo1->folder - msginfo2->folder; } void procmsg_write_flags_for_multiple_folders(GSList *mlist) { GSList *tmp_list, *cur; FolderItem *prev_item = NULL; FILE *fp = NULL; if (!mlist) return; tmp_list = g_slist_copy(mlist); tmp_list = g_slist_sort(tmp_list, cmp_by_item); for (cur = tmp_list; cur != NULL; cur = cur->next) { MsgInfo *msginfo = (MsgInfo *)cur->data; FolderItem *item = msginfo->folder; if (prev_item != item) { if (fp) fclose(fp); fp = procmsg_open_mark_file(item, DATA_APPEND); if (!fp) { g_warning("can't open mark file\n"); break; } item->updated = TRUE; } procmsg_write_flags(msginfo, fp); prev_item = item; } if (fp) fclose(fp); g_slist_free(tmp_list); } void procmsg_flush_mark_queue(FolderItem *item, FILE *fp) { MsgInfo *flaginfo; g_return_if_fail(item != NULL); g_return_if_fail(fp != NULL); if (item->mark_queue) debug_print("flushing mark_queue...\n"); while (item->mark_queue != NULL) { flaginfo = (MsgInfo *)item->mark_queue->data; procmsg_write_flags(flaginfo, fp); procmsg_msginfo_free(flaginfo); item->mark_queue = g_slist_remove(item->mark_queue, flaginfo); } } void procmsg_add_mark_queue(FolderItem *item, gint num, MsgFlags flags) { MsgInfo *queue_msginfo; queue_msginfo = g_new0(MsgInfo, 1); queue_msginfo->msgnum = num; queue_msginfo->flags = flags; item->mark_queue = g_slist_append (item->mark_queue, queue_msginfo); return; } void procmsg_add_flags(FolderItem *item, gint num, MsgFlags flags) { FILE *fp; MsgInfo msginfo; g_return_if_fail(item != NULL); if (item->opened) { procmsg_add_mark_queue(item, num, flags); return; } if ((fp = procmsg_open_mark_file(item, DATA_APPEND)) == NULL) { g_warning(_("can't open mark file\n")); return; } msginfo.msgnum = num; msginfo.flags = flags; procmsg_write_flags(&msginfo, fp); fclose(fp); } struct MarkSum { gint *new; gint *unread; gint *total; gint *min; gint *max; gint first; }; static void mark_sum_func(gpointer key, gpointer value, gpointer data) { MsgFlags *flags = value; gint num = GPOINTER_TO_INT(key); struct MarkSum *marksum = data; if (marksum->first <= num) { if (MSG_IS_NEW(*flags)) (*marksum->new)++; if (MSG_IS_UNREAD(*flags)) (*marksum->unread)++; if (num > *marksum->max) *marksum->max = num; if (num < *marksum->min || *marksum->min == 0) *marksum->min = num; (*marksum->total)++; } g_free(flags); } void procmsg_get_mark_sum(FolderItem *item, gint *new, gint *unread, gint *total, gint *min, gint *max, gint first) { GHashTable *mark_table; struct MarkSum marksum; *new = *unread = *total = *min = *max = 0; marksum.new = new; marksum.unread = unread; marksum.total = total; marksum.min = min; marksum.max = max; marksum.first = first; mark_table = procmsg_read_mark_file(item); if (mark_table) { g_hash_table_foreach(mark_table, mark_sum_func, &marksum); g_hash_table_destroy(mark_table); } } static GHashTable *procmsg_read_mark_file(FolderItem *item) { FILE *fp; GHashTable *mark_table = NULL; guint32 idata; guint num; MsgFlags *flags; MsgPermFlags perm_flags; GSList *cur; if ((fp = procmsg_open_mark_file(item, DATA_READ)) == NULL) return NULL; mark_table = g_hash_table_new(NULL, g_direct_equal); while (fread(&idata, sizeof(idata), 1, fp) == 1) { num = idata; if (fread(&idata, sizeof(idata), 1, fp) != 1) break; perm_flags = idata; flags = g_hash_table_lookup(mark_table, GUINT_TO_POINTER(num)); if (flags != NULL) g_free(flags); flags = g_new0(MsgFlags, 1); flags->perm_flags = perm_flags; g_hash_table_insert(mark_table, GUINT_TO_POINTER(num), flags); } fclose(fp); if (item->mark_queue) { g_hash_table_foreach(mark_table, mark_unset_new_func, NULL); item->mark_dirty = TRUE; } for (cur = item->mark_queue; cur != NULL; cur = cur->next) { MsgInfo *msginfo = (MsgInfo *)cur->data; flags = g_hash_table_lookup(mark_table, GUINT_TO_POINTER(msginfo->msgnum)); if (flags != NULL) g_free(flags); flags = g_new0(MsgFlags, 1); flags->perm_flags = msginfo->flags.perm_flags; g_hash_table_insert(mark_table, GUINT_TO_POINTER(msginfo->msgnum), flags); } if (item->mark_queue && !item->opened) { procmsg_write_mark_file(item, mark_table); procmsg_msg_list_free(item->mark_queue); item->mark_queue = NULL; item->mark_dirty = FALSE; } return mark_table; } static void write_mark_func(gpointer key, gpointer value, gpointer data) { MsgInfo msginfo; msginfo.msgnum = GPOINTER_TO_UINT(key); msginfo.flags.perm_flags = ((MsgFlags *)value)->perm_flags; procmsg_write_flags(&msginfo, (FILE *)data); } static void procmsg_write_mark_file(FolderItem *item, GHashTable *mark_table) { FILE *fp; fp = procmsg_open_mark_file(item, DATA_WRITE); g_hash_table_foreach(mark_table, write_mark_func, fp); fclose(fp); } FILE *procmsg_open_data_file(const gchar *file, guint version, DataOpenMode mode, gchar *buf, size_t buf_size) { FILE *fp; guint32 data_ver = 0; g_return_val_if_fail(file != NULL, NULL); if (mode == DATA_WRITE) { if ((fp = g_fopen(file, "wb")) == NULL) { FILE_OP_ERROR(file, "fopen"); return NULL; } if (change_file_mode_rw(fp, file) < 0) FILE_OP_ERROR(file, "chmod"); WRITE_CACHE_DATA_INT(version, fp); return fp; } /* check version */ if ((fp = g_fopen(file, "rb")) == NULL) debug_print("Mark/Cache file '%s' not found\n", file); else { if (buf && buf_size > 0) setvbuf(fp, buf, _IOFBF, buf_size); if (fread(&data_ver, sizeof(data_ver), 1, fp) != 1 || version != data_ver) { g_message("%s: Mark/Cache version is different (%u != %u). Discarding it.\n", file, data_ver, version); fclose(fp); fp = NULL; } } if (mode == DATA_READ) return fp; if (fp) { /* reopen with append mode */ fclose(fp); if ((fp = g_fopen(file, "ab")) == NULL) FILE_OP_ERROR(file, "fopen"); } else { /* open with overwrite mode if mark file doesn't exist or version is different */ fp = procmsg_open_data_file(file, version, DATA_WRITE, buf, buf_size); } return fp; } static FILE *procmsg_open_cache_file_with_buffer(FolderItem *item, DataOpenMode mode, gchar *buf, size_t buf_size) { gchar *cachefile; FILE *fp; cachefile = folder_item_get_cache_file(item); fp = procmsg_open_data_file(cachefile, CACHE_VERSION, mode, buf, buf_size); g_free(cachefile); return fp; } FILE *procmsg_open_cache_file(FolderItem *item, DataOpenMode mode) { gchar *cachefile; FILE *fp; cachefile = folder_item_get_cache_file(item); fp = procmsg_open_data_file(cachefile, CACHE_VERSION, mode, NULL, 0); g_free(cachefile); return fp; } FILE *procmsg_open_mark_file(FolderItem *item, DataOpenMode mode) { gchar *markfile; FILE *fp; markfile = folder_item_get_mark_file(item); fp = procmsg_open_data_file(markfile, MARK_VERSION, mode, NULL, 0); g_free(markfile); return fp; } void procmsg_clear_cache(FolderItem *item) { FILE *fp; fp = procmsg_open_cache_file(item, DATA_WRITE); if (fp) fclose(fp); } void procmsg_clear_mark(FolderItem *item) { FILE *fp; fp = procmsg_open_mark_file(item, DATA_WRITE); if (fp) fclose(fp); } /* return the reversed thread tree */ GNode *procmsg_get_thread_tree(GSList *mlist) { GNode *root, *parent, *node, *next; GHashTable *table; MsgInfo *msginfo; const gchar *msgid; GSList *reflist; root = g_node_new(NULL); table = g_hash_table_new(g_str_hash, g_str_equal); for (; mlist != NULL; mlist = mlist->next) { msginfo = (MsgInfo *)mlist->data; parent = root; /* only look for the real parent first */ if (msginfo->inreplyto) { parent = g_hash_table_lookup(table, msginfo->inreplyto); if (parent == NULL) parent = root; } node = g_node_insert_data_before (parent, parent == root ? parent->children : NULL, msginfo); if ((msgid = msginfo->msgid) && g_hash_table_lookup(table, msgid) == NULL) g_hash_table_insert(table, (gchar *)msgid, node); } /* complete the unfinished threads */ for (node = root->children; node != NULL; ) { next = node->next; msginfo = (MsgInfo *)node->data; parent = NULL; if (msginfo->inreplyto) parent = g_hash_table_lookup(table, msginfo->inreplyto); /* try looking for the indirect parent */ if (!parent && msginfo->references) { for (reflist = msginfo->references; reflist != NULL; reflist = reflist->next) if ((parent = g_hash_table_lookup (table, reflist->data)) != NULL) break; } /* node should not be the parent, and node should not be an ancestor of parent (circular reference) */ if (parent && parent != node && !g_node_is_ancestor(node, parent)) { g_node_unlink(node); g_node_insert_before (parent, parent->children, node); } node = next; } g_hash_table_destroy(table); return root; } static gboolean procmsg_thread_date_func(GNode *node, gpointer data) { guint *tdate = (guint *)data; MsgInfo *msginfo = (MsgInfo *)node->data; if (*tdate < msginfo->date_t) *tdate = msginfo->date_t; return FALSE; } guint procmsg_get_thread_date(GNode *node) { guint tdate = 0; g_return_val_if_fail(node != NULL && node->parent != NULL && node->parent->parent == NULL, 0); g_node_traverse(node, G_PRE_ORDER, G_TRAVERSE_ALL, -1, procmsg_thread_date_func, &tdate); return tdate; } gint procmsg_move_messages(GSList *mlist) { GSList *cur, *movelist = NULL; MsgInfo *msginfo; FolderItem *dest = NULL; GHashTable *hash; gint val = 0; if (!mlist) return 0; hash = procmsg_to_folder_hash_table_create(mlist); folder_item_scan_foreach(hash); g_hash_table_destroy(hash); for (cur = mlist; cur != NULL; cur = cur->next) { msginfo = (MsgInfo *)cur->data; if (!dest) { dest = msginfo->to_folder; movelist = g_slist_append(movelist, msginfo); } else if (dest == msginfo->to_folder) { movelist = g_slist_append(movelist, msginfo); } else { val = folder_item_move_msgs(dest, movelist); g_slist_free(movelist); movelist = NULL; if (val == -1) return val; dest = msginfo->to_folder; movelist = g_slist_append(movelist, msginfo); } } if (movelist) { val = folder_item_move_msgs(dest, movelist); g_slist_free(movelist); } return val == -1 ? -1 : 0; } gint procmsg_copy_messages(GSList *mlist) { GSList *cur, *copylist = NULL; MsgInfo *msginfo; FolderItem *dest = NULL; GHashTable *hash; gint val = 0; if (!mlist) return 0; hash = procmsg_to_folder_hash_table_create(mlist); folder_item_scan_foreach(hash); g_hash_table_destroy(hash); for (cur = mlist; cur != NULL; cur = cur->next) { msginfo = (MsgInfo *)cur->data; if (!dest) { dest = msginfo->to_folder; copylist = g_slist_append(copylist, msginfo); } else if (dest == msginfo->to_folder) { copylist = g_slist_append(copylist, msginfo); } else { val = folder_item_copy_msgs(dest, copylist); g_slist_free(copylist); copylist = NULL; if (val == -1) return val; dest = msginfo->to_folder; copylist = g_slist_append(copylist, msginfo); } } if (copylist) { val = folder_item_copy_msgs(dest, copylist); g_slist_free(copylist); } return val == -1 ? -1 : 0; } gchar *procmsg_get_message_file_path(MsgInfo *msginfo) { gchar *path, *file; g_return_val_if_fail(msginfo != NULL, NULL); if (msginfo->encinfo && msginfo->encinfo->plaintext_file) file = g_strdup(msginfo->encinfo->plaintext_file); else if (msginfo->file_path) return g_strdup(msginfo->file_path); else { path = folder_item_get_path(msginfo->folder); file = g_strconcat(path, G_DIR_SEPARATOR_S, itos(msginfo->msgnum), NULL); g_free(path); } return file; } gchar *procmsg_get_message_file(MsgInfo *msginfo) { gchar *filename = NULL; g_return_val_if_fail(msginfo != NULL, NULL); if (msginfo->file_path) return g_strdup(msginfo->file_path); filename = folder_item_fetch_msg(msginfo->folder, msginfo->msgnum); if (!filename) debug_print(_("can't fetch message %d\n"), msginfo->msgnum); return filename; } GSList *procmsg_get_message_file_list(GSList *mlist) { GSList *file_list = NULL; MsgInfo *msginfo; MsgFileInfo *fileinfo; gchar *file; while (mlist != NULL) { msginfo = (MsgInfo *)mlist->data; file = procmsg_get_message_file(msginfo); if (!file) { procmsg_message_file_list_free(file_list); return NULL; } fileinfo = g_new(MsgFileInfo, 1); fileinfo->file = file; fileinfo->flags = g_new(MsgFlags, 1); *fileinfo->flags = msginfo->flags; file_list = g_slist_prepend(file_list, fileinfo); mlist = mlist->next; } file_list = g_slist_reverse(file_list); return file_list; } void procmsg_message_file_list_free(GSList *file_list) { GSList *cur; MsgFileInfo *fileinfo; for (cur = file_list; cur != NULL; cur = cur->next) { fileinfo = (MsgFileInfo *)cur->data; g_free(fileinfo->file); g_free(fileinfo->flags); g_free(fileinfo); } g_slist_free(file_list); } FILE *procmsg_open_message(MsgInfo *msginfo) { FILE *fp; gchar *file; g_return_val_if_fail(msginfo != NULL, NULL); file = procmsg_get_message_file_path(msginfo); g_return_val_if_fail(file != NULL, NULL); if (!is_file_exist(file)) { g_free(file); file = procmsg_get_message_file(msginfo); if (!file) return NULL; } if ((fp = g_fopen(file, "rb")) == NULL) { FILE_OP_ERROR(file, "fopen"); g_free(file); return NULL; } g_free(file); if (MSG_IS_QUEUED(msginfo->flags)) { gchar buf[BUFFSIZE]; while (fgets(buf, sizeof(buf), fp) != NULL) if (buf[0] == '\r' || buf[0] == '\n') break; } return fp; } static DecryptMessageFunc decrypt_message_func = NULL; void procmsg_set_decrypt_message_func(DecryptMessageFunc func) { decrypt_message_func = func; } FILE *procmsg_open_message_decrypted(MsgInfo *msginfo, MimeInfo **mimeinfo) { FILE *fp; if (decrypt_message_func) return decrypt_message_func(msginfo, mimeinfo); *mimeinfo = NULL; if ((fp = procmsg_open_message(msginfo)) == NULL) return NULL; *mimeinfo = procmime_scan_mime_header(fp); return fp; } gboolean procmsg_msg_exist(MsgInfo *msginfo) { gchar *path; gboolean ret; if (!msginfo) return FALSE; path = folder_item_get_path(msginfo->folder); change_dir(path); ret = !folder_item_is_msg_changed(msginfo->folder, msginfo); g_free(path); return ret; } gboolean procmsg_trash_messages_exist(void) { FolderItem *trash; GList *cur; for (cur = folder_get_list(); cur != NULL; cur = cur->next) { trash = FOLDER(cur->data)->trash; if (trash && trash->total > 0) return TRUE; } return FALSE; } void procmsg_empty_trash(FolderItem *trash) { if (!trash) return; g_return_if_fail(trash->stype == F_TRASH); if (trash->total > 0) { debug_print("Emptying messages in %s ...\n", trash->path); folder_item_remove_all_msg(trash); procmsg_clear_cache(trash); procmsg_clear_mark(trash); trash->cache_dirty = FALSE; trash->mark_dirty = FALSE; } } void procmsg_empty_all_trash(void) { FolderItem *trash; GList *cur; for (cur = folder_get_list(); cur != NULL; cur = cur->next) { trash = FOLDER(cur->data)->trash; procmsg_empty_trash(trash); } } static gboolean remove_all_cached_messages_func(GNode *node, gpointer data) { FolderItem *item; gchar *dir; g_return_val_if_fail(node->data != NULL, FALSE); item = FOLDER_ITEM(node->data); if (!item->path || item->stype == F_VIRTUAL) return FALSE; dir = folder_item_get_path(item); if (is_dir_exist(dir)) { debug_print("removing all cached messages in '%s' ...\n", item->path); remove_all_numbered_files(dir); } g_free(dir); return FALSE; } void procmsg_remove_all_cached_messages(Folder *folder) { g_return_if_fail(folder != NULL); g_return_if_fail(FOLDER_IS_REMOTE(folder)); debug_print("Removing all caches in the mailbox '%s' ...\n", folder->name); g_node_traverse(folder->node, G_PRE_ORDER, G_TRAVERSE_ALL, -1, remove_all_cached_messages_func, NULL); } gint procmsg_save_to_outbox(FolderItem *outbox, const gchar *file) { gint num; MsgFlags flag = {0, 0}; debug_print("saving sent message...\n"); if (!outbox) outbox = folder_get_default_outbox(); g_return_val_if_fail(outbox != NULL, -1); folder_item_scan(outbox); if ((num = folder_item_add_msg(outbox, file, &flag, FALSE)) < 0) { g_warning("can't save message\n"); return -1; } return 0; } void procmsg_print_message(MsgInfo *msginfo, const gchar *cmdline, gboolean all_headers) { static const gchar *def_cmd = "lpr %s"; static guint id = 0; gchar *prtmp; FILE *msgfp, *tmpfp, *prfp; GPtrArray *headers; gint i; gchar buf[1024]; g_return_if_fail(msginfo != NULL); if ((tmpfp = procmime_get_first_text_content (msginfo, conv_get_locale_charset_str())) == NULL) { g_warning("Can't get text part\n"); return; } prtmp = g_strdup_printf("%s%cprinttmp-%08x.txt", get_mime_tmp_dir(), G_DIR_SEPARATOR, id++); if ((prfp = g_fopen(prtmp, "wb")) == NULL) { FILE_OP_ERROR(prtmp, "fopen"); g_free(prtmp); fclose(tmpfp); return; } if ((msgfp = procmsg_open_message(msginfo)) == NULL) { fclose(prfp); g_free(prtmp); fclose(tmpfp); return; } if (all_headers) headers = procheader_get_header_array_asis(msgfp, NULL); else headers = procheader_get_header_array_for_display(msgfp, NULL); fclose(msgfp); for (i = 0; i < headers->len; i++) { Header *hdr; gchar *locale_str; const gchar *body; hdr = g_ptr_array_index(headers, i); if (!g_ascii_strcasecmp(hdr->name, "Subject")) body = msginfo->subject; else if (!g_ascii_strcasecmp(hdr->name, "From")) body = msginfo->from; else if (!g_ascii_strcasecmp(hdr->name, "To")) body = msginfo->to; else if (!g_ascii_strcasecmp(hdr->name, "Cc")) { unfold_line(hdr->body); body = hdr->body; while (g_ascii_isspace(*body)) body++; } else { body = hdr->body; while (g_ascii_isspace(*body)) body++; } if (body && *body != '\0') { locale_str = conv_codeset_strdup (body, CS_INTERNAL, conv_get_locale_charset_str()); fprintf(prfp, "%s: %s\n", hdr->name, locale_str ? locale_str : body); g_free(locale_str); } else { fprintf(prfp, "%s: (none)\n", hdr->name); } } procheader_header_array_destroy(headers); fputc('\n', prfp); while (fgets(buf, sizeof(buf), tmpfp) != NULL) fputs(buf, prfp); fclose(prfp); fclose(tmpfp); #ifdef G_OS_WIN32 if (canonicalize_file_replace(prtmp) < 0) { g_free(prtmp); return; } #endif if (cmdline && str_find_format_times(cmdline, 's') == 1) g_snprintf(buf, sizeof(buf) - 1, cmdline, prtmp); else { if (cmdline) { g_warning(_("Print command line is invalid: `%s'\n"), cmdline); g_free(prtmp); return; } #ifdef G_OS_WIN32 execute_print_file(prtmp); g_free(prtmp); return; #else g_snprintf(buf, sizeof(buf) - 1, def_cmd, prtmp); #endif } g_free(prtmp); g_strchomp(buf); if (buf[strlen(buf) - 1] != '&') strcat(buf, "&"); system(buf); } MsgInfo *procmsg_msginfo_copy(MsgInfo *msginfo) { MsgInfo *newmsginfo; if (msginfo == NULL) return NULL; newmsginfo = g_new0(MsgInfo, 1); #define MEMBCOPY(mmb) newmsginfo->mmb = msginfo->mmb #define MEMBDUP(mmb) newmsginfo->mmb = msginfo->mmb ? \ g_strdup(msginfo->mmb) : NULL MEMBCOPY(msgnum); MEMBCOPY(size); MEMBCOPY(mtime); MEMBCOPY(date_t); MEMBCOPY(flags); MEMBDUP(fromname); MEMBDUP(date); MEMBDUP(from); MEMBDUP(to); MEMBDUP(cc); MEMBDUP(newsgroups); MEMBDUP(subject); MEMBDUP(msgid); MEMBDUP(inreplyto); MEMBCOPY(folder); MEMBCOPY(to_folder); MEMBDUP(xface); MEMBDUP(file_path); if (msginfo->encinfo) { newmsginfo->encinfo = g_new0(MsgEncryptInfo, 1); MEMBDUP(encinfo->plaintext_file); MEMBDUP(encinfo->sigstatus); MEMBDUP(encinfo->sigstatus_full); MEMBCOPY(encinfo->decryption_failed); } return newmsginfo; } MsgInfo *procmsg_msginfo_get_full_info(MsgInfo *msginfo) { MsgInfo *full_msginfo; gchar *file; if (msginfo == NULL) return NULL; file = procmsg_get_message_file(msginfo); if (!file) { g_warning("procmsg_msginfo_get_full_info(): can't get message file.\n"); return NULL; } full_msginfo = procheader_parse_file(file, msginfo->flags, TRUE); g_free(file); if (!full_msginfo) return NULL; full_msginfo->msgnum = msginfo->msgnum; full_msginfo->size = msginfo->size; full_msginfo->mtime = msginfo->mtime; full_msginfo->folder = msginfo->folder; full_msginfo->to_folder = msginfo->to_folder; full_msginfo->file_path = g_strdup(msginfo->file_path); if (msginfo->encinfo) { full_msginfo->encinfo = g_new0(MsgEncryptInfo, 1); full_msginfo->encinfo->plaintext_file = g_strdup(msginfo->encinfo->plaintext_file); full_msginfo->encinfo->sigstatus = g_strdup(msginfo->encinfo->sigstatus); full_msginfo->encinfo->sigstatus_full = g_strdup(msginfo->encinfo->sigstatus_full); full_msginfo->encinfo->decryption_failed = msginfo->encinfo->decryption_failed; } return full_msginfo; } gboolean procmsg_msginfo_equal(MsgInfo *msginfo_a, MsgInfo *msginfo_b) { if (!msginfo_a || !msginfo_b) return FALSE; if (msginfo_a == msginfo_b) return TRUE; if (msginfo_a->folder == msginfo_b->folder && msginfo_a->msgnum == msginfo_b->msgnum && msginfo_a->size == msginfo_b->size && msginfo_a->mtime == msginfo_b->mtime) return TRUE; return FALSE; } void procmsg_msginfo_free(MsgInfo *msginfo) { if (msginfo == NULL) return; g_free(msginfo->xface); g_free(msginfo->fromname); g_free(msginfo->date); g_free(msginfo->from); g_free(msginfo->to); g_free(msginfo->cc); g_free(msginfo->newsgroups); g_free(msginfo->subject); g_free(msginfo->msgid); g_free(msginfo->inreplyto); slist_free_strings(msginfo->references); g_slist_free(msginfo->references); g_free(msginfo->file_path); if (msginfo->encinfo) { g_free(msginfo->encinfo->plaintext_file); g_free(msginfo->encinfo->sigstatus); g_free(msginfo->encinfo->sigstatus_full); g_free(msginfo->encinfo); } g_free(msginfo); } gint procmsg_cmp_msgnum_for_sort(gconstpointer a, gconstpointer b) { const MsgInfo *msginfo1 = a; const MsgInfo *msginfo2 = b; if (!msginfo1 || !msginfo2) return 0; return msginfo1->msgnum - msginfo2->msgnum; } #define CMP_FUNC_DEF(func_name, val) \ static gint func_name(gconstpointer a, gconstpointer b) \ { \ const MsgInfo *msginfo1 = a; \ const MsgInfo *msginfo2 = b; \ gint ret; \ \ if (!msginfo1 || !msginfo2) \ return 0; \ \ ret = (val); \ if (ret == 0) \ ret = msginfo1->date_t - msginfo2->date_t; \ \ return ret * (cmp_func_sort_type == SORT_ASCENDING ? 1 : -1); \ } CMP_FUNC_DEF(procmsg_cmp_by_mark, MSG_IS_MARKED(msginfo1->flags) - MSG_IS_MARKED(msginfo2->flags)) CMP_FUNC_DEF(procmsg_cmp_by_unread, MSG_IS_UNREAD(msginfo1->flags) - MSG_IS_UNREAD(msginfo2->flags)) CMP_FUNC_DEF(procmsg_cmp_by_mime, MSG_IS_MIME(msginfo1->flags) - MSG_IS_MIME(msginfo2->flags)) CMP_FUNC_DEF(procmsg_cmp_by_label, MSG_GET_COLORLABEL(msginfo1->flags) - MSG_GET_COLORLABEL(msginfo2->flags)) CMP_FUNC_DEF(procmsg_cmp_by_size, msginfo1->size - msginfo2->size) #undef CMP_FUNC_DEF #define CMP_FUNC_DEF(func_name, val) \ static gint func_name(gconstpointer a, gconstpointer b) \ { \ const MsgInfo *msginfo1 = a; \ const MsgInfo *msginfo2 = b; \ \ if (!msginfo1 || !msginfo2) \ return 0; \ \ return (val) * (cmp_func_sort_type == SORT_ASCENDING ? 1 : -1); \ } CMP_FUNC_DEF(procmsg_cmp_by_number, msginfo1->msgnum - msginfo2->msgnum) CMP_FUNC_DEF(procmsg_cmp_by_date, msginfo1->date_t - msginfo2->date_t) #undef CMP_FUNC_DEF #define CMP_FUNC_DEF(func_name, var_name) \ static gint func_name(gconstpointer a, gconstpointer b) \ { \ const MsgInfo *msginfo1 = a; \ const MsgInfo *msginfo2 = b; \ gint ret; \ \ if (!msginfo1->var_name) \ return (msginfo2->var_name != NULL) * \ (cmp_func_sort_type == SORT_ASCENDING ? -1 : 1);\ if (!msginfo2->var_name) \ return (cmp_func_sort_type == SORT_ASCENDING ? 1 : -1); \ \ ret = g_ascii_strcasecmp \ (msginfo1->var_name, msginfo2->var_name); \ if (ret == 0) \ ret = msginfo1->date_t - msginfo2->date_t; \ \ return ret * (cmp_func_sort_type == SORT_ASCENDING ? 1 : -1); \ } CMP_FUNC_DEF(procmsg_cmp_by_from, fromname) CMP_FUNC_DEF(procmsg_cmp_by_to, to) #undef CMP_FUNC_DEF static gint procmsg_cmp_by_subject(gconstpointer a, gconstpointer b) { const MsgInfo *msginfo1 = a; const MsgInfo *msginfo2 = b; gint ret; if (!msginfo1->subject) return (msginfo2->subject != NULL) * (cmp_func_sort_type == SORT_ASCENDING ? -1 : 1); if (!msginfo2->subject) return (cmp_func_sort_type == SORT_ASCENDING ? 1 : -1); ret = subject_compare_for_sort(msginfo1->subject, msginfo2->subject); if (ret == 0) ret = msginfo1->date_t - msginfo2->date_t; return ret * (cmp_func_sort_type == SORT_ASCENDING ? 1 : -1); } libsylph-1.1.0/libsylph/quoted-printable.c0000644000175000017500000001076010457702534015544 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include static gboolean get_hex_value(guchar *out, gchar c1, gchar c2); static void get_hex_str(gchar *out, guchar ch); #define MAX_LINELEN 76 #define IS_LBREAK(p) \ (*(p) == '\0' || *(p) == '\n' || (*(p) == '\r' && *((p) + 1) == '\n')) #define SOFT_LBREAK_IF_REQUIRED(n) \ if (len + (n) > MAX_LINELEN || \ (len + (n) == MAX_LINELEN && (!IS_LBREAK(inp + 1)))) { \ *outp++ = '='; \ *outp++ = '\n'; \ len = 0; \ } void qp_encode_line(gchar *out, const guchar *in) { const guchar *inp = in; gchar *outp = out; guchar ch; gint len = 0; while (*inp != '\0') { ch = *inp; if (IS_LBREAK(inp)) { *outp++ = '\n'; len = 0; if (*inp == '\r') inp++; inp++; } else if (ch == '\t' || ch == ' ') { if (IS_LBREAK(inp + 1)) { SOFT_LBREAK_IF_REQUIRED(3); *outp++ = '='; get_hex_str(outp, ch); outp += 2; len += 3; inp++; } else { SOFT_LBREAK_IF_REQUIRED(1); *outp++ = *inp++; len++; } } else if ((ch >= 33 && ch <= 60) || (ch >= 62 && ch <= 126)) { SOFT_LBREAK_IF_REQUIRED(1); *outp++ = *inp++; len++; } else { SOFT_LBREAK_IF_REQUIRED(3); *outp++ = '='; get_hex_str(outp, ch); outp += 2; len += 3; inp++; } } if (len > 0) *outp++ = '\n'; *outp = '\0'; } gint qp_decode_line(gchar *str) { gchar *inp = str, *outp = str; while (*inp != '\0') { if (*inp == '=') { if (inp[1] && inp[2] && get_hex_value((guchar *)outp, inp[1], inp[2]) == TRUE) { inp += 3; } else if (inp[1] == '\0' || g_ascii_isspace(inp[1])) { /* soft line break */ break; } else { /* broken QP string */ *outp = *inp++; } } else { *outp = *inp++; } outp++; } *outp = '\0'; return outp - str; } gint qp_decode_q_encoding(guchar *out, const gchar *in, gint inlen) { const gchar *inp = in; guchar *outp = out; if (inlen < 0) inlen = G_MAXINT; while (inp - in < inlen && *inp != '\0') { if (*inp == '=' && inp + 3 - in <= inlen) { if (get_hex_value(outp, inp[1], inp[2]) == TRUE) { inp += 3; } else { *outp = *inp++; } } else if (*inp == '_') { *outp = ' '; inp++; } else { *outp = *inp++; } outp++; } *outp = '\0'; return outp - out; } gint qp_get_q_encoding_len(const guchar *str) { const guchar *inp = str; gint len = 0; while (*inp != '\0') { if (*inp == 0x20) len++; else if (*inp == '=' || *inp == '?' || *inp == '_' || *inp < 32 || *inp > 127 || g_ascii_isspace(*inp)) len += 3; else len++; inp++; } return len; } void qp_q_encode(gchar *out, const guchar *in) { const guchar *inp = in; gchar *outp = out; while (*inp != '\0') { if (*inp == 0x20) *outp++ = '_'; else if (*inp == '=' || *inp == '?' || *inp == '_' || *inp < 32 || *inp > 127 || g_ascii_isspace(*inp)) { *outp++ = '='; get_hex_str(outp, *inp); outp += 2; } else *outp++ = *inp; inp++; } *outp = '\0'; } #define HEX_TO_INT(val, hex) \ { \ gchar c = hex; \ \ if ('0' <= c && c <= '9') { \ val = c - '0'; \ } else if ('a' <= c && c <= 'f') { \ val = c - 'a' + 10; \ } else if ('A' <= c && c <= 'F') { \ val = c - 'A' + 10; \ } else { \ val = -1; \ } \ } static gboolean get_hex_value(guchar *out, gchar c1, gchar c2) { gint hi, lo; HEX_TO_INT(hi, c1); HEX_TO_INT(lo, c2); if (hi == -1 || lo == -1) return FALSE; *out = (hi << 4) + lo; return TRUE; } #define INT_TO_HEX(hex, val) \ { \ if ((val) < 10) \ hex = '0' + (val); \ else \ hex = 'A' + (val) - 10; \ } static void get_hex_str(gchar *out, guchar ch) { gchar hex; INT_TO_HEX(hex, ch >> 4); *out++ = hex; INT_TO_HEX(hex, ch & 0x0f); *out++ = hex; } libsylph-1.1.0/libsylph/recv.c0000644000175000017500000001173310734636475013235 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2007 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "defs.h" #include #include #include #include #include #include "recv.h" #include "socket.h" #include "utils.h" static RecvUIFunc recv_ui_func; static gpointer recv_ui_func_data; gchar *recv_bytes(SockInfo *sock, glong size) { gchar *buf; glong count = 0; if (size == 0) return NULL; buf = g_malloc(size + 1); do { gint read_count; read_count = sock_read(sock, buf + count, MIN(BUFFSIZE, size - count)); if (read_count <= 0) { g_free(buf); return NULL; } count += read_count; } while (count < size); buf[size] = '\0'; return buf; } gint recv_write_to_file(SockInfo *sock, const gchar *filename) { FILE *fp; gint ret; g_return_val_if_fail(filename != NULL, -1); if ((fp = g_fopen(filename, "wb")) == NULL) { FILE_OP_ERROR(filename, "fopen"); recv_write(sock, NULL); return -1; } if (change_file_mode_rw(fp, filename) < 0) FILE_OP_ERROR(filename, "chmod"); if ((ret = recv_write(sock, fp)) < 0) { fclose(fp); g_unlink(filename); return ret; } if (fclose(fp) == EOF) { FILE_OP_ERROR(filename, "fclose"); g_unlink(filename); return -1; } return 0; } gint recv_bytes_write_to_file(SockInfo *sock, glong size, const gchar *filename) { FILE *fp; gint ret; g_return_val_if_fail(filename != NULL, -1); if ((fp = g_fopen(filename, "wb")) == NULL) { FILE_OP_ERROR(filename, "fopen"); return recv_bytes_write(sock, size, NULL); } if (change_file_mode_rw(fp, filename) < 0) FILE_OP_ERROR(filename, "chmod"); if ((ret = recv_bytes_write(sock, size, fp)) < 0) { fclose(fp); g_unlink(filename); return ret; } if (fclose(fp) == EOF) { FILE_OP_ERROR(filename, "fclose"); g_unlink(filename); return -1; } return 0; } gint recv_write(SockInfo *sock, FILE *fp) { gchar buf[BUFFSIZE]; gint len; gint count = 0; gint bytes = 0; gchar *p; GTimeVal tv_prev, tv_cur; g_get_current_time(&tv_prev); for (;;) { if (sock_gets(sock, buf, sizeof(buf)) < 0) { g_warning(_("error occurred while retrieving data.\n")); return -2; } len = strlen(buf); if (len > 1 && buf[0] == '.' && buf[1] == '\r') { if (recv_ui_func) recv_ui_func(sock, count, bytes, recv_ui_func_data); break; } count++; bytes += len; if (recv_ui_func) { g_get_current_time(&tv_cur); /* if elapsed time from previous update is greater than 50msec, update UI */ if (tv_cur.tv_sec - tv_prev.tv_sec > 0 || tv_cur.tv_usec - tv_prev.tv_usec > UI_REFRESH_INTERVAL) { gboolean ret; ret = recv_ui_func(sock, count, bytes, recv_ui_func_data); if (ret == FALSE) return -1; g_get_current_time(&tv_prev); } } p = buf; if (len > 1 && buf[len - 1] == '\n' && buf[len - 2] == '\r') { buf[len - 2] = '\n'; buf[len - 1] = '\0'; } if (buf[0] == '.' && buf[1] == '.') p++; else if (!strncmp(buf, ">From ", 6)) p++; if (fp && fputs(p, fp) == EOF) { perror("fputs"); g_warning(_("Can't write to file.\n")); fp = NULL; } } if (!fp) return -1; return 0; } gint recv_bytes_write(SockInfo *sock, glong size, FILE *fp) { gchar *buf; gchar *prev, *cur; if (size == 0) return 0; buf = recv_bytes(sock, size); if (!buf) return -2; /* +------------------+----------------+--------------------------+ * * ^buf ^prev ^cur buf+size-1^ */ prev = buf; while ((cur = memchr(prev, '\r', size - (prev - buf))) != NULL) { if (cur == buf + size - 1) break; if (fp && (fwrite(prev, sizeof(gchar), cur - prev, fp) == EOF || fwrite("\n", sizeof(gchar), 1, fp) == EOF)) { perror("fwrite"); g_warning(_("Can't write to file.\n")); fp = NULL; } if (*(cur + 1) == '\n') prev = cur + 2; else prev = cur + 1; if (prev - buf >= size) break; } if (prev - buf < size && fp && fwrite(buf, sizeof(gchar), size - (prev - buf), fp) == EOF) { perror("fwrite"); g_warning(_("Can't write to file.\n")); fp = NULL; } g_free(buf); if (!fp) return -1; return 0; } void recv_set_ui_func(RecvUIFunc func, gpointer data) { recv_ui_func = func; recv_ui_func_data = data; } libsylph-1.1.0/libsylph/session.c0000644000175000017500000006370010530506714013744 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2006 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "defs.h" #include #include #include #include #include #include #include #include "session.h" #include "utils.h" static gint session_connect_cb (SockInfo *sock, gpointer data); static gint session_close (Session *session); static gboolean session_timeout_cb (gpointer data); #ifdef G_OS_WIN32 static gboolean session_ping_cb (gpointer data); #endif static gboolean session_recv_msg_idle_cb (gpointer data); static gboolean session_recv_data_idle_cb (gpointer data); static gboolean session_recv_data_as_file_idle_cb (gpointer data); static gboolean session_read_msg_cb (SockInfo *source, GIOCondition condition, gpointer data); static gboolean session_read_data_cb (SockInfo *source, GIOCondition condition, gpointer data); static gboolean session_read_data_as_file_cb (SockInfo *source, GIOCondition condition, gpointer data); static gboolean session_write_msg_cb (SockInfo *source, GIOCondition condition, gpointer data); static gboolean session_write_data_cb (SockInfo *source, GIOCondition condition, gpointer data); void session_init(Session *session) { session->type = SESSION_UNKNOWN; session->sock = NULL; session->server = NULL; session->port = 0; #if USE_SSL session->ssl_type = SSL_NONE; #endif session->nonblocking = TRUE; session->state = SESSION_READY; session->last_access_time = time(NULL); g_get_current_time(&session->tv_prev); session->conn_id = 0; session->io_tag = 0; session->read_buf_p = session->read_buf; session->read_buf_len = 0; session->read_msg_buf = g_string_sized_new(1024); session->read_data_buf = g_byte_array_new(); session->read_data_terminator = NULL; session->read_data_fp = NULL; session->read_data_pos = 0; session->preread_len = 0; session->write_buf = NULL; session->write_buf_p = NULL; session->write_buf_len = 0; session->write_data_fp = NULL; session->write_data_pos = 0; session->write_data_len = 0; session->timeout_tag = 0; session->timeout_interval = 0; session->ping_tag = 0; session->data = NULL; } gint session_connect(Session *session, const gchar *server, gushort port) { #ifdef G_OS_UNIX session->server = g_strdup(server); session->port = port; session->conn_id = sock_connect_async(server, port, session_connect_cb, session); if (session->conn_id < 0) { g_warning("can't connect to server."); session_close(session); return -1; } return 0; #else SockInfo *sock; session->server = g_strdup(server); session->port = port; sock = sock_connect(server, port); if (sock == NULL) { g_warning("can't connect to server."); session_close(session); return -1; } return session_connect_cb(sock, session); #endif } static gint session_connect_cb(SockInfo *sock, gpointer data) { Session *session = SESSION(data); session->conn_id = 0; if (!sock) { g_warning("can't connect to server."); session->state = SESSION_ERROR; return -1; } session->sock = sock; #if USE_SSL if (session->ssl_type == SSL_TUNNEL) { sock_set_nonblocking_mode(sock, FALSE); if (!ssl_init_socket(sock)) { g_warning("can't initialize SSL."); session->state = SESSION_ERROR; return -1; } } #endif debug_print("session (%p): connected\n", session); sock_set_nonblocking_mode(sock, session->nonblocking); session->state = SESSION_RECV; session->io_tag = sock_add_watch(session->sock, G_IO_IN, session_read_msg_cb, session); #ifdef G_OS_WIN32 session->ping_tag = g_timeout_add(1000, session_ping_cb, session); #endif return 0; } gint session_disconnect(Session *session) { session_close(session); return 0; } void session_destroy(Session *session) { g_return_if_fail(session != NULL); g_return_if_fail(session->destroy != NULL); session_close(session); session->destroy(session); g_free(session->server); g_string_free(session->read_msg_buf, TRUE); g_byte_array_free(session->read_data_buf, TRUE); g_free(session->read_data_terminator); if (session->read_data_fp) fclose(session->read_data_fp); g_free(session->write_buf); debug_print("session (%p): destroyed\n", session); g_free(session); } gboolean session_is_connected(Session *session) { return (session->state == SESSION_READY || session->state == SESSION_SEND || session->state == SESSION_RECV); } void session_set_access_time(Session *session) { session->last_access_time = time(NULL); } void session_set_timeout(Session *session, guint interval) { if (session->timeout_tag > 0) g_source_remove(session->timeout_tag); session->timeout_interval = interval; if (interval > 0) session->timeout_tag = g_timeout_add(interval, session_timeout_cb, session); else session->timeout_tag = 0; } static gboolean session_timeout_cb(gpointer data) { Session *session = SESSION(data); g_warning("session timeout.\n"); if (session->io_tag > 0) { g_source_remove(session->io_tag); session->io_tag = 0; } session->timeout_tag = 0; session->state = SESSION_TIMEOUT; return FALSE; } #ifdef G_OS_WIN32 /* hack for state machine freeze problem in GLib >= 2.8.x */ static gboolean session_ping_cb(gpointer data) { Session *session = SESSION(data); SockInfo *sock = session->sock; if (session->io_tag > 0 && sock && sock->callback) { GTimeVal tv_cur, tv_result; g_get_current_time(&tv_cur); tv_result.tv_sec = tv_cur.tv_sec - session->tv_prev.tv_sec; tv_result.tv_usec = tv_cur.tv_usec - session->tv_prev.tv_usec; if (tv_result.tv_usec < 0) { tv_result.tv_sec--; tv_result.tv_usec += G_USEC_PER_SEC; } if (tv_result.tv_sec * G_USEC_PER_SEC + tv_result.tv_usec > G_USEC_PER_SEC) { debug_print("state machine freeze for 1 second detected, forcing dispatch.\n"); sock->callback(sock, sock->condition, sock->data); } } return TRUE; } #endif void session_set_recv_message_notify(Session *session, RecvMsgNotify notify_func, gpointer data) { session->recv_msg_notify = notify_func; session->recv_msg_notify_data = data; } void session_set_recv_data_progressive_notify (Session *session, RecvDataProgressiveNotify notify_func, gpointer data) { session->recv_data_progressive_notify = notify_func, session->recv_data_progressive_notify_data = data; } void session_set_recv_data_notify(Session *session, RecvDataNotify notify_func, gpointer data) { session->recv_data_notify = notify_func; session->recv_data_notify_data = data; } void session_set_send_data_progressive_notify (Session *session, SendDataProgressiveNotify notify_func, gpointer data) { session->send_data_progressive_notify = notify_func; session->send_data_progressive_notify_data = data; } void session_set_send_data_notify(Session *session, SendDataNotify notify_func, gpointer data) { session->send_data_notify = notify_func; session->send_data_notify_data = data; } static gint session_close(Session *session) { g_return_val_if_fail(session != NULL, -1); #ifdef G_OS_UNIX if (session->conn_id > 0) { sock_connect_async_cancel(session->conn_id); session->conn_id = 0; debug_print("session (%p): connection cancelled\n", session); } #endif session_set_timeout(session, 0); #ifdef G_OS_WIN32 if (session->ping_tag > 0) { g_source_remove(session->ping_tag); session->ping_tag = 0; } #endif if (session->io_tag > 0) { g_source_remove(session->io_tag); session->io_tag = 0; } if (session->sock) { sock_close(session->sock); session->sock = NULL; session->state = SESSION_DISCONNECTED; debug_print("session (%p): closed\n", session); } return 0; } #if USE_SSL gint session_start_tls(Session *session) { gboolean nb_mode; nb_mode = sock_is_nonblocking_mode(session->sock); sock_set_nonblocking_mode(session->sock, FALSE); if (!ssl_init_socket_with_method(session->sock, SSL_METHOD_TLSv1)) { g_warning("can't start TLS session.\n"); if (nb_mode) sock_set_nonblocking_mode(session->sock, TRUE); return -1; } sock_set_nonblocking_mode(session->sock, session->nonblocking); return 0; } #endif gint session_send_msg(Session *session, SessionMsgType type, const gchar *msg) { gboolean ret; g_return_val_if_fail(session->write_buf == NULL, -1); g_return_val_if_fail(msg != NULL, -1); g_return_val_if_fail(msg[0] != '\0', -1); session->state = SESSION_SEND; session->write_buf = g_strconcat(msg, "\r\n", NULL); session->write_buf_p = session->write_buf; session->write_buf_len = strlen(msg) + 2; ret = session_write_msg_cb(session->sock, G_IO_OUT, session); if (ret == TRUE) session->io_tag = sock_add_watch(session->sock, G_IO_OUT, session_write_msg_cb, session); else if (session->state == SESSION_ERROR) return -1; return 0; } gint session_recv_msg(Session *session) { g_return_val_if_fail(session->read_msg_buf->len == 0, -1); session->state = SESSION_RECV; if (session->read_buf_len > 0) g_idle_add(session_recv_msg_idle_cb, session); else session->io_tag = sock_add_watch(session->sock, G_IO_IN, session_read_msg_cb, session); return 0; } static gboolean session_recv_msg_idle_cb(gpointer data) { Session *session = SESSION(data); gboolean ret; ret = session_read_msg_cb(session->sock, G_IO_IN, session); if (ret == TRUE) session->io_tag = sock_add_watch(session->sock, G_IO_IN, session_read_msg_cb, session); return FALSE; } gint session_send_data(Session *session, FILE *data_fp, guint size) { gboolean ret; g_return_val_if_fail(session->write_data_fp == NULL, -1); g_return_val_if_fail(data_fp != NULL, -1); g_return_val_if_fail(size != 0, -1); session->state = SESSION_SEND; session->write_data_fp = data_fp; session->write_data_pos = 0; session->write_data_len = size; g_get_current_time(&session->tv_prev); ret = session_write_data_cb(session->sock, G_IO_OUT, session); if (ret == TRUE) session->io_tag = sock_add_watch(session->sock, G_IO_OUT, session_write_data_cb, session); else if (session->state == SESSION_ERROR) return -1; return 0; } gint session_recv_data(Session *session, guint size, const gchar *terminator) { g_return_val_if_fail(session->read_data_buf->len == 0, -1); session->state = SESSION_RECV; g_free(session->read_data_terminator); session->read_data_terminator = g_strdup(terminator); g_get_current_time(&session->tv_prev); if (session->read_buf_len > 0) g_idle_add(session_recv_data_idle_cb, session); else session->io_tag = sock_add_watch(session->sock, G_IO_IN, session_read_data_cb, session); return 0; } static gboolean session_recv_data_idle_cb(gpointer data) { Session *session = SESSION(data); gboolean ret; ret = session_read_data_cb(session->sock, G_IO_IN, session); if (ret == TRUE) session->io_tag = sock_add_watch(session->sock, G_IO_IN, session_read_data_cb, session); return FALSE; } gint session_recv_data_as_file(Session *session, guint size, const gchar *terminator) { g_return_val_if_fail(session->read_data_pos == 0, -1); g_return_val_if_fail(session->read_data_fp == NULL, -1); session->state = SESSION_RECV; g_free(session->read_data_terminator); session->read_data_terminator = g_strdup(terminator); g_get_current_time(&session->tv_prev); session->read_data_fp = my_tmpfile(); if (!session->read_data_fp) { FILE_OP_ERROR("session_recv_data_as_file", "my_tmpfile"); return -1; } if (session->read_buf_len > 0) g_idle_add(session_recv_data_as_file_idle_cb, session); else session->io_tag = sock_add_watch(session->sock, G_IO_IN, session_read_data_as_file_cb, session); return 0; } static gboolean session_recv_data_as_file_idle_cb(gpointer data) { Session *session = SESSION(data); gboolean ret; ret = session_read_data_as_file_cb(session->sock, G_IO_IN, session); if (ret == TRUE) session->io_tag = sock_add_watch(session->sock, G_IO_IN, session_read_data_as_file_cb, session); return FALSE; } static gboolean session_read_msg_cb(SockInfo *source, GIOCondition condition, gpointer data) { Session *session = SESSION(data); gchar buf[SESSION_BUFFSIZE]; gint line_len; gchar *newline; gchar *msg; gint ret; g_return_val_if_fail(condition == G_IO_IN, FALSE); session_set_timeout(session, session->timeout_interval); if (session->read_buf_len == 0) { gint read_len; read_len = sock_read(session->sock, session->read_buf, SESSION_BUFFSIZE - 1); if (read_len == 0) { g_warning("sock_read: received EOF\n"); session->state = SESSION_EOF; return FALSE; } if (read_len < 0) { switch (errno) { case EAGAIN: return TRUE; default: g_warning("%s: sock_read: %s\n", G_STRFUNC, g_strerror(errno)); session->state = SESSION_ERROR; return FALSE; } } session->read_buf_len = read_len; } if ((newline = memchr(session->read_buf_p, '\n', session->read_buf_len)) != NULL) line_len = newline - session->read_buf_p + 1; else line_len = session->read_buf_len; if (line_len == 0) return TRUE; memcpy(buf, session->read_buf_p, line_len); buf[line_len] = '\0'; g_string_append(session->read_msg_buf, buf); session->read_buf_len -= line_len; if (session->read_buf_len == 0) session->read_buf_p = session->read_buf; else session->read_buf_p += line_len; /* incomplete read */ if (buf[line_len - 1] != '\n') return TRUE; /* complete */ if (session->io_tag > 0) { g_source_remove(session->io_tag); session->io_tag = 0; } /* callback */ msg = g_strdup(session->read_msg_buf->str); strretchomp(msg); g_string_truncate(session->read_msg_buf, 0); ret = session->recv_msg(session, msg); if (session->recv_msg_notify) session->recv_msg_notify(session, msg, session->recv_msg_notify_data); g_free(msg); if (ret < 0) session->state = SESSION_ERROR; return FALSE; } static gboolean session_read_data_cb(SockInfo *source, GIOCondition condition, gpointer data) { Session *session = SESSION(data); GByteArray *data_buf; gint terminator_len; gboolean complete = FALSE; guint data_len; gint ret; g_return_val_if_fail(condition == G_IO_IN, FALSE); session_set_timeout(session, session->timeout_interval); if (session->read_buf_len == 0) { gint read_len; read_len = sock_read(session->sock, session->read_buf, SESSION_BUFFSIZE); if (read_len == 0) { g_warning("sock_read: received EOF\n"); session->state = SESSION_EOF; return FALSE; } if (read_len < 0) { switch (errno) { case EAGAIN: return TRUE; default: g_warning("%s: sock_read: %s\n", G_STRFUNC, g_strerror(errno)); session->state = SESSION_ERROR; return FALSE; } } session->read_buf_len = read_len; } data_buf = session->read_data_buf; terminator_len = strlen(session->read_data_terminator); if (session->read_buf_len == 0) return TRUE; g_byte_array_append(data_buf, (guchar *)session->read_buf_p, session->read_buf_len); session->read_buf_len = 0; session->read_buf_p = session->read_buf; /* check if data is terminated */ if (data_buf->len >= terminator_len) { if (memcmp(data_buf->data, session->read_data_terminator, terminator_len) == 0) complete = TRUE; else if (data_buf->len >= terminator_len + 2 && memcmp(data_buf->data + data_buf->len - (terminator_len + 2), "\r\n", 2) == 0 && memcmp(data_buf->data + data_buf->len - terminator_len, session->read_data_terminator, terminator_len) == 0) complete = TRUE; } /* incomplete read */ if (!complete) { GTimeVal tv_cur; g_get_current_time(&tv_cur); if (tv_cur.tv_sec - session->tv_prev.tv_sec > 0 || tv_cur.tv_usec - session->tv_prev.tv_usec > UI_REFRESH_INTERVAL) { if (session->recv_data_progressive_notify) session->recv_data_progressive_notify (session, data_buf->len, 0, session->recv_data_progressive_notify_data); g_get_current_time(&session->tv_prev); } return TRUE; } /* complete */ if (session->io_tag > 0) { g_source_remove(session->io_tag); session->io_tag = 0; } data_len = data_buf->len - terminator_len; /* callback */ ret = session->recv_data_finished(session, (guchar *)data_buf->data, data_len); g_byte_array_set_size(data_buf, 0); if (session->recv_data_notify) session->recv_data_notify(session, data_len, session->recv_data_notify_data); if (ret < 0) session->state = SESSION_ERROR; return FALSE; } #define READ_BUF_LEFT() \ (SESSION_BUFFSIZE - (session->read_buf_p - session->read_buf) - \ session->read_buf_len) #define PREREAD_SIZE 8 static gboolean session_read_data_as_file_cb(SockInfo *source, GIOCondition condition, gpointer data) { Session *session = SESSION(data); gint terminator_len; gchar *data_begin_p; gint buf_data_len; gboolean complete = FALSE; gint read_len; gint write_len; gint ret; g_return_val_if_fail(condition == G_IO_IN, FALSE); session_set_timeout(session, session->timeout_interval); if (session->read_buf_len == 0) { read_len = sock_read(session->sock, session->read_buf_p, READ_BUF_LEFT()); if (read_len == 0) { g_warning("sock_read: received EOF\n"); session->state = SESSION_EOF; return FALSE; } if (read_len < 0) { switch (errno) { case EAGAIN: return TRUE; default: g_warning("%s: sock_read: %s\n", G_STRFUNC, g_strerror(errno)); session->state = SESSION_ERROR; return FALSE; } } session->read_buf_len = read_len; } terminator_len = strlen(session->read_data_terminator); if (session->read_buf_len == 0) return TRUE; /* +---------------buf_data_len---------------+ * +--preread_len--+-------read_buf_len-------+ * +---------------+--------------------------+-------------------+ * * ^data_begin_p ^read_buf_p * ^read_buf */ data_begin_p = session->read_buf_p - session->preread_len; buf_data_len = session->preread_len + session->read_buf_len; /* check if data is terminated */ if (buf_data_len >= terminator_len) { if (session->read_data_pos == 0 && buf_data_len == terminator_len && memcmp(data_begin_p, session->read_data_terminator, terminator_len) == 0) complete = TRUE; else if (buf_data_len >= terminator_len + 2 && memcmp(data_begin_p + buf_data_len - (terminator_len + 2), "\r\n", 2) == 0 && memcmp(data_begin_p + buf_data_len - terminator_len, session->read_data_terminator, terminator_len) == 0) complete = TRUE; } /* incomplete read */ if (!complete) { GTimeVal tv_cur; if (buf_data_len <= PREREAD_SIZE) { if (data_begin_p > session->read_buf) { g_memmove(session->read_buf, data_begin_p, buf_data_len); data_begin_p = session->read_buf; session->read_buf_p = session->read_buf + session->preread_len; } session->read_buf_p += session->read_buf_len; session->preread_len = buf_data_len; session->read_buf_len = 0; return TRUE; } if (READ_BUF_LEFT() >= (SESSION_BUFFSIZE / 2)) { session->read_buf_p += session->read_buf_len; session->preread_len = buf_data_len; session->read_buf_len = 0; return TRUE; } write_len = buf_data_len - PREREAD_SIZE; if (fwrite(data_begin_p, write_len, 1, session->read_data_fp) < 1) { g_warning("session_read_data_as_file_cb: " "writing data to file failed\n"); session->state = SESSION_ERROR; return FALSE; } session->read_data_pos += write_len; g_memmove(session->read_buf, data_begin_p + write_len, PREREAD_SIZE); session->read_buf_p = session->read_buf + PREREAD_SIZE; session->preread_len = PREREAD_SIZE; session->read_buf_len = 0; g_get_current_time(&tv_cur); if (tv_cur.tv_sec - session->tv_prev.tv_sec > 0 || tv_cur.tv_usec - session->tv_prev.tv_usec > UI_REFRESH_INTERVAL) { if (session->recv_data_progressive_notify) session->recv_data_progressive_notify (session, session->read_data_pos, 0, session->recv_data_progressive_notify_data); g_get_current_time(&session->tv_prev); } return TRUE; } /* complete */ if (session->io_tag > 0) { g_source_remove(session->io_tag); session->io_tag = 0; } write_len = buf_data_len - terminator_len; if (write_len > 0 && fwrite(data_begin_p, write_len, 1, session->read_data_fp) < 1) { g_warning("session_read_data_as_file_cb: " "writing data to file failed\n"); session->state = SESSION_ERROR; return FALSE; } session->read_data_pos += write_len; if (fflush(session->read_data_fp) == EOF) { perror("fflush"); g_warning("session_read_data_as_file_cb: " "writing data to file failed\n"); session->state = SESSION_ERROR; return FALSE; } rewind(session->read_data_fp); session->preread_len = 0; session->read_buf_len = 0; session->read_buf_p = session->read_buf; /* callback */ ret = session->recv_data_as_file_finished (session, session->read_data_fp, session->read_data_pos); fclose(session->read_data_fp); session->read_data_fp = NULL; if (session->recv_data_notify) session->recv_data_notify(session, session->read_data_pos, session->recv_data_notify_data); session->read_data_pos = 0; if (ret < 0) session->state = SESSION_ERROR; return FALSE; } static gint session_write_buf(Session *session) { gint write_len; gint to_write_len; g_return_val_if_fail(session->write_buf != NULL, -1); g_return_val_if_fail(session->write_buf_p != NULL, -1); g_return_val_if_fail(session->write_buf_len > 0, -1); to_write_len = session->write_buf_len - (session->write_buf_p - session->write_buf); to_write_len = MIN(to_write_len, SESSION_BUFFSIZE); write_len = sock_write(session->sock, session->write_buf_p, to_write_len); if (write_len < 0) { switch (errno) { case EAGAIN: write_len = 0; break; default: g_warning("sock_write: %s\n", g_strerror(errno)); session->state = SESSION_ERROR; return -1; } } /* incomplete write */ if (session->write_buf_p - session->write_buf + write_len < session->write_buf_len) { session->write_buf_p += write_len; return 1; } g_free(session->write_buf); session->write_buf = NULL; session->write_buf_p = NULL; session->write_buf_len = 0; return 0; } static gint session_write_data(Session *session) { gchar buf[SESSION_BUFFSIZE]; gint write_len; gint to_write_len; g_return_val_if_fail(session->write_data_fp != NULL, -1); g_return_val_if_fail(session->write_data_pos >= 0, -1); g_return_val_if_fail(session->write_data_len > 0, -1); to_write_len = session->write_data_len - session->write_data_pos; to_write_len = MIN(to_write_len, SESSION_BUFFSIZE); if (fread(buf, to_write_len, 1, session->write_data_fp) < 1) { g_warning("session_write_data: reading data from file failed\n"); session->state = SESSION_ERROR; return -1; } write_len = sock_write(session->sock, buf, to_write_len); if (write_len < 0) { switch (errno) { case EAGAIN: write_len = 0; break; default: g_warning("sock_write: %s\n", g_strerror(errno)); session->state = SESSION_ERROR; return -1; } } /* incomplete write */ if (session->write_data_pos + write_len < session->write_data_len) { session->write_data_pos += write_len; if (write_len < to_write_len) { if (fseek(session->write_data_fp, session->write_data_pos, SEEK_SET) < 0) { g_warning("session_write_data: file seek failed\n"); session->state = SESSION_ERROR; return -1; } } return 1; } session->write_data_fp = NULL; session->write_data_pos = 0; session->write_data_len = 0; return 0; } static gboolean session_write_msg_cb(SockInfo *source, GIOCondition condition, gpointer data) { Session *session = SESSION(data); gint ret; g_return_val_if_fail(condition == G_IO_OUT, FALSE); g_return_val_if_fail(session->write_buf != NULL, FALSE); g_return_val_if_fail(session->write_buf_p != NULL, FALSE); g_return_val_if_fail(session->write_buf_len > 0, FALSE); ret = session_write_buf(session); if (ret < 0) { session->state = SESSION_ERROR; return FALSE; } else if (ret > 0) return TRUE; if (session->io_tag > 0) { g_source_remove(session->io_tag); session->io_tag = 0; } session_recv_msg(session); return FALSE; } static gboolean session_write_data_cb(SockInfo *source, GIOCondition condition, gpointer data) { Session *session = SESSION(data); guint write_data_len; gint ret; g_return_val_if_fail(condition == G_IO_OUT, FALSE); g_return_val_if_fail(session->write_data_fp != NULL, FALSE); g_return_val_if_fail(session->write_data_pos >= 0, FALSE); g_return_val_if_fail(session->write_data_len > 0, FALSE); write_data_len = session->write_data_len; ret = session_write_data(session); if (ret < 0) { session->state = SESSION_ERROR; return FALSE; } else if (ret > 0) { GTimeVal tv_cur; g_get_current_time(&tv_cur); if (tv_cur.tv_sec - session->tv_prev.tv_sec > 0 || tv_cur.tv_usec - session->tv_prev.tv_usec > UI_REFRESH_INTERVAL) { session_set_timeout(session, session->timeout_interval); if (session->send_data_progressive_notify) session->send_data_progressive_notify (session, session->write_data_pos, write_data_len, session->send_data_progressive_notify_data); g_get_current_time(&session->tv_prev); } return TRUE; } if (session->io_tag > 0) { g_source_remove(session->io_tag); session->io_tag = 0; } /* callback */ ret = session->send_data_finished(session, write_data_len); if (session->send_data_notify) session->send_data_notify(session, write_data_len, session->send_data_notify_data); return FALSE; } libsylph-1.1.0/libsylph/smtp.c0000644000175000017500000003550410457702534013253 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include #include #include "smtp.h" #include "md5_hmac.h" #include "base64.h" #include "utils.h" static void smtp_session_destroy(Session *session); static gint smtp_from(SMTPSession *session); static gint smtp_auth(SMTPSession *session); static gint smtp_starttls(SMTPSession *session); static gint smtp_auth_cram_md5(SMTPSession *session); static gint smtp_auth_plain(SMTPSession *session); static gint smtp_auth_login(SMTPSession *session); static gint smtp_ehlo(SMTPSession *session); static gint smtp_ehlo_recv(SMTPSession *session, const gchar *msg); static gint smtp_helo(SMTPSession *session); static gint smtp_rcpt(SMTPSession *session); static gint smtp_data(SMTPSession *session); static gint smtp_send_data(SMTPSession *session); /* static gint smtp_rset(SMTPSession *session); */ static gint smtp_quit(SMTPSession *session); static gint smtp_eom(SMTPSession *session); static gint smtp_session_recv_msg(Session *session, const gchar *msg); static gint smtp_session_send_data_finished(Session *session, guint len); Session *smtp_session_new(void) { SMTPSession *session; session = g_new0(SMTPSession, 1); session_init(SESSION(session)); SESSION(session)->type = SESSION_SMTP; SESSION(session)->recv_msg = smtp_session_recv_msg; SESSION(session)->recv_data_finished = NULL; SESSION(session)->send_data_finished = smtp_session_send_data_finished; SESSION(session)->destroy = smtp_session_destroy; session->state = SMTP_READY; #if USE_SSL session->tls_init_done = FALSE; #endif session->hostname = NULL; session->user = NULL; session->pass = NULL; session->from = NULL; session->to_list = NULL; session->cur_to = NULL; session->send_data_fp = NULL; session->send_data_len = 0; session->avail_auth_type = 0; session->forced_auth_type = 0; session->auth_type = 0; session->error_val = SM_OK; session->error_msg = NULL; return SESSION(session); } static void smtp_session_destroy(Session *session) { SMTPSession *smtp_session = SMTP_SESSION(session); g_free(smtp_session->hostname); g_free(smtp_session->user); g_free(smtp_session->pass); g_free(smtp_session->from); if (smtp_session->send_data_fp) fclose(smtp_session->send_data_fp); g_free(smtp_session->error_msg); } static gint smtp_from(SMTPSession *session) { gchar buf[MSGBUFSIZE]; g_return_val_if_fail(session->from != NULL, SM_ERROR); session->state = SMTP_FROM; if (strchr(session->from, '<')) g_snprintf(buf, sizeof(buf), "MAIL FROM:%s", session->from); else g_snprintf(buf, sizeof(buf), "MAIL FROM:<%s>", session->from); session_send_msg(SESSION(session), SESSION_MSG_NORMAL, buf); log_print("SMTP> %s\n", buf); return SM_OK; } static gint smtp_auth(SMTPSession *session) { g_return_val_if_fail(session->user != NULL, SM_ERROR); session->state = SMTP_AUTH; if (session->forced_auth_type == SMTPAUTH_CRAM_MD5 || (session->forced_auth_type == 0 && (session->avail_auth_type & SMTPAUTH_CRAM_MD5) != 0)) smtp_auth_cram_md5(session); else if (session->forced_auth_type == SMTPAUTH_PLAIN || (session->forced_auth_type == 0 && (session->avail_auth_type & SMTPAUTH_PLAIN) != 0)) smtp_auth_plain(session); else if (session->forced_auth_type == SMTPAUTH_LOGIN || (session->forced_auth_type == 0 && (session->avail_auth_type & SMTPAUTH_LOGIN) != 0)) smtp_auth_login(session); else { log_warning(_("SMTP AUTH not available\n")); return SM_AUTHFAIL; } return SM_OK; } static gint smtp_auth_recv(SMTPSession *session, const gchar *msg) { gchar buf[MSGBUFSIZE]; switch (session->auth_type) { case SMTPAUTH_LOGIN: session->state = SMTP_AUTH_LOGIN_USER; if (!strncmp(msg, "334 ", 4)) { base64_encode(buf, (guchar *)session->user, strlen(session->user)); session_send_msg(SESSION(session), SESSION_MSG_NORMAL, buf); log_print("ESMTP> [USERID]\n"); } else { /* Server rejects AUTH */ session_send_msg(SESSION(session), SESSION_MSG_NORMAL, "*"); log_print("ESMTP> *\n"); } break; case SMTPAUTH_CRAM_MD5: session->state = SMTP_AUTH_CRAM_MD5; if (!strncmp(msg, "334 ", 4)) { gchar *response; gchar *response64; guchar *challenge; gint challengelen; gchar hexdigest[33]; challenge = g_malloc(strlen(msg + 4) + 1); challengelen = base64_decode(challenge, msg + 4, -1); challenge[challengelen] = '\0'; log_print("ESMTP< [Decoded: %s]\n", challenge); g_snprintf(buf, sizeof(buf), "%s", session->pass); md5_hex_hmac(hexdigest, challenge, challengelen, (guchar *)buf, strlen(buf)); g_free(challenge); response = g_strdup_printf ("%s %s", session->user, hexdigest); log_print("ESMTP> [Encoded: %s]\n", response); response64 = g_malloc((strlen(response) + 3) * 2 + 1); base64_encode(response64, (guchar *)response, strlen(response)); g_free(response); session_send_msg(SESSION(session), SESSION_MSG_NORMAL, response64); log_print("ESMTP> %s\n", response64); g_free(response64); } else { /* Server rejects AUTH */ session_send_msg(SESSION(session), SESSION_MSG_NORMAL, "*"); log_print("ESMTP> *\n"); } break; case SMTPAUTH_DIGEST_MD5: default: /* stop smtp_auth when no correct authtype */ session_send_msg(SESSION(session), SESSION_MSG_NORMAL, "*"); log_print("ESMTP> *\n"); break; } return SM_OK; } static gint smtp_auth_login_user_recv(SMTPSession *session, const gchar *msg) { gchar buf[MSGBUFSIZE]; session->state = SMTP_AUTH_LOGIN_PASS; if (!strncmp(msg, "334 ", 4)) base64_encode(buf, (guchar *)session->pass, strlen(session->pass)); else /* Server rejects AUTH */ g_snprintf(buf, sizeof(buf), "*"); session_send_msg(SESSION(session), SESSION_MSG_NORMAL, buf); log_print("ESMTP> [PASSWORD]\n"); return SM_OK; } static gint smtp_ehlo(SMTPSession *session) { gchar buf[MSGBUFSIZE]; session->state = SMTP_EHLO; session->avail_auth_type = 0; g_snprintf(buf, sizeof(buf), "EHLO %s", session->hostname ? session->hostname : get_domain_name()); session_send_msg(SESSION(session), SESSION_MSG_NORMAL, buf); log_print("ESMTP> %s\n", buf); return SM_OK; } static gint smtp_ehlo_recv(SMTPSession *session, const gchar *msg) { if (strncmp(msg, "250", 3) == 0) { const gchar *p = msg; p += 3; if (*p == '-' || *p == ' ') p++; if (g_ascii_strncasecmp(p, "AUTH", 4) == 0 && p[4] != '\0') { p += 5; if (strcasestr(p, "PLAIN")) session->avail_auth_type |= SMTPAUTH_PLAIN; if (strcasestr(p, "LOGIN")) session->avail_auth_type |= SMTPAUTH_LOGIN; if (strcasestr(p, "CRAM-MD5")) session->avail_auth_type |= SMTPAUTH_CRAM_MD5; if (strcasestr(p, "DIGEST-MD5")) session->avail_auth_type |= SMTPAUTH_DIGEST_MD5; } return SM_OK; } else if ((msg[0] == '1' || msg[0] == '2' || msg[0] == '3') && (msg[3] == ' ' || msg[3] == '\0')) return SM_OK; else if (msg[0] == '5' && msg[1] == '0' && (msg[2] == '4' || msg[2] == '3' || msg[2] == '1')) return SM_ERROR; return SM_ERROR; } static gint smtp_starttls(SMTPSession *session) { session->state = SMTP_STARTTLS; session_send_msg(SESSION(session), SESSION_MSG_NORMAL, "STARTTLS"); log_print("ESMTP> STARTTLS\n"); return SM_OK; } static gint smtp_auth_cram_md5(SMTPSession *session) { session->state = SMTP_AUTH; session->auth_type = SMTPAUTH_CRAM_MD5; session_send_msg(SESSION(session), SESSION_MSG_NORMAL, "AUTH CRAM-MD5"); log_print("ESMTP> AUTH CRAM-MD5\n"); return SM_OK; } static gint smtp_auth_plain(SMTPSession *session) { gchar *authstr; gint authlen; gchar *outbuf; gchar *p; session->state = SMTP_AUTH_PLAIN; session->auth_type = SMTPAUTH_PLAIN; /* * construct the string: \0\0 */ authlen = 1 + strlen(session->user) + 1 + strlen(session->pass); authstr = g_malloc(authlen + 1); p = authstr; *p++ = '\0'; strcpy(p, session->user); p += strlen(p) + 1; strcpy(p, session->pass); outbuf = g_malloc(sizeof("AUTH PLAIN ") + authlen * 2 + 1); strcpy(outbuf, "AUTH PLAIN "); p = outbuf + strlen(outbuf); base64_encode(p, (guchar *)authstr, authlen); session_send_msg(SESSION(session), SESSION_MSG_NORMAL, outbuf); log_print("ESMTP> AUTH PLAIN ********\n"); g_free(outbuf); g_free(authstr); return SM_OK; } static gint smtp_auth_login(SMTPSession *session) { session->state = SMTP_AUTH; session->auth_type = SMTPAUTH_LOGIN; session_send_msg(SESSION(session), SESSION_MSG_NORMAL, "AUTH LOGIN"); log_print("ESMTP> AUTH LOGIN\n"); return SM_OK; } static gint smtp_helo(SMTPSession *session) { gchar buf[MSGBUFSIZE]; session->state = SMTP_HELO; g_snprintf(buf, sizeof(buf), "HELO %s", session->hostname ? session->hostname : get_domain_name()); session_send_msg(SESSION(session), SESSION_MSG_NORMAL, buf); log_print("SMTP> %s\n", buf); return SM_OK; } static gint smtp_rcpt(SMTPSession *session) { gchar buf[MSGBUFSIZE]; gchar *to; g_return_val_if_fail(session->cur_to != NULL, SM_ERROR); session->state = SMTP_RCPT; to = (gchar *)session->cur_to->data; if (strchr(to, '<')) g_snprintf(buf, sizeof(buf), "RCPT TO:%s", to); else g_snprintf(buf, sizeof(buf), "RCPT TO:<%s>", to); session_send_msg(SESSION(session), SESSION_MSG_NORMAL, buf); log_print("SMTP> %s\n", buf); session->cur_to = session->cur_to->next; return SM_OK; } static gint smtp_data(SMTPSession *session) { session->state = SMTP_DATA; session_send_msg(SESSION(session), SESSION_MSG_NORMAL, "DATA"); log_print("SMTP> DATA\n"); return SM_OK; } static gint smtp_send_data(SMTPSession *session) { session->state = SMTP_SEND_DATA; session_send_data(SESSION(session), session->send_data_fp, session->send_data_len); return SM_OK; } #if 0 static gint smtp_rset(SMTPSession *session) { session->state = SMTP_RSET; session_send_msg(SESSION(session), SESSION_MSG_NORMAL, "RSET"); log_print("SMTP> RSET\n"); return SM_OK; } #endif static gint smtp_quit(SMTPSession *session) { session->state = SMTP_QUIT; session_send_msg(SESSION(session), SESSION_MSG_NORMAL, "QUIT"); log_print("SMTP> QUIT\n"); return SM_OK; } static gint smtp_eom(SMTPSession *session) { session->state = SMTP_EOM; session_send_msg(SESSION(session), SESSION_MSG_NORMAL, "."); log_print("SMTP> . (EOM)\n"); return SM_OK; } static gint smtp_session_recv_msg(Session *session, const gchar *msg) { SMTPSession *smtp_session = SMTP_SESSION(session); gboolean cont = FALSE; if (strlen(msg) < 4) { log_warning(_("bad SMTP response\n")); return -1; } switch (smtp_session->state) { case SMTP_EHLO: case SMTP_STARTTLS: case SMTP_AUTH: case SMTP_AUTH_PLAIN: case SMTP_AUTH_LOGIN_USER: case SMTP_AUTH_LOGIN_PASS: case SMTP_AUTH_CRAM_MD5: log_print("ESMTP< %s\n", msg); break; default: log_print("SMTP< %s\n", msg); break; } if (msg[0] == '5' && msg[1] == '0' && (msg[2] == '4' || msg[2] == '3' || msg[2] == '1')) { log_warning(_("error occurred on SMTP session\n")); smtp_session->state = SMTP_ERROR; smtp_session->error_val = SM_ERROR; g_free(smtp_session->error_msg); smtp_session->error_msg = g_strdup(msg); return -1; } if (!strncmp(msg, "535", 3)) { log_warning(_("error occurred on authentication\n")); smtp_session->state = SMTP_ERROR; smtp_session->error_val = SM_AUTHFAIL; g_free(smtp_session->error_msg); smtp_session->error_msg = g_strdup(msg); return -1; } if (msg[0] != '1' && msg[0] != '2' && msg[0] != '3') { log_warning(_("error occurred on SMTP session\n")); smtp_session->state = SMTP_ERROR; smtp_session->error_val = SM_ERROR; g_free(smtp_session->error_msg); smtp_session->error_msg = g_strdup(msg); return -1; } if (msg[3] == '-') cont = TRUE; else if (msg[3] != ' ' && msg[3] != '\0') { log_warning(_("bad SMTP response\n")); smtp_session->state = SMTP_ERROR; smtp_session->error_val = SM_UNRECOVERABLE; return -1; } /* ignore all multiline responses except for EHLO */ if (cont && smtp_session->state != SMTP_EHLO) return session_recv_msg(session); switch (smtp_session->state) { case SMTP_READY: case SMTP_CONNECTED: #if USE_SSL if (smtp_session->user || session->ssl_type != SSL_NONE) #else if (smtp_session->user) #endif smtp_ehlo(smtp_session); else smtp_helo(smtp_session); break; case SMTP_HELO: smtp_from(smtp_session); break; case SMTP_EHLO: smtp_ehlo_recv(smtp_session, msg); if (cont == TRUE) break; #if USE_SSL if (session->ssl_type == SSL_STARTTLS && smtp_session->tls_init_done == FALSE) { smtp_starttls(smtp_session); break; } #endif if (smtp_session->user) { if (smtp_auth(smtp_session) != SM_OK) smtp_from(smtp_session); } else smtp_from(smtp_session); break; case SMTP_STARTTLS: #if USE_SSL if (session_start_tls(session) < 0) { log_warning(_("can't start TLS session\n")); smtp_session->state = SMTP_ERROR; smtp_session->error_val = SM_ERROR; return -1; } smtp_session->tls_init_done = TRUE; smtp_ehlo(smtp_session); #endif break; case SMTP_AUTH: smtp_auth_recv(smtp_session, msg); break; case SMTP_AUTH_LOGIN_USER: smtp_auth_login_user_recv(smtp_session, msg); break; case SMTP_AUTH_PLAIN: case SMTP_AUTH_LOGIN_PASS: case SMTP_AUTH_CRAM_MD5: smtp_from(smtp_session); break; case SMTP_FROM: if (smtp_session->cur_to) smtp_rcpt(smtp_session); break; case SMTP_RCPT: if (smtp_session->cur_to) smtp_rcpt(smtp_session); else smtp_data(smtp_session); break; case SMTP_DATA: smtp_send_data(smtp_session); break; case SMTP_EOM: smtp_quit(smtp_session); break; case SMTP_QUIT: session_disconnect(session); break; case SMTP_ERROR: default: log_warning(_("error occurred on SMTP session\n")); smtp_session->error_val = SM_ERROR; return -1; } if (cont) return session_recv_msg(session); return 0; } static gint smtp_session_send_data_finished(Session *session, guint len) { smtp_eom(SMTP_SESSION(session)); return 0; } libsylph-1.1.0/libsylph/socket.c0000644000175000017500000010130210755251006013540 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2008 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include #ifdef G_OS_WIN32 # include # include #else # if HAVE_SYS_WAIT_H # include # endif # include # include # include # include # include #endif /* G_OS_WIN32 */ #include #include #include #include #include #include #include #include #if HAVE_SYS_SELECT_H # include #endif #include "socket.h" #if USE_SSL # include "ssl.h" #endif #include "utils.h" #define BUFFSIZE 8192 #ifdef G_OS_WIN32 #define SockDesc SOCKET #define SOCKET_IS_VALID(s) ((s) != INVALID_SOCKET) #else #define SockDesc gint #define SOCKET_IS_VALID(s) ((s) >= 0) #define INVALID_SOCKET (-1) #endif typedef gint (*SockAddrFunc) (GList *addr_list, gpointer data); typedef struct _SockConnectData SockConnectData; typedef struct _SockLookupData SockLookupData; typedef struct _SockAddrData SockAddrData; typedef struct _SockSource SockSource; struct _SockConnectData { gint id; gchar *hostname; gushort port; GList *addr_list; GList *cur_addr; SockLookupData *lookup_data; GIOChannel *channel; guint io_tag; SockConnectFunc func; gpointer data; }; struct _SockLookupData { gchar *hostname; pid_t child_pid; GIOChannel *channel; guint io_tag; SockAddrFunc func; gpointer data; }; struct _SockAddrData { gint family; gint socktype; gint protocol; gint addr_len; struct sockaddr *addr; }; struct _SockSource { GSource parent; SockInfo *sock; }; static guint io_timeout = 60; static GList *sock_connect_data_list = NULL; static GList *sock_list = NULL; static gboolean sock_prepare (GSource *source, gint *timeout); static gboolean sock_check (GSource *source); static gboolean sock_dispatch (GSource *source, GSourceFunc callback, gpointer user_data); GSourceFuncs sock_watch_funcs = { sock_prepare, sock_check, sock_dispatch, NULL }; static SockInfo *sock_find_from_fd (gint fd); static gint sock_connect_with_timeout (gint sock, const struct sockaddr *serv_addr, gint addrlen, guint timeout_secs); #ifndef INET6 static gint sock_connect_by_hostname (gint sock, const gchar *hostname, gushort port); #else static SockDesc sock_connect_by_getaddrinfo (const gchar *hostname, gushort port); #endif #ifdef G_OS_UNIX static void sock_address_list_free (GList *addr_list); static gboolean sock_connect_async_cb (GIOChannel *source, GIOCondition condition, gpointer data); static gint sock_connect_async_get_address_info_cb (GList *addr_list, gpointer data); static gint sock_connect_address_list_async (SockConnectData *conn_data); static gboolean sock_get_address_info_async_cb (GIOChannel *source, GIOCondition condition, gpointer data); static SockLookupData *sock_get_address_info_async (const gchar *hostname, gushort port, SockAddrFunc func, gpointer data); static gint sock_get_address_info_async_cancel (SockLookupData *lookup_data); #endif /* G_OS_UNIX */ gint sock_init(void) { #ifdef G_OS_WIN32 WSADATA wsadata; gint result; result = WSAStartup(MAKEWORD(2, 2), &wsadata); if (result != NO_ERROR) { g_warning("WSAStartup() failed\n"); return -1; } #endif return 0; } gint sock_cleanup(void) { #ifdef G_OS_WIN32 WSACleanup(); #endif return 0; } gint sock_set_io_timeout(guint sec) { io_timeout = sec; return 0; } gint fd_connect_inet(gushort port) { SockDesc sock; struct sockaddr_in addr; sock = socket(AF_INET, SOCK_STREAM, 0); if (!SOCKET_IS_VALID(sock)) { #ifdef G_OS_WIN32 g_warning("fd_connect_inet(): socket() failed: %ld\n", WSAGetLastError()); #else perror("fd_connect_inet(): socket"); #endif return -1; } memset(&addr, 0, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_port = htons(port); addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) < 0) { fd_close(sock); return -1; } return sock; } gint fd_open_inet(gushort port) { SockDesc sock; struct sockaddr_in addr; gint val; sock = socket(AF_INET, SOCK_STREAM, 0); if (!SOCKET_IS_VALID(sock)) { #ifdef G_OS_WIN32 g_warning("fd_open_inet(): socket() failed: %ld\n", WSAGetLastError()); #else perror("fd_open_inet(): socket"); #endif return -1; } val = 1; if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val)) < 0) { perror("setsockopt"); fd_close(sock); return -1; } memset(&addr, 0, sizeof(addr)); addr.sin_family = AF_INET; addr.sin_port = htons(port); addr.sin_addr.s_addr = htonl(INADDR_LOOPBACK); if (bind(sock, (struct sockaddr *)&addr, sizeof(addr)) < 0) { perror("bind"); fd_close(sock); return -1; } if (listen(sock, 1) < 0) { perror("listen"); fd_close(sock); return -1; } return sock; } gint fd_connect_unix(const gchar *path) { #ifdef G_OS_UNIX gint sock; struct sockaddr_un addr; sock = socket(PF_UNIX, SOCK_STREAM, 0); if (sock < 0) { perror("fd_connect_unix(): socket"); return -1; } memset(&addr, 0, sizeof(addr)); addr.sun_family = AF_UNIX; strncpy(addr.sun_path, path, sizeof(addr.sun_path) - 1); if (connect(sock, (struct sockaddr *)&addr, sizeof(addr)) < 0) { fd_close(sock); return -1; } return sock; #else return -1; #endif } gint fd_open_unix(const gchar *path) { #ifdef G_OS_UNIX gint sock; struct sockaddr_un addr; gint val; sock = socket(PF_UNIX, SOCK_STREAM, 0); if (sock < 0) { perror("sock_open_unix(): socket"); return -1; } val = 1; if (setsockopt(sock, SOL_SOCKET, SO_REUSEADDR, &val, sizeof(val)) < 0) { perror("setsockopt"); fd_close(sock); return -1; } memset(&addr, 0, sizeof(addr)); addr.sun_family = AF_UNIX; strncpy(addr.sun_path, path, sizeof(addr.sun_path) - 1); if (bind(sock, (struct sockaddr *)&addr, sizeof(addr)) < 0) { perror("bind"); fd_close(sock); return -1; } if (listen(sock, 1) < 0) { perror("listen"); fd_close(sock); return -1; } return sock; #else return -1; #endif } gint fd_accept(gint sock) { struct sockaddr_in caddr; guint caddr_len; caddr_len = sizeof(caddr); return accept(sock, (struct sockaddr *)&caddr, &caddr_len); } static SockInfo *sock_find_from_fd(gint fd) { GList *cur; for (cur = sock_list; cur != NULL; cur = cur->next) { if (((SockInfo *)cur->data)->sock == fd) return (SockInfo *)cur->data; } return NULL; } static gint set_nonblocking_mode(gint fd, gboolean nonblock) { #ifdef G_OS_WIN32 gulong val = nonblock ? 1 : 0; SockInfo *sock; if (!nonblock) WSAEventSelect(fd, NULL, 0); if (ioctlsocket(fd, FIONBIO, &val) == SOCKET_ERROR) { g_warning("set_nonblocking_mode(): ioctlsocket() failed: %ld\n", WSAGetLastError()); return -1; } sock = sock_find_from_fd(fd); if (sock) sock->nonblock = nonblock; debug_print("set nonblocking mode to %d\n", nonblock); return 0; #else gint flags; flags = fcntl(fd, F_GETFL, 0); if (flags < 0) { perror("fcntl"); return -1; } if (nonblock) flags |= O_NONBLOCK; else flags &= ~O_NONBLOCK; return fcntl(fd, F_SETFL, flags); #endif } gint sock_set_nonblocking_mode(SockInfo *sock, gboolean nonblock) { gint ret; g_return_val_if_fail(sock != NULL, -1); ret = set_nonblocking_mode(sock->sock, nonblock); if (ret == 0) sock->nonblock = nonblock; return ret; } static gboolean is_nonblocking_mode(gint fd) { #ifdef G_OS_WIN32 SockInfo *sock; sock = sock_find_from_fd(fd); if (sock) return sock->nonblock; return FALSE; #else gint flags; flags = fcntl(fd, F_GETFL, 0); if (flags < 0) { perror("fcntl"); return FALSE; } return ((flags & O_NONBLOCK) != 0); #endif } gboolean sock_is_nonblocking_mode(SockInfo *sock) { g_return_val_if_fail(sock != NULL, FALSE); #ifdef G_OS_WIN32 return sock->nonblock; #else return is_nonblocking_mode(sock->sock); #endif } gboolean sock_has_read_data(SockInfo *sock) { #ifdef G_OS_WIN32 gulong val; #if USE_SSL if (sock->ssl) return TRUE; #endif if (ioctlsocket(sock->sock, FIONREAD, &val) < 0) { g_warning("sock_has_read_data(): ioctlsocket() failed: %ld\n", WSAGetLastError()); return TRUE; } if (val == 0) return FALSE; else return TRUE; #else return TRUE; #endif } static gboolean sock_prepare(GSource *source, gint *timeout) { *timeout = 1; return FALSE; } static gboolean sock_check(GSource *source) { SockInfo *sock = ((SockSource *)source)->sock; struct timeval timeout = {0, 0}; fd_set fds; GIOCondition condition = sock->condition; #if USE_SSL if (sock->ssl) { if (condition & G_IO_IN) { if (SSL_pending(sock->ssl) > 0) return TRUE; if (SSL_want_write(sock->ssl)) condition |= G_IO_OUT; } if (condition & G_IO_OUT) { if (SSL_want_read(sock->ssl)) condition |= G_IO_IN; } } #endif FD_ZERO(&fds); FD_SET(sock->sock, &fds); select(sock->sock + 1, (condition & G_IO_IN) ? &fds : NULL, (condition & G_IO_OUT) ? &fds : NULL, NULL, &timeout); return FD_ISSET(sock->sock, &fds) != 0; } static gboolean sock_dispatch(GSource *source, GSourceFunc callback, gpointer user_data) { SockInfo *sock = ((SockSource *)source)->sock; return sock->callback(sock, sock->condition, sock->data); } static gboolean sock_watch_cb(GIOChannel *source, GIOCondition condition, gpointer data) { SockInfo *sock = (SockInfo *)data; if ((condition & sock->condition) == 0) return TRUE; return sock->callback(sock, sock->condition, sock->data); } guint sock_add_watch(SockInfo *sock, GIOCondition condition, SockFunc func, gpointer data) { sock->callback = func; sock->condition = condition; sock->data = data; #if USE_SSL if (sock->ssl) { GSource *source; source = g_source_new(&sock_watch_funcs, sizeof(SockSource)); ((SockSource *)source)->sock = sock; g_source_set_priority(source, G_PRIORITY_DEFAULT); g_source_set_can_recurse(source, FALSE); return g_source_attach(source, NULL); } #endif return g_io_add_watch(sock->sock_ch, condition, sock_watch_cb, sock); } static gint fd_check_io(gint fd, GIOCondition cond) { struct timeval timeout; fd_set fds; if (is_nonblocking_mode(fd)) return 0; timeout.tv_sec = io_timeout; timeout.tv_usec = 0; FD_ZERO(&fds); FD_SET(fd, &fds); if (cond == G_IO_IN) { select(fd + 1, &fds, NULL, NULL, io_timeout > 0 ? &timeout : NULL); } else { select(fd + 1, NULL, &fds, NULL, io_timeout > 0 ? &timeout : NULL); } if (FD_ISSET(fd, &fds)) { return 0; } else { g_warning("Socket IO timeout\n"); return -1; } } #ifdef G_OS_UNIX static sigjmp_buf jmpenv; static void timeout_handler(gint sig) { siglongjmp(jmpenv, 1); } #endif static gint sock_connect_with_timeout(gint sock, const struct sockaddr *serv_addr, gint addrlen, guint timeout_secs) { gint ret; #ifdef G_OS_UNIX void (*prev_handler)(gint); alarm(0); prev_handler = signal(SIGALRM, timeout_handler); if (sigsetjmp(jmpenv, 1)) { alarm(0); signal(SIGALRM, prev_handler); errno = ETIMEDOUT; return -1; } alarm(timeout_secs); #endif ret = connect(sock, serv_addr, addrlen); #ifdef G_OS_UNIX alarm(0); signal(SIGALRM, prev_handler); #endif return ret; } struct hostent *my_gethostbyname(const gchar *hostname) { struct hostent *hp; #ifdef G_OS_UNIX void (*prev_handler)(gint); alarm(0); prev_handler = signal(SIGALRM, timeout_handler); if (sigsetjmp(jmpenv, 1)) { alarm(0); signal(SIGALRM, prev_handler); fprintf(stderr, "%s: host lookup timed out.\n", hostname); errno = 0; return NULL; } alarm(io_timeout); #endif if ((hp = gethostbyname(hostname)) == NULL) { #ifdef G_OS_UNIX alarm(0); signal(SIGALRM, prev_handler); #endif fprintf(stderr, "%s: unknown host.\n", hostname); errno = 0; return NULL; } #ifdef G_OS_UNIX alarm(0); signal(SIGALRM, prev_handler); #endif return hp; } #ifndef INET6 static gint my_inet_aton(const gchar *hostname, struct in_addr *inp) { #if HAVE_INET_ATON return inet_aton(hostname, inp); #else #if HAVE_INET_ADDR guint32 inaddr; inaddr = inet_addr(hostname); if (inaddr != -1) { memcpy(inp, &inaddr, sizeof(inaddr)); return 1; } else return 0; #else return 0; #endif #endif /* HAVE_INET_ATON */ } static gint sock_connect_by_hostname(gint sock, const gchar *hostname, gushort port) { struct hostent *hp; struct sockaddr_in ad; memset(&ad, 0, sizeof(ad)); ad.sin_family = AF_INET; ad.sin_port = htons(port); if (!my_inet_aton(hostname, &ad.sin_addr)) { if ((hp = my_gethostbyname(hostname)) == NULL) { fprintf(stderr, "%s: unknown host.\n", hostname); errno = 0; return -1; } if (hp->h_length != 4 && hp->h_length != 8) { fprintf(stderr, "illegal address length received for host %s\n", hostname); errno = 0; return -1; } memcpy(&ad.sin_addr, hp->h_addr, hp->h_length); } return sock_connect_with_timeout(sock, (struct sockaddr *)&ad, sizeof(ad), io_timeout); } #else /* INET6 */ #ifdef G_OS_WIN32 /* MinGW defines gai_strerror() in ws2tcpip.h, but it is not implemented. */ #undef gai_strerror const gchar *gai_strerror(gint errcode) { static gchar str[32]; g_snprintf(str, sizeof(str), "gai errcode: (%d)", errcode); return str; } #endif static SockDesc sock_connect_by_getaddrinfo(const gchar *hostname, gushort port) { SockDesc sock = INVALID_SOCKET; gint gai_error; struct addrinfo hints, *res, *ai; gchar port_str[6]; memset(&hints, 0, sizeof(hints)); /* hints.ai_flags = AI_CANONNAME; */ hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; hints.ai_protocol = IPPROTO_TCP; /* convert port from integer to string. */ g_snprintf(port_str, sizeof(port_str), "%d", port); if ((gai_error = getaddrinfo(hostname, port_str, &hints, &res)) != 0) { fprintf(stderr, "getaddrinfo for %s:%s failed: %s\n", hostname, port_str, gai_strerror(gai_error)); return INVALID_SOCKET; } for (ai = res; ai != NULL; ai = ai->ai_next) { sock = socket(ai->ai_family, ai->ai_socktype, ai->ai_protocol); if (!SOCKET_IS_VALID(sock)) continue; if (sock_connect_with_timeout (sock, ai->ai_addr, ai->ai_addrlen, io_timeout) == 0) break; fd_close(sock); } if (res != NULL) freeaddrinfo(res); if (ai == NULL) return INVALID_SOCKET; return sock; } #endif /* !INET6 */ SockInfo *sock_connect(const gchar *hostname, gushort port) { SockDesc sock; SockInfo *sockinfo; #ifdef INET6 sock = sock_connect_by_getaddrinfo(hostname, port); if (!SOCKET_IS_VALID(sock)) return NULL; #else sock = socket(AF_INET, SOCK_STREAM, 0); if (!SOCKET_IS_VALID(sock)) { #ifdef G_OS_WIN32 g_warning("socket() failed: %ld\n", WSAGetLastError()); #else perror("socket"); #endif /* G_OS_WIN32 */ return NULL; } if (sock_connect_by_hostname(sock, hostname, port) < 0) { if (errno != 0) perror("connect"); fd_close(sock); return NULL; } #endif /* INET6 */ sockinfo = g_new0(SockInfo, 1); sockinfo->sock = sock; sockinfo->sock_ch = g_io_channel_unix_new(sock); sockinfo->hostname = g_strdup(hostname); sockinfo->port = port; sockinfo->state = CONN_ESTABLISHED; sockinfo->nonblock = FALSE; sock_list = g_list_prepend(sock_list, sockinfo); g_usleep(100000); return sockinfo; } #ifdef G_OS_UNIX static void sock_address_list_free(GList *addr_list) { GList *cur; for (cur = addr_list; cur != NULL; cur = cur->next) { SockAddrData *addr_data = (SockAddrData *)cur->data; g_free(addr_data->addr); g_free(addr_data); } g_list_free(addr_list); } /* asynchronous TCP connection */ static gboolean sock_connect_async_cb(GIOChannel *source, GIOCondition condition, gpointer data) { SockConnectData *conn_data = (SockConnectData *)data; gint fd; gint val; guint len; SockInfo *sockinfo; fd = g_io_channel_unix_get_fd(source); conn_data->io_tag = 0; conn_data->channel = NULL; g_io_channel_unref(source); if (condition & (G_IO_ERR | G_IO_HUP)) { debug_print("sock_connect_async_cb: condition = %d\n", condition); fd_close(fd); sock_connect_address_list_async(conn_data); return FALSE; } len = sizeof(val); if (getsockopt(fd, SOL_SOCKET, SO_ERROR, &val, &len) < 0) { perror("getsockopt"); fd_close(fd); sock_connect_address_list_async(conn_data); return FALSE; } if (val != 0) { fd_close(fd); sock_connect_address_list_async(conn_data); return FALSE; } sockinfo = g_new0(SockInfo, 1); sockinfo->sock = fd; sockinfo->sock_ch = g_io_channel_unix_new(fd); sockinfo->hostname = g_strdup(conn_data->hostname); sockinfo->port = conn_data->port; sockinfo->state = CONN_ESTABLISHED; sockinfo->nonblock = TRUE; sock_list = g_list_prepend(sock_list, sockinfo); conn_data->func(sockinfo, conn_data->data); sock_connect_async_cancel(conn_data->id); return FALSE; } static gint sock_connect_async_get_address_info_cb(GList *addr_list, gpointer data) { SockConnectData *conn_data = (SockConnectData *)data; conn_data->addr_list = addr_list; conn_data->cur_addr = addr_list; conn_data->lookup_data = NULL; return sock_connect_address_list_async(conn_data); } gint sock_connect_async(const gchar *hostname, gushort port, SockConnectFunc func, gpointer data) { static gint id = 1; SockConnectData *conn_data; conn_data = g_new0(SockConnectData, 1); conn_data->id = id++; conn_data->hostname = g_strdup(hostname); conn_data->port = port; conn_data->addr_list = NULL; conn_data->cur_addr = NULL; conn_data->io_tag = 0; conn_data->func = func; conn_data->data = data; conn_data->lookup_data = sock_get_address_info_async (hostname, port, sock_connect_async_get_address_info_cb, conn_data); if (conn_data->lookup_data == NULL) { g_free(conn_data->hostname); g_free(conn_data); return -1; } sock_connect_data_list = g_list_append(sock_connect_data_list, conn_data); return conn_data->id; } gint sock_connect_async_cancel(gint id) { SockConnectData *conn_data = NULL; GList *cur; for (cur = sock_connect_data_list; cur != NULL; cur = cur->next) { if (((SockConnectData *)cur->data)->id == id) { conn_data = (SockConnectData *)cur->data; break; } } if (conn_data) { sock_connect_data_list = g_list_remove(sock_connect_data_list, conn_data); if (conn_data->lookup_data) sock_get_address_info_async_cancel (conn_data->lookup_data); if (conn_data->io_tag > 0) g_source_remove(conn_data->io_tag); if (conn_data->channel) { g_io_channel_shutdown(conn_data->channel, FALSE, NULL); g_io_channel_unref(conn_data->channel); } sock_address_list_free(conn_data->addr_list); g_free(conn_data->hostname); g_free(conn_data); } else { g_warning("sock_connect_async_cancel: id %d not found.\n", id); return -1; } return 0; } static gint sock_connect_address_list_async(SockConnectData *conn_data) { SockAddrData *addr_data; gint sock = -1; for (; conn_data->cur_addr != NULL; conn_data->cur_addr = conn_data->cur_addr->next) { addr_data = (SockAddrData *)conn_data->cur_addr->data; if ((sock = socket(addr_data->family, addr_data->socktype, addr_data->protocol)) < 0) { perror("socket"); continue; } set_nonblocking_mode(sock, TRUE); if (connect(sock, addr_data->addr, addr_data->addr_len) < 0) { if (EINPROGRESS == errno) { break; } else { perror("connect"); fd_close(sock); } } else break; } if (conn_data->cur_addr == NULL) { g_warning("sock_connect_address_list_async: " "connection to %s:%d failed\n", conn_data->hostname, conn_data->port); conn_data->func(NULL, conn_data->data); sock_connect_async_cancel(conn_data->id); return -1; } debug_print("sock_connect_address_list_async: waiting for connect\n"); conn_data->cur_addr = conn_data->cur_addr->next; conn_data->channel = g_io_channel_unix_new(sock); conn_data->io_tag = g_io_add_watch(conn_data->channel, G_IO_OUT | G_IO_ERR | G_IO_HUP, sock_connect_async_cb, conn_data); return 0; } static gint sock_kill_process(pid_t pid) { pid_t ret = (pid_t)-1; kill(pid, SIGKILL); while (ret == (pid_t)-1) { if ((ret = waitpid(pid, NULL, 0)) != pid) { perror("sock_kill_process(): waitpid"); if (ret == (pid_t)-1 && errno != EINTR) break; } } return (gint)pid; } /* asynchronous DNS lookup */ static gboolean sock_get_address_info_async_cb(GIOChannel *source, GIOCondition condition, gpointer data) { SockLookupData *lookup_data = (SockLookupData *)data; GList *addr_list = NULL; SockAddrData *addr_data; gsize bytes_read; gint ai_member[4]; struct sockaddr *addr; for (;;) { if (g_io_channel_read(source, (gchar *)ai_member, sizeof(ai_member), &bytes_read) != G_IO_ERROR_NONE) { g_warning("sock_get_address_info_async_cb: " "address length read error\n"); break; } if (bytes_read == 0 || bytes_read != sizeof(ai_member)) break; if (ai_member[0] == AF_UNSPEC) { g_warning("DNS lookup failed\n"); break; } addr = g_malloc(ai_member[3]); if (g_io_channel_read(source, (gchar *)addr, ai_member[3], &bytes_read) != G_IO_ERROR_NONE) { g_warning("sock_get_address_info_async_cb: " "address data read error\n"); g_free(addr); break; } if (bytes_read != ai_member[3]) { g_warning("sock_get_address_info_async_cb: " "incomplete address data\n"); g_free(addr); break; } addr_data = g_new0(SockAddrData, 1); addr_data->family = ai_member[0]; addr_data->socktype = ai_member[1]; addr_data->protocol = ai_member[2]; addr_data->addr_len = ai_member[3]; addr_data->addr = addr; addr_list = g_list_append(addr_list, addr_data); } g_io_channel_shutdown(source, FALSE, NULL); g_io_channel_unref(source); sock_kill_process(lookup_data->child_pid); lookup_data->func(addr_list, lookup_data->data); g_free(lookup_data->hostname); g_free(lookup_data); return FALSE; } static SockLookupData *sock_get_address_info_async(const gchar *hostname, gushort port, SockAddrFunc func, gpointer data) { SockLookupData *lookup_data = NULL; gint pipe_fds[2]; pid_t pid; if (pipe(pipe_fds) < 0) { perror("pipe"); func(NULL, data); return NULL; } if ((pid = fork()) < 0) { perror("fork"); func(NULL, data); return NULL; } /* child process */ if (pid == 0) { #ifdef INET6 gint gai_err; struct addrinfo hints, *res, *ai; gchar port_str[6]; #else /* !INET6 */ struct hostent *hp; gchar **addr_list_p; struct sockaddr_in ad; #endif /* INET6 */ gint ai_member[4] = {AF_UNSPEC, 0, 0, 0}; close(pipe_fds[0]); #ifdef INET6 memset(&hints, 0, sizeof(hints)); /* hints.ai_flags = AI_CANONNAME; */ hints.ai_family = AF_UNSPEC; hints.ai_socktype = SOCK_STREAM; hints.ai_protocol = IPPROTO_TCP; g_snprintf(port_str, sizeof(port_str), "%d", port); gai_err = getaddrinfo(hostname, port_str, &hints, &res); if (gai_err != 0) { g_warning("getaddrinfo for %s:%s failed: %s\n", hostname, port_str, gai_strerror(gai_err)); fd_write_all(pipe_fds[1], (gchar *)ai_member, sizeof(ai_member)); close(pipe_fds[1]); _exit(1); } for (ai = res; ai != NULL; ai = ai->ai_next) { ai_member[0] = ai->ai_family; ai_member[1] = ai->ai_socktype; ai_member[2] = ai->ai_protocol; ai_member[3] = ai->ai_addrlen; fd_write_all(pipe_fds[1], (gchar *)ai_member, sizeof(ai_member)); fd_write_all(pipe_fds[1], (gchar *)ai->ai_addr, ai->ai_addrlen); } if (res != NULL) freeaddrinfo(res); #else /* !INET6 */ hp = my_gethostbyname(hostname); if (hp == NULL || hp->h_addrtype != AF_INET) { fd_write_all(pipe_fds[1], (gchar *)ai_member, sizeof(ai_member)); close(pipe_fds[1]); _exit(1); } ai_member[0] = AF_INET; ai_member[1] = SOCK_STREAM; ai_member[2] = IPPROTO_TCP; ai_member[3] = sizeof(ad); memset(&ad, 0, sizeof(ad)); ad.sin_family = AF_INET; ad.sin_port = htons(port); for (addr_list_p = hp->h_addr_list; *addr_list_p != NULL; addr_list_p++) { memcpy(&ad.sin_addr, *addr_list_p, hp->h_length); fd_write_all(pipe_fds[1], (gchar *)ai_member, sizeof(ai_member)); fd_write_all(pipe_fds[1], (gchar *)&ad, sizeof(ad)); } #endif /* INET6 */ close(pipe_fds[1]); _exit(0); } else { close(pipe_fds[1]); lookup_data = g_new0(SockLookupData, 1); lookup_data->hostname = g_strdup(hostname); lookup_data->child_pid = pid; lookup_data->func = func; lookup_data->data = data; lookup_data->channel = g_io_channel_unix_new(pipe_fds[0]); lookup_data->io_tag = g_io_add_watch (lookup_data->channel, G_IO_IN, sock_get_address_info_async_cb, lookup_data); } return lookup_data; } static gint sock_get_address_info_async_cancel(SockLookupData *lookup_data) { if (lookup_data->io_tag > 0) g_source_remove(lookup_data->io_tag); if (lookup_data->channel) { g_io_channel_shutdown(lookup_data->channel, FALSE, NULL); g_io_channel_unref(lookup_data->channel); } if (lookup_data->child_pid > 0) sock_kill_process(lookup_data->child_pid); g_free(lookup_data->hostname); g_free(lookup_data); return 0; } #endif /* G_OS_UNIX */ gint sock_printf(SockInfo *sock, const gchar *format, ...) { va_list args; gchar buf[BUFFSIZE]; va_start(args, format); g_vsnprintf(buf, sizeof(buf), format, args); va_end(args); return sock_write_all(sock, buf, strlen(buf)); } #ifdef G_OS_WIN32 static void sock_set_errno_from_last_error(gint error) { switch (error) { case WSAEWOULDBLOCK: errno = EAGAIN; break; default: debug_print("last error = %d\n", error); errno = 0; break; } } #endif gint sock_read(SockInfo *sock, gchar *buf, gint len) { g_return_val_if_fail(sock != NULL, -1); #if USE_SSL if (sock->ssl) return ssl_read(sock->ssl, buf, len); #endif return fd_read(sock->sock, buf, len); } gint fd_read(gint fd, gchar *buf, gint len) { #ifdef G_OS_WIN32 return fd_recv(fd, buf, len, 0); #else if (fd_check_io(fd, G_IO_IN) < 0) return -1; return read(fd, buf, len); #endif } #if USE_SSL gint ssl_read(SSL *ssl, gchar *buf, gint len) { gint err, ret; if (SSL_pending(ssl) == 0) { if (fd_check_io(SSL_get_rfd(ssl), G_IO_IN) < 0) return -1; } ret = SSL_read(ssl, buf, len); switch ((err = SSL_get_error(ssl, ret))) { case SSL_ERROR_NONE: return ret; case SSL_ERROR_WANT_READ: case SSL_ERROR_WANT_WRITE: errno = EAGAIN; return -1; case SSL_ERROR_ZERO_RETURN: return 0; default: g_warning("SSL_read() returned error %d, ret = %d\n", err, ret); if (ret == 0) return 0; return -1; } } #endif gint sock_write(SockInfo *sock, const gchar *buf, gint len) { g_return_val_if_fail(sock != NULL, -1); #if USE_SSL if (sock->ssl) return ssl_write(sock->ssl, buf, len); #endif return fd_write(sock->sock, buf, len); } gint fd_write(gint fd, const gchar *buf, gint len) { #ifdef G_OS_WIN32 gint ret; #endif if (fd_check_io(fd, G_IO_OUT) < 0) return -1; #ifdef G_OS_WIN32 ret = send(fd, buf, len, 0); if (ret == SOCKET_ERROR) { gint err; err = WSAGetLastError(); sock_set_errno_from_last_error(err); if (err != WSAEWOULDBLOCK) g_warning("fd_write() failed with %d (errno = %d)\n", err, errno); } return ret; #else return write(fd, buf, len); #endif } #if USE_SSL gint ssl_write(SSL *ssl, const gchar *buf, gint len) { gint ret; ret = SSL_write(ssl, buf, len); switch (SSL_get_error(ssl, ret)) { case SSL_ERROR_NONE: return ret; case SSL_ERROR_WANT_READ: case SSL_ERROR_WANT_WRITE: errno = EAGAIN; return -1; default: return -1; } } #endif gint sock_write_all(SockInfo *sock, const gchar *buf, gint len) { g_return_val_if_fail(sock != NULL, -1); #if USE_SSL if (sock->ssl) return ssl_write_all(sock->ssl, buf, len); #endif return fd_write_all(sock->sock, buf, len); } gint fd_write_all(gint fd, const gchar *buf, gint len) { gint n, wrlen = 0; while (len) { n = fd_write(fd, buf, len); if (n <= 0) return -1; len -= n; wrlen += n; buf += n; } return wrlen; } #if USE_SSL gint ssl_write_all(SSL *ssl, const gchar *buf, gint len) { gint n, wrlen = 0; while (len) { n = ssl_write(ssl, buf, len); if (n <= 0) return -1; len -= n; wrlen += n; buf += n; } return wrlen; } #endif gint fd_recv(gint fd, gchar *buf, gint len, gint flags) { #ifdef G_OS_WIN32 gint ret; #endif if (fd_check_io(fd, G_IO_IN) < 0) return -1; #ifdef G_OS_WIN32 ret = recv(fd, buf, len, flags); if (ret == SOCKET_ERROR) { gint err; err = WSAGetLastError(); sock_set_errno_from_last_error(err); if (err != WSAEWOULDBLOCK) g_warning("fd_recv(): failed with %d (errno = %d)\n", err, errno); } return ret; #else return recv(fd, buf, len, flags); #endif } gint fd_gets(gint fd, gchar *buf, gint len) { gchar *newline, *bp = buf; gint n; if (--len < 1) return -1; do { if ((n = fd_recv(fd, bp, len, MSG_PEEK)) <= 0) return -1; if ((newline = memchr(bp, '\n', n)) != NULL) n = newline - bp + 1; if ((n = fd_read(fd, bp, n)) < 0) return -1; bp += n; len -= n; } while (!newline && len); *bp = '\0'; return bp - buf; } #if USE_SSL gint ssl_gets(SSL *ssl, gchar *buf, gint len) { gchar *newline, *bp = buf; gint n; if (--len < 1) return -1; do { if ((n = ssl_peek(ssl, bp, len)) <= 0) return -1; if ((newline = memchr(bp, '\n', n)) != NULL) n = newline - bp + 1; if ((n = ssl_read(ssl, bp, n)) < 0) return -1; bp += n; len -= n; } while (!newline && len); *bp = '\0'; return bp - buf; } #endif gint sock_gets(SockInfo *sock, gchar *buf, gint len) { g_return_val_if_fail(sock != NULL, -1); #if USE_SSL if (sock->ssl) return ssl_gets(sock->ssl, buf, len); #endif return fd_gets(sock->sock, buf, len); } gint fd_getline(gint fd, gchar **line) { gchar buf[BUFFSIZE]; gchar *str = NULL; gint len; gulong size = 0; gulong cur_offset = 0; while ((len = fd_gets(fd, buf, sizeof(buf))) > 0) { size += len; str = g_realloc(str, size + 1); memcpy(str + cur_offset, buf, len + 1); cur_offset += len; if (buf[len - 1] == '\n') break; } *line = str; if (!str) return -1; else return (gint)size; } #if USE_SSL gint ssl_getline(SSL *ssl, gchar **line) { gchar buf[BUFFSIZE]; gchar *str = NULL; gint len; gulong size = 0; gulong cur_offset = 0; while ((len = ssl_gets(ssl, buf, sizeof(buf))) > 0) { size += len; str = g_realloc(str, size + 1); memcpy(str + cur_offset, buf, len + 1); cur_offset += len; if (buf[len - 1] == '\n') break; } *line = str; if (!str) return -1; else return (gint)size; } #endif gint sock_getline(SockInfo *sock, gchar **line) { g_return_val_if_fail(sock != NULL, -1); g_return_val_if_fail(line != NULL, -1); #if USE_SSL if (sock->ssl) return ssl_getline(sock->ssl, line); #endif return fd_getline(sock->sock, line); } gint sock_puts(SockInfo *sock, const gchar *buf) { gint ret; if ((ret = sock_write_all(sock, buf, strlen(buf))) < 0) return ret; return sock_write_all(sock, "\r\n", 2); } /* peek at the socket data without actually reading it */ #if USE_SSL gint ssl_peek(SSL *ssl, gchar *buf, gint len) { gint err, ret; if (SSL_pending(ssl) == 0) { if (fd_check_io(SSL_get_rfd(ssl), G_IO_IN) < 0) return -1; } ret = SSL_peek(ssl, buf, len); switch ((err = SSL_get_error(ssl, ret))) { case SSL_ERROR_NONE: return ret; case SSL_ERROR_WANT_READ: case SSL_ERROR_WANT_WRITE: errno = EAGAIN; return -1; case SSL_ERROR_ZERO_RETURN: return 0; default: g_warning("SSL_peek() returned error %d, ret = %d\n", err, ret); if (ret == 0) return 0; return -1; } } #endif gint sock_peek(SockInfo *sock, gchar *buf, gint len) { g_return_val_if_fail(sock != NULL, -1); #if USE_SSL if (sock->ssl) return ssl_peek(sock->ssl, buf, len); #endif return fd_recv(sock->sock, buf, len, MSG_PEEK); } gint sock_close(SockInfo *sock) { GList *cur; if (!sock) return 0; #if USE_SSL if (sock->ssl) ssl_done_socket(sock); #endif if (sock->sock_ch) { g_io_channel_shutdown(sock->sock_ch, FALSE, NULL); g_io_channel_unref(sock->sock_ch); } for (cur = sock_list; cur != NULL; cur = cur->next) { if ((SockInfo *)cur->data == sock) { sock_list = g_list_remove(sock_list, sock); break; } } g_free(sock->hostname); g_free(sock); return 0; } gint fd_close(gint fd) { #ifdef G_OS_WIN32 return closesocket(fd); #else return close(fd); #endif } libsylph-1.1.0/libsylph/ssl.c0000644000175000017500000001064410506675670013074 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #if USE_SSL #include "defs.h" #include #include #include "utils.h" #include "ssl.h" static SSL_CTX *ssl_ctx_SSLv23; static SSL_CTX *ssl_ctx_TLSv1; void ssl_init(void) { gchar *certs_dir; SSL_library_init(); SSL_load_error_strings(); certs_dir = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, "certs", NULL); if (!is_dir_exist(certs_dir)) { debug_print("%s doesn't exist, or not a directory.\n", certs_dir); g_free(certs_dir); certs_dir = NULL; } ssl_ctx_SSLv23 = SSL_CTX_new(SSLv23_client_method()); if (ssl_ctx_SSLv23 == NULL) { debug_print(_("SSLv23 not available\n")); } else { debug_print(_("SSLv23 available\n")); if (certs_dir && !SSL_CTX_load_verify_locations(ssl_ctx_SSLv23, NULL, certs_dir)) g_warning("SSLv23 SSL_CTX_load_verify_locations failed.\n"); } ssl_ctx_TLSv1 = SSL_CTX_new(TLSv1_client_method()); if (ssl_ctx_TLSv1 == NULL) { debug_print(_("TLSv1 not available\n")); } else { debug_print(_("TLSv1 available\n")); if (certs_dir && !SSL_CTX_load_verify_locations(ssl_ctx_TLSv1, NULL, certs_dir)) g_warning("TLSv1 SSL_CTX_load_verify_locations failed.\n"); } g_free(certs_dir); } void ssl_done(void) { if (ssl_ctx_SSLv23) { SSL_CTX_free(ssl_ctx_SSLv23); } if (ssl_ctx_TLSv1) { SSL_CTX_free(ssl_ctx_TLSv1); } } gboolean ssl_init_socket(SockInfo *sockinfo) { return ssl_init_socket_with_method(sockinfo, SSL_METHOD_SSLv23); } gboolean ssl_init_socket_with_method(SockInfo *sockinfo, SSLMethod method) { X509 *server_cert; gint err, ret; switch (method) { case SSL_METHOD_SSLv23: if (!ssl_ctx_SSLv23) { g_warning(_("SSL method not available\n")); return FALSE; } sockinfo->ssl = SSL_new(ssl_ctx_SSLv23); break; case SSL_METHOD_TLSv1: if (!ssl_ctx_TLSv1) { g_warning(_("SSL method not available\n")); return FALSE; } sockinfo->ssl = SSL_new(ssl_ctx_TLSv1); break; default: g_warning(_("Unknown SSL method *PROGRAM BUG*\n")); return FALSE; break; } if (sockinfo->ssl == NULL) { g_warning(_("Error creating ssl context\n")); return FALSE; } SSL_set_fd(sockinfo->ssl, sockinfo->sock); while ((ret = SSL_connect(sockinfo->ssl)) != 1) { err = SSL_get_error(sockinfo->ssl, ret); if (err == SSL_ERROR_WANT_READ || err == SSL_ERROR_WANT_WRITE) { g_usleep(100000); g_warning("SSL_connect(): try again\n"); continue; } g_warning("SSL_connect() failed with error %d, ret = %d (%s)\n", err, ret, ERR_error_string(ERR_get_error(), NULL)); return FALSE; } /* Get the cipher */ debug_print(_("SSL connection using %s\n"), SSL_get_cipher(sockinfo->ssl)); /* Get server's certificate (note: beware of dynamic allocation) */ if ((server_cert = SSL_get_peer_certificate(sockinfo->ssl)) != NULL) { gchar *str; glong verify_result; debug_print(_("Server certificate:\n")); if ((str = X509_NAME_oneline(X509_get_subject_name(server_cert), 0, 0)) != NULL) { debug_print(_(" Subject: %s\n"), str); g_free(str); } if ((str = X509_NAME_oneline(X509_get_issuer_name(server_cert), 0, 0)) != NULL) { debug_print(_(" Issuer: %s\n"), str); g_free(str); } verify_result = SSL_get_verify_result(sockinfo->ssl); if (verify_result == X509_V_OK) debug_print("SSL verify OK\n"); else g_warning("%s: SSL certificate verify failed (%ld: %s)\n", sockinfo->hostname, verify_result, X509_verify_cert_error_string(verify_result)); X509_free(server_cert); } return TRUE; } void ssl_done_socket(SockInfo *sockinfo) { if (sockinfo->ssl) { SSL_free(sockinfo->ssl); } } #endif /* USE_SSL */ libsylph-1.1.0/libsylph/stringtable.c0000644000175000017500000000760210457702533014603 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include "stringtable.h" #include "utils.h" /* alfons - hashed string table (I wasn't content with GStringChunk; * can't recall why :-) */ #if 0 #define XXX_DEBUG \ debug_print #else #define XXX_DEBUG \ if (0) debug_print #endif typedef struct StringEntry_ { gint ref_count; gchar *string; } StringEntry; static StringEntry *string_entry_new(const gchar *str) { StringEntry *entry; entry = g_new0(StringEntry, 1); entry->ref_count = 1; entry->string = g_strdup(str); return entry; } static void string_entry_free(StringEntry *entry) { g_return_if_fail(entry != NULL); g_free(entry->string); g_free(entry); } StringTable *string_table_new(void) { StringTable *strtable; strtable = g_new0(StringTable, 1); g_return_val_if_fail(strtable != NULL, NULL); strtable->hash_table = g_hash_table_new(g_str_hash, g_str_equal); g_return_val_if_fail(strtable->hash_table, NULL); return strtable; } gchar *string_table_lookup_string(StringTable *table, const gchar *str) { StringEntry *entry; entry = g_hash_table_lookup(table->hash_table, str); if (entry) { return entry->string; } else { return NULL; } } gchar *string_table_insert_string(StringTable *table, const gchar *str) { StringEntry *entry; entry = g_hash_table_lookup(table->hash_table, str); if (entry) { entry->ref_count++; XXX_DEBUG ("ref++ for %s (%d)\n", entry->string, entry->ref_count); } else { entry = string_entry_new(str); XXX_DEBUG ("inserting %s\n", str); /* insert entry->string instead of str, since it can be * invalid pointer after this. */ g_hash_table_insert(table->hash_table, entry->string, entry); } return entry->string; } void string_table_free_string(StringTable *table, const gchar *str) { StringEntry *entry; entry = g_hash_table_lookup(table->hash_table, str); if (entry) { entry->ref_count--; if (entry->ref_count <= 0) { XXX_DEBUG ("refcount of string %s dropped to zero\n", entry->string); g_hash_table_remove(table->hash_table, str); string_entry_free(entry); } else { XXX_DEBUG ("ref-- for %s (%d)\n", entry->string, entry->ref_count); } } } static gboolean string_table_remove_for_each_fn(gchar *key, StringEntry *entry, gpointer user_data) { g_return_val_if_fail(key != NULL, TRUE); g_return_val_if_fail(entry != NULL, TRUE); string_entry_free(entry); return TRUE; } void string_table_free(StringTable *table) { g_return_if_fail(table != NULL); g_return_if_fail(table->hash_table != NULL); g_hash_table_foreach_remove(table->hash_table, (GHRFunc)string_table_remove_for_each_fn, NULL); g_hash_table_destroy(table->hash_table); g_free(table); } static void string_table_stats_for_each_fn(gchar *key, StringEntry *entry, guint *totals) { if (entry->ref_count > 1) { *totals += strlen(key) * (entry->ref_count - 1); } } void string_table_get_stats(StringTable *table) { guint totals = 0; g_hash_table_foreach(table->hash_table, (GHFunc)string_table_stats_for_each_fn, &totals); XXX_DEBUG ("TOTAL UNSPILLED %d (%dK)\n", totals, totals / 1024); } libsylph-1.1.0/libsylph/sylmain.c0000644000175000017500000000755610734631403013744 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2006 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "defs.h" #include #include #ifdef G_OS_UNIX # include #endif #if HAVE_LOCALE_H # include #endif #include "sylmain.h" #include "prefs_common.h" #include "account.h" #include "filter.h" #include "folder.h" #include "socket.h" #include "codeconv.h" #include "utils.h" #if USE_SSL # include "ssl.h" #endif #define PACKAGE "libsylph" void syl_init(void) { #ifdef G_OS_WIN32 gchar *newpath; const gchar *lang_env; /* disable locale variable such as "LANG=1041" */ #define DISABLE_DIGIT_LOCALE(envstr) \ { \ lang_env = g_getenv(envstr); \ if (lang_env && g_ascii_isdigit(lang_env[0])) \ g_unsetenv(envstr); \ } DISABLE_DIGIT_LOCALE("LC_ALL"); DISABLE_DIGIT_LOCALE("LANG"); DISABLE_DIGIT_LOCALE("LC_CTYPE"); DISABLE_DIGIT_LOCALE("LC_MESSAGES"); #undef DISABLE_DIGIT_LOCALE #endif setlocale(LC_ALL, ""); set_startup_dir(); #ifdef G_OS_WIN32 /* include startup directory into %PATH% for GSpawn */ newpath = g_strconcat(get_startup_dir(), ";", g_getenv("PATH"), NULL); g_setenv("PATH", newpath, TRUE); g_free(newpath); #endif if (g_path_is_absolute(LOCALEDIR)) bindtextdomain(PACKAGE, LOCALEDIR); else { gchar *locale_dir; locale_dir = g_strconcat(get_startup_dir(), G_DIR_SEPARATOR_S, LOCALEDIR, NULL); #ifdef G_OS_WIN32 { gchar *locale_dir_; locale_dir_ = g_locale_from_utf8(locale_dir, -1, NULL, NULL, NULL); if (locale_dir_) { g_free(locale_dir); locale_dir = locale_dir_; } } #endif bindtextdomain(PACKAGE, locale_dir); g_free(locale_dir); } bind_textdomain_codeset(PACKAGE, CS_UTF_8); textdomain(PACKAGE); sock_init(); #if USE_SSL ssl_init(); #endif #ifdef G_OS_UNIX /* ignore SIGPIPE signal for preventing sudden death of program */ signal(SIGPIPE, SIG_IGN); #endif } #define MAKE_DIR_IF_NOT_EXIST(dir) \ { \ if (!is_dir_exist(dir)) { \ if (is_file_exist(dir)) { \ g_warning("File '%s' already exists. " \ "Can't create folder.", dir); \ return -1; \ } \ if (make_dir(dir) < 0) \ return -1; \ } \ } gint syl_setup_rc_dir(void) { if (!is_dir_exist(get_rc_dir())) { if (make_dir_hier(get_rc_dir()) < 0) return -1; } MAKE_DIR_IF_NOT_EXIST(get_mail_base_dir()); CHDIR_RETURN_VAL_IF_FAIL(get_rc_dir(), -1); MAKE_DIR_IF_NOT_EXIST(get_imap_cache_dir()); MAKE_DIR_IF_NOT_EXIST(get_news_cache_dir()); MAKE_DIR_IF_NOT_EXIST(get_mime_tmp_dir()); MAKE_DIR_IF_NOT_EXIST(get_tmp_dir()); MAKE_DIR_IF_NOT_EXIST(UIDL_DIR); /* remove temporary files */ remove_all_files(get_tmp_dir()); remove_all_files(get_mime_tmp_dir()); return 0; } void syl_save_all_state(void) { folder_write_list(); prefs_common_write_config(); filter_write_config(); account_write_config_all(); } void syl_cleanup(void) { /* remove temporary files */ remove_all_files(get_tmp_dir()); remove_all_files(get_mime_tmp_dir()); g_log_set_default_handler(g_log_default_handler, NULL); close_log_file(); #if USE_SSL ssl_done(); #endif sock_cleanup(); } libsylph-1.1.0/libsylph/unmime.c0000644000175000017500000000672710457702534013567 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include #include "codeconv.h" #include "base64.h" #include "quoted-printable.h" #define ENCODED_WORD_BEGIN "=?" #define ENCODED_WORD_END "?=" /* Decodes headers based on RFC2045 and RFC2047. */ gchar *unmime_header(const gchar *encoded_str) { const gchar *p = encoded_str; const gchar *eword_begin_p, *encoding_begin_p, *text_begin_p, *eword_end_p; gchar charset[32]; gchar encoding; gchar *conv_str; GString *outbuf; gchar *out_str; gsize out_len; outbuf = g_string_sized_new(strlen(encoded_str) * 2); while (*p != '\0') { gchar *decoded_text = NULL; gint len; eword_begin_p = strstr(p, ENCODED_WORD_BEGIN); if (!eword_begin_p) { g_string_append(outbuf, p); break; } encoding_begin_p = strchr(eword_begin_p + 2, '?'); if (!encoding_begin_p) { g_string_append(outbuf, p); break; } text_begin_p = strchr(encoding_begin_p + 1, '?'); if (!text_begin_p) { g_string_append(outbuf, p); break; } eword_end_p = strstr(text_begin_p + 1, ENCODED_WORD_END); if (!eword_end_p) { g_string_append(outbuf, p); break; } if (p == encoded_str) { g_string_append_len(outbuf, p, eword_begin_p - p); p = eword_begin_p; } else { /* ignore spaces between encoded words */ const gchar *sp; for (sp = p; sp < eword_begin_p; sp++) { if (!g_ascii_isspace(*sp)) { g_string_append_len (outbuf, p, eword_begin_p - p); p = eword_begin_p; break; } } } len = MIN(sizeof(charset) - 1, encoding_begin_p - (eword_begin_p + 2)); memcpy(charset, eword_begin_p + 2, len); charset[len] = '\0'; encoding = g_ascii_toupper(*(encoding_begin_p + 1)); if (encoding == 'B') { decoded_text = g_malloc (eword_end_p - (text_begin_p + 1) + 1); len = base64_decode((guchar *)decoded_text, text_begin_p + 1, eword_end_p - (text_begin_p + 1)); decoded_text[len] = '\0'; } else if (encoding == 'Q') { decoded_text = g_malloc (eword_end_p - (text_begin_p + 1) + 1); len = qp_decode_q_encoding ((guchar *)decoded_text, text_begin_p + 1, eword_end_p - (text_begin_p + 1)); } else { g_string_append_len(outbuf, p, eword_end_p + 2 - p); p = eword_end_p + 2; continue; } /* convert to UTF-8 */ conv_str = conv_codeset_strdup(decoded_text, charset, NULL); if (!conv_str) conv_str = conv_utf8todisp(decoded_text, NULL); g_string_append(outbuf, conv_str); g_free(conv_str); g_free(decoded_text); p = eword_end_p + 2; } out_str = outbuf->str; out_len = outbuf->len; g_string_free(outbuf, FALSE); return g_realloc(out_str, out_len + 1); } libsylph-1.1.0/libsylph/utils.c0000644000175000017500000024040210734635110013414 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2007 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "defs.h" #include #include #include #include #include #include #include #include #include #include #include #include #if HAVE_SYS_WAIT_H # include #endif #include #include #ifdef G_OS_WIN32 # include # include # include # include # include #endif #include "utils.h" #include "socket.h" #define BUFFSIZE 8192 static gboolean debug_mode = FALSE; #if !GLIB_CHECK_VERSION(2, 7, 0) && !defined(G_OS_UNIX) gint g_chdir(const gchar *path) { #ifdef G_OS_WIN32 if (G_WIN32_HAVE_WIDECHAR_API()) { wchar_t *wpath; gint retval; gint save_errno; wpath = g_utf8_to_utf16(path, -1, NULL, NULL, NULL); if (wpath == NULL) { errno = EINVAL; return -1; } retval = _wchdir(wpath); save_errno = errno; g_free(wpath); errno = save_errno; return retval; } else { gchar *cp_path; gint retval; gint save_errno; cp_path = g_locale_from_utf8(path, -1, NULL, NULL, NULL); if (cp_path == NULL) { errno = EINVAL; return -1; } retval = chdir(cp_path); save_errno = errno; g_free(cp_path); errno = save_errno; return retval; } #else return chdir(path); #endif } gint g_chmod(const gchar *path, gint mode) { #ifdef G_OS_WIN32 if (G_WIN32_HAVE_WIDECHAR_API()) { wchar_t *wpath; gint retval; gint save_errno; wpath = g_utf8_to_utf16(path, -1, NULL, NULL, NULL); if (wpath == NULL) { errno = EINVAL; return -1; } retval = _wchmod(wpath, mode); save_errno = errno; g_free(wpath); errno = save_errno; return retval; } else { gchar *cp_path; gint retval; gint save_errno; cp_path = g_locale_from_utf8(path, -1, NULL, NULL, NULL); if (cp_path == NULL) { errno = EINVAL; return -1; } retval = chmod(cp_path, mode); save_errno = errno; g_free(cp_path); errno = save_errno; return retval; } #else return chmod(path, mode); #endif } #endif /* GLIB_CHECK_VERSION && G_OS_UNIX */ void list_free_strings(GList *list) { list = g_list_first(list); while (list != NULL) { g_free(list->data); list = list->next; } } void slist_free_strings(GSList *list) { while (list != NULL) { g_free(list->data); list = list->next; } } static void hash_free_strings_func(gpointer key, gpointer value, gpointer data) { g_free(key); } void hash_free_strings(GHashTable *table) { g_hash_table_foreach(table, hash_free_strings_func, NULL); } static void hash_free_value_mem_func(gpointer key, gpointer value, gpointer data) { g_free(value); } void hash_free_value_mem(GHashTable *table) { g_hash_table_foreach(table, hash_free_value_mem_func, NULL); } gint str_case_equal(gconstpointer v, gconstpointer v2) { return g_ascii_strcasecmp((const gchar *)v, (const gchar *)v2) == 0; } guint str_case_hash(gconstpointer key) { const gchar *p = key; guint h = *p; if (h) { h = g_ascii_tolower(h); for (p += 1; *p != '\0'; p++) h = (h << 5) - h + g_ascii_tolower(*p); } return h; } void ptr_array_free_strings(GPtrArray *array) { gint i; gchar *str; g_return_if_fail(array != NULL); for (i = 0; i < array->len; i++) { str = g_ptr_array_index(array, i); g_free(str); } } gboolean str_find(const gchar *haystack, const gchar *needle) { return strstr(haystack, needle) != NULL ? TRUE : FALSE; } gboolean str_case_find(const gchar *haystack, const gchar *needle) { return strcasestr(haystack, needle) != NULL ? TRUE : FALSE; } gboolean str_find_equal(const gchar *haystack, const gchar *needle) { return strcmp(haystack, needle) == 0; } gboolean str_case_find_equal(const gchar *haystack, const gchar *needle) { return g_ascii_strcasecmp(haystack, needle) == 0; } gint to_number(const gchar *nstr) { register const gchar *p; if (*nstr == '\0') return -1; for (p = nstr; *p != '\0'; p++) if (!g_ascii_isdigit(*p)) return -1; return atoi(nstr); } /* convert integer into string, nstr must be not lower than 11 characters length */ gchar *itos_buf(gchar *nstr, gint n) { g_snprintf(nstr, 11, "%d", n); return nstr; } /* convert integer into string */ gchar *itos(gint n) { static gchar nstr[11]; return itos_buf(nstr, n); } gchar *to_human_readable(gint64 size) { static gchar str[16]; if (size < 1024) g_snprintf(str, sizeof(str), "%dB", (gint)size); else if ((size >> 10) < 1024) g_snprintf(str, sizeof(str), "%.1fKB", (gfloat)size / (1 << 10)); else if ((size >> 20) < 1024) g_snprintf(str, sizeof(str), "%.2fMB", (gfloat)size / (1 << 20)); else g_snprintf(str, sizeof(str), "%.2fGB", (gfloat)size / (1 << 30)); return str; } /* strcmp with NULL-checking */ gint strcmp2(const gchar *s1, const gchar *s2) { if (s1 == NULL || s2 == NULL) return -1; else return strcmp(s1, s2); } /* compare paths */ gint path_cmp(const gchar *s1, const gchar *s2) { gint len1, len2; #ifdef G_OS_WIN32 gchar *s1_, *s2_; #endif if (s1 == NULL || s2 == NULL) return -1; if (*s1 == '\0' || *s2 == '\0') return -1; len1 = strlen(s1); len2 = strlen(s2); #ifdef G_OS_WIN32 Xstrdup_a(s1_, s1, return -1); Xstrdup_a(s2_, s2, return -1); subst_char(s1_, '/', G_DIR_SEPARATOR); subst_char(s2_, '/', G_DIR_SEPARATOR); if (s1_[len1 - 1] == G_DIR_SEPARATOR) len1--; if (s2_[len2 - 1] == G_DIR_SEPARATOR) len2--; return strncmp(s1_, s2_, MAX(len1, len2)); #else if (s1[len1 - 1] == G_DIR_SEPARATOR) len1--; if (s2[len2 - 1] == G_DIR_SEPARATOR) len2--; return strncmp(s1, s2, MAX(len1, len2)); #endif } /* remove trailing return code */ gchar *strretchomp(gchar *str) { register gchar *s; if (!*str) return str; for (s = str + strlen(str) - 1; s >= str && (*s == '\n' || *s == '\r'); s--) *s = '\0'; return str; } /* remove trailing character */ gchar *strtailchomp(gchar *str, gchar tail_char) { register gchar *s; if (!*str) return str; if (tail_char == '\0') return str; for (s = str + strlen(str) - 1; s >= str && *s == tail_char; s--) *s = '\0'; return str; } /* remove CR (carriage return) */ gchar *strcrchomp(gchar *str) { register gchar *s; if (!*str) return str; s = str + strlen(str) - 1; if (*s == '\n' && s > str && *(s - 1) == '\r') { *(s - 1) = '\n'; *s = '\0'; } return str; } /* Similar to `strstr' but this function ignores the case of both strings. */ gchar *strcasestr(const gchar *haystack, const gchar *needle) { register size_t haystack_len, needle_len; haystack_len = strlen(haystack); needle_len = strlen(needle); if (haystack_len < needle_len || needle_len == 0) return NULL; while (haystack_len >= needle_len) { if (!g_ascii_strncasecmp(haystack, needle, needle_len)) return (gchar *)haystack; else { haystack++; haystack_len--; } } return NULL; } gpointer my_memmem(gconstpointer haystack, size_t haystacklen, gconstpointer needle, size_t needlelen) { const gchar *haystack_ = (const gchar *)haystack; const gchar *needle_ = (const gchar *)needle; const gchar *haystack_cur = (const gchar *)haystack; size_t haystack_left = haystacklen; if (needlelen == 1) return memchr(haystack_, *needle_, haystacklen); while ((haystack_cur = memchr(haystack_cur, *needle_, haystack_left)) != NULL) { if (haystacklen - (haystack_cur - haystack_) < needlelen) break; if (memcmp(haystack_cur + 1, needle_ + 1, needlelen - 1) == 0) return (gpointer)haystack_cur; else { haystack_cur++; haystack_left = haystacklen - (haystack_cur - haystack_); } } return NULL; } /* Copy no more than N characters of SRC to DEST, with NULL terminating. */ gchar *strncpy2(gchar *dest, const gchar *src, size_t n) { register const gchar *s = src; register gchar *d = dest; while (--n && *s) *d++ = *s++; *d = '\0'; return dest; } /* Similar to g_str_has_suffix() but case-insensitive */ gboolean str_has_suffix_case(const gchar *str, const gchar *suffix) { size_t len, s_len; if (!str || !suffix) return FALSE; len = strlen(str); s_len = strlen(suffix); if (s_len > len) return FALSE; return (g_ascii_strcasecmp(str + (len - s_len), suffix) == 0); } gint str_find_format_times(const gchar *haystack, gchar ch) { gint n = 0; const gchar *p = haystack; while ((p = strchr(p, '%')) != NULL) { ++p; if (*p == '%') { ++p; } else if (*p == ch) { ++p; ++n; } else return -1; } return n; } /* Examine if next block is non-ASCII string */ gboolean is_next_nonascii(const gchar *s) { const gchar *p; gboolean in_quote = FALSE; /* skip head space */ for (p = s; *p != '\0' && g_ascii_isspace(*p); p++) ; while (*p != '\0') { if (!in_quote && g_ascii_isspace(*p)) break; if (*p == '"') in_quote ^= TRUE; else if (*(guchar *)p > 127 || *(guchar *)p < 32) return TRUE; ++p; } return FALSE; } gint get_next_word_len(const gchar *s) { const gchar *p = s; gboolean in_quote = FALSE; while (*p != '\0') { if (!in_quote && g_ascii_isspace(*p)) break; if (*p == '"') in_quote ^= TRUE; ++p; } return p - s; } /* compare subjects */ gint subject_compare(const gchar *s1, const gchar *s2) { gchar *str1, *str2; if (!s1 || !s2) return -1; if (!*s1 || !*s2) return -1; Xstrdup_a(str1, s1, return -1); Xstrdup_a(str2, s2, return -1); trim_subject_for_compare(str1); trim_subject_for_compare(str2); if (!*str1 || !*str2) return -1; return strcmp(str1, str2); } gint subject_compare_for_sort(const gchar *s1, const gchar *s2) { gchar *str1, *str2; if (!s1 || !s2) return -1; Xstrdup_a(str1, s1, return -1); Xstrdup_a(str2, s2, return -1); trim_subject_for_sort(str1); trim_subject_for_sort(str2); return g_ascii_strcasecmp(str1, str2); } void trim_subject_for_compare(gchar *str) { gchar *srcp; eliminate_parenthesis(str, '[', ']'); eliminate_parenthesis(str, '(', ')'); g_strstrip(str); while (!g_ascii_strncasecmp(str, "Re:", 3)) { srcp = str + 3; while (g_ascii_isspace(*srcp)) srcp++; memmove(str, srcp, strlen(srcp) + 1); } } void trim_subject_for_sort(gchar *str) { gchar *srcp; g_strstrip(str); while (!g_ascii_strncasecmp(str, "Re:", 3)) { srcp = str + 3; while (g_ascii_isspace(*srcp)) srcp++; memmove(str, srcp, strlen(srcp) + 1); } } void trim_subject(gchar *str) { register gchar *srcp, *destp; gchar op, cl; gint in_brace; destp = str; while (!g_ascii_strncasecmp(destp, "Re:", 3)) { destp += 3; while (g_ascii_isspace(*destp)) destp++; } if (*destp == '[') { op = '['; cl = ']'; } else if (*destp == '(') { op = '('; cl = ')'; } else return; srcp = destp + 1; in_brace = 1; while (*srcp) { if (*srcp == op) in_brace++; else if (*srcp == cl) in_brace--; srcp++; if (in_brace == 0) break; } while (g_ascii_isspace(*srcp)) srcp++; memmove(destp, srcp, strlen(srcp) + 1); } void eliminate_parenthesis(gchar *str, gchar op, gchar cl) { register gchar *srcp, *destp; gint in_brace; srcp = destp = str; while ((destp = strchr(destp, op))) { in_brace = 1; srcp = destp + 1; while (*srcp) { if (*srcp == op) in_brace++; else if (*srcp == cl) in_brace--; srcp++; if (in_brace == 0) break; } while (g_ascii_isspace(*srcp)) srcp++; memmove(destp, srcp, strlen(srcp) + 1); } } void extract_parenthesis(gchar *str, gchar op, gchar cl) { register gchar *srcp, *destp; gint in_brace; srcp = destp = str; while ((srcp = strchr(destp, op))) { if (destp > str) *destp++ = ' '; memmove(destp, srcp + 1, strlen(srcp)); in_brace = 1; while(*destp) { if (*destp == op) in_brace++; else if (*destp == cl) in_brace--; if (in_brace == 0) break; destp++; } } *destp = '\0'; } void extract_parenthesis_with_escape(gchar *str, gchar op, gchar cl) { register gchar *srcp, *destp; gint in_brace; srcp = destp = str; while ((srcp = strchr(srcp, op))) { if (destp > str) *destp++ = ' '; ++srcp; in_brace = 1; while (*srcp) { if (*srcp == op) in_brace++; else if (*srcp == cl) in_brace--; if (in_brace == 0) break; if (*srcp == '\\' && *(srcp + 1) != '\0') ++srcp; *destp++ = *srcp++; } } *destp = '\0'; } void extract_parenthesis_with_skip_quote(gchar *str, gchar quote_chr, gchar op, gchar cl) { register gchar *srcp, *destp; gint in_brace; gboolean in_quote = FALSE; srcp = destp = str; while ((srcp = strchr_with_skip_quote(destp, quote_chr, op))) { if (destp > str) *destp++ = ' '; memmove(destp, srcp + 1, strlen(srcp)); in_brace = 1; while(*destp) { if (*destp == op && !in_quote) in_brace++; else if (*destp == cl && !in_quote) in_brace--; else if (*destp == quote_chr) in_quote ^= TRUE; if (in_brace == 0) break; destp++; } } *destp = '\0'; } void eliminate_quote(gchar *str, gchar quote_chr) { register gchar *srcp, *destp; srcp = destp = str; while ((destp = strchr(destp, quote_chr))) { if ((srcp = strchr(destp + 1, quote_chr))) { srcp++; while (g_ascii_isspace(*srcp)) srcp++; memmove(destp, srcp, strlen(srcp) + 1); } else { *destp = '\0'; break; } } } void extract_quote(gchar *str, gchar quote_chr) { register gchar *p; if ((str = strchr(str, quote_chr))) { if ((p = strchr(str + 1, quote_chr))) { *p = '\0'; memmove(str, str + 1, p - str); } } } void extract_quote_with_escape(gchar *str, gchar quote_chr) { register gchar *sp, *dp; if ((sp = strchr(str, quote_chr))) { dp = sp; ++sp; while (*sp) { if (*sp == quote_chr) break; else if (*sp == '\\' && *(sp + 1) != '\0') ++sp; *dp++ = *sp++; } *dp = '\0'; } } void eliminate_address_comment(gchar *str) { register gchar *srcp, *destp; gint in_brace; srcp = destp = str; while ((destp = strchr(destp, '"'))) { if ((srcp = strchr(destp + 1, '"'))) { srcp++; if (*srcp == '@') { destp = srcp + 1; } else { while (g_ascii_isspace(*srcp)) srcp++; memmove(destp, srcp, strlen(srcp) + 1); } } else { *destp = '\0'; break; } } srcp = destp = str; while ((destp = strchr_with_skip_quote(destp, '"', '('))) { in_brace = 1; srcp = destp + 1; while (*srcp) { if (*srcp == '(') in_brace++; else if (*srcp == ')') in_brace--; srcp++; if (in_brace == 0) break; } while (g_ascii_isspace(*srcp)) srcp++; memmove(destp, srcp, strlen(srcp) + 1); } } gchar *strchr_with_skip_quote(const gchar *str, gint quote_chr, gint c) { gboolean in_quote = FALSE; while (*str) { if (*str == c && !in_quote) return (gchar *)str; if (*str == quote_chr) in_quote ^= TRUE; str++; } return NULL; } gchar *strrchr_with_skip_quote(const gchar *str, gint quote_chr, gint c) { gboolean in_quote = FALSE; const gchar *p; p = str + strlen(str) - 1; while (p >= str) { if (*p == c && !in_quote) return (gchar *)p; if (*p == quote_chr) in_quote ^= TRUE; p--; } return NULL; } void extract_address(gchar *str) { eliminate_address_comment(str); if (strchr_with_skip_quote(str, '"', '<')) extract_parenthesis_with_skip_quote(str, '"', '<', '>'); g_strstrip(str); } void extract_list_id_str(gchar *str) { if (strchr_with_skip_quote(str, '"', '<')) extract_parenthesis_with_skip_quote(str, '"', '<', '>'); g_strstrip(str); } gchar *normalize_address_field(const gchar *str) { GString *new_str; GSList *addr_list, *cur; gchar *addr, *p, *q, *r; gchar *ret_str; addr_list = address_list_append_orig(NULL, str); new_str = g_string_new(NULL); for (cur = addr_list; cur != NULL; cur = cur->next) { p = addr = (gchar *)cur->data; q = strchr_with_skip_quote(p, '"', '<'); if (q && q > p) { r = q - 1; while (r > p && g_ascii_isspace(*r)) --r; g_string_append_len(new_str, p, r - p + 1); g_string_append_c(new_str, ' '); p = q; } if (*p == '<') { q = strchr(p, '>'); if (q) { r = q + 1; if (*r) { while (g_ascii_isspace(*r)) ++r; g_string_append(new_str, r); if (new_str->len > 0 && !g_ascii_isspace (new_str->str[new_str->len - 1])) g_string_append_c(new_str, ' '); } g_string_append_len(new_str, p, q - p + 1); } else { g_string_append(new_str, p); g_string_append_c(new_str, '>'); } } else g_string_append(new_str, p); if (cur->next) g_string_append(new_str, ", "); } slist_free_strings(addr_list); ret_str = new_str->str; g_string_free(new_str, FALSE); return ret_str; } gboolean address_equal(const gchar *addr1, const gchar *addr2) { gchar *addr1_, *addr2_; if (!addr1 || !addr2) return FALSE; Xstrdup_a(addr1_, addr1, return FALSE); Xstrdup_a(addr2_, addr2, return FALSE); extract_address(addr1_); extract_address(addr2_); return strcmp(addr1_, addr2_) == 0; } GSList *address_list_append_orig(GSList *addr_list, const gchar *str) { const gchar *p = str, *q; gchar *addr; if (!str) return addr_list; while (*p) { if (*p == ',' || g_ascii_isspace(*p)) { ++p; } else if ((q = strchr_with_skip_quote(p, '"', ','))) { addr = g_strndup(p, q - p); g_strstrip(addr); addr_list = g_slist_append(addr_list, addr); p = q + 1; } else { addr = g_strdup(p); g_strstrip(addr); addr_list = g_slist_append(addr_list, addr); break; } } return addr_list; } GSList *address_list_append(GSList *addr_list, const gchar *str) { gchar *work; gchar *workp; if (!str) return addr_list; Xstrdup_a(work, str, return addr_list); eliminate_address_comment(work); workp = work; while (workp && *workp) { gchar *p, *next; if ((p = strchr_with_skip_quote(workp, '"', ','))) { *p = '\0'; next = p + 1; } else next = NULL; if (strchr_with_skip_quote(workp, '"', '<')) extract_parenthesis_with_skip_quote (workp, '"', '<', '>'); g_strstrip(workp); if (*workp) addr_list = g_slist_append(addr_list, g_strdup(workp)); workp = next; } return addr_list; } GSList *references_list_prepend(GSList *msgid_list, const gchar *str) { const gchar *strp; if (!str) return msgid_list; strp = str; while (strp && *strp) { const gchar *start, *end; gchar *msgid; if ((start = strchr(strp, '<')) != NULL) { end = strchr(start + 1, '>'); if (!end) break; } else break; msgid = g_strndup(start + 1, end - start - 1); g_strstrip(msgid); if (*msgid) msgid_list = g_slist_prepend(msgid_list, msgid); else g_free(msgid); strp = end + 1; } return msgid_list; } GSList *references_list_append(GSList *msgid_list, const gchar *str) { GSList *list; list = references_list_prepend(NULL, str); list = g_slist_reverse(list); msgid_list = g_slist_concat(msgid_list, list); return msgid_list; } GSList *newsgroup_list_append(GSList *group_list, const gchar *str) { gchar *work; gchar *workp; if (!str) return group_list; Xstrdup_a(work, str, return group_list); workp = work; while (workp && *workp) { gchar *p, *next; if ((p = strchr_with_skip_quote(workp, '"', ','))) { *p = '\0'; next = p + 1; } else next = NULL; g_strstrip(workp); if (*workp) group_list = g_slist_append(group_list, g_strdup(workp)); workp = next; } return group_list; } GList *add_history(GList *list, const gchar *str) { GList *old; g_return_val_if_fail(str != NULL, list); old = g_list_find_custom(list, (gpointer)str, (GCompareFunc)strcmp2); if (old) { g_free(old->data); list = g_list_remove(list, old->data); } else if (g_list_length(list) >= MAX_HISTORY_SIZE) { GList *last; last = g_list_last(list); if (last) { g_free(last->data); list = g_list_remove(list, last->data); } } list = g_list_prepend(list, g_strdup(str)); return list; } void remove_return(gchar *str) { register gchar *p = str; while (*p) { if (*p == '\n' || *p == '\r') memmove(p, p + 1, strlen(p)); else p++; } } void remove_space(gchar *str) { register gchar *p = str; register gint spc; while (*p) { spc = 0; while (g_ascii_isspace(*(p + spc))) spc++; if (spc) memmove(p, p + spc, strlen(p + spc) + 1); else p++; } } void unfold_line(gchar *str) { register gchar *p = str; register gint spc; while (*p) { if (*p == '\n' || *p == '\r') { *p++ = ' '; spc = 0; while (g_ascii_isspace(*(p + spc))) spc++; if (spc) memmove(p, p + spc, strlen(p + spc) + 1); } else p++; } } void subst_char(gchar *str, gchar orig, gchar subst) { register gchar *p = str; while (*p) { if (*p == orig) *p = subst; p++; } } void subst_chars(gchar *str, gchar *orig, gchar subst) { register gchar *p = str; while (*p) { if (strchr(orig, *p) != NULL) *p = subst; ++p; } } void subst_null(gchar *str, gint len, gchar subst) { register gchar *p = str; while (len--) { if (*p == '\0') *p = subst; ++p; } } void subst_control(gchar *str, gchar subst) { register gchar *p = str; while (*p) { if (g_ascii_iscntrl(*p)) *p = subst; ++p; } } void subst_for_filename(gchar *str) { subst_chars(str, " \t\r\n\"'\\/:;*?<>|", '_'); } gchar *get_alt_filename(const gchar *filename, gint count) { const gchar *ext; gchar *alt_filename; ext = strrchr(filename, '.'); if (ext) { gchar *base; base = g_strndup(filename, ext - filename); alt_filename = g_strdup_printf("%s-%d%s", base, count, ext); g_free(base); } else alt_filename = g_strdup_printf("%s-%d", filename, count); return alt_filename; } gboolean is_header_line(const gchar *str) { if (str[0] == ':') return FALSE; while (*str != '\0' && *str != ' ') { if (*str == ':') return TRUE; str++; } return FALSE; } gboolean is_ascii_str(const gchar *str) { const guchar *p = (const guchar *)str; while (*p != '\0') { if (*p != '\t' && *p != ' ' && *p != '\r' && *p != '\n' && (*p < 32 || *p >= 127)) return FALSE; p++; } return TRUE; } gint get_quote_level(const gchar *str) { const gchar *first_pos; const gchar *last_pos; const gchar *p = str; gint quote_level = -1; /* speed up line processing by only searching to the last '>' */ if ((first_pos = strchr(str, '>')) != NULL) { /* skip a line if it contains a '<' before the initial '>' */ if (memchr(str, '<', first_pos - str) != NULL) return -1; last_pos = strrchr(first_pos, '>'); } else return -1; while (p <= last_pos) { while (p < last_pos) { if (g_ascii_isspace(*p)) p++; else break; } if (*p == '>') quote_level++; else if (*p != '-' && !g_ascii_isspace(*p) && p <= last_pos) { /* any characters are allowed except '-' and space */ while (*p != '-' && *p != '>' && !g_ascii_isspace(*p) && p < last_pos) p++; if (*p == '>') quote_level++; else break; } p++; } return quote_level; } gint check_line_length(const gchar *str, gint max_chars, gint *line) { const gchar *p = str, *q; gint cur_line = 0, len; while ((q = strchr(p, '\n')) != NULL) { len = q - p + 1; if (len > max_chars) { if (line) *line = cur_line; return -1; } p = q + 1; ++cur_line; } len = strlen(p); if (len > max_chars) { if (line) *line = cur_line; return -1; } return 0; } gchar *strstr_with_skip_quote(const gchar *haystack, const gchar *needle) { register guint haystack_len, needle_len; gboolean in_squote = FALSE, in_dquote = FALSE; haystack_len = strlen(haystack); needle_len = strlen(needle); if (haystack_len < needle_len || needle_len == 0) return NULL; while (haystack_len >= needle_len) { if (!in_squote && !in_dquote && !strncmp(haystack, needle, needle_len)) return (gchar *)haystack; /* 'foo"bar"' -> foo"bar" "foo'bar'" -> foo'bar' */ if (*haystack == '\'') { if (in_squote) in_squote = FALSE; else if (!in_dquote) in_squote = TRUE; } else if (*haystack == '\"') { if (in_dquote) in_dquote = FALSE; else if (!in_squote) in_dquote = TRUE; } haystack++; haystack_len--; } return NULL; } gchar *strchr_parenthesis_close(const gchar *str, gchar op, gchar cl) { const gchar *p; gchar quote_chr = '"'; gint in_brace; gboolean in_quote = FALSE; p = str; if ((p = strchr_with_skip_quote(p, quote_chr, op))) { p++; in_brace = 1; while (*p) { if (*p == op && !in_quote) in_brace++; else if (*p == cl && !in_quote) in_brace--; else if (*p == quote_chr) in_quote ^= TRUE; if (in_brace == 0) return (gchar *)p; p++; } } return NULL; } gchar **strsplit_parenthesis(const gchar *str, gchar op, gchar cl, gint max_tokens) { GSList *string_list = NULL, *slist; gchar **str_array; const gchar *s_op, *s_cl; guint i, n = 1; g_return_val_if_fail(str != NULL, NULL); if (max_tokens < 1) max_tokens = G_MAXINT; s_op = strchr_with_skip_quote(str, '"', op); if (!s_op) return NULL; str = s_op; s_cl = strchr_parenthesis_close(str, op, cl); if (s_cl) { do { guint len; gchar *new_string; str++; len = s_cl - str; new_string = g_new(gchar, len + 1); strncpy(new_string, str, len); new_string[len] = 0; string_list = g_slist_prepend(string_list, new_string); n++; str = s_cl + 1; while (*str && g_ascii_isspace(*str)) str++; if (*str != op) { string_list = g_slist_prepend(string_list, g_strdup("")); n++; s_op = strchr_with_skip_quote(str, '"', op); if (!--max_tokens || !s_op) break; str = s_op; } else s_op = str; s_cl = strchr_parenthesis_close(str, op, cl); } while (--max_tokens && s_cl); } str_array = g_new(gchar*, n); i = n - 1; str_array[i--] = NULL; for (slist = string_list; slist; slist = slist->next) str_array[i--] = slist->data; g_slist_free(string_list); return str_array; } gchar **strsplit_with_quote(const gchar *str, const gchar *delim, gint max_tokens) { GSList *string_list = NULL, *slist; gchar **str_array, *s, *new_str; guint i, n = 1, len; g_return_val_if_fail(str != NULL, NULL); g_return_val_if_fail(delim != NULL, NULL); if (max_tokens < 1) max_tokens = G_MAXINT; s = strstr_with_skip_quote(str, delim); if (s) { guint delimiter_len = strlen(delim); do { len = s - str; new_str = g_strndup(str, len); if (new_str[0] == '\'' || new_str[0] == '\"') { if (new_str[len - 1] == new_str[0]) { new_str[len - 1] = '\0'; memmove(new_str, new_str + 1, len - 1); } } string_list = g_slist_prepend(string_list, new_str); n++; str = s + delimiter_len; s = strstr_with_skip_quote(str, delim); } while (--max_tokens && s); } if (*str) { new_str = g_strdup(str); if (new_str[0] == '\'' || new_str[0] == '\"') { len = strlen(str); if (new_str[len - 1] == new_str[0]) { new_str[len - 1] = '\0'; memmove(new_str, new_str + 1, len - 1); } } string_list = g_slist_prepend(string_list, new_str); n++; } str_array = g_new(gchar*, n); i = n - 1; str_array[i--] = NULL; for (slist = string_list; slist; slist = slist->next) str_array[i--] = slist->data; g_slist_free(string_list); return str_array; } gchar **strsplit_csv(const gchar *str, gchar delim, gint max_tokens) { GSList *string_list = NULL, *slist; gchar **str_array, *s, *new_str; gchar *tmp, *tmpp, *p; guint i, n = 1, len; g_return_val_if_fail(str != NULL, NULL); if (max_tokens < 1) max_tokens = G_MAXINT; s = strchr_with_skip_quote(str, '"', delim); if (s) { do { len = s - str; tmpp = tmp = g_strndup(str, len); if (tmp[0] == '"' && tmp[len - 1] == tmp[0]) { tmp[len - 1] = '\0'; ++tmpp; p = new_str = g_malloc(len - 1); while (*tmpp) { if (*tmpp == '"' && *(tmpp + 1) == '"') ++tmpp; *p++ = *tmpp++; } *p = '\0'; g_free(tmp); } else new_str = tmp; string_list = g_slist_prepend(string_list, new_str); n++; str = s + 1; s = strchr_with_skip_quote(str, '"', delim); } while (--max_tokens && s); } if (*str) { len = strlen(str); tmpp = tmp = g_strdup(str); if (tmp[0] == '"' && tmp[len - 1] == tmp[0]) { tmp[len - 1] = '\0'; ++tmpp; p = new_str = g_malloc(len - 1); while (*tmpp) { if (*tmpp == '"' && *(tmpp + 1) == '"') ++tmpp; *p++ = *tmpp++; } *p = '\0'; g_free(tmp); } else new_str = tmp; string_list = g_slist_prepend(string_list, new_str); n++; } str_array = g_new(gchar*, n); i = n - 1; str_array[i--] = NULL; for (slist = string_list; slist; slist = slist->next) str_array[i--] = slist->data; g_slist_free(string_list); return str_array; } gchar *get_abbrev_newsgroup_name(const gchar *group, gint len) { gchar *abbrev_group; gchar *ap; const gchar *p = group; const gchar *last; last = group + strlen(group); abbrev_group = ap = g_malloc(strlen(group) + 1); while (*p) { while (*p == '.') *ap++ = *p++; if ((ap - abbrev_group) + (last - p) > len && strchr(p, '.')) { *ap++ = *p++; while (*p != '.') p++; } else { strcpy(ap, p); return abbrev_group; } } *ap = '\0'; return abbrev_group; } gchar *trim_string(const gchar *str, gint len) { const gchar *p = str; gint mb_len; gchar *new_str; gint new_len = 0; if (!str) return NULL; if (strlen(str) <= len) return g_strdup(str); if (g_utf8_validate(str, -1, NULL) == FALSE) return g_strdup(str); while (*p != '\0') { mb_len = g_utf8_skip[*(guchar *)p]; if (mb_len == 0) break; else if (new_len + mb_len > len) break; new_len += mb_len; p += mb_len; } Xstrndup_a(new_str, str, new_len, return g_strdup(str)); return g_strconcat(new_str, "...", NULL); } gchar *trim_string_before(const gchar *str, gint len) { const gchar *p = str; gint mb_len; gint new_len; if (!str) return NULL; if ((new_len = strlen(str)) <= len) return g_strdup(str); if (g_utf8_validate(str, -1, NULL) == FALSE) return g_strdup(str); while (*p != '\0') { mb_len = g_utf8_skip[*(guchar *)p]; if (mb_len == 0) break; new_len -= mb_len; p += mb_len; if (new_len <= len) break; } return g_strconcat("...", p, NULL); } GList *uri_list_extract_filenames(const gchar *uri_list) { GList *result = NULL; gchar *file; #if GLIB_CHECK_VERSION(2, 6, 0) gchar **uris; gint i; uris = g_uri_list_extract_uris(uri_list); g_return_val_if_fail(uris != NULL, NULL); for (i = 0; uris[i] != NULL; i++) { file = g_filename_from_uri(uris[i], NULL, NULL); if (file) result = g_list_append(result, file); } g_strfreev(uris); return result; #else const gchar *p, *q; p = uri_list; while (p) { if (*p != '#') { while (g_ascii_isspace(*p)) p++; if (!strncmp(p, "file:", 5)) { p += 5; while (*p == '/' && *(p + 1) == '/') p++; q = p; while (*q && *q != '\n' && *q != '\r') q++; if (q > p) { q--; while (q > p && g_ascii_isspace(*q)) q--; file = g_malloc(q - p + 2); strncpy(file, p, q - p + 1); file[q - p + 1] = '\0'; decode_uri(file, file); result = g_list_append(result, file); } } } p = strchr(p, '\n'); if (p) p++; } return result; #endif } #define HEX_TO_INT(val, hex) \ { \ gchar c = hex; \ \ if ('0' <= c && c <= '9') { \ val = c - '0'; \ } else if ('a' <= c && c <= 'f') { \ val = c - 'a' + 10; \ } else if ('A' <= c && c <= 'F') { \ val = c - 'A' + 10; \ } else { \ val = 0; \ } \ } #define INT_TO_HEX(hex, val) \ { \ if ((val) < 10) \ hex = '0' + (val); \ else \ hex = 'a' + (val) - 10; \ } /* Converts two-digit hexadecimal to decimal. Used for unescaping escaped * characters. */ static gint axtoi(const gchar *hex_str) { gint hi, lo; HEX_TO_INT(hi, hex_str[0]); HEX_TO_INT(lo, hex_str[1]); return (hi << 4) + lo; } static void get_hex_str(gchar *out, guchar ch) { gchar hex; INT_TO_HEX(hex, ch >> 4); *out++ = hex; INT_TO_HEX(hex, ch & 0x0f); *out++ = hex; } gboolean is_uri_string(const gchar *str) { return (g_ascii_strncasecmp(str, "http://", 7) == 0 || g_ascii_strncasecmp(str, "https://", 8) == 0 || g_ascii_strncasecmp(str, "ftp://", 6) == 0 || g_ascii_strncasecmp(str, "www.", 4) == 0); } gchar *get_uri_path(const gchar *uri) { if (g_ascii_strncasecmp(uri, "http://", 7) == 0) return (gchar *)(uri + 7); else if (g_ascii_strncasecmp(uri, "https://", 8) == 0) return (gchar *)(uri + 8); else if (g_ascii_strncasecmp(uri, "ftp://", 6) == 0) return (gchar *)(uri + 6); else return (gchar *)uri; } gint get_uri_len(const gchar *str) { const gchar *p; if (is_uri_string(str)) { for (p = str; *p != '\0'; p++) { if (!g_ascii_isgraph(*p) || strchr("()<>\"", *p)) break; } return p - str; } return 0; } /* Decodes URL-Encoded strings (i.e. strings in which spaces are replaced by * plusses, and escape characters are used) * Note: decoded_uri and encoded_uri can point the same location */ void decode_uri(gchar *decoded_uri, const gchar *encoded_uri) { gchar *dec = decoded_uri; const gchar *enc = encoded_uri; while (*enc) { if (*enc == '%') { enc++; if (g_ascii_isxdigit((guchar)enc[0]) && g_ascii_isxdigit((guchar)enc[1])) { *dec = axtoi(enc); dec++; enc += 2; } } else { if (*enc == '+') *dec = ' '; else *dec = *enc; dec++; enc++; } } *dec = '\0'; } void decode_xdigit_encoded_str(gchar *decoded, const gchar *encoded) { gchar *dec = decoded; const gchar *enc = encoded; while (*enc) { if (*enc == '%') { enc++; if (g_ascii_isxdigit((guchar)enc[0]) && g_ascii_isxdigit((guchar)enc[1])) { *dec++ = axtoi(enc); enc += 2; } } else *dec++ = *enc++; } *dec = '\0'; } gchar *encode_uri(const gchar *filename) { gchar *uri; uri = g_filename_to_uri(filename, NULL, NULL); if (!uri) uri = g_strconcat("file://", filename, NULL); return uri; } gchar *uriencode_for_filename(const gchar *filename) { const gchar *p = filename; gchar *enc, *outp; outp = enc = g_malloc(strlen(filename) * 3 + 1); for (p = filename; *p != '\0'; p++) { if (strchr("\t\r\n\"'\\/:;*?<>|", *p)) { *outp++ = '%'; get_hex_str(outp, *p); outp += 2; } else *outp++ = *p; } *outp = '\0'; return enc; } gchar *uriencode_for_mailto(const gchar *mailto) { const gchar *p = mailto; gchar *enc, *outp; outp = enc = g_malloc(strlen(mailto) * 3 + 1); for (p = mailto; *p != '\0'; p++) { if (*p == '+') { *outp++ = '%'; get_hex_str(outp, *p); outp += 2; } else *outp++ = *p; } *outp = '\0'; return enc; } gint scan_mailto_url(const gchar *mailto, gchar **to, gchar **cc, gchar **bcc, gchar **subject, gchar **body) { gchar *tmp_mailto; gchar *p; Xstrdup_a(tmp_mailto, mailto, return -1); if (!strncmp(tmp_mailto, "mailto:", 7)) tmp_mailto += 7; p = strchr(tmp_mailto, '?'); if (p) { *p = '\0'; p++; } if (to && !*to) *to = g_strdup(tmp_mailto); while (p) { gchar *field, *value; field = p; p = strchr(p, '='); if (!p) break; *p = '\0'; p++; value = p; p = strchr(p, '&'); if (p) { *p = '\0'; p++; } if (*value == '\0') continue; if (cc && !*cc && !g_ascii_strcasecmp(field, "cc")) { *cc = g_strdup(value); } else if (bcc && !*bcc && !g_ascii_strcasecmp(field, "bcc")) { *bcc = g_strdup(value); } else if (subject && !*subject && !g_ascii_strcasecmp(field, "subject")) { *subject = g_malloc(strlen(value) + 1); decode_uri(*subject, value); } else if (body && !*body && !g_ascii_strcasecmp(field, "body")) { *body = g_malloc(strlen(value) + 1); decode_uri(*body, value); } } return 0; } static gchar *startup_dir = NULL; static gchar *rc_dir = NULL; void set_startup_dir(void) { #ifdef G_OS_WIN32 if (!startup_dir) { startup_dir = g_win32_get_package_installation_directory (NULL, NULL); if (startup_dir) { if (g_chdir(startup_dir) < 0) { FILE_OP_ERROR(startup_dir, "chdir"); g_free(startup_dir); startup_dir = g_get_current_dir(); } } else startup_dir = g_get_current_dir(); } #else if (!startup_dir) startup_dir = g_get_current_dir(); #endif } void set_rc_dir(const gchar *dir) { if (rc_dir) g_free(rc_dir); if (dir) { if (g_path_is_absolute(dir)) rc_dir = g_strdup(dir); else rc_dir = g_strconcat(get_startup_dir(), G_DIR_SEPARATOR_S, dir, NULL); } else rc_dir = NULL; } const gchar *get_startup_dir(void) { if (!startup_dir) set_startup_dir(); return startup_dir; } #ifdef G_OS_WIN32 static gchar *get_win32_special_folder_path(gint nfolder) { gchar *folder = NULL; HRESULT hr; if (G_WIN32_HAVE_WIDECHAR_API()) { wchar_t path[MAX_PATH + 1]; hr = SHGetFolderPathW(NULL, nfolder, NULL, 0, path); if (hr == S_OK) folder = g_utf16_to_utf8(path, -1, NULL, NULL, NULL); } else { gchar path[MAX_PATH + 1]; hr = SHGetFolderPathA(NULL, nfolder, NULL, 0, path); if (hr == S_OK) folder = g_locale_to_utf8(path, -1, NULL, NULL, NULL); } return folder; } #endif const gchar *get_home_dir(void) { #ifdef G_OS_WIN32 static const gchar *home_dir = NULL; if (!home_dir) { home_dir = g_get_home_dir(); if (!home_dir) home_dir = "C:\\Sylpheed"; } return home_dir; #else return g_get_home_dir(); #endif } const gchar *get_document_dir(void) { #ifdef G_OS_WIN32 static const gchar *document_dir = NULL; HRESULT hr; if (!document_dir) { document_dir = get_win32_special_folder_path(CSIDL_PERSONAL); if (!document_dir) document_dir = get_home_dir(); } return document_dir; #else return get_home_dir(); #endif } const gchar *get_rc_dir(void) { if (!rc_dir) { #ifdef G_OS_WIN32 gchar *appdata; appdata = get_win32_special_folder_path(CSIDL_APPDATA); if (appdata) rc_dir = g_strconcat(appdata, G_DIR_SEPARATOR_S, RC_DIR, NULL); else rc_dir = g_strconcat(get_home_dir(), G_DIR_SEPARATOR_S, RC_DIR, NULL); g_free(appdata); #else rc_dir = g_strconcat(get_home_dir(), G_DIR_SEPARATOR_S, RC_DIR, NULL); #endif } return rc_dir; } const gchar *get_old_rc_dir(void) { static gchar *old_rc_dir = NULL; if (!old_rc_dir) old_rc_dir = g_strconcat(get_home_dir(), G_DIR_SEPARATOR_S, OLD_RC_DIR, NULL); return old_rc_dir; } const gchar *get_mail_base_dir(void) { #ifdef G_OS_WIN32 static gchar *mail_base_dir = NULL; if (!mail_base_dir) mail_base_dir = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, "Mailboxes", NULL); return mail_base_dir; #else return get_home_dir(); #endif } const gchar *get_news_cache_dir(void) { static gchar *news_cache_dir = NULL; if (!news_cache_dir) news_cache_dir = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, NEWS_CACHE_DIR, NULL); return news_cache_dir; } const gchar *get_imap_cache_dir(void) { static gchar *imap_cache_dir = NULL; if (!imap_cache_dir) imap_cache_dir = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, IMAP_CACHE_DIR, NULL); return imap_cache_dir; } const gchar *get_mime_tmp_dir(void) { static gchar *mime_tmp_dir = NULL; if (!mime_tmp_dir) mime_tmp_dir = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, MIME_TMP_DIR, NULL); return mime_tmp_dir; } const gchar *get_template_dir(void) { static gchar *template_dir = NULL; if (!template_dir) template_dir = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, TEMPLATE_DIR, NULL); return template_dir; } const gchar *get_tmp_dir(void) { static gchar *tmp_dir = NULL; if (!tmp_dir) tmp_dir = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, TMP_DIR, NULL); return tmp_dir; } gchar *get_tmp_file(void) { gchar *tmp_file; static guint32 id = 0; tmp_file = g_strdup_printf("%s%ctmpfile.%08x", get_tmp_dir(), G_DIR_SEPARATOR, id++); return tmp_file; } const gchar *get_domain_name(void) { static gchar *domain_name = NULL; if (!domain_name) { gchar buf[128] = ""; struct hostent *hp; if (gethostname(buf, sizeof(buf)) < 0) { perror("gethostname"); domain_name = "unknown"; } else { buf[sizeof(buf) - 1] = '\0'; if ((hp = my_gethostbyname(buf)) == NULL) { perror("gethostbyname"); domain_name = g_strdup(buf); } else { domain_name = g_strdup(hp->h_name); } } debug_print("domain name = %s\n", domain_name); if (is_next_nonascii(domain_name)) { g_warning("invalid domain name: %s\n", domain_name); g_free(domain_name); domain_name = "unknown"; } } return domain_name; } off_t get_file_size(const gchar *file) { struct stat s; if (g_stat(file, &s) < 0) { FILE_OP_ERROR(file, "stat"); return -1; } return s.st_size; } off_t get_file_size_as_crlf(const gchar *file) { FILE *fp; off_t size = 0; gchar buf[BUFFSIZE]; if ((fp = g_fopen(file, "rb")) == NULL) { FILE_OP_ERROR(file, "fopen"); return -1; } while (fgets(buf, sizeof(buf), fp) != NULL) { strretchomp(buf); size += strlen(buf) + 2; } if (ferror(fp)) { FILE_OP_ERROR(file, "fgets"); size = -1; } fclose(fp); return size; } off_t get_left_file_size(FILE *fp) { glong pos; glong end; off_t size; if ((pos = ftell(fp)) < 0) { perror("ftell"); return -1; } if (fseek(fp, 0L, SEEK_END) < 0) { perror("fseek"); return -1; } if ((end = ftell(fp)) < 0) { perror("fseek"); return -1; } size = end - pos; if (fseek(fp, pos, SEEK_SET) < 0) { perror("fseek"); return -1; } return size; } gboolean file_exist(const gchar *file, gboolean allow_fifo) { if (file == NULL) return FALSE; if (allow_fifo) { struct stat s; if (g_stat(file, &s) < 0) { if (ENOENT != errno) FILE_OP_ERROR(file, "stat"); return FALSE; } if (S_ISREG(s.st_mode) || S_ISFIFO(s.st_mode)) return TRUE; } else { return g_file_test(file, G_FILE_TEST_IS_REGULAR); } return FALSE; } gboolean is_dir_exist(const gchar *dir) { if (dir == NULL) return FALSE; return g_file_test(dir, G_FILE_TEST_IS_DIR); } gboolean is_file_entry_exist(const gchar *file) { if (file == NULL) return FALSE; return g_file_test(file, G_FILE_TEST_EXISTS); } gboolean dirent_is_regular_file(struct dirent *d) { #ifdef HAVE_DIRENT_D_TYPE if (d->d_type == DT_REG) return TRUE; else if (d->d_type != DT_UNKNOWN) return FALSE; #endif return g_file_test(d->d_name, G_FILE_TEST_IS_REGULAR); } gboolean dirent_is_directory(struct dirent *d) { #ifdef HAVE_DIRENT_D_TYPE if (d->d_type == DT_DIR) return TRUE; else if (d->d_type != DT_UNKNOWN) return FALSE; #endif return g_file_test(d->d_name, G_FILE_TEST_IS_DIR); } gint change_dir(const gchar *dir) { gchar *prevdir = NULL; if (debug_mode) prevdir = g_get_current_dir(); if (g_chdir(dir) < 0) { FILE_OP_ERROR(dir, "chdir"); if (debug_mode) g_free(prevdir); return -1; } else if (debug_mode) { gchar *cwd; cwd = g_get_current_dir(); if (strcmp(prevdir, cwd) != 0) g_print("current dir: %s\n", cwd); g_free(cwd); g_free(prevdir); } return 0; } gint make_dir(const gchar *dir) { if (g_mkdir(dir, S_IRWXU) < 0) { FILE_OP_ERROR(dir, "mkdir"); return -1; } if (g_chmod(dir, S_IRWXU) < 0) FILE_OP_ERROR(dir, "chmod"); return 0; } gint make_dir_hier(const gchar *dir) { gchar *parent_dir; const gchar *p; for (p = dir; (p = strchr(p, G_DIR_SEPARATOR)) != NULL; p++) { parent_dir = g_strndup(dir, p - dir); if (*parent_dir != '\0') { if (!is_dir_exist(parent_dir)) { if (make_dir(parent_dir) < 0) { g_free(parent_dir); return -1; } } } g_free(parent_dir); } if (!is_dir_exist(dir)) { if (make_dir(dir) < 0) return -1; } return 0; } gint remove_all_files(const gchar *dir) { GDir *dp; const gchar *dir_name; gchar *prev_dir; prev_dir = g_get_current_dir(); if (g_chdir(dir) < 0) { FILE_OP_ERROR(dir, "chdir"); g_free(prev_dir); return -1; } if ((dp = g_dir_open(".", 0, NULL)) == NULL) { g_warning("failed to open directory: %s\n", dir); g_free(prev_dir); return -1; } while ((dir_name = g_dir_read_name(dp)) != NULL) { if (g_unlink(dir_name) < 0) FILE_OP_ERROR(dir_name, "unlink"); } g_dir_close(dp); if (g_chdir(prev_dir) < 0) { FILE_OP_ERROR(prev_dir, "chdir"); g_free(prev_dir); return -1; } g_free(prev_dir); return 0; } gint remove_numbered_files(const gchar *dir, guint first, guint last) { GDir *dp; const gchar *dir_name; gchar *prev_dir; gint file_no; prev_dir = g_get_current_dir(); if (g_chdir(dir) < 0) { FILE_OP_ERROR(dir, "chdir"); g_free(prev_dir); return -1; } if ((dp = g_dir_open(".", 0, NULL)) == NULL) { g_warning("failed to open directory: %s\n", dir); g_free(prev_dir); return -1; } while ((dir_name = g_dir_read_name(dp)) != NULL) { file_no = to_number(dir_name); if (file_no > 0 && first <= file_no && file_no <= last) { if (is_dir_exist(dir_name)) continue; if (g_unlink(dir_name) < 0) FILE_OP_ERROR(dir_name, "unlink"); } } g_dir_close(dp); if (g_chdir(prev_dir) < 0) { FILE_OP_ERROR(prev_dir, "chdir"); g_free(prev_dir); return -1; } g_free(prev_dir); return 0; } gint remove_all_numbered_files(const gchar *dir) { return remove_numbered_files(dir, 0, UINT_MAX); } gint remove_expired_files(const gchar *dir, guint hours) { GDir *dp; const gchar *dir_name; struct stat s; gchar *prev_dir; gint file_no; time_t mtime, now, expire_time; prev_dir = g_get_current_dir(); if (g_chdir(dir) < 0) { FILE_OP_ERROR(dir, "chdir"); g_free(prev_dir); return -1; } if ((dp = g_dir_open(".", 0, NULL)) == NULL) { g_warning("failed to open directory: %s\n", dir); g_free(prev_dir); return -1; } now = time(NULL); expire_time = hours * 60 * 60; while ((dir_name = g_dir_read_name(dp)) != NULL) { file_no = to_number(dir_name); if (file_no > 0) { if (g_stat(dir_name, &s) < 0) { FILE_OP_ERROR(dir_name, "stat"); continue; } if (S_ISDIR(s.st_mode)) continue; mtime = MAX(s.st_mtime, s.st_atime); if (now - mtime > expire_time) { if (g_unlink(dir_name) < 0) FILE_OP_ERROR(dir_name, "unlink"); } } } g_dir_close(dp); if (g_chdir(prev_dir) < 0) { FILE_OP_ERROR(prev_dir, "chdir"); g_free(prev_dir); return -1; } g_free(prev_dir); return 0; } static gint remove_dir_recursive_real(const gchar *dir) { struct stat s; GDir *dp; const gchar *dir_name; gchar *prev_dir; if (g_stat(dir, &s) < 0) { FILE_OP_ERROR(dir, "stat"); if (ENOENT == errno) return 0; return -1; } if (!S_ISDIR(s.st_mode)) { if (g_unlink(dir) < 0) { FILE_OP_ERROR(dir, "unlink"); return -1; } return 0; } prev_dir = g_get_current_dir(); /* g_print("prev_dir = %s\n", prev_dir); */ if (g_chdir(dir) < 0) { FILE_OP_ERROR(dir, "chdir"); g_free(prev_dir); return -1; } if ((dp = g_dir_open(".", 0, NULL)) == NULL) { g_warning("failed to open directory: %s\n", dir); g_chdir(prev_dir); g_free(prev_dir); return -1; } /* remove all files in the directory */ while ((dir_name = g_dir_read_name(dp)) != NULL) { /* g_print("removing %s\n", dir_name); */ if (is_dir_exist(dir_name)) { if (remove_dir_recursive_real(dir_name) < 0) { g_warning("can't remove directory\n"); return -1; } } else { if (g_unlink(dir_name) < 0) FILE_OP_ERROR(dir_name, "unlink"); } } g_dir_close(dp); if (g_chdir(prev_dir) < 0) { FILE_OP_ERROR(prev_dir, "chdir"); g_free(prev_dir); return -1; } g_free(prev_dir); if (g_rmdir(dir) < 0) { if (ENOTDIR == errno) { if (g_unlink(dir) < 0) { FILE_OP_ERROR(dir, "unlink"); return -1; } } else { FILE_OP_ERROR(dir, "rmdir"); return -1; } } return 0; } gint remove_dir_recursive(const gchar *dir) { gchar *cur_dir; gint ret; cur_dir = g_get_current_dir(); if (g_chdir(dir) < 0) { FILE_OP_ERROR(dir, "chdir"); ret = -1; goto leave; } if (g_chdir("..") < 0) { FILE_OP_ERROR(dir, "chdir"); ret = -1; goto leave; } ret = remove_dir_recursive_real(dir); leave: if (is_dir_exist(cur_dir)) { if (g_chdir(cur_dir) < 0) { FILE_OP_ERROR(cur_dir, "chdir"); } } g_free(cur_dir); return ret; } gint rename_force(const gchar *oldpath, const gchar *newpath) { #if !defined(G_OS_UNIX) && !GLIB_CHECK_VERSION(2, 9, 1) if (!is_file_entry_exist(oldpath)) { errno = ENOENT; return -1; } if (is_file_exist(newpath)) { if (g_unlink(newpath) < 0) FILE_OP_ERROR(newpath, "unlink"); } #endif return g_rename(oldpath, newpath); } gint copy_file(const gchar *src, const gchar *dest, gboolean keep_backup) { gint srcfd, destfd; gint n_read; gchar buf[BUFFSIZE]; gchar *dest_bak = NULL; gboolean err = FALSE; #ifdef G_OS_WIN32 if ((srcfd = g_open(src, O_RDONLY | O_BINARY, 0600)) < 0) { #else if ((srcfd = g_open(src, O_RDONLY, 0600)) < 0) { #endif FILE_OP_ERROR(src, "open"); return -1; } if (is_file_exist(dest)) { dest_bak = g_strconcat(dest, ".bak", NULL); if (rename_force(dest, dest_bak) < 0) { FILE_OP_ERROR(dest, "rename"); close(srcfd); g_free(dest_bak); return -1; } } #ifdef G_OS_WIN32 if ((destfd = g_open(dest, O_WRONLY | O_CREAT | O_BINARY, 0600)) < 0) { #else if ((destfd = g_open(dest, O_WRONLY | O_CREAT, 0600)) < 0) { #endif FILE_OP_ERROR(dest, "open"); close(srcfd); if (dest_bak) { if (rename_force(dest_bak, dest) < 0) FILE_OP_ERROR(dest_bak, "rename"); g_free(dest_bak); } return -1; } while ((n_read = read(srcfd, buf, sizeof(buf))) > 0) { gchar *p = buf; const gchar *endp = buf + n_read; gint n_write; while (p < endp) { if ((n_write = write(destfd, p, endp - p)) < 0) { g_warning(_("writing to %s failed.\n"), dest); close(destfd); close(srcfd); g_unlink(dest); if (dest_bak) { if (rename_force(dest_bak, dest) < 0) FILE_OP_ERROR(dest_bak, "rename"); g_free(dest_bak); } return -1; } p += n_write; } } if (close(destfd) < 0) { FILE_OP_ERROR(dest, "close"); err = TRUE; } close(srcfd); if (err) { g_unlink(dest); if (dest_bak) { if (rename_force(dest_bak, dest) < 0) FILE_OP_ERROR(dest_bak, "rename"); g_free(dest_bak); } return -1; } if (keep_backup == FALSE && dest_bak) g_unlink(dest_bak); g_free(dest_bak); return 0; } gint copy_dir(const gchar *src, const gchar *dest) { GDir *dir; const gchar *dir_name; gchar *src_file; gchar *dest_file; if ((dir = g_dir_open(src, 0, NULL)) == NULL) { g_warning("failed to open directory: %s\n", src); return -1; } if (make_dir_hier(dest) < 0) { g_dir_close(dir); return -1; } while ((dir_name = g_dir_read_name(dir)) != NULL) { src_file = g_strconcat(src, G_DIR_SEPARATOR_S, dir_name, NULL); dest_file = g_strconcat(dest, G_DIR_SEPARATOR_S, dir_name, NULL); if (is_file_exist(src_file)) copy_file(src_file, dest_file, FALSE); g_free(dest_file); g_free(src_file); } g_dir_close(dir); return 0; } gint move_file(const gchar *src, const gchar *dest, gboolean overwrite) { if (overwrite == FALSE && is_file_entry_exist(dest)) { g_warning("move_file(): file %s already exists.", dest); return -1; } if (rename_force(src, dest) == 0) return 0; if (EXDEV != errno) { FILE_OP_ERROR(src, "rename"); return -1; } if (copy_file(src, dest, FALSE) < 0) return -1; g_unlink(src); return 0; } gint copy_file_part(FILE *fp, off_t offset, size_t length, const gchar *dest) { FILE *dest_fp; gint n_read; gint bytes_left, to_read; gchar buf[BUFSIZ]; gboolean err = FALSE; if (fseek(fp, offset, SEEK_SET) < 0) { perror("fseek"); return -1; } if ((dest_fp = g_fopen(dest, "wb")) == NULL) { FILE_OP_ERROR(dest, "fopen"); return -1; } if (change_file_mode_rw(dest_fp, dest) < 0) { FILE_OP_ERROR(dest, "chmod"); g_warning("can't change file mode\n"); } bytes_left = length; to_read = MIN(bytes_left, sizeof(buf)); while ((n_read = fread(buf, sizeof(gchar), to_read, fp)) > 0) { if (n_read < to_read && ferror(fp)) break; if (fwrite(buf, n_read, 1, dest_fp) < 1) { g_warning(_("writing to %s failed.\n"), dest); fclose(dest_fp); g_unlink(dest); return -1; } bytes_left -= n_read; if (bytes_left == 0) break; to_read = MIN(bytes_left, sizeof(buf)); } if (ferror(fp)) { perror("fread"); err = TRUE; } if (fclose(dest_fp) == EOF) { FILE_OP_ERROR(dest, "fclose"); err = TRUE; } if (err) { g_unlink(dest); return -1; } return 0; } /* convert line endings into CRLF. If the last line doesn't end with * linebreak, add it. */ gchar *canonicalize_str(const gchar *str) { const gchar *p; guint new_len = 0; gchar *out, *outp; for (p = str; *p != '\0'; ++p) { if (*p != '\r') { ++new_len; if (*p == '\n') ++new_len; } } if (p == str || *(p - 1) != '\n') new_len += 2; out = outp = g_malloc(new_len + 1); for (p = str; *p != '\0'; ++p) { if (*p != '\r') { if (*p == '\n') *outp++ = '\r'; *outp++ = *p; } } if (p == str || *(p - 1) != '\n') { *outp++ = '\r'; *outp++ = '\n'; } *outp = '\0'; return out; } gint canonicalize_file(const gchar *src, const gchar *dest) { FILE *src_fp, *dest_fp; gchar buf[BUFFSIZE]; gint len; gboolean err = FALSE; gboolean last_linebreak = FALSE; if ((src_fp = g_fopen(src, "rb")) == NULL) { FILE_OP_ERROR(src, "fopen"); return -1; } if ((dest_fp = g_fopen(dest, "wb")) == NULL) { FILE_OP_ERROR(dest, "fopen"); fclose(src_fp); return -1; } if (change_file_mode_rw(dest_fp, dest) < 0) { FILE_OP_ERROR(dest, "chmod"); g_warning("can't change file mode\n"); } while (fgets(buf, sizeof(buf), src_fp) != NULL) { gint r = 0; len = strlen(buf); if (len == 0) break; last_linebreak = FALSE; if (buf[len - 1] != '\n') { last_linebreak = TRUE; r = fputs(buf, dest_fp); } else if (len > 1 && buf[len - 1] == '\n' && buf[len - 2] == '\r') { r = fputs(buf, dest_fp); } else { if (len > 1) { r = fwrite(buf, len - 1, 1, dest_fp); if (r != 1) r = EOF; } if (r != EOF) r = fputs("\r\n", dest_fp); } if (r == EOF) { g_warning("writing to %s failed.\n", dest); fclose(dest_fp); fclose(src_fp); g_unlink(dest); return -1; } } if (last_linebreak == TRUE) { if (fputs("\r\n", dest_fp) == EOF) err = TRUE; } if (ferror(src_fp)) { FILE_OP_ERROR(src, "fgets"); err = TRUE; } fclose(src_fp); if (fclose(dest_fp) == EOF) { FILE_OP_ERROR(dest, "fclose"); err = TRUE; } if (err) { g_unlink(dest); return -1; } return 0; } gint canonicalize_file_replace(const gchar *file) { gchar *tmp_file; tmp_file = get_tmp_file(); if (canonicalize_file(file, tmp_file) < 0) { g_free(tmp_file); return -1; } if (move_file(tmp_file, file, TRUE) < 0) { g_warning("can't replace %s .\n", file); g_unlink(tmp_file); g_free(tmp_file); return -1; } g_free(tmp_file); return 0; } FILE *canonicalize_file_stream(FILE *src_fp, gint *length) { FILE *dest_fp; gchar buf[BUFFSIZE]; gint len; gint length_ = 0; gboolean err = FALSE; gboolean last_linebreak = FALSE; if ((dest_fp = my_tmpfile()) == NULL) return NULL; while (fgets(buf, sizeof(buf), src_fp) != NULL) { gint r = 0; len = strlen(buf); if (len == 0) break; last_linebreak = FALSE; if (buf[len - 1] != '\n') { last_linebreak = TRUE; r = fputs(buf, dest_fp); length_ += len; } else if (len > 1 && buf[len - 1] == '\n' && buf[len - 2] == '\r') { r = fputs(buf, dest_fp); length_ += len; } else { if (len > 1) { r = fwrite(buf, len - 1, 1, dest_fp); if (r != 1) r = EOF; else length_ += len - 1; } if (r != EOF) { r = fputs("\r\n", dest_fp); length_ += 2; } } if (r == EOF) { g_warning("writing to temporary file failed.\n"); fclose(dest_fp); return NULL; } } if (last_linebreak == TRUE) { if (fputs("\r\n", dest_fp) == EOF) err = TRUE; else length_ += 2; } if (ferror(src_fp)) { FILE_OP_ERROR("canonicalize_file_stream", "fgets"); err = TRUE; } if (fflush(dest_fp) == EOF) { FILE_OP_ERROR("canonicalize_file_stream", "fflush"); err = TRUE; } if (err) { fclose(dest_fp); return NULL; } if (length) *length = length_; rewind(dest_fp); return dest_fp; } gint uncanonicalize_file(const gchar *src, const gchar *dest) { FILE *src_fp, *dest_fp; gchar buf[BUFFSIZE]; gboolean err = FALSE; if ((src_fp = g_fopen(src, "rb")) == NULL) { FILE_OP_ERROR(src, "fopen"); return -1; } if ((dest_fp = g_fopen(dest, "wb")) == NULL) { FILE_OP_ERROR(dest, "fopen"); fclose(src_fp); return -1; } if (change_file_mode_rw(dest_fp, dest) < 0) { FILE_OP_ERROR(dest, "chmod"); g_warning("can't change file mode\n"); } while (fgets(buf, sizeof(buf), src_fp) != NULL) { strcrchomp(buf); if (fputs(buf, dest_fp) == EOF) { g_warning("writing to %s failed.\n", dest); fclose(dest_fp); fclose(src_fp); g_unlink(dest); return -1; } } if (ferror(src_fp)) { FILE_OP_ERROR(src, "fgets"); err = TRUE; } fclose(src_fp); if (fclose(dest_fp) == EOF) { FILE_OP_ERROR(dest, "fclose"); err = TRUE; } if (err) { g_unlink(dest); return -1; } return 0; } gint uncanonicalize_file_replace(const gchar *file) { gchar *tmp_file; tmp_file = get_tmp_file(); if (uncanonicalize_file(file, tmp_file) < 0) { g_free(tmp_file); return -1; } if (move_file(tmp_file, file, TRUE) < 0) { g_warning("can't replace %s .\n", file); g_unlink(tmp_file); g_free(tmp_file); return -1; } g_free(tmp_file); return 0; } gchar *normalize_newlines(const gchar *str) { const gchar *p = str; gchar *out, *outp; out = outp = g_malloc(strlen(str) + 1); for (p = str; *p != '\0'; ++p) { if (*p == '\r') { if (*(p + 1) != '\n') *outp++ = '\n'; } else *outp++ = *p; } *outp = '\0'; return out; } gchar *strchomp_all(const gchar *str) { const gchar *p = str; const gchar *newline, *last; gchar *out, *outp; out = outp = g_malloc(strlen(str) + 1); while (*p != '\0') { newline = strchr(p, '\n'); if (newline) { for (last = newline; p < last && g_ascii_isspace(*(last - 1)); --last) ; strncpy(outp, p, last - p); outp += last - p; if (p < newline && *(newline - 1) == '\r') { strncpy(outp, newline - 1, 2); outp += 2; } else { *outp++ = *newline; } p = newline + 1; } else { for (last = p + strlen(p); p < last && g_ascii_isspace(*(last - 1)); --last) ; strncpy(outp, p, last - p); outp += last - p; break; } } *outp = '\0'; return out; } FILE *get_outgoing_rfc2822_file(FILE *fp) { gchar buf[BUFFSIZE]; FILE *outfp; outfp = my_tmpfile(); if (!outfp) { FILE_OP_ERROR("get_outgoing_rfc2822_file", "my_tmpfile"); return NULL; } /* output header part */ while (fgets(buf, sizeof(buf), fp) != NULL) { strretchomp(buf); if (!g_ascii_strncasecmp(buf, "Bcc:", 4)) { gint next; for (;;) { next = fgetc(fp); if (next == EOF) break; else if (next != ' ' && next != '\t') { ungetc(next, fp); break; } if (fgets(buf, sizeof(buf), fp) == NULL) break; } } else { if (fputs(buf, outfp) == EOF) goto file_error; if (fputs("\r\n", outfp) == EOF) goto file_error; if (buf[0] == '\0') break; } } /* output body part */ while (fgets(buf, sizeof(buf), fp) != NULL) { strretchomp(buf); if (buf[0] == '.') { if (fputc('.', outfp) == EOF) goto file_error; } if (fputs(buf, outfp) == EOF) goto file_error; if (fputs("\r\n", outfp) == EOF) goto file_error; } if (fflush(outfp) == EOF) { FILE_OP_ERROR("get_outgoing_rfc2822_file", "fflush"); goto file_error; } rewind(outfp); return outfp; file_error: g_warning("get_outgoing_rfc2822_file(): writing to temporary file failed.\n"); fclose(outfp); return NULL; } gchar *get_outgoing_rfc2822_str(FILE *fp) { gchar buf[BUFFSIZE]; GString *str; gchar *ret; str = g_string_new(NULL); /* output header part */ while (fgets(buf, sizeof(buf), fp) != NULL) { strretchomp(buf); if (!g_ascii_strncasecmp(buf, "Bcc:", 4)) { gint next; for (;;) { next = fgetc(fp); if (next == EOF) break; else if (next != ' ' && next != '\t') { ungetc(next, fp); break; } if (fgets(buf, sizeof(buf), fp) == NULL) break; } #if 0 } else if (!g_ascii_strncasecmp(buf, "Date:", 5)) { get_rfc822_date(buf, sizeof(buf)); g_string_append_printf(str, "Date: %s\r\n", buf); #endif } else { g_string_append(str, buf); g_string_append(str, "\r\n"); if (buf[0] == '\0') break; } } /* output body part */ while (fgets(buf, sizeof(buf), fp) != NULL) { strretchomp(buf); if (buf[0] == '.') g_string_append_c(str, '.'); g_string_append(str, buf); g_string_append(str, "\r\n"); } ret = str->str; g_string_free(str, FALSE); return ret; } /* * Create a new boundary in a way that it is very unlikely that this * will occur in the following text. It would be easy to ensure * uniqueness if everything is either quoted-printable or base64 * encoded (note that conversion is allowed), but because MIME bodies * may be nested, it may happen that the same boundary has already * been used. We avoid scanning the message for conflicts and hope the * best. * * boundary := 0*69 bcharsnospace * bchars := bcharsnospace / " " * bcharsnospace := DIGIT / ALPHA / "'" / "(" / ")" / * "+" / "_" / "," / "-" / "." / * "/" / ":" / "=" / "?" * * some special characters removed because of buggy MTAs */ gchar *generate_mime_boundary(const gchar *prefix) { static gchar tbl[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ" "abcdefghijklmnopqrstuvwxyz" "1234567890+_./="; gchar buf_uniq[17]; gchar buf_date[64]; gint i; for (i = 0; i < sizeof(buf_uniq) - 1; i++) buf_uniq[i] = tbl[g_random_int_range(0, sizeof(tbl) - 1)]; buf_uniq[i] = '\0'; get_rfc822_date(buf_date, sizeof(buf_date)); subst_chars(buf_date, " ,:", '_'); return g_strdup_printf("%s=_%s_%s", prefix ? prefix : "Multipart", buf_date, buf_uniq); } gint change_file_mode_rw(FILE *fp, const gchar *file) { #ifdef G_OS_WIN32 DWORD attr; BOOL retval; if (G_WIN32_HAVE_WIDECHAR_API()) { wchar_t *wpath; wpath = g_utf8_to_utf16(file, -1, NULL, NULL, NULL); if (wpath == NULL) return -1; attr = GetFileAttributesW(wpath); retval = SetFileAttributesW (wpath, attr & ~(FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_HIDDEN)); g_free(wpath); } else { gchar *cp_path; cp_path = g_locale_from_utf8(file, -1, NULL, NULL, NULL); if (cp_path == NULL) return -1; attr = GetFileAttributesA(cp_path); retval = SetFileAttributesA (cp_path, attr & ~(FILE_ATTRIBUTE_READONLY|FILE_ATTRIBUTE_HIDDEN)); g_free(cp_path); } if (retval) return 0; else return -1; #else #if HAVE_FCHMOD if (fp) return fchmod(fileno(fp), S_IRUSR|S_IWUSR); else #endif return g_chmod(file, S_IRUSR|S_IWUSR); #endif } #ifdef G_OS_WIN32 gchar *_s_tempnam(const gchar *dir, const gchar *prefix) { if (G_WIN32_HAVE_WIDECHAR_API()) { wchar_t *wpath; wchar_t *wprefix; wchar_t *wname; gint save_errno; gchar *name; wpath = g_utf8_to_utf16(dir, -1, NULL, NULL, NULL); if (wpath == NULL) { errno = EINVAL; return NULL; } wprefix = g_utf8_to_utf16(prefix, -1, NULL, NULL, NULL); if (wprefix == NULL) { errno = EINVAL; g_free(wpath); return NULL; } wname = _wtempnam(wpath, wprefix); save_errno = errno; name = g_utf16_to_utf8(wname, -1, NULL, NULL, NULL); if (name == NULL) { save_errno = EINVAL; } g_free(wname); g_free(wprefix); g_free(wpath); errno = save_errno; return name; } else { gchar *cp_path; gchar *cp_prefix; gchar *cp_name; gint save_errno; gchar *name; cp_path = g_locale_from_utf8(dir, -1, NULL, NULL, NULL); if (cp_path == NULL) { errno = EINVAL; return NULL; } cp_prefix = g_locale_from_utf8(prefix, -1, NULL, NULL, NULL); if (cp_prefix == NULL) { errno = EINVAL; g_free(cp_path); return NULL; } cp_name = _tempnam(cp_path, cp_prefix); save_errno = errno; name = g_locale_to_utf8(cp_name, -1, NULL, NULL, NULL); if (name == NULL) { save_errno = EINVAL; } g_free(cp_name); g_free(cp_prefix); g_free(cp_path); errno = save_errno; return name; } } #endif FILE *my_tmpfile(void) { #ifdef G_OS_WIN32 const gchar *tmpdir; gchar *fname; gint fd; FILE *fp; tmpdir = get_tmp_dir(); fname = _s_tempnam(tmpdir, "sylph"); if (!fname) return NULL; fd = g_open(fname, O_RDWR | O_CREAT | O_EXCL | _O_TEMPORARY | _O_SHORT_LIVED | _O_BINARY, 0600); if (fd < 0) { g_free(fname); return NULL; } fp = fdopen(fd, "w+b"); if (!fp) { perror("fdopen"); close(fd); } return fp; #else const gchar suffix[] = ".XXXXXX"; const gchar *tmpdir; guint tmplen; const gchar *progname; guint proglen; gchar *fname; gint fd; FILE *fp; tmpdir = get_tmp_dir(); tmplen = strlen(tmpdir); progname = g_get_prgname(); if (!progname) progname = "sylph"; proglen = strlen(progname); Xalloca(fname, tmplen + 1 + proglen + sizeof(suffix), return tmpfile()); memcpy(fname, tmpdir, tmplen); fname[tmplen] = G_DIR_SEPARATOR; memcpy(fname + tmplen + 1, progname, proglen); memcpy(fname + tmplen + 1 + proglen, suffix, sizeof(suffix)); fd = g_mkstemp(fname); if (fd < 0) return tmpfile(); g_unlink(fname); fp = fdopen(fd, "w+b"); if (!fp) close(fd); return fp; #endif } FILE *str_open_as_stream(const gchar *str) { FILE *fp; size_t len; g_return_val_if_fail(str != NULL, NULL); fp = my_tmpfile(); if (!fp) { FILE_OP_ERROR("str_open_as_stream", "my_tmpfile"); return NULL; } len = strlen(str); if (len == 0) return fp; if (fwrite(str, len, 1, fp) != 1) { FILE_OP_ERROR("str_open_as_stream", "fwrite"); fclose(fp); return NULL; } if (fflush(fp) == EOF) { FILE_OP_ERROR("str_open_as_stream", "fflush"); fclose(fp); return NULL; } rewind(fp); return fp; } gint str_write_to_file(const gchar *str, const gchar *file) { FILE *fp; size_t len; g_return_val_if_fail(str != NULL, -1); g_return_val_if_fail(file != NULL, -1); if ((fp = g_fopen(file, "wb")) == NULL) { FILE_OP_ERROR(file, "fopen"); return -1; } len = strlen(str); if (len == 0) { fclose(fp); return 0; } if (fwrite(str, len, 1, fp) != 1) { FILE_OP_ERROR(file, "fwrite"); fclose(fp); g_unlink(file); return -1; } if (fclose(fp) == EOF) { FILE_OP_ERROR(file, "fclose"); g_unlink(file); return -1; } return 0; } gchar *file_read_to_str(const gchar *file) { FILE *fp; gchar *str; g_return_val_if_fail(file != NULL, NULL); if ((fp = g_fopen(file, "rb")) == NULL) { FILE_OP_ERROR(file, "fopen"); return NULL; } str = file_read_stream_to_str(fp); fclose(fp); return str; } gchar *file_read_stream_to_str(FILE *fp) { GByteArray *array; guchar buf[BUFSIZ]; gint n_read; gchar *str; g_return_val_if_fail(fp != NULL, NULL); array = g_byte_array_new(); while ((n_read = fread(buf, sizeof(gchar), sizeof(buf), fp)) > 0) { if (n_read < sizeof(buf) && ferror(fp)) break; g_byte_array_append(array, buf, n_read); } if (ferror(fp)) { FILE_OP_ERROR("file stream", "fread"); g_byte_array_free(array, TRUE); return NULL; } buf[0] = '\0'; g_byte_array_append(array, buf, 1); str = (gchar *)array->data; g_byte_array_free(array, FALSE); return str; } #if defined(G_OS_WIN32) && !GLIB_CHECK_VERSION(2, 8, 2) static gchar **argv_utf8_to_locale(gchar **argv) { gint argc = 0, i; gchar **cp_argv; while (argv[argc] != NULL) argc++; cp_argv = g_new(gchar *, argc + 1); for (i = 0; i < argc; i++) { cp_argv[i] = g_locale_from_utf8(argv[i], -1, NULL, NULL, NULL); if (cp_argv[i] == NULL) { g_warning("Failed to convert from UTF-8 to locale encoding: %s\n", argv[i]); g_strfreev(cp_argv); return NULL; } } cp_argv[i] = NULL; return cp_argv; } #endif gint execute_async(gchar *const argv[]) { #if defined(G_OS_WIN32) && !GLIB_CHECK_VERSION(2, 8, 2) gchar **cp_argv; g_return_val_if_fail(argv != NULL && argv[0] != NULL, -1); cp_argv = argv_utf8_to_locale((gchar **)argv); if (!cp_argv) return -1; if (g_spawn_async(NULL, cp_argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL) == FALSE) { g_warning("Can't execute command: %s\n", argv[0]); g_strfreev(cp_argv); return -1; } g_strfreev(cp_argv); #else g_return_val_if_fail(argv != NULL && argv[0] != NULL, -1); if (g_spawn_async(NULL, (gchar **)argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL) == FALSE) { g_warning("Can't execute command: %s\n", argv[0]); return -1; } #endif return 0; } gint execute_sync(gchar *const argv[]) { gint status; #if defined(G_OS_WIN32) && !GLIB_CHECK_VERSION(2, 8, 2) gchar **cp_argv; #endif g_return_val_if_fail(argv != NULL && argv[0] != NULL, -1); #ifdef G_OS_WIN32 #if !GLIB_CHECK_VERSION(2, 8, 2) cp_argv = argv_utf8_to_locale((gchar **)argv); if (!cp_argv) return -1; if (g_spawn_sync(NULL, cp_argv, NULL, G_SPAWN_SEARCH_PATH | G_SPAWN_CHILD_INHERITS_STDIN | G_SPAWN_LEAVE_DESCRIPTORS_OPEN, NULL, NULL, NULL, NULL, &status, NULL) == FALSE) { g_warning("Can't execute command: %s\n", argv[0]); g_strfreev(cp_argv); return -1; } g_strfreev(cp_argv); #else /* !GLIB_CHECK_VERSION */ if (g_spawn_sync(NULL, (gchar **)argv, NULL, G_SPAWN_SEARCH_PATH | G_SPAWN_CHILD_INHERITS_STDIN | G_SPAWN_LEAVE_DESCRIPTORS_OPEN, NULL, NULL, NULL, NULL, &status, NULL) == FALSE) { g_warning("Can't execute command: %s\n", argv[0]); return -1; } #endif /* !GLIB_CHECK_VERSION */ return status; #else /* G_OS_WIN32 */ if (g_spawn_sync(NULL, (gchar **)argv, NULL, G_SPAWN_SEARCH_PATH, NULL, NULL, NULL, NULL, &status, NULL) == FALSE) { g_warning("Can't execute command: %s\n", argv[0]); return -1; } if (WIFEXITED(status)) return WEXITSTATUS(status); else return -1; #endif /* G_OS_WIN32 */ } gint execute_command_line(const gchar *cmdline, gboolean async) { gchar **argv; gint ret; if (debug_mode) { gchar *utf8_cmdline; utf8_cmdline = g_filename_to_utf8 (cmdline, -1, NULL, NULL, NULL); debug_print("execute_command_line(): executing: %s\n", utf8_cmdline ? utf8_cmdline : cmdline); g_free(utf8_cmdline); } argv = strsplit_with_quote(cmdline, " ", 0); if (async) ret = execute_async(argv); else ret = execute_sync(argv); g_strfreev(argv); return ret; } gint execute_open_file(const gchar *file, const gchar *content_type) { g_return_val_if_fail(file != NULL, -1); #ifdef G_OS_WIN32 log_print("opening %s - %s\n", file, content_type ? content_type : ""); if (G_WIN32_HAVE_WIDECHAR_API()) { wchar_t *wpath; wpath = g_utf8_to_utf16(file, -1, NULL, NULL, NULL); if (wpath == NULL) return -1; ShellExecuteW(NULL, L"open", wpath, NULL, NULL, SW_SHOWNORMAL); g_free(wpath); return 0; } else { gchar *cp_path; cp_path = g_locale_from_utf8(file, -1, NULL, NULL, NULL); if (cp_path == NULL) return -1; ShellExecuteA(NULL, "open", cp_path, NULL, NULL, SW_SHOWNORMAL); g_free(cp_path); return 0; } #endif return 0; } gint execute_print_file(const gchar *file) { g_return_val_if_fail(file != NULL, -1); #ifdef G_OS_WIN32 log_print("printing %s\n", file); if (G_WIN32_HAVE_WIDECHAR_API()) { wchar_t *wpath; wpath = g_utf8_to_utf16(file, -1, NULL, NULL, NULL); if (wpath == NULL) return -1; ShellExecuteW(NULL, L"print", wpath, NULL, NULL, SW_SHOWNORMAL); g_free(wpath); return 0; } else { gchar *cp_path; cp_path = g_locale_from_utf8(file, -1, NULL, NULL, NULL); if (cp_path == NULL) return -1; ShellExecuteA(NULL, "print", cp_path, NULL, NULL, SW_SHOWNORMAL); g_free(cp_path); return 0; } #endif return 0; } gchar *get_command_output(const gchar *cmdline) { gchar *child_stdout; gint status; g_return_val_if_fail(cmdline != NULL, NULL); debug_print("get_command_output(): executing: %s\n", cmdline); if (g_spawn_command_line_sync(cmdline, &child_stdout, NULL, &status, NULL) == FALSE) { g_warning("Can't execute command: %s\n", cmdline); return NULL; } return child_stdout; } gint open_uri(const gchar *uri, const gchar *cmdline) { gchar buf[BUFFSIZE]; g_return_val_if_fail(uri != NULL, -1); #ifdef G_OS_WIN32 if (!cmdline || cmdline[0] == '\0') return execute_open_file(uri, NULL); #endif if (cmdline && str_find_format_times(cmdline, 's') == 1) g_snprintf(buf, sizeof(buf), cmdline, uri); else { if (cmdline) g_warning("Open URI command line is invalid " "(there must be only one '%%s'): %s", cmdline); g_snprintf(buf, sizeof(buf), DEFAULT_BROWSER_CMD, uri); } execute_command_line(buf, TRUE); return 0; } time_t remote_tzoffset_sec(const gchar *zone) { static gchar ustzstr[] = "PSTPDTMSTMDTCSTCDTESTEDT"; gchar zone3[4]; gchar *p; gchar c; gint iustz; gint offset; time_t remoteoffset; strncpy(zone3, zone, 3); zone3[3] = '\0'; remoteoffset = 0; if (sscanf(zone, "%c%d", &c, &offset) == 2 && (c == '+' || c == '-')) { remoteoffset = ((offset / 100) * 60 + (offset % 100)) * 60; if (c == '-') remoteoffset = -remoteoffset; } else if (!strncmp(zone, "UT" , 2) || !strncmp(zone, "GMT", 2)) { remoteoffset = 0; } else if (strlen(zone3) == 3) { for (p = ustzstr; *p != '\0'; p += 3) { if (!g_ascii_strncasecmp(p, zone3, 3)) { iustz = ((gint)(p - ustzstr) / 3 + 1) / 2 - 8; remoteoffset = iustz * 3600; break; } } if (*p == '\0') return -1; } else if (strlen(zone3) == 1) { switch (zone[0]) { case 'Z': remoteoffset = 0; break; case 'A': remoteoffset = -1; break; case 'B': remoteoffset = -2; break; case 'C': remoteoffset = -3; break; case 'D': remoteoffset = -4; break; case 'E': remoteoffset = -5; break; case 'F': remoteoffset = -6; break; case 'G': remoteoffset = -7; break; case 'H': remoteoffset = -8; break; case 'I': remoteoffset = -9; break; case 'K': remoteoffset = -10; break; /* J is not used */ case 'L': remoteoffset = -11; break; case 'M': remoteoffset = -12; break; case 'N': remoteoffset = 1; break; case 'O': remoteoffset = 2; break; case 'P': remoteoffset = 3; break; case 'Q': remoteoffset = 4; break; case 'R': remoteoffset = 5; break; case 'S': remoteoffset = 6; break; case 'T': remoteoffset = 7; break; case 'U': remoteoffset = 8; break; case 'V': remoteoffset = 9; break; case 'W': remoteoffset = 10; break; case 'X': remoteoffset = 11; break; case 'Y': remoteoffset = 12; break; default: remoteoffset = 0; break; } remoteoffset = remoteoffset * 3600; } else return -1; return remoteoffset; } time_t tzoffset_sec(time_t *now) { struct tm gmt, *tmp, *lt; gint off; tmp = gmtime(now); g_return_val_if_fail(tmp != NULL, -1); gmt = *tmp; lt = localtime(now); g_return_val_if_fail(lt != NULL, -1); off = (lt->tm_hour - gmt.tm_hour) * 60 + lt->tm_min - gmt.tm_min; if (lt->tm_year < gmt.tm_year) off -= 24 * 60; else if (lt->tm_year > gmt.tm_year) off += 24 * 60; else if (lt->tm_yday < gmt.tm_yday) off -= 24 * 60; else if (lt->tm_yday > gmt.tm_yday) off += 24 * 60; if (off >= 24 * 60) /* should be impossible */ off = 23 * 60 + 59; /* if not, insert silly value */ if (off <= -24 * 60) off = -(23 * 60 + 59); return off * 60; } /* calculate timezone offset */ gchar *tzoffset(time_t *now) { static gchar offset_string[6]; struct tm gmt, *tmp, *lt; gint off; gchar sign = '+'; tmp = gmtime(now); g_return_val_if_fail(tmp != NULL, NULL); gmt = *tmp; lt = localtime(now); g_return_val_if_fail(lt != NULL, NULL); off = (lt->tm_hour - gmt.tm_hour) * 60 + lt->tm_min - gmt.tm_min; if (lt->tm_year < gmt.tm_year) off -= 24 * 60; else if (lt->tm_year > gmt.tm_year) off += 24 * 60; else if (lt->tm_yday < gmt.tm_yday) off -= 24 * 60; else if (lt->tm_yday > gmt.tm_yday) off += 24 * 60; if (off < 0) { sign = '-'; off = -off; } if (off >= 24 * 60) /* should be impossible */ off = 23 * 60 + 59; /* if not, insert silly value */ sprintf(offset_string, "%c%02d%02d", sign, off / 60, off % 60); return offset_string; } void get_rfc822_date(gchar *buf, gint len) { struct tm *lt; time_t t; gchar day[4], mon[4]; gint dd, hh, mm, ss, yyyy; t = time(NULL); lt = localtime(&t); sscanf(asctime(lt), "%3s %3s %d %d:%d:%d %d\n", day, mon, &dd, &hh, &mm, &ss, &yyyy); g_snprintf(buf, len, "%s, %d %s %d %02d:%02d:%02d %s", day, dd, mon, yyyy, hh, mm, ss, tzoffset(&t)); } /* just a wrapper to suppress the warning of gcc about %c */ size_t my_strftime(gchar *s, size_t max, const gchar *format, const struct tm *tm) { return strftime(s, max, format, tm); } /* UI hints */ static UIUpdateFunc ui_update_func = NULL; void set_ui_update_func(UIUpdateFunc func) { ui_update_func = func; } void ui_update(void) { if (ui_update_func) ui_update_func(); } static ProgressFunc progress_func = NULL; void set_progress_func(ProgressFunc func) { progress_func = func; } void progress_show(gint cur, gint total) { if (progress_func) progress_func(cur, total); } /* user input */ static QueryPasswordFunc query_password_func = NULL; void set_input_query_password_func(QueryPasswordFunc func) { query_password_func = func; } gchar *input_query_password(const gchar *server, const gchar *user) { if (query_password_func) return query_password_func(server, user); else return NULL; } /* logging */ static FILE *log_fp = NULL; void set_log_file(const gchar *filename) { if (log_fp) return; log_fp = g_fopen(filename, "wb"); if (!log_fp) FILE_OP_ERROR(filename, "fopen"); } void close_log_file(void) { if (log_fp) { fclose(log_fp); log_fp = NULL; } } static guint log_verbosity_count = 0; void set_log_verbosity(gboolean verbose) { if (verbose) log_verbosity_count++; else if (log_verbosity_count > 0) log_verbosity_count--; } gboolean get_debug_mode(void) { return debug_mode; } void set_debug_mode(gboolean enable) { debug_mode = enable; } static void log_dummy_func(const gchar *str) { } static LogFunc log_print_ui_func = log_dummy_func; static LogFunc log_message_ui_func = log_dummy_func; static LogFunc log_warning_ui_func = log_dummy_func; static LogFunc log_error_ui_func = log_dummy_func; static LogFunc log_show_status_func = log_dummy_func; void set_log_ui_func(LogFunc print_func, LogFunc message_func, LogFunc warning_func, LogFunc error_func) { log_print_ui_func = print_func; log_message_ui_func = message_func; log_warning_ui_func = warning_func; log_error_ui_func = error_func; } void set_log_show_status_func(LogFunc status_func) { log_show_status_func = status_func; } void debug_print(const gchar *format, ...) { va_list args; gchar buf[BUFFSIZE]; if (!debug_mode) return; va_start(args, format); g_vsnprintf(buf, sizeof(buf), format, args); va_end(args); g_print("%s", buf); } void status_print(const gchar *format, ...) { va_list args; gchar buf[BUFFSIZE]; va_start(args, format); g_vsnprintf(buf, sizeof(buf), format, args); va_end(args); log_show_status_func(buf); } #define TIME_LEN 11 void log_write(const gchar *str, const gchar *prefix) { if (log_fp) { gchar buf[TIME_LEN + 1]; time_t t; time(&t); strftime(buf, TIME_LEN + 1, "[%H:%M:%S] ", localtime(&t)); fputs(buf, log_fp); if (prefix) fputs(prefix, log_fp); fputs(str, log_fp); fflush(log_fp); } } void log_print(const gchar *format, ...) { va_list args; gchar buf[BUFFSIZE + TIME_LEN]; time_t t; time(&t); strftime(buf, TIME_LEN + 1, "[%H:%M:%S] ", localtime(&t)); va_start(args, format); g_vsnprintf(buf + TIME_LEN, BUFFSIZE, format, args); va_end(args); if (debug_mode) g_print("%s", buf); log_print_ui_func(buf); if (log_fp) { fputs(buf, log_fp); fflush(log_fp); } if (log_verbosity_count) log_show_status_func(buf + TIME_LEN); } void log_message(const gchar *format, ...) { va_list args; gchar buf[BUFFSIZE + TIME_LEN]; time_t t; time(&t); strftime(buf, TIME_LEN + 1, "[%H:%M:%S] ", localtime(&t)); va_start(args, format); g_vsnprintf(buf + TIME_LEN, BUFFSIZE, format, args); va_end(args); if (debug_mode) g_message("%s", buf + TIME_LEN); log_message_ui_func(buf + TIME_LEN); if (log_fp) { fwrite(buf, TIME_LEN, 1, log_fp); fputs("* message: ", log_fp); fputs(buf + TIME_LEN, log_fp); fflush(log_fp); } log_show_status_func(buf + TIME_LEN); } void log_warning(const gchar *format, ...) { va_list args; gchar buf[BUFFSIZE + TIME_LEN]; time_t t; time(&t); strftime(buf, TIME_LEN + 1, "[%H:%M:%S] ", localtime(&t)); va_start(args, format); g_vsnprintf(buf + TIME_LEN, BUFFSIZE, format, args); va_end(args); g_warning("%s", buf); log_warning_ui_func(buf + TIME_LEN); if (log_fp) { fwrite(buf, TIME_LEN, 1, log_fp); fputs("** warning: ", log_fp); fputs(buf + TIME_LEN, log_fp); fflush(log_fp); } } void log_error(const gchar *format, ...) { va_list args; gchar buf[BUFFSIZE + TIME_LEN]; time_t t; time(&t); strftime(buf, TIME_LEN + 1, "[%H:%M:%S] ", localtime(&t)); va_start(args, format); g_vsnprintf(buf + TIME_LEN, BUFFSIZE, format, args); va_end(args); g_warning("%s", buf); log_error_ui_func(buf + TIME_LEN); if (log_fp) { fwrite(buf, TIME_LEN, 1, log_fp); fputs("*** error: ", log_fp); fputs(buf + TIME_LEN, log_fp); fflush(log_fp); } } libsylph-1.1.0/libsylph/uuencode.c0000644000175000017500000000534110457702534014073 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #define UUDECODE(c) (c=='`' ? 0 : c - ' ') #define N64(i) (i & ~63) const char uudigit[64] = { '`', '!', '"', '#', '$', '%', '&', '\'', '(', ')', '*', '+', ',', '-', '.', '/', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', ':', ';', '<', '=', '>', '?', '@', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', '[', '\\', ']', '^', '_' }; int touufrombits(unsigned char *out, const unsigned char *in, int inlen) { int len; if (inlen > 45) return -1; len = (inlen * 4 + 2) / 3 + 1; *out++ = uudigit[inlen]; for (; inlen >= 3; inlen -= 3) { *out++ = uudigit[in[0] >> 2]; *out++ = uudigit[((in[0] << 4) & 0x30) | (in[1] >> 4)]; *out++ = uudigit[((in[1] << 2) & 0x3c) | (in[2] >> 6)]; *out++ = uudigit[in[2] & 0x3f]; in += 3; } if (inlen > 0) { *out++ = uudigit[(in[0] >> 2)]; if (inlen == 1) { *out++ = uudigit[((in[0] << 4) & 0x30)]; } else { *out++ = uudigit[(((in[0] << 4) & 0x30) | (in[1] >> 4))] ; *out++ = uudigit[((in[1] << 2) & 0x3c)]; } } *out = '\0'; return len; } int fromuutobits(char *out, const char *in) { int len, outlen, inlen; register unsigned char digit1, digit2; outlen = UUDECODE(in[0]); in += 1; if(outlen < 0 || outlen > 45) return -2; if(outlen == 0) return 0; inlen = (outlen * 4 + 2) / 3; len = 0; for( ; inlen>0; inlen-=4) { digit1 = UUDECODE(in[0]); if (N64(digit1)) return -1; digit2 = UUDECODE(in[1]); if (N64(digit2)) return -1; out[len++] = (digit1 << 2) | (digit2 >> 4); if (inlen > 2) { digit1 = UUDECODE(in[2]); if (N64(digit1)) return -1; out[len++] = (digit2 << 4) | (digit1 >> 2); if (inlen > 3) { digit2 = UUDECODE(in[3]); if (N64(digit2)) return -1; out[len++] = (digit1 << 6) | digit2; } } in += 4; } return len == outlen ? len : -3; } libsylph-1.1.0/libsylph/virtual.c0000644000175000017500000003236410457702533013756 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2006 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include "defs.h" #include #include #include #include #include #include #include #include #undef MEASURE_TIME #include "folder.h" #include "virtual.h" #include "mh.h" #include "procmsg.h" #include "procheader.h" #include "filter.h" #include "utils.h" typedef struct _VirtualSearchInfo VirtualSearchInfo; typedef struct _SearchCacheInfo SearchCacheInfo; struct _VirtualSearchInfo { FilterRule *rule; GSList *mlist; GHashTable *search_cache_table; FILE *fp; gboolean requires_full_headers; gboolean exclude_trash; }; struct _SearchCacheInfo { FolderItem *folder; guint msgnum; off_t size; time_t mtime; MsgFlags flags; }; enum { SCACHE_NOT_EXIST = 0, SCACHE_MATCHED = 1, SCACHE_NOT_MATCHED = 2 }; static void virtual_folder_init (Folder *folder, const gchar *name, const gchar *path); static GHashTable *virtual_read_search_cache (FolderItem *item); static void virtual_write_search_cache (FILE *fp, FolderItem *item, MsgInfo *msginfo, gint matched); static GSList *virtual_search_folder (VirtualSearchInfo *info, FolderItem *item); static gboolean virtual_search_recursive_func (GNode *node, gpointer data); static Folder *virtual_folder_new (const gchar *name, const gchar *path); static void virtual_folder_destroy (Folder *folder); static GSList *virtual_get_msg_list (Folder *folder, FolderItem *item, gboolean use_cache); static gchar *virtual_fetch_msg (Folder *folder, FolderItem *item, gint num); static MsgInfo *virtual_get_msginfo (Folder *folder, FolderItem *item, gint num); static gint virtual_close (Folder *folder, FolderItem *item); static gint virtual_scan_folder (Folder *folder, FolderItem *item); static gint virtual_rename_folder (Folder *folder, FolderItem *item, const gchar *name); static gint virtual_remove_folder (Folder *folder, FolderItem *item); static FolderClass virtual_class = { F_VIRTUAL, virtual_folder_new, virtual_folder_destroy, NULL, NULL, virtual_get_msg_list, virtual_fetch_msg, virtual_get_msginfo, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, virtual_close, virtual_scan_folder, NULL, virtual_rename_folder, NULL, virtual_remove_folder, }; FolderClass *virtual_get_class(void) { return &virtual_class; } static Folder *virtual_folder_new(const gchar *name, const gchar *path) { Folder *folder; folder = (Folder *)g_new0(VirtualFolder, 1); virtual_folder_init(folder, name, path); return folder; } static void virtual_folder_destroy(Folder *folder) { folder_local_folder_destroy(LOCAL_FOLDER(folder)); } static void virtual_folder_init(Folder *folder, const gchar *name, const gchar *path) { folder->klass = virtual_get_class(); folder_local_folder_init(folder, name, path); } guint sinfo_hash(gconstpointer key) { const SearchCacheInfo *sinfo = key; guint h; h = (guint)sinfo->folder; h ^= sinfo->msgnum; h ^= (guint)sinfo->size; h ^= (guint)sinfo->mtime; /* h ^= (guint)sinfo->flags.tmp_flags; */ h ^= (guint)sinfo->flags.perm_flags; /* g_print("path: %s, n = %u, hash = %u\n", sinfo->folder->path, sinfo->msgnum, h); */ return h; } gint sinfo_equal(gconstpointer v, gconstpointer v2) { const SearchCacheInfo *s1 = v; const SearchCacheInfo *s2 = v2; return (s1->folder == s2->folder && s1->msgnum == s2->msgnum && s1->size == s2->size && s1->mtime == s2->mtime && /* s1->flags.tmp_flags == s2->flags.tmp_flags && */ s1->flags.perm_flags == s2->flags.perm_flags); } #define READ_CACHE_DATA_INT(n, fp) \ { \ guint32 idata; \ \ if (fread(&idata, sizeof(idata), 1, fp) != 1) { \ g_warning("Cache data is corrupted\n"); \ fclose(fp); \ return table; \ } else \ n = idata; \ } static GHashTable *virtual_read_search_cache(FolderItem *item) { GHashTable *table; gchar *path, *file; FILE *fp; gchar *id; gint count = 0; g_return_val_if_fail(item != NULL, NULL); path = folder_item_get_path(item); file = g_strconcat(path, G_DIR_SEPARATOR_S, SEARCH_CACHE, NULL); debug_print("reading search cache: %s\n", file); fp = procmsg_open_data_file(file, SEARCH_CACHE_VERSION, DATA_READ, NULL, 0); g_free(file); g_free(path); if (!fp) return NULL; table = g_hash_table_new(sinfo_hash, sinfo_equal); while (procmsg_read_cache_data_str(fp, &id) == 0) { FolderItem *folder; guint32 msgnum; off_t size; time_t mtime; MsgFlags flags; gint matched; SearchCacheInfo *sinfo; folder = folder_find_item_from_identifier(id); g_free(id); while (fread(&msgnum, sizeof(msgnum), 1, fp) == 1) { if (msgnum == 0) break; READ_CACHE_DATA_INT(size, fp); READ_CACHE_DATA_INT(mtime, fp); READ_CACHE_DATA_INT(flags.tmp_flags, fp); READ_CACHE_DATA_INT(flags.perm_flags, fp); READ_CACHE_DATA_INT(matched, fp); if (folder) { sinfo = g_new(SearchCacheInfo, 1); sinfo->folder = folder; sinfo->msgnum = msgnum; sinfo->size = size; sinfo->mtime = mtime; sinfo->flags = flags; g_hash_table_insert(table, sinfo, GINT_TO_POINTER(matched)); ++count; } } } debug_print("%d cache items read.\n", count); fclose(fp); return table; } static void virtual_write_search_cache(FILE *fp, FolderItem *item, MsgInfo *msginfo, gint matched) { if (!item && !msginfo) { WRITE_CACHE_DATA_INT(0, fp); return; } if (item) { gchar *id; id = folder_item_get_identifier(item); if (id) { WRITE_CACHE_DATA(id, fp); g_free(id); } } if (msginfo) { WRITE_CACHE_DATA_INT(msginfo->msgnum, fp); WRITE_CACHE_DATA_INT(msginfo->size, fp); WRITE_CACHE_DATA_INT(msginfo->mtime, fp); WRITE_CACHE_DATA_INT ((msginfo->flags.tmp_flags & MSG_CACHED_FLAG_MASK), fp); WRITE_CACHE_DATA_INT(msginfo->flags.perm_flags, fp); WRITE_CACHE_DATA_INT(matched, fp); } } static void search_cache_free_func(gpointer key, gpointer value, gpointer data) { g_free(key); } static void virtual_search_cache_free(GHashTable *table) { if (table) { g_hash_table_foreach(table, search_cache_free_func, NULL); g_hash_table_destroy(table); } } static GSList *virtual_search_folder(VirtualSearchInfo *info, FolderItem *item) { GSList *match_list = NULL; GSList *mlist; GSList *cur; FilterInfo fltinfo; gint count = 1, total, ncachehit = 0; GTimeVal tv_prev, tv_cur; g_return_val_if_fail(info != NULL, NULL); g_return_val_if_fail(info->rule != NULL, NULL); g_return_val_if_fail(item != NULL, NULL); g_return_val_if_fail(item->path != NULL, NULL); /* prevent circular reference */ if (item->stype == F_VIRTUAL) return NULL; g_get_current_time(&tv_prev); status_print(_("Searching %s ..."), item->path); mlist = folder_item_get_msg_list(item, TRUE); total = g_slist_length(mlist); memset(&fltinfo, 0, sizeof(FilterInfo)); debug_print("start query search: %s\n", item->path); virtual_write_search_cache(info->fp, item, NULL, 0); for (cur = mlist; cur != NULL; cur = cur->next) { MsgInfo *msginfo = (MsgInfo *)cur->data; GSList *hlist; g_get_current_time(&tv_cur); if (tv_cur.tv_sec > tv_prev.tv_sec || tv_cur.tv_usec - tv_prev.tv_usec > PROGRESS_UPDATE_INTERVAL * 1000) { status_print(_("Searching %s (%d / %d)..."), item->path, count, total); tv_prev = tv_cur; } ++count; if (info->search_cache_table) { gint matched; SearchCacheInfo sinfo; sinfo.folder = item; sinfo.msgnum = msginfo->msgnum; sinfo.size = msginfo->size; sinfo.mtime = msginfo->mtime; sinfo.flags = msginfo->flags; matched = (gint)g_hash_table_lookup (info->search_cache_table, &sinfo); if (matched == SCACHE_MATCHED) { match_list = g_slist_prepend (match_list, msginfo); cur->data = NULL; virtual_write_search_cache(info->fp, NULL, msginfo, matched); ++ncachehit; continue; } else if (matched == SCACHE_NOT_MATCHED) { virtual_write_search_cache(info->fp, NULL, msginfo, matched); ++ncachehit; continue; } } fltinfo.flags = msginfo->flags; if (info->requires_full_headers) { gchar *file; file = procmsg_get_message_file(msginfo); hlist = procheader_get_header_list_from_file(file); g_free(file); } else hlist = procheader_get_header_list_from_msginfo (msginfo); if (!hlist) continue; if (filter_match_rule(info->rule, msginfo, hlist, &fltinfo)) { match_list = g_slist_prepend(match_list, msginfo); cur->data = NULL; virtual_write_search_cache(info->fp, NULL, msginfo, SCACHE_MATCHED); } else { virtual_write_search_cache(info->fp, NULL, msginfo, SCACHE_NOT_MATCHED); } procheader_header_list_destroy(hlist); } debug_print("%d cache hits (%d total)\n", ncachehit, total); virtual_write_search_cache(info->fp, NULL, NULL, 0); procmsg_msg_list_free(mlist); return g_slist_reverse(match_list); } static gboolean virtual_search_recursive_func(GNode *node, gpointer data) { VirtualSearchInfo *info = (VirtualSearchInfo *)data; FolderItem *item; GSList *mlist; g_return_val_if_fail(node->data != NULL, FALSE); item = FOLDER_ITEM(node->data); if (!item->path) return FALSE; if (info->exclude_trash && item->stype == F_TRASH) return FALSE; mlist = virtual_search_folder(info, item); info->mlist = g_slist_concat(info->mlist, mlist); return FALSE; } static GSList *virtual_get_msg_list(Folder *folder, FolderItem *item, gboolean use_cache) { GSList *mlist = NULL; GSList *flist; GSList *cur; FilterRule *rule; gchar *path; gchar *rule_file; gchar *cache_file; FolderItem *target; gint new = 0, unread = 0, total = 0; VirtualSearchInfo info; g_return_val_if_fail(item != NULL, NULL); g_return_val_if_fail(item->stype == F_VIRTUAL, NULL); path = folder_item_get_path(item); rule_file = g_strconcat(path, G_DIR_SEPARATOR_S, "filter.xml", NULL); flist = filter_read_file(rule_file); g_free(rule_file); g_free(path); if (!flist) { g_warning("filter rule not found\n"); return NULL; } rule = (FilterRule *)flist->data; target = folder_find_item_from_identifier(rule->target_folder); if (!target || target == item) { g_warning("invalid target folder\n"); goto finish; } info.rule = rule; info.mlist = NULL; if (use_cache) info.search_cache_table = virtual_read_search_cache(item); else info.search_cache_table = NULL; path = folder_item_get_path(item); cache_file = g_strconcat(path, G_DIR_SEPARATOR_S, SEARCH_CACHE, NULL); info.fp = procmsg_open_data_file(cache_file, SEARCH_CACHE_VERSION, DATA_WRITE, NULL, 0); g_free(cache_file); g_free(path); if (!info.fp) goto finish; info.requires_full_headers = filter_rule_requires_full_headers(rule); if (rule->recursive) { if (target->stype == F_TRASH) info.exclude_trash = FALSE; else info.exclude_trash = TRUE; } else info.exclude_trash = FALSE; if (rule->recursive) { g_node_traverse(target->node, G_PRE_ORDER, G_TRAVERSE_ALL, -1, virtual_search_recursive_func, &info); mlist = info.mlist; } else mlist = virtual_search_folder(&info, target); fclose(info.fp); virtual_search_cache_free(info.search_cache_table); for (cur = mlist; cur != NULL; cur = cur->next) { MsgInfo *msginfo = (MsgInfo *)cur->data; if (MSG_IS_NEW(msginfo->flags)) ++new; if (MSG_IS_UNREAD(msginfo->flags)) ++unread; ++total; } item->new = new; item->unread = unread; item->total = total; item->updated = TRUE; finish: filter_rule_list_free(flist); return mlist; } static gchar *virtual_fetch_msg(Folder *folder, FolderItem *item, gint num) { return NULL; } static MsgInfo *virtual_get_msginfo(Folder *folder, FolderItem *item, gint num) { return NULL; } static gint virtual_close(Folder *folder, FolderItem *item) { return 0; } static gint virtual_scan_folder(Folder *folder, FolderItem *item) { return 0; } static gint virtual_rename_folder(Folder *folder, FolderItem *item, const gchar *name) { g_return_val_if_fail(item != NULL, -1); g_return_val_if_fail(item->stype == F_VIRTUAL, -1); return mh_get_class()->rename_folder(folder, item, name); } static gint virtual_remove_folder(Folder *folder, FolderItem *item) { gchar *path; g_return_val_if_fail(item != NULL, -1); g_return_val_if_fail(item->stype == F_VIRTUAL, -1); path = folder_item_get_path(item); if (remove_dir_recursive(path) < 0) { g_warning("can't remove directory '%s'\n", path); g_free(path); return -1; } g_free(path); folder_item_remove(item); return 0; } libsylph-1.1.0/libsylph/xml.c0000644000175000017500000003130710457702533013064 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #include #include #include #include #include "xml.h" #include "utils.h" #include "codeconv.h" #define SPARSE_MEMORY /* if this is defined all attr.names and tag.names are stored * in a hash table */ #if defined(SPARSE_MEMORY) #include "stringtable.h" static StringTable *xml_string_table; static void xml_string_table_create(void) { if (xml_string_table == NULL) xml_string_table = string_table_new(); } #define XML_STRING_ADD(str) \ string_table_insert_string(xml_string_table, (str)) #define XML_STRING_FREE(str) \ string_table_free_string(xml_string_table, (str)) #define XML_STRING_TABLE_CREATE() \ xml_string_table_create() #else /* !SPARSE_MEMORY */ #define XML_STRING_ADD(str) \ g_strdup(str) #define XML_STRING_FREE(str) \ g_free(str) #define XML_STRING_TABLE_CREATE() #endif /* SPARSE_MEMORY */ static void xml_free_tag (XMLTag *tag); static gint xml_get_parenthesis (XMLFile *file, gchar *buf, gint len); XMLFile *xml_open_file(const gchar *path) { XMLFile *newfile; g_return_val_if_fail(path != NULL, NULL); XML_STRING_TABLE_CREATE(); newfile = g_new(XMLFile, 1); newfile->fp = g_fopen(path, "rb"); if (!newfile->fp) { g_free(newfile); return NULL; } newfile->buf = g_string_new(NULL); newfile->bufp = newfile->buf->str; newfile->dtd = NULL; newfile->encoding = NULL; newfile->tag_stack = NULL; newfile->level = 0; newfile->is_empty_element = FALSE; return newfile; } void xml_close_file(XMLFile *file) { g_return_if_fail(file != NULL); if (file->fp) fclose(file->fp); g_string_free(file->buf, TRUE); g_free(file->dtd); g_free(file->encoding); while (file->tag_stack != NULL) xml_pop_tag(file); g_free(file); } static GNode *xml_build_tree(XMLFile *file, GNode *parent, guint level) { GNode *node = NULL; XMLNode *xmlnode; XMLTag *tag; while (xml_parse_next_tag(file) == 0) { if (file->level < level) break; if (file->level == level) { g_warning("xml_build_tree(): Parse error\n"); break; } tag = xml_get_current_tag(file); if (!tag) break; xmlnode = xml_node_new(xml_copy_tag(tag), NULL); xmlnode->element = xml_get_element(file); if (!parent) node = g_node_new(xmlnode); else node = g_node_append_data(parent, xmlnode); xml_build_tree(file, node, file->level); if (file->level == 0) break; } return node; } GNode *xml_parse_file(const gchar *path) { XMLFile *file; GNode *node; file = xml_open_file(path); g_return_val_if_fail(file != NULL, NULL); xml_get_dtd(file); node = xml_build_tree(file, NULL, file->level); xml_close_file(file); #if defined(SPARSE_MEMORY) if (get_debug_mode()) string_table_get_stats(xml_string_table); #endif return node; } gint xml_get_dtd(XMLFile *file) { gchar buf[XMLBUFSIZE]; gchar *bufp = buf; if (xml_get_parenthesis(file, buf, sizeof(buf)) < 0) return -1; if ((*bufp++ == '?') && (bufp = strcasestr(bufp, "xml")) && (bufp = strcasestr(bufp + 3, "version")) && (bufp = strchr(bufp + 7, '?'))) { file->dtd = g_strdup(buf); if ((bufp = strcasestr(buf, "encoding=\""))) { bufp += 9; extract_quote(bufp, '"'); file->encoding = g_strdup(bufp); } else file->encoding = g_strdup(CS_INTERNAL); } else { g_warning("Can't get xml dtd\n"); return -1; } return 0; } gint xml_parse_next_tag(XMLFile *file) { gchar buf[XMLBUFSIZE]; gchar *bufp = buf; gchar *tag_str; XMLTag *tag; gint len; if (file->is_empty_element == TRUE) { file->is_empty_element = FALSE; xml_pop_tag(file); return 0; } if (xml_get_parenthesis(file, buf, sizeof(buf)) < 0) { g_warning("xml_parse_next_tag(): Can't parse next tag\n"); return -1; } /* end-tag */ if (buf[0] == '/') { if (strcmp(xml_get_current_tag(file)->tag, buf + 1) != 0) { g_warning("xml_parse_next_tag(): Tag name mismatch: %s\n", buf); return -1; } xml_pop_tag(file); return 0; } tag = xml_tag_new(NULL); xml_push_tag(file, tag); len = strlen(buf); if (len > 0 && buf[len - 1] == '/') { file->is_empty_element = TRUE; buf[len - 1] = '\0'; g_strchomp(buf); } if (strlen(buf) == 0) { g_warning("xml_parse_next_tag(): Tag name is empty\n"); return -1; } while (*bufp != '\0' && !g_ascii_isspace(*bufp)) bufp++; if (*bufp == '\0') { tag_str = conv_codeset_strdup(buf, file->encoding, CS_INTERNAL); if (tag_str) { tag->tag = XML_STRING_ADD(tag_str); g_free(tag_str); } else tag->tag = XML_STRING_ADD(buf); return 0; } else { *bufp++ = '\0'; tag_str = conv_codeset_strdup(buf, file->encoding, CS_INTERNAL); if (tag_str) { tag->tag = XML_STRING_ADD(tag_str); g_free(tag_str); } else tag->tag = XML_STRING_ADD(buf); } /* parse attributes ( name=value ) */ while (*bufp) { XMLAttr *attr; gchar *attr_name; gchar *attr_value; gchar *utf8_attr_name; gchar *utf8_attr_value; gchar *p; gchar quote; while (g_ascii_isspace(*bufp)) bufp++; attr_name = bufp; if ((p = strchr(attr_name, '=')) == NULL) { g_warning("xml_parse_next_tag(): Syntax error in tag\n"); return -1; } bufp = p; *bufp++ = '\0'; while (g_ascii_isspace(*bufp)) bufp++; if (*bufp != '"' && *bufp != '\'') { g_warning("xml_parse_next_tag(): Syntax error in tag\n"); return -1; } quote = *bufp; bufp++; attr_value = bufp; if ((p = strchr(attr_value, quote)) == NULL) { g_warning("xml_parse_next_tag(): Syntax error in tag\n"); return -1; } bufp = p; *bufp++ = '\0'; g_strchomp(attr_name); xml_unescape_str(attr_value); utf8_attr_name = conv_codeset_strdup (attr_name, file->encoding, CS_INTERNAL); utf8_attr_value = conv_codeset_strdup (attr_value, file->encoding, CS_INTERNAL); if (!utf8_attr_name) utf8_attr_name = g_strdup(attr_name); if (!utf8_attr_value) utf8_attr_value = g_strdup(attr_value); attr = xml_attr_new(utf8_attr_name, utf8_attr_value); xml_tag_add_attr(tag, attr); g_free(utf8_attr_value); g_free(utf8_attr_name); } return 0; } void xml_push_tag(XMLFile *file, XMLTag *tag) { g_return_if_fail(tag != NULL); file->tag_stack = g_list_prepend(file->tag_stack, tag); file->level++; } void xml_pop_tag(XMLFile *file) { XMLTag *tag; if (!file->tag_stack) return; tag = (XMLTag *)file->tag_stack->data; xml_free_tag(tag); file->tag_stack = g_list_remove(file->tag_stack, tag); file->level--; } XMLTag *xml_get_current_tag(XMLFile *file) { if (file->tag_stack) return (XMLTag *)file->tag_stack->data; else return NULL; } GList *xml_get_current_tag_attr(XMLFile *file) { XMLTag *tag; tag = xml_get_current_tag(file); if (!tag) return NULL; return tag->attr; } gchar *xml_get_element(XMLFile *file) { gchar *str; gchar *new_str; gchar *end; while ((end = strchr(file->bufp, '<')) == NULL) if (xml_read_line(file) < 0) return NULL; if (end == file->bufp) return NULL; str = g_strndup(file->bufp, end - file->bufp); /* this is not XML1.0 strict */ g_strstrip(str); xml_unescape_str(str); file->bufp = end; xml_truncate_buf(file); if (str[0] == '\0') { g_free(str); return NULL; } new_str = conv_codeset_strdup(str, file->encoding, CS_INTERNAL); if (!new_str) new_str = g_strdup(str); g_free(str); return new_str; } gint xml_read_line(XMLFile *file) { gchar buf[XMLBUFSIZE]; gint index; if (fgets(buf, sizeof(buf), file->fp) == NULL) return -1; index = file->bufp - file->buf->str; g_string_append(file->buf, buf); file->bufp = file->buf->str + index; return 0; } void xml_truncate_buf(XMLFile *file) { gint len; len = file->bufp - file->buf->str; if (len > 0) { g_string_erase(file->buf, 0, len); file->bufp = file->buf->str; } } gboolean xml_compare_tag(XMLFile *file, const gchar *name) { XMLTag *tag; tag = xml_get_current_tag(file); if (tag && strcmp(tag->tag, name) == 0) return TRUE; else return FALSE; } XMLNode *xml_node_new(XMLTag *tag, const gchar *text) { XMLNode *node; node = g_new(XMLNode, 1); node->tag = tag; node->element = g_strdup(text); return node; } XMLTag *xml_tag_new(const gchar *tag) { XMLTag *new_tag; new_tag = g_new(XMLTag, 1); if (tag) new_tag->tag = XML_STRING_ADD(tag); else new_tag->tag = NULL; new_tag->attr = NULL; return new_tag; } XMLAttr *xml_attr_new(const gchar *name, const gchar *value) { XMLAttr *new_attr; new_attr = g_new(XMLAttr, 1); new_attr->name = XML_STRING_ADD(name); new_attr->value = g_strdup(value); return new_attr; } void xml_tag_add_attr(XMLTag *tag, XMLAttr *attr) { tag->attr = g_list_append(tag->attr, attr); } XMLTag *xml_copy_tag(XMLTag *tag) { XMLTag *new_tag; XMLAttr *attr; GList *list; new_tag = xml_tag_new(tag->tag); for (list = tag->attr; list != NULL; list = list->next) { attr = xml_copy_attr((XMLAttr *)list->data); xml_tag_add_attr(new_tag, attr); } return new_tag; } XMLAttr *xml_copy_attr(XMLAttr *attr) { return xml_attr_new(attr->name, attr->value); } gint xml_unescape_str(gchar *str) { gchar *start; gchar *end; gchar *p = str; gchar *esc_str; gchar ch; gint len; while ((start = strchr(p, '&')) != NULL) { if ((end = strchr(start + 1, ';')) == NULL) { g_warning("Unescaped `&' appeared\n"); p = start + 1; continue; } len = end - start + 1; if (len < 3) { p = end + 1; continue; } Xstrndup_a(esc_str, start, len, return -1); if (!strcmp(esc_str, "<")) ch = '<'; else if (!strcmp(esc_str, ">")) ch = '>'; else if (!strcmp(esc_str, "&")) ch = '&'; else if (!strcmp(esc_str, "'")) ch = '\''; else if (!strcmp(esc_str, """)) ch = '\"'; else { p = end + 1; continue; } *start = ch; memmove(start + 1, end + 1, strlen(end + 1) + 1); p = start + 1; } return 0; } gint xml_file_put_escape_str(FILE *fp, const gchar *str) { const gchar *p; g_return_val_if_fail(fp != NULL, -1); if (!str) return 0; for (p = str; *p != '\0'; p++) { switch (*p) { case '<': fputs("<", fp); break; case '>': fputs(">", fp); break; case '&': fputs("&", fp); break; case '\'': fputs("'", fp); break; case '\"': fputs(""", fp); break; default: fputc(*p, fp); } } return 0; } gint xml_file_put_xml_decl(FILE *fp) { g_return_val_if_fail(fp != NULL, -1); fprintf(fp, "\n", CS_INTERNAL); return 0; } gint xml_file_put_node(FILE *fp, XMLNode *node) { GList *cur; g_return_val_if_fail(fp != NULL, -1); g_return_val_if_fail(node != NULL, -1); fprintf(fp, "<%s", node->tag->tag); for (cur = node->tag->attr; cur != NULL; cur = cur->next) { XMLAttr *attr = (XMLAttr *)cur->data; fprintf(fp, " %s=\"", attr->name); xml_file_put_escape_str(fp, attr->value); fputs("\"", fp); } if (node->element) { fputs(">", fp); xml_file_put_escape_str(fp, node->element); fprintf(fp, "\n", node->tag->tag); } else { fputs(" />\n", fp); } return 0; } void xml_free_node(XMLNode *node) { if (!node) return; xml_free_tag(node->tag); g_free(node->element); g_free(node); } static gboolean xml_free_func(GNode *node, gpointer data) { XMLNode *xmlnode = node->data; xml_free_node(xmlnode); return FALSE; } void xml_free_tree(GNode *node) { g_return_if_fail(node != NULL); g_node_traverse(node, G_PRE_ORDER, G_TRAVERSE_ALL, -1, xml_free_func, NULL); g_node_destroy(node); } static void xml_free_tag(XMLTag *tag) { if (!tag) return; XML_STRING_FREE(tag->tag); while (tag->attr != NULL) { XMLAttr *attr = (XMLAttr *)tag->attr->data; XML_STRING_FREE(attr->name); g_free(attr->value); g_free(attr); tag->attr = g_list_remove(tag->attr, tag->attr->data); } g_free(tag); } static gint xml_get_parenthesis(XMLFile *file, gchar *buf, gint len) { gchar *start; gchar *end; buf[0] = '\0'; while ((start = strchr(file->bufp, '<')) == NULL) if (xml_read_line(file) < 0) return -1; start++; file->bufp = start; while ((end = strchr(file->bufp, '>')) == NULL) if (xml_read_line(file) < 0) return -1; strncpy2(buf, file->bufp, MIN(end - file->bufp + 1, len)); g_strstrip(buf); file->bufp = end + 1; xml_truncate_buf(file); return 0; } libsylph-1.1.0/libsylph/defs.h0000644000175000017500000000712410504661060013202 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __DEFS_H__ #define __DEFS_H__ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #ifdef G_OS_WIN32 # include #endif #if HAVE_PATHS_H # include #endif #if HAVE_SYS_PARAM_H # include #endif #define INBOX_DIR "inbox" #define OUTBOX_DIR "sent" #define QUEUE_DIR "queue" #define DRAFT_DIR "draft" #define TRASH_DIR "trash" #ifdef G_OS_WIN32 # define RC_DIR "Sylpheed" #else # define RC_DIR ".sylpheed-2.0" #endif #define OLD_RC_DIR ".sylpheed" #define NEWS_CACHE_DIR "newscache" #define IMAP_CACHE_DIR "imapcache" #define MIME_TMP_DIR "mimetmp" #define COMMON_RC "sylpheedrc" #define ACCOUNT_RC "accountrc" #define FILTER_RC "filterrc" #define FILTER_LIST "filter.xml" #define FILTER_HEADER_RC "filterheaderrc" #define CUSTOM_HEADER_RC "customheaderrc" #define DISPLAY_HEADER_RC "dispheaderrc" #define MENU_RC "menurc" #define ACTIONS_RC "actionsrc" #define COMMAND_HISTORY "command_history" #define TEMPLATE_DIR "templates" #define TMP_DIR "tmp" #define UIDL_DIR "uidl" #define NEWSGROUP_LIST ".newsgroup_list" #define ADDRESS_BOOK "addressbook.xml" #define MANUAL_HTML_INDEX "sylpheed.html" #define FAQ_HTML_INDEX "sylpheed-faq.html" #define HOMEPAGE_URI "http://sylpheed.sraoss.jp/" #define FOLDER_LIST "folderlist.xml" #define CACHE_FILE ".sylpheed_cache" #define MARK_FILE ".sylpheed_mark" #define SEARCH_CACHE "search_cache" #define CACHE_VERSION 0x21 #define MARK_VERSION 2 #define SEARCH_CACHE_VERSION 1 #ifdef G_OS_WIN32 # define REMOTE_CMD_PORT 50215 #endif #ifdef G_OS_WIN32 # define DEFAULT_SIGNATURE "signature.txt" #else # define DEFAULT_SIGNATURE ".signature" #endif #define DEFAULT_INC_PATH "/usr/bin/mh/inc" #define DEFAULT_INC_PROGRAM "inc" /* #define DEFAULT_INC_PATH "/usr/bin/imget" */ /* #define DEFAULT_INC_PROGRAM "imget" */ #define DEFAULT_SENDMAIL_CMD "/usr/sbin/sendmail -t -i" #define DEFAULT_BROWSER_CMD "mozilla-firefox -remote 'openURL(%s,new-window)'" #ifdef _PATH_MAILDIR # define DEFAULT_SPOOL_PATH _PATH_MAILDIR #else # define DEFAULT_SPOOL_PATH "/var/spool/mail" #endif #define BUFFSIZE 8192 #ifndef MAXPATHLEN # define MAXPATHLEN 4095 #endif #define DEFAULT_HEIGHT 460 #define DEFAULT_FOLDERVIEW_WIDTH 179 #define DEFAULT_MAINVIEW_WIDTH 600 #define DEFAULT_SUMMARY_HEIGHT 140 #define DEFAULT_HEADERVIEW_HEIGHT 40 #define DEFAULT_COMPOSE_HEIGHT 560 #define BORDER_WIDTH 2 #define CTREE_INDENT 18 #define FOLDER_SPACING 4 #define MAX_ENTRY_LENGTH 8191 #define COLOR_DIM 35000 #define UI_REFRESH_INTERVAL 50000 /* usec */ #define FOLDER_UPDATE_INTERVAL 1500 /* msec */ #define PROGRESS_UPDATE_INTERVAL 200 /* msec */ #define SESSION_TIMEOUT_INTERVAL 60 /* sec */ #define MAX_HISTORY_SIZE 16 #define DEFAULT_MESSAGE_FONT "Monospace 12" #endif /* __DEFS_H__ */ libsylph-1.1.0/libsylph/enums.h0000644000175000017500000000241310457702533013414 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __ENUMS_H__ #define __ENUMS_H__ typedef enum { TOOLBAR_NONE, TOOLBAR_ICON, TOOLBAR_TEXT, TOOLBAR_BOTH } ToolbarStyle; typedef enum { S_COL_MARK, S_COL_UNREAD, S_COL_MIME, S_COL_SUBJECT, S_COL_FROM, S_COL_DATE, S_COL_SIZE, S_COL_NUMBER, S_COL_MSG_INFO, S_COL_LABEL, S_COL_TDATE, S_COL_TO, S_COL_FOREGROUND, S_COL_BOLD, N_SUMMARY_COLS } SummaryColumnType; #define N_SUMMARY_VISIBLE_COLS S_COL_MSG_INFO #endif /* __ENUMS_H__ */ libsylph-1.1.0/libsylph/account.h0000644000175000017500000000445510522045330013715 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2006 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __ACCOUNT_H__ #define __ACCOUNT_H__ #include #include "prefs.h" #include "prefs_account.h" #include "folder.h" #include "procmsg.h" typedef gint (*AccountFunc) (PrefsAccount *ac_prefs, gpointer user_data); /* extern PrefsAccount *cur_account; */ void account_read_config_all (void); void account_write_config_all (void); PrefsAccount *account_get_current_account (void); PrefsAccount *account_find_from_smtp_server (const gchar *address, const gchar *smtp_server); PrefsAccount *account_find_from_address (const gchar *address); PrefsAccount *account_find_from_id (gint id); PrefsAccount *account_find_from_item (FolderItem *item); PrefsAccount *account_find_from_item_property (FolderItem *item); PrefsAccount *account_find_from_message_file (const gchar *file); PrefsAccount *account_find_from_msginfo (MsgInfo *msginfo); gboolean account_address_exist (const gchar *address); void account_foreach (AccountFunc func, gpointer user_data); GList *account_get_list (void); void account_list_free (void); void account_append (PrefsAccount *ac_prefs); void account_set_as_default (PrefsAccount *ac_prefs); PrefsAccount *account_get_default (void); //void account_set_missing_folder(void); FolderItem *account_get_special_folder(PrefsAccount *ac_prefs, SpecialFolderItemType type); void account_destroy (PrefsAccount *ac_prefs); void account_updated (void); #endif /* __ACCOUNT_H__ */ libsylph-1.1.0/libsylph/base64.h0000644000175000017500000000253710457702534013361 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __BASE64_H__ #define __BASE64_H__ #include typedef struct _Base64Decoder Base64Decoder; struct _Base64Decoder { gint buf_len; gchar buf[4]; }; void base64_encode (gchar *out, const guchar *in, gint inlen); gint base64_decode (guchar *out, const gchar *in, gint inlen); Base64Decoder *base64_decoder_new (void); void base64_decoder_free (Base64Decoder *decoder); gint base64_decoder_decode (Base64Decoder *decoder, const gchar *in, guchar *out); #endif /* __BASE64_H__ */ libsylph-1.1.0/libsylph/codeconv.h0000644000175000017500000001516710734632450014075 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2007 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __CODECONV_H__ #define __CODECONV_H__ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include typedef struct _CodeConverter CodeConverter; typedef enum { C_AUTO, C_US_ASCII, C_UTF_8, C_UTF_7, C_ISO_8859_1, C_ISO_8859_2, C_ISO_8859_3, C_ISO_8859_4, C_ISO_8859_5, C_ISO_8859_6, C_ISO_8859_7, C_ISO_8859_8, C_ISO_8859_9, C_ISO_8859_10, C_ISO_8859_11, C_ISO_8859_13, C_ISO_8859_14, C_ISO_8859_15, C_BALTIC, C_CP932, C_CP1250, C_CP1251, C_CP1252, C_CP1253, C_CP1254, C_CP1255, C_CP1256, C_CP1257, C_CP1258, C_WINDOWS_932, C_WINDOWS_1250, C_WINDOWS_1251, C_WINDOWS_1252, C_WINDOWS_1253, C_WINDOWS_1254, C_WINDOWS_1255, C_WINDOWS_1256, C_WINDOWS_1257, C_WINDOWS_1258, C_KOI8_R, C_KOI8_T, C_KOI8_U, C_ISO_2022_JP, C_ISO_2022_JP_2, C_ISO_2022_JP_3, C_EUC_JP, C_EUC_JP_MS, C_SHIFT_JIS, C_ISO_2022_KR, C_EUC_KR, C_ISO_2022_CN, C_EUC_CN, C_GB2312, C_GBK, C_EUC_TW, C_BIG5, C_BIG5_HKSCS, C_TIS_620, C_WINDOWS_874, C_GEORGIAN_PS, C_TCVN5712_1, C_ISO_8859_16 } CharSet; typedef gchar *(*CodeConvFunc) (const gchar *inbuf, gint *error); struct _CodeConverter { CodeConvFunc code_conv_func; gchar *src_encoding; gchar *dest_encoding; }; #define CS_AUTO "AUTO" #define CS_US_ASCII "US-ASCII" #define CS_ANSI_X3_4_1968 "ANSI_X3.4-1968" #define CS_UTF_8 "UTF-8" #define CS_UTF_7 "UTF-7" #define CS_ISO_8859_1 "ISO-8859-1" #define CS_ISO_8859_2 "ISO-8859-2" #define CS_ISO_8859_3 "ISO-8859-3" #define CS_ISO_8859_4 "ISO-8859-4" #define CS_ISO_8859_5 "ISO-8859-5" #define CS_ISO_8859_6 "ISO-8859-6" #define CS_ISO_8859_7 "ISO-8859-7" #define CS_ISO_8859_8 "ISO-8859-8" #define CS_ISO_8859_9 "ISO-8859-9" #define CS_ISO_8859_10 "ISO-8859-10" #define CS_ISO_8859_11 "ISO-8859-11" #define CS_ISO_8859_13 "ISO-8859-13" #define CS_ISO_8859_14 "ISO-8859-14" #define CS_ISO_8859_15 "ISO-8859-15" #define CS_BALTIC "BALTIC" #define CS_CP932 "CP932" #define CS_CP1250 "CP1250" #define CS_CP1251 "CP1251" #define CS_CP1252 "CP1252" #define CS_CP1253 "CP1253" #define CS_CP1254 "CP1254" #define CS_CP1255 "CP1255" #define CS_CP1256 "CP1256" #define CS_CP1257 "CP1257" #define CS_CP1258 "CP1258" #define CS_WINDOWS_932 "Windows-932" #define CS_WINDOWS_1250 "Windows-1250" #define CS_WINDOWS_1251 "Windows-1251" #define CS_WINDOWS_1252 "Windows-1252" #define CS_WINDOWS_1253 "Windows-1253" #define CS_WINDOWS_1254 "Windows-1254" #define CS_WINDOWS_1255 "Windows-1255" #define CS_WINDOWS_1256 "Windows-1256" #define CS_WINDOWS_1257 "Windows-1257" #define CS_WINDOWS_1258 "Windows-1258" #define CS_KOI8_R "KOI8-R" #define CS_KOI8_T "KOI8-T" #define CS_KOI8_U "KOI8-U" #define CS_ISO_2022_JP "ISO-2022-JP" #define CS_ISO_2022_JP_2 "ISO-2022-JP-2" #define CS_ISO_2022_JP_3 "ISO-2022-JP-3" #define CS_EUC_JP "EUC-JP" #define CS_EUCJP "EUCJP" #define CS_EUC_JP_MS "EUC-JP-MS" #define CS_SHIFT_JIS "Shift_JIS" #define CS_SHIFT__JIS "SHIFT-JIS" #define CS_SJIS "SJIS" #define CS_X_SJIS "X-SJIS" #define CS_ISO_2022_KR "ISO-2022-KR" #define CS_EUC_KR "EUC-KR" #define CS_KS_C_5601_1987 "ks_c_5601-1987" #define CS_ISO_2022_CN "ISO-2022-CN" #define CS_EUC_CN "EUC-CN" #define CS_GB2312 "GB2312" #define CS_GBK "GBK" #define CS_X_GBK "X-GBK" #define CS_EUC_TW "EUC-TW" #define CS_BIG5 "Big5" #define CS_BIG5_HKSCS "BIG5-HKSCS" #define CS_TIS_620 "TIS-620" #define CS_WINDOWS_874 "Windows-874" #define CS_GEORGIAN_PS "GEORGIAN-PS" #define CS_TCVN5712_1 "TCVN5712-1" #define CS_ISO_8859_16 "ISO-8859-16" #define C_INTERNAL C_UTF_8 #define CS_INTERNAL CS_UTF_8 //void conv_mb_alnum(gchar *str); CharSet conv_guess_ja_encoding (const gchar *str); gchar *conv_utf8todisp (const gchar *inbuf, gint *error); gchar *conv_localetodisp (const gchar *inbuf, gint *error); CodeConverter *conv_code_converter_new (const gchar *src_encoding, const gchar *dest_encoding); void conv_code_converter_destroy (CodeConverter *conv); gchar *conv_convert (CodeConverter *conv, const gchar *inbuf); #define conv_codeset_strdup(inbuf, src_code, dest_code) \ (conv_codeset_strdup_full(inbuf, src_code, dest_code, NULL)) gchar *conv_codeset_strdup_full (const gchar *inbuf, const gchar *src_encoding, const gchar *dest_encoding, gint *error); CodeConvFunc conv_get_code_conv_func (const gchar *src_encoding, const gchar *dest_encoding); gchar *conv_iconv_strdup (const gchar *inbuf, const gchar *src_encoding, const gchar *dest_encoding, gint *error); gchar *conv_iconv_strdup_with_cd (const gchar *inbuf, iconv_t cd, gint *error); const gchar *conv_get_charset_str (CharSet charset); CharSet conv_get_charset_from_str (const gchar *charset); CharSet conv_get_locale_charset (void); const gchar *conv_get_locale_charset_str (void); CharSet conv_get_internal_charset (void); const gchar *conv_get_internal_charset_str (void); CharSet conv_get_outgoing_charset (void); const gchar *conv_get_outgoing_charset_str (void); gboolean conv_is_multibyte_encoding (CharSet encoding); const gchar *conv_get_current_locale (void); gboolean conv_is_ja_locale (void); gchar *conv_unmime_header (const gchar *str, const gchar *default_encoding); void conv_encode_header (gchar *dest, gint len, const gchar *src, gint header_len, gboolean addr_field, const gchar *out_encoding); gchar *conv_encode_filename (const gchar *src, const gchar *param_name, const gchar *out_encoding); gint conv_copy_file (const gchar *src, const gchar *dest, const gchar *src_encoding); gint conv_copy_dir (const gchar *src, const gchar *dest, const gchar *src_encoding); CharSet conv_check_file_encoding (const gchar *file); gchar *conv_filename_from_utf8 (const gchar *utf8_file); gchar *conv_filename_to_utf8 (const gchar *fs_file); #endif /* __CODECONV_H__ */ libsylph-1.1.0/libsylph/compose.h0000644000175000017500000000740510501164114013723 00000000000000 #ifndef __COMPOSE_H__ #define __COMPOSE_H__ #include typedef struct _ComposeInfo ComposeInfo; typedef struct _ComposeAttachInfo ComposeAttachInfo; #include "procmsg.h" #include "procmime.h" #include "folder.h" #include "prefs_account.h" #include "codeconv.h" typedef enum { COMPOSE_REPLY = 1, COMPOSE_REPLY_TO_SENDER = 2, COMPOSE_REPLY_TO_ALL = 3, COMPOSE_REPLY_TO_LIST = 4, COMPOSE_FORWARD = 5, COMPOSE_FORWARD_AS_ATTACH = 6, COMPOSE_NEW = 7, COMPOSE_REDIRECT = 8, COMPOSE_REEDIT = 9, COMPOSE_WITH_QUOTE = 1 << 16, COMPOSE_MODE_MASK = 0xffff } ComposeMode; #define COMPOSE_MODE(mode) ((mode) & COMPOSE_MODE_MASK) #define COMPOSE_QUOTE_MODE(mode) ((mode) & COMPOSE_WITH_QUOTE) typedef enum { COMPOSE_OUT_MIME_PROLOG = 1 << 0, COMPOSE_OUT_DISPOSITION_INLINE = 1 << 1, COMPOSE_PROTECT_TRAILING_SPACE = 1 << 2, COMPOSE_DRAFT_MODE = 1 << 3 } ComposeFlags; typedef gint (*ComposePreFunc) (ComposeInfo *compose, gpointer user_data); typedef gint (*ComposePostFunc) (ComposeInfo *compose, const gchar *file, gpointer user_data); struct _ComposeInfo { ComposeMode mode; ComposeFlags flags; /* reference of redirect or reedit */ MsgInfo *targetinfo; /* reference of reply */ MsgInfo *replyinfo; /* extra information */ gchar *ref_replyto; gchar *ref_cc; gchar *ref_bcc; gchar *ref_newsgroups; gchar *ref_followup_to; gchar *ref_ml_post; /* composing message information */ gchar *to; gchar *cc; gchar *bcc; gchar *replyto; gchar *newsgroups; gchar *followup_to; gchar *subject; gchar *inreplyto; gchar *references; gchar *msgid; gchar *boundary; gchar *header_encoding; gchar *body_encoding; EncodingType ctencoding; gchar *body_text; GList *attach_list; /* actually sent address list */ GSList *to_list; GSList *newsgroup_list; PrefsAccount *account; /* callback functions for pre/post-process */ ComposePreFunc preprocess_func; ComposePostFunc postprocess_func; /* user data */ gpointer data; }; struct _ComposeAttachInfo { gchar *file; gchar *content_type; EncodingType encoding; gchar *name; gsize size; }; ComposeInfo *compose_info_new (PrefsAccount *account, ComposeMode mode); void compose_info_free (ComposeInfo *compose); ComposeAttachInfo *compose_attach_info_new (const gchar *file, const gchar *content_type, EncodingType encoding, const gchar *name, gsize size); void compose_attach_info_free (ComposeAttachInfo *ainfo); gint compose_parse_header (ComposeInfo *compose, MsgInfo *msginfo); gint compose_set_headers (ComposeInfo *compose, const gchar *to, const gchar *cc, const gchar *bcc, const gchar *replyto, const gchar *subject); gint compose_set_news_headers (ComposeInfo *compose, const gchar *newsgroups, const gchar *followup_to); gint compose_set_body (ComposeInfo *compose, const gchar *body); gint compose_set_encoding (ComposeInfo *compose, const gchar *header_encoding, const gchar *body_encoding); gint compose_set_attachments (ComposeInfo *compose, GList *attach_list); gint compose_write_to_file (ComposeInfo *compose, const gchar *out_file, GError *error); gint compose_redirect_write_to_file (ComposeInfo *compose, const gchar *out_file, GError *error); gint compose_remove_reedit_target (ComposeInfo *compose); gint compose_queue (ComposeInfo *compose, const gchar *file); void compose_generate_msgid (ComposeInfo *compose, gchar *buf, gint len); void compose_set_preprocess_func (ComposeInfo *compose, ComposePreFunc func); void compose_set_postprocess_func (ComposeInfo *compose, ComposePostFunc func); #endif /* __COMPOSE_H__ */ libsylph-1.1.0/libsylph/customheader.h0000644000175000017500000000262210457702534014753 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __CUSTOMHEADER_H__ #define __CUSTOMHEADER_H__ #include typedef struct _CustomHeader CustomHeader; #include "prefs_account.h" struct _CustomHeader { gint account_id; gchar *name; gchar *value; }; void custom_header_read_config (PrefsAccount *ac); void custom_header_write_config (PrefsAccount *ac); gchar *custom_header_get_str (CustomHeader *ch); CustomHeader *custom_header_read_str (const gchar *buf); CustomHeader *custom_header_find (GSList *header_list, const gchar *header); void custom_header_free (CustomHeader *ch); #endif /* __CUSTOMHEADER_H__ */ libsylph-1.1.0/libsylph/displayheader.h0000644000175000017500000000233210457702534015104 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __DISPLAYHEADER_H__ #define __DISPLAYHEADER_H__ #include typedef struct _DisplayHeaderProp DisplayHeaderProp; struct _DisplayHeaderProp { gchar *name; gboolean hidden; }; gchar *display_header_prop_get_str (DisplayHeaderProp *dp); DisplayHeaderProp *display_header_prop_read_str (gchar *buf); void display_header_prop_free (DisplayHeaderProp *dp); #endif /* __DISPLAYHEADER_H__ */ libsylph-1.1.0/libsylph/filter.h0000644000175000017500000001200110525033077013540 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2006 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FILTER_H__ #define __FILTER_H__ #include #include "folder.h" #include "procmsg.h" #include "utils.h" typedef struct _FilterCond FilterCond; typedef struct _FilterAction FilterAction; typedef struct _FilterRule FilterRule; typedef struct _FilterInfo FilterInfo; typedef enum { FLT_TIMING_ANY, FLT_TIMING_ON_RECEIVE, FLT_TIMING_MANUAL } FilterTiming; typedef enum { FLT_COND_HEADER, FLT_COND_ANY_HEADER, FLT_COND_TO_OR_CC, FLT_COND_BODY, FLT_COND_CMD_TEST, FLT_COND_SIZE_GREATER, FLT_COND_AGE_GREATER, FLT_COND_UNREAD, FLT_COND_MARK, FLT_COND_COLOR_LABEL, FLT_COND_MIME, FLT_COND_ACCOUNT } FilterCondType; typedef enum { FLT_CONTAIN, FLT_EQUAL, FLT_REGEX } FilterMatchType; typedef enum { FLT_NOT_MATCH = 1 << 0, FLT_CASE_SENS = 1 << 1 } FilterMatchFlag; typedef enum { FLT_OR, FLT_AND } FilterBoolOp; typedef enum { FLT_ACTION_MOVE, FLT_ACTION_COPY, FLT_ACTION_NOT_RECEIVE, FLT_ACTION_DELETE, FLT_ACTION_EXEC, FLT_ACTION_EXEC_ASYNC, FLT_ACTION_MARK, FLT_ACTION_COLOR_LABEL, FLT_ACTION_MARK_READ, FLT_ACTION_FORWARD, FLT_ACTION_FORWARD_AS_ATTACHMENT, FLT_ACTION_REDIRECT, FLT_ACTION_STOP_EVAL, FLT_ACTION_NONE } FilterActionType; typedef enum { FLT_BY_NONE, FLT_BY_AUTO, FLT_BY_FROM, FLT_BY_TO, FLT_BY_SUBJECT } FilterCreateType; #define FLT_IS_NOT_MATCH(flag) ((flag & FLT_NOT_MATCH) != 0) #define FLT_IS_CASE_SENS(flag) ((flag & FLT_CASE_SENS) != 0) struct _FilterCond { FilterCondType type; gchar *header_name; gchar *str_value; gint int_value; FilterMatchType match_type; FilterMatchFlag match_flag; StrFindFunc match_func; }; struct _FilterAction { FilterActionType type; gchar *str_value; gint int_value; }; struct _FilterRule { gchar *name; FilterBoolOp bool_op; GSList *cond_list; GSList *action_list; FilterTiming timing; gboolean enabled; gchar *target_folder; gboolean recursive; }; struct _FilterInfo { PrefsAccount *account; MsgFlags flags; gboolean actions[FLT_ACTION_NONE]; GSList *dest_list; FolderItem *move_dest; gboolean drop_done; }; gint filter_apply (GSList *fltlist, const gchar *file, FilterInfo *fltinfo); gint filter_apply_msginfo (GSList *fltlist, MsgInfo *msginfo, FilterInfo *fltinfo); gint filter_action_exec (FilterRule *rule, MsgInfo *msginfo, const gchar *file, FilterInfo *fltinfo); gboolean filter_match_rule (FilterRule *rule, MsgInfo *msginfo, GSList *hlist, FilterInfo *fltinfo); gboolean filter_rule_requires_full_headers (FilterRule *rule); /* read / write config */ GSList *filter_xml_node_to_filter_list (GNode *node); GSList *filter_read_file (const gchar *file); void filter_read_config (void); void filter_write_file (GSList *list, const gchar *file); void filter_write_config (void); /* for old filterrc */ gchar *filter_get_str (FilterRule *rule); FilterRule *filter_read_str (const gchar *str); FilterRule *filter_rule_new (const gchar *name, FilterBoolOp bool_op, GSList *cond_list, GSList *action_list); FilterCond *filter_cond_new (FilterCondType type, FilterMatchType match_type, FilterMatchFlag match_flag, const gchar *header, const gchar *value); FilterAction *filter_action_new (FilterActionType type, const gchar *str); FilterInfo *filter_info_new (void); void filter_rule_rename_dest_path (FilterRule *rule, const gchar *old_path, const gchar *new_path); void filter_rule_delete_action_by_dest_path (FilterRule *rule, const gchar *path); void filter_list_rename_path (const gchar *old_path, const gchar *new_path); void filter_list_delete_path (const gchar *path); void filter_rule_match_type_str_to_enum (const gchar *type_str, FilterMatchType *type, FilterMatchFlag *flag); void filter_get_keyword_from_msg (MsgInfo *msginfo, gchar **header, gchar **key, FilterCreateType type); void filter_rule_list_free (GSList *fltlist); void filter_rule_free (FilterRule *rule); void filter_cond_list_free (GSList *cond_list); void filter_action_list_free (GSList *action_list); void filter_info_free (FilterInfo *info); #endif /* __FILTER_H__ */ libsylph-1.1.0/libsylph/folder.h0000644000175000017500000002415510530261415013536 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __FOLDER_H__ #define __FOLDER_H__ #include #include typedef struct _Folder Folder; typedef struct _FolderClass FolderClass; typedef struct _LocalFolder LocalFolder; typedef struct _RemoteFolder RemoteFolder; #if 0 typedef struct _MboxFolder MboxFolder; typedef struct _MaildirFolder MaildirFolder; #endif typedef struct _FolderItem FolderItem; #define FOLDER(obj) ((Folder *)obj) #define FOLDER_CLASS(obj) (FOLDER(obj)->klass) #define FOLDER_TYPE(obj) (FOLDER(obj)->klass->type) #define LOCAL_FOLDER(obj) ((LocalFolder *)obj) #define REMOTE_FOLDER(obj) ((RemoteFolder *)obj) #define FOLDER_IS_LOCAL(obj) (FOLDER_TYPE(obj) == F_MH || \ FOLDER_TYPE(obj) == F_MBOX || \ FOLDER_TYPE(obj) == F_MAILDIR) #define FOLDER_IS_REMOTE(obj) (FOLDER_TYPE(obj) == F_IMAP || \ FOLDER_TYPE(obj) == F_NEWS) #if 0 #define MBOX_FOLDER(obj) ((MboxFolder *)obj) #define MAILDIR_FOLDER(obj) ((MaildirFolder *)obj) #endif #define FOLDER_ITEM(obj) ((FolderItem *)obj) #define FOLDER_ITEM_CAN_ADD(obj) \ ((obj) && FOLDER_ITEM(obj)->folder && \ FOLDER_ITEM(obj)->path && \ (FOLDER_IS_LOCAL(FOLDER_ITEM(obj)->folder) || \ FOLDER_TYPE(FOLDER_ITEM(obj)->folder) == F_IMAP) && \ !FOLDER_ITEM(obj)->no_select) typedef enum { F_MH, F_MBOX, F_MAILDIR, F_IMAP, F_NEWS, F_UNKNOWN } FolderType; typedef enum { F_NORMAL, F_INBOX, F_OUTBOX, F_DRAFT, F_QUEUE, F_TRASH, F_JUNK, F_VIRTUAL } SpecialFolderItemType; typedef enum { SORT_BY_NONE, SORT_BY_NUMBER, SORT_BY_SIZE, SORT_BY_DATE, SORT_BY_TDATE, SORT_BY_FROM, SORT_BY_SUBJECT, SORT_BY_SCORE, SORT_BY_LABEL, SORT_BY_MARK, SORT_BY_UNREAD, SORT_BY_MIME, SORT_BY_TO } FolderSortKey; typedef enum { SORT_ASCENDING, SORT_DESCENDING } FolderSortType; typedef void (*FolderUIFunc) (Folder *folder, FolderItem *item, gpointer data); typedef void (*FolderDestroyNotify) (Folder *folder, FolderItem *item, gpointer data); #include "prefs_account.h" #include "session.h" #include "procmsg.h" struct _Folder { FolderClass *klass; gchar *name; PrefsAccount *account; FolderItem *inbox; FolderItem *outbox; FolderItem *draft; FolderItem *queue; FolderItem *trash; FolderUIFunc ui_func; gpointer ui_func_data; GNode *node; gpointer data; }; struct _FolderClass { FolderType type; /* virtual functions */ Folder * (*folder_new) (const gchar *name, const gchar *path); void (*destroy) (Folder *folder); gint (*scan_tree) (Folder *folder); gint (*create_tree) (Folder *folder); GSList * (*get_msg_list) (Folder *folder, FolderItem *item, gboolean use_cache); /* return value is filename encoding */ gchar * (*fetch_msg) (Folder *folder, FolderItem *item, gint num); MsgInfo * (*get_msginfo) (Folder *folder, FolderItem *item, gint num); gint (*add_msg) (Folder *folder, FolderItem *dest, const gchar *file, MsgFlags *flags, gboolean remove_source); gint (*add_msgs) (Folder *folder, FolderItem *dest, GSList *file_list, gboolean remove_source, gint *first); gint (*move_msg) (Folder *folder, FolderItem *dest, MsgInfo *msginfo); gint (*move_msgs) (Folder *folder, FolderItem *dest, GSList *msglist); gint (*copy_msg) (Folder *folder, FolderItem *dest, MsgInfo *msginfo); gint (*copy_msgs) (Folder *folder, FolderItem *dest, GSList *msglist); gint (*remove_msg) (Folder *folder, FolderItem *item, MsgInfo *msginfo); gint (*remove_msgs) (Folder *folder, FolderItem *item, GSList *msglist); gint (*remove_all_msg) (Folder *folder, FolderItem *item); gboolean (*is_msg_changed) (Folder *folder, FolderItem *item, MsgInfo *msginfo); gint (*close) (Folder *folder, FolderItem *item); gint (*scan) (Folder *folder, FolderItem *item); FolderItem * (*create_folder) (Folder *folder, FolderItem *parent, const gchar *name); gint (*rename_folder) (Folder *folder, FolderItem *item, const gchar *name); gint (*move_folder) (Folder *folder, FolderItem *item, FolderItem *new_parent); gint (*remove_folder) (Folder *folder, FolderItem *item); }; struct _LocalFolder { Folder folder; gchar *rootpath; }; struct _RemoteFolder { Folder folder; Session *session; }; #if 0 struct _MboxFolder { LocalFolder lfolder; }; struct _MaildirFolder { LocalFolder lfolder; }; #endif struct _FolderItem { SpecialFolderItemType stype; gchar *name; /* UTF-8 */ gchar *path; /* UTF-8 */ time_t mtime; gint new; gint unread; gint total; gint unmarked_num; gint last_num; /* special flags */ guint no_sub : 1; /* no child allowed? */ guint no_select : 1; /* not selectable? */ guint collapsed : 1; /* collapsed item */ guint threaded : 1; /* threaded folder view */ guint opened : 1; /* opened by summary view */ guint updated : 1; /* folderview should be updated */ guint cache_dirty : 1; /* cache file needs to be updated */ guint mark_dirty : 1; /* mark file needs to be updated */ FolderSortKey sort_key; FolderSortType sort_type; GNode *node; FolderItem *parent; Folder *folder; PrefsAccount *account; gboolean ac_apply_sub; gchar *auto_to; gboolean use_auto_to_on_reply; gchar *auto_cc; gchar *auto_bcc; gchar *auto_replyto; gboolean trim_summary_subject; gboolean trim_compose_subject; GSList *mark_queue; guint last_selected; gpointer data; }; Folder *folder_new (FolderType type, const gchar *name, const gchar *path); void folder_local_folder_init (Folder *folder, const gchar *name, const gchar *path); void folder_remote_folder_init (Folder *folder, const gchar *name, const gchar *path); void folder_destroy (Folder *folder); void folder_local_folder_destroy (LocalFolder *lfolder); void folder_remote_folder_destroy(RemoteFolder *rfolder); gint folder_scan_tree (Folder *folder); gint folder_create_tree (Folder *folder); FolderItem *folder_item_new (const gchar *name, const gchar *path); void folder_item_append (FolderItem *parent, FolderItem *item); void folder_item_remove (FolderItem *item); void folder_item_remove_children (FolderItem *item); void folder_item_destroy (FolderItem *item); gint folder_item_compare (FolderItem *item_a, FolderItem *item_b); void folder_set_ui_func (Folder *folder, FolderUIFunc func, gpointer data); void folder_set_name (Folder *folder, const gchar *name); void folder_tree_destroy (Folder *folder); void folder_add (Folder *folder); GList *folder_get_list (void); gint folder_read_list (void); void folder_write_list (void); gchar *folder_get_status (GPtrArray *folders, gboolean full); Folder *folder_find_from_path (const gchar *path); Folder *folder_find_from_name (const gchar *name, FolderType type); FolderItem *folder_find_item_from_path (const gchar *path); FolderItem *folder_find_child_item_by_name (FolderItem *item, const gchar *name); gchar *folder_get_identifier (Folder *folder); gchar *folder_item_get_identifier (FolderItem *item); FolderItem *folder_find_item_from_identifier (const gchar *identifier); Folder *folder_get_default_folder (void); FolderItem *folder_get_default_inbox (void); FolderItem *folder_get_default_outbox (void); FolderItem *folder_get_default_draft (void); FolderItem *folder_get_default_queue (void); FolderItem *folder_get_default_trash (void); void folder_set_missing_folders (void); void folder_unref_account_all (PrefsAccount *account); /* return value is filename encoding */ gchar *folder_get_path (Folder *folder); gchar *folder_item_get_path (FolderItem *item); gint folder_item_scan (FolderItem *item); void folder_item_scan_foreach (GHashTable *table); GSList *folder_item_get_msg_list (FolderItem *item, gboolean use_cache); /* return value is filename encoding */ gchar *folder_item_fetch_msg (FolderItem *item, gint num); gint folder_item_fetch_all_msg (FolderItem *item); MsgInfo *folder_item_get_msginfo (FolderItem *item, gint num); gint folder_item_add_msg (FolderItem *dest, const gchar *file, MsgFlags *flags, gboolean remove_source); gint folder_item_add_msgs (FolderItem *dest, GSList *file_list, gboolean remove_source, gint *first); gint folder_item_move_msg (FolderItem *dest, MsgInfo *msginfo); gint folder_item_move_msgs (FolderItem *dest, GSList *msglist); gint folder_item_copy_msg (FolderItem *dest, MsgInfo *msginfo); gint folder_item_copy_msgs (FolderItem *dest, GSList *msglist); gint folder_item_remove_msg (FolderItem *item, MsgInfo *msginfo); gint folder_item_remove_msgs (FolderItem *item, GSList *msglist); gint folder_item_remove_all_msg (FolderItem *item); gboolean folder_item_is_msg_changed (FolderItem *item, MsgInfo *msginfo); /* return value is filename encoding */ gchar *folder_item_get_cache_file (FolderItem *item); gchar *folder_item_get_mark_file (FolderItem *item); gint folder_item_close (FolderItem *item); #endif /* __FOLDER_H__ */ libsylph-1.1.0/libsylph/html.h0000644000175000017500000000331610457702534013235 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __HTML_H__ #define __HTML_H__ #include #include #include "codeconv.h" typedef enum { HTML_NORMAL, HTML_PAR, HTML_BR, HTML_HR, HTML_HREF, HTML_IMG, HTML_FONT, HTML_PRE, HTML_UNKNOWN, HTML_CONV_FAILED, HTML_ERR, HTML_EOF } HTMLState; typedef struct _HTMLParser HTMLParser; typedef struct _HTMLAttr HTMLAttr; typedef struct _HTMLTag HTMLTag; struct _HTMLParser { FILE *fp; CodeConverter *conv; GHashTable *symbol_table; GString *str; GString *buf; gchar *bufp; HTMLState state; gchar *href; gboolean newline; gboolean empty_line; gboolean space; gboolean pre; }; struct _HTMLAttr { gchar *name; gchar *value; }; struct _HTMLTag { gchar *name; GList *attr; }; HTMLParser *html_parser_new (FILE *fp, CodeConverter *conv); void html_parser_destroy (HTMLParser *parser); const gchar *html_parse (HTMLParser *parser); #endif /* __HTML_H__ */ libsylph-1.1.0/libsylph/imap.h0000644000175000017500000000534210477467562013233 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __IMAP_H__ #define __IMAP_H__ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include "folder.h" #include "session.h" #include "procmsg.h" typedef struct _IMAPFolder IMAPFolder; typedef struct _IMAPSession IMAPSession; typedef struct _IMAPNameSpace IMAPNameSpace; #define IMAP_FOLDER(obj) ((IMAPFolder *)obj) #define IMAP_SESSION(obj) ((IMAPSession *)obj) #include "prefs_account.h" typedef enum { IMAP_AUTH_LOGIN = 1 << 0, IMAP_AUTH_CRAM_MD5 = 1 << 1, IMAP_AUTH_PLAIN = 1 << 2 } IMAPAuthType; struct _IMAPFolder { RemoteFolder rfolder; /* list of IMAPNameSpace */ GList *ns_personal; GList *ns_others; GList *ns_shared; }; struct _IMAPSession { Session session; gboolean authenticated; gchar **capability; gboolean uidplus; gchar *mbox; guint cmd_count; }; struct _IMAPNameSpace { gchar *name; gchar separator; }; #define IMAP_SUCCESS 0 #define IMAP_SOCKET 2 #define IMAP_AUTHFAIL 3 #define IMAP_PROTOCOL 4 #define IMAP_SYNTAX 5 #define IMAP_IOERR 6 #define IMAP_ERROR 7 #define IMAPBUFSIZE 8192 typedef enum { IMAP_FLAG_SEEN = 1 << 0, IMAP_FLAG_ANSWERED = 1 << 1, IMAP_FLAG_FLAGGED = 1 << 2, IMAP_FLAG_DELETED = 1 << 3, IMAP_FLAG_DRAFT = 1 << 4 } IMAPFlags; #define IMAP_IS_SEEN(flags) ((flags & IMAP_FLAG_SEEN) != 0) #define IMAP_IS_ANSWERED(flags) ((flags & IMAP_FLAG_ANSWERED) != 0) #define IMAP_IS_FLAGGED(flags) ((flags & IMAP_FLAG_FLAGGED) != 0) #define IMAP_IS_DELETED(flags) ((flags & IMAP_FLAG_DELETED) != 0) #define IMAP_IS_DRAFT(flags) ((flags & IMAP_FLAG_DRAFT) != 0) FolderClass *imap_get_class (void); gint imap_msg_set_perm_flags (MsgInfo *msginfo, MsgPermFlags flags); gint imap_msg_unset_perm_flags (MsgInfo *msginfo, MsgPermFlags flags); gint imap_msg_list_set_perm_flags (GSList *msglist, MsgPermFlags flags); gint imap_msg_list_unset_perm_flags (GSList *msglist, MsgPermFlags flags); #endif /* __IMAP_H__ */ libsylph-1.1.0/libsylph/mbox.h0000644000175000017500000000252510457702534013237 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __MBOX_H__ #define __MBOX_H__ #include #include "folder.h" typedef enum { LOCK_FILE, LOCK_FLOCK } LockType; gint proc_mbox (FolderItem *dest, const gchar *mbox, GHashTable *folder_table); gint lock_mbox (const gchar *base, LockType type); gint unlock_mbox (const gchar *base, gint fd, LockType type); gint copy_mbox (const gchar *src, const gchar *dest); void empty_mbox (const gchar *mbox); gint export_to_mbox (FolderItem *src, const gchar *mbox); #endif /* __MBOX_H__ */ libsylph-1.1.0/libsylph/md5.h0000644000175000017500000000232610457702533012755 00000000000000/** This code is in the public domain. See md5.c for details. Authors: Colin Plumb [original author] David Helder [GNet API] Modified the prefix of functions to prevent conflict with original GNet. */ #ifndef S_GNET_MD5_H #define S_GNET_MD5_H #include #ifdef __cplusplus extern "C" { #endif /* __cplusplus */ /** * SMD5 * * SMD5 is a MD5 hash. * **/ typedef struct _SMD5 SMD5; /** * S_GNET_MD5_HASH_LENGTH * * Length of the MD5 hash in bytes. **/ #define S_GNET_MD5_HASH_LENGTH 16 SMD5* s_gnet_md5_new (const guchar* buffer, guint length); SMD5* s_gnet_md5_new_string (const gchar* str); SMD5* s_gnet_md5_clone (const SMD5* md5); void s_gnet_md5_delete (SMD5* md5); SMD5* s_gnet_md5_new_incremental (void); void s_gnet_md5_update (SMD5* md5, const guchar* buffer, guint length); void s_gnet_md5_final (SMD5* md5); gboolean s_gnet_md5_equal (gconstpointer p1, gconstpointer p2); guint s_gnet_md5_hash (gconstpointer p); gchar* s_gnet_md5_get_digest (const SMD5* md5); gchar* s_gnet_md5_get_string (const SMD5* md5); void s_gnet_md5_copy_string (const SMD5* md5, gchar* buffer); #ifdef __cplusplus } #endif /* __cplusplus */ #endif /* S_GNET_MD5_H */ libsylph-1.1.0/libsylph/md5_hmac.h0000644000175000017500000000217510457702534013750 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __MD5_HMAC_H__ #define __MD5_HMAC_H__ #include void md5_hmac (guchar *digest, const guchar* text, gint text_len, const guchar* key, gint key_len); void md5_hex_hmac (gchar *hexdigest, const guchar* text, gint text_len, const guchar* key, gint key_len); #endif /* __MD5_HMAC_H__ */ libsylph-1.1.0/libsylph/mh.h0000644000175000017500000000207610457702533012676 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __MH_H__ #define __MH_H__ #include #include "folder.h" typedef struct _MHFolder MHFolder; #define MH_FOLDER(obj) ((MHFolder *)obj) struct _MHFolder { LocalFolder lfolder; }; FolderClass *mh_get_class (void); #endif /* __MH_H__ */ libsylph-1.1.0/libsylph/news.h0000644000175000017500000000304110457702534013240 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __NEWS_H__ #define __NEWS_H__ #include #include #include "folder.h" typedef struct _NewsFolder NewsFolder; typedef struct _NewsGroupInfo NewsGroupInfo; #define NEWS_FOLDER(obj) ((NewsFolder *)obj) struct _NewsFolder { RemoteFolder rfolder; gboolean use_auth; }; struct _NewsGroupInfo { gchar *name; guint first; guint last; gchar type; gboolean subscribed; }; FolderClass *news_get_class (void); GSList *news_get_group_list (Folder *folder); void news_group_list_free (GSList *group_list); void news_remove_group_list_cache (Folder *folder); gint news_post (Folder *folder, const gchar *file); gint news_post_stream (Folder *folder, FILE *fp); #endif /* __NEWS_H__ */ libsylph-1.1.0/libsylph/nntp.h0000644000175000017500000000536210532757730013255 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __NNTP_H__ #define __NNTP_H__ #include "session.h" #if USE_SSL # include "ssl.h" #endif typedef struct _NNTPSession NNTPSession; #define NNTP_SESSION(obj) ((NNTPSession *)obj) struct _NNTPSession { Session session; gchar *group; gchar *userid; gchar *passwd; gboolean auth_failed; }; #define NN_SUCCESS 0 #define NN_SOCKET 2 #define NN_AUTHFAIL 3 #define NN_PROTOCOL 4 #define NN_SYNTAX 5 #define NN_IOERR 6 #define NN_ERROR 7 #define NN_AUTHREQ 8 #define NN_AUTHCONT 9 #define NNTPBUFSIZE 8192 #if USE_SSL Session *nntp_session_new (const gchar *server, gushort port, gchar *buf, const gchar *userid, const gchar *passwd, SSLType ssl_type); #else Session *nntp_session_new (const gchar *server, gushort port, gchar *buf, const gchar *userid, const gchar *passwd); #endif gint nntp_group (NNTPSession *session, const gchar *group, gint *num, gint *first, gint *last); gint nntp_get_article (NNTPSession *session, const gchar *cmd, gint num, gchar **msgid); gint nntp_article (NNTPSession *session, gint num, gchar **msgid); gint nntp_body (NNTPSession *session, gint num, gchar **msgid); gint nntp_head (NNTPSession *session, gint num, gchar **msgid); gint nntp_stat (NNTPSession *session, gint num, gchar **msgid); gint nntp_next (NNTPSession *session, gint *num, gchar **msgid); gint nntp_xover (NNTPSession *session, gint first, gint last); gint nntp_xhdr (NNTPSession *session, const gchar *header, gint first, gint last); gint nntp_list (NNTPSession *session); gint nntp_post (NNTPSession *session, FILE *fp); gint nntp_newgroups (NNTPSession *session); gint nntp_newnews (NNTPSession *session); gint nntp_mode (NNTPSession *session, gboolean stream); #endif /* __NNTP_H__ */ libsylph-1.1.0/libsylph/pop.h0000644000175000017500000000662510521320117013056 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2006 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __POP_H__ #define __POP_H__ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include "session.h" #include "prefs_account.h" typedef struct _Pop3MsgInfo Pop3MsgInfo; typedef struct _Pop3Session Pop3Session; #define POP3_SESSION(obj) ((Pop3Session *)obj) typedef enum { POP3_READY, POP3_GREETING, POP3_STLS, POP3_GETAUTH_USER, POP3_GETAUTH_PASS, POP3_GETAUTH_APOP, POP3_GETRANGE_STAT, POP3_GETRANGE_LAST, POP3_GETRANGE_UIDL, POP3_GETRANGE_UIDL_RECV, POP3_GETSIZE_LIST, POP3_GETSIZE_LIST_RECV, POP3_RETR, POP3_RETR_RECV, POP3_DELETE, POP3_LOGOUT, POP3_DONE, POP3_ERROR, N_POP3_STATE } Pop3State; typedef enum { PS_SUCCESS = 0, /* command successful */ PS_NOMAIL = 1, /* no mail available */ PS_SOCKET = 2, /* socket I/O woes */ PS_AUTHFAIL = 3, /* user authorization failed */ PS_PROTOCOL = 4, /* protocol violation */ PS_SYNTAX = 5, /* command-line syntax error */ PS_IOERR = 6, /* file I/O error */ PS_ERROR = 7, /* protocol error */ PS_EXCLUDE = 8, /* client-side exclusion error */ PS_LOCKBUSY = 9, /* server responded lock busy */ PS_SMTP = 10, /* SMTP error */ PS_DNS = 11, /* fatal DNS error */ PS_BSMTP = 12, /* output batch could not be opened */ PS_MAXFETCH = 13, /* poll ended by fetch limit */ PS_NOTSUPPORTED = 14, /* command not supported */ /* leave space for more codes */ PS_CONTINUE = 128 /* more responses may follow */ } Pop3ErrorValue; typedef enum { RECV_TIME_NONE = 0, RECV_TIME_RECEIVED = 1, RECV_TIME_KEEP = 2, RECV_TIME_DELETE = 3 } RecvTime; typedef enum { DROP_OK = 0, DROP_DONT_RECEIVE = 1, DROP_DELETE = 2, DROP_ERROR = -1 } Pop3DropValue; struct _Pop3MsgInfo { gint size; gchar *uidl; time_t recv_time; guint received : 1; guint deleted : 1; }; struct _Pop3Session { Session session; Pop3State state; PrefsAccount *ac_prefs; gchar *greeting; gchar *user; gchar *pass; gint count; gint64 total_bytes; gint cur_msg; gint cur_total_num; gint64 cur_total_bytes; gint64 cur_total_recv_bytes; gint skipped_num; Pop3MsgInfo *msg; GHashTable *uidl_table; gboolean auth_only; gboolean new_msg_exist; gboolean uidl_is_valid; time_t current_time; Pop3ErrorValue error_val; gchar *error_msg; gpointer data; /* virtual method to drop message */ gint (*drop_message) (Pop3Session *session, const gchar *file); }; #define POPBUFSIZE 512 /* #define IDLEN 128 */ #define IDLEN POPBUFSIZE Session *pop3_session_new (PrefsAccount *account); GHashTable *pop3_get_uidl_table (PrefsAccount *account); gint pop3_write_uidl_list (Pop3Session *session); #endif /* __POP_H__ */ libsylph-1.1.0/libsylph/prefs.h0000644000175000017500000000375710457702534013421 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __PREFS_H__ #define __PREFS_H__ #include #include typedef struct _PrefParam PrefParam; typedef struct _PrefFile PrefFile; #define PREFSBUFSIZE 1024 typedef enum { P_STRING, P_INT, P_BOOL, P_ENUM, P_USHORT, P_OTHER } PrefType; typedef void (*DataSetFunc) (PrefParam *pparam); typedef void (*WidgetSetFunc) (PrefParam *pparam); struct _PrefParam { gchar *name; gchar *defval; gpointer data; PrefType type; gpointer ui_data; }; struct _PrefFile { FILE *fp; gchar *path; }; GHashTable *prefs_param_table_get (PrefParam *param); void prefs_param_table_destroy (GHashTable *param_table); void prefs_read_config (PrefParam *param, const gchar *label, const gchar *rcfile, const gchar *encoding); void prefs_write_config (PrefParam *param, const gchar *label, const gchar *rcfile); PrefFile *prefs_file_open (const gchar *path); gint prefs_file_write_param (PrefFile *pfile, PrefParam *param); gint prefs_file_close (PrefFile *pfile); gint prefs_file_close_revert (PrefFile *pfile); void prefs_set_default (PrefParam *param); void prefs_free (PrefParam *param); #endif /* __PREFS_H__ */ libsylph-1.1.0/libsylph/prefs_account.h0000644000175000017500000000740310457702534015125 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2006 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __PREFS_ACCOUNT_H__ #define __PREFS_ACCOUNT_H__ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include typedef struct _PrefsAccount PrefsAccount; #include "folder.h" #include "smtp.h" #include "prefs.h" typedef enum { A_POP3, A_APOP, /* deprecated */ A_RPOP, /* deprecated */ A_IMAP4, A_NNTP, A_LOCAL } RecvProtocol; typedef enum { SIG_FILE, SIG_COMMAND, SIG_DIRECT } SigType; typedef enum { SIGN_KEY_DEFAULT, SIGN_KEY_BY_FROM, SIGN_KEY_CUSTOM } SignKeyType; struct _PrefsAccount { gchar *account_name; /* Personal info */ gchar *name; gchar *address; gchar *organization; /* Server info */ RecvProtocol protocol; gchar *recv_server; gchar *smtp_server; gchar *nntp_server; gboolean use_nntp_auth; gchar *userid; gchar *passwd; /* SSL */ gint ssl_pop; gint ssl_imap; gint ssl_nntp; gint ssl_smtp; gboolean use_nonblocking_ssl; /* Temporarily preserved password */ gchar *tmp_pass; /* Receive */ gboolean use_apop_auth; gboolean rmmail; gint msg_leave_time; gboolean getall; gboolean enable_size_limit; gint size_limit; gboolean filter_on_recv; gchar *inbox; gboolean imap_check_inbox_only; gint imap_auth_type; gint max_nntp_articles; gboolean recv_at_getall; /* Send */ gboolean add_date; gboolean gen_msgid; gboolean add_customhdr; gboolean use_smtp_auth; SMTPAuthType smtp_auth_type; gchar *smtp_userid; gchar *smtp_passwd; /* Temporarily preserved password */ gchar *tmp_smtp_pass; gboolean pop_before_smtp; GSList *customhdr_list; /* Compose */ SigType sig_type; gchar *sig_path; gboolean set_autocc; gchar *auto_cc; gboolean set_autobcc; gchar *auto_bcc; gboolean set_autoreplyto; gchar *auto_replyto; /* Privacy */ gboolean default_sign; gboolean default_encrypt; gboolean ascii_armored; gboolean clearsign; gboolean encrypt_reply; SignKeyType sign_key; gchar *sign_key_id; /* Advanced */ gboolean set_smtpport; gushort smtpport; gboolean set_popport; gushort popport; gboolean set_imapport; gushort imapport; gboolean set_nntpport; gushort nntpport; gboolean set_domain; gchar *domain; gchar *imap_dir; gboolean imap_clear_cache_on_exit; gboolean set_sent_folder; gchar *sent_folder; gboolean set_draft_folder; gchar *draft_folder; gboolean set_queue_folder; gchar *queue_folder; gboolean set_trash_folder; gchar *trash_folder; /* Default or not */ gboolean is_default; /* Unique account ID */ gint account_id; RemoteFolder *folder; }; PrefsAccount *prefs_account_new (void); PrefsAccount *prefs_account_get_tmp_prefs (void); void prefs_account_set_tmp_prefs (PrefsAccount *ac_prefs); void prefs_account_apply_tmp_prefs (PrefsAccount *ac_prefs); PrefParam *prefs_account_get_params (void); void prefs_account_read_config (PrefsAccount *ac_prefs, const gchar *label); void prefs_account_write_config_all (GList *account_list); void prefs_account_free (PrefsAccount *ac_prefs); #endif /* __PREFS_ACCOUNT_H__ */ libsylph-1.1.0/libsylph/prefs_common.h0000644000175000017500000001404010522312345014742 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2006 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __PREFS_COMMON_H__ #define __PREFS_COMMON_H__ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include typedef struct _PrefsCommon PrefsCommon; #include "enums.h" #include "prefs.h" typedef enum { RECV_DIALOG_ALWAYS, RECV_DIALOG_MANUAL, RECV_DIALOG_NEVER } RecvDialogMode; typedef enum { CTE_AUTO, CTE_BASE64, CTE_QUOTED_PRINTABLE, CTE_8BIT } TransferEncodingMethod; typedef enum { FENC_MIME, FENC_RFC2231, FENC_NONE } MIMEFilenameEncodingMethod; struct _PrefsCommon { /* Receive */ gboolean scan_all_after_inc; gboolean autochk_newmail; gint autochk_itv; gboolean chk_on_startup; gboolean enable_newmsg_notify; gchar *newmsg_notify_cmd; gboolean inc_local; gboolean filter_on_inc; gchar *spool_path; /* Send */ gboolean savemsg; gboolean filter_sent; TransferEncodingMethod encoding_method; MIMEFilenameEncodingMethod mime_fencoding_method; gboolean allow_jisx0201_kana; /* Compose */ gboolean auto_sig; gchar *sig_sep; gint undolevels; gint linewrap_len; gboolean linewrap_quote; gboolean autowrap; gboolean auto_exteditor; gboolean enable_autosave; gint autosave_itv; gboolean reply_account_autosel; gboolean default_reply_list; gboolean show_ruler; /* Quote */ gboolean reply_with_quote; gchar *quotemark; gchar *quotefmt; gchar *fw_quotemark; gchar *fw_quotefmt; /* Spelling */ gboolean check_spell; gchar *spell_lang; /* Display */ gchar *textfont; gboolean trans_hdr; gboolean display_folder_unread; gboolean display_folder_num_columns; gint ng_abbrev_len; gboolean swap_from; gboolean expand_thread; gchar *date_format; gboolean enable_rules_hint; gboolean bold_unread; ToolbarStyle toolbar_style; gboolean show_searchbar; gboolean show_statusbar; /* Summary columns visibility, position and size */ gboolean summary_col_visible[N_SUMMARY_COLS]; gint summary_col_pos[N_SUMMARY_COLS]; gint summary_col_size[N_SUMMARY_COLS]; /* Widget visibility, position and size */ gint folderwin_x; gint folderwin_y; gint folderview_width; gint folderview_height; gboolean folderview_visible; gint folder_col_folder; gint folder_col_new; gint folder_col_unread; gint folder_col_total; gint summaryview_width; gint summaryview_height; gint main_msgwin_x; gint main_msgwin_y; gint msgview_width; gint msgview_height; gboolean msgview_visible; gint mainview_x; gint mainview_y; gint mainview_width; gint mainview_height; gint mainwin_x; gint mainwin_y; gint mainwin_width; gint mainwin_height; gint msgwin_width; gint msgwin_height; gboolean mainwin_maximized; gint sourcewin_width; gint sourcewin_height; gint compose_x; gint compose_y; gint compose_width; gint compose_height; gint addressbook_x; gint addressbook_y; gint addressbook_width; gint addressbook_height; /* Message */ gboolean enable_color; gint quote_level1_col; gint quote_level2_col; gint quote_level3_col; gint uri_col; gushort sig_col; gboolean recycle_quote_colors; gboolean conv_mb_alnum; gboolean display_header_pane; gboolean display_header; gint line_space; gboolean render_html; gboolean textview_cursor_visible; gboolean enable_smooth_scroll; gint scroll_step; gboolean scroll_halfpage; gboolean resize_image; gboolean inline_image; /* Encoding */ gchar *force_charset; gchar *default_encoding; gchar *outgoing_charset; gboolean show_other_header; GSList *disphdr_list; /* MIME viewer */ gchar *mime_image_viewer; gchar *mime_audio_player; gchar *mime_open_cmd; gchar *mime_cmd; GList *mime_open_cmd_history; /* Junk Mail */ gboolean enable_junk; gchar *junk_learncmd; gchar *nojunk_learncmd; gchar *junk_classify_cmd; gchar *junk_folder; gboolean filter_junk_on_recv; gboolean filter_junk_before; gboolean delete_junk_on_recv; gboolean mark_junk_as_read; /* Privacy */ gboolean auto_check_signatures; gboolean gpg_signature_popup; gboolean store_passphrase; gint store_passphrase_timeout; gboolean passphrase_grab; gboolean gpg_warning; /* Interface */ gboolean sep_folder; gboolean sep_msg; gboolean always_show_msg; gboolean open_unread_on_enter; gboolean remember_last_selected; gboolean mark_as_read_on_new_window; gboolean open_inbox_on_inc; gboolean open_inbox_on_startup; gboolean immediate_exec; gboolean comply_gnome_hig; gboolean show_trayicon; gboolean minimize_to_tray; /* Other */ RecvDialogMode recv_dialog_mode; gboolean no_recv_err_panel; gboolean close_recv_dialog; gboolean add_address_by_click; gboolean confirm_on_exit; gboolean clean_on_exit; gboolean ask_on_clean; gboolean warn_queued_on_exit; gint logwin_line_limit; /* External commands */ gchar *uri_cmd; gchar *print_cmd; gchar *ext_editor_cmd; gboolean use_extinc; gchar *extinc_cmd; gboolean use_extsend; gchar *extsend_cmd; /* Advanced */ gboolean strict_cache_check; gint io_timeout_secs; /* Filtering */ GSList *fltlist; GSList *junk_fltlist; GSList *manual_junk_fltlist; /* Actions */ GSList *actions_list; /* Online / Offline */ gboolean online_mode; }; extern PrefsCommon prefs_common; PrefsCommon *prefs_common_get (void); PrefParam *prefs_common_get_params (void); void prefs_common_read_config (void); void prefs_common_write_config (void); void prefs_common_junk_filter_list_set (void); #endif /* __PREFS_COMMON_H__ */ libsylph-1.1.0/libsylph/procheader.h0000644000175000017500000000550610457702533014407 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __PROCHEADER_H__ #define __PROCHEADER_H__ #include #include #include #include "procmsg.h" typedef struct _HeaderEntry HeaderEntry; typedef struct _Header Header; struct _HeaderEntry { gchar *name; gchar *body; gboolean unfold; }; struct _Header { gchar *name; gchar *body; }; gint procheader_get_one_field (gchar *buf, size_t len, FILE *fp, HeaderEntry hentry[]); gchar *procheader_get_unfolded_line (gchar *buf, size_t len, FILE *fp); GSList *procheader_get_header_list_from_file (const gchar *file); GSList *procheader_get_header_list (FILE *fp); GSList *procheader_get_header_list_from_msginfo (MsgInfo *msginfo); GSList *procheader_add_header_list (GSList *hlist, const gchar *header_name, const gchar *body); GSList *procheader_merge_header_list (GSList *hlist1, GSList *hlist2); gint procheader_find_header_list (GSList *hlist, const gchar *header_name); void procheader_header_list_destroy (GSList *hlist); GPtrArray *procheader_get_header_array (FILE *fp, const gchar *encoding); GPtrArray *procheader_get_header_array_asis (FILE *fp, const gchar *encoding); GPtrArray *procheader_get_header_array_for_display (FILE *fp, const gchar *encoding); void procheader_header_array_destroy (GPtrArray *harray); void procheader_header_free (Header *header); void procheader_get_header_fields (FILE *fp, HeaderEntry hentry[]); MsgInfo *procheader_parse_file (const gchar *file, MsgFlags flags, gboolean full); MsgInfo *procheader_parse_str (const gchar *str, MsgFlags flags, gboolean full); MsgInfo *procheader_parse_stream (FILE *fp, MsgFlags flags, gboolean full); gchar *procheader_get_fromname (const gchar *str); time_t procheader_date_parse (gchar *dest, const gchar *src, gint len); void procheader_date_get_localtime (gchar *dest, gint len, const time_t timer); #endif /* __PROCHEADER_H__ */ libsylph-1.1.0/libsylph/procmime.h0000644000175000017500000001203110622225071014064 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2007 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __PROCMIME_H__ #define __PROCMIME_H__ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include typedef struct _MimeType MimeType; typedef struct _MailCap MailCap; typedef struct _MimeInfo MimeInfo; #include "procmsg.h" #include "utils.h" typedef enum { ENC_7BIT, ENC_8BIT, ENC_QUOTED_PRINTABLE, ENC_BASE64, ENC_X_UUENCODE, ENC_UNKNOWN } EncodingType; typedef enum { MIME_TEXT, MIME_TEXT_HTML, MIME_MESSAGE_RFC822, MIME_APPLICATION, MIME_APPLICATION_OCTET_STREAM, MIME_MULTIPART, MIME_IMAGE, MIME_AUDIO, MIME_VIDEO, MIME_UNKNOWN } ContentType; struct _MimeType { gchar *type; gchar *sub_type; gchar *extension; }; struct _MailCap { gchar *mime_type; gchar *cmdline_fmt; gboolean needs_terminal; }; /* * An example of MimeInfo structure: * * multipart/mixed root <-+ parent * | * multipart/alternative children <-+ parent * | * text/plain children --+ * | * text/html next <-+ * * message/rfc822 next <-+ main * | * sub (capsulated message) * * image/jpeg next */ struct _MimeInfo { gchar *encoding; EncodingType encoding_type; ContentType mime_type; gchar *content_type; gchar *charset; gchar *name; gchar *boundary; gchar *content_disposition; gchar *filename; glong fpos; guint size; guint content_size; MimeInfo *main; MimeInfo *sub; MimeInfo *next; MimeInfo *parent; MimeInfo *children; MimeInfo *plaintext; gchar *sigstatus; gchar *sigstatus_full; gint level; }; #define IS_BOUNDARY(s, bnd, len) \ (bnd && s[0] == '-' && s[1] == '-' && !strncmp(s + 2, bnd, len)) /* MimeInfo handling */ MimeInfo *procmime_mimeinfo_new (void); void procmime_mimeinfo_free_all (MimeInfo *mimeinfo); MimeInfo *procmime_mimeinfo_insert (MimeInfo *parent, MimeInfo *mimeinfo); #if 0 void procmime_mimeinfo_replace (MimeInfo *old, MimeInfo *new); #endif MimeInfo *procmime_mimeinfo_next (MimeInfo *mimeinfo); MimeInfo *procmime_scan_message (MsgInfo *msginfo); void procmime_scan_multipart_message (MimeInfo *mimeinfo, FILE *fp); /* scan headers */ void procmime_scan_encoding (MimeInfo *mimeinfo, const gchar *encoding); void procmime_scan_content_type (MimeInfo *mimeinfo, const gchar *content_type); void procmime_scan_content_type_str (const gchar *content_type, gchar **mime_type, gchar **charset, gchar **name, gchar **boundary); void procmime_scan_content_disposition (MimeInfo *mimeinfo, const gchar *content_disposition); MimeInfo *procmime_scan_mime_header (FILE *fp); FILE *procmime_decode_content (FILE *outfp, FILE *infp, MimeInfo *mimeinfo); gint procmime_get_part (const gchar *outfile, const gchar *infile, MimeInfo *mimeinfo); gint procmime_get_part_fp (const gchar *outfile, FILE *infp, MimeInfo *mimeinfo); gint procmime_get_all_parts (const gchar *dir, const gchar *infile, MimeInfo *mimeinfo); FILE *procmime_get_text_content (MimeInfo *mimeinfo, FILE *infp, const gchar *encoding); FILE *procmime_get_first_text_content (MsgInfo *msginfo, const gchar *encoding); gboolean procmime_find_string_part (MimeInfo *mimeinfo, const gchar *filename, const gchar *str, StrFindFunc find_func); gboolean procmime_find_string (MsgInfo *msginfo, const gchar *str, StrFindFunc find_func); gchar *procmime_get_part_file_name (MimeInfo *mimeinfo); gchar *procmime_get_tmp_file_name (MimeInfo *mimeinfo); ContentType procmime_scan_mime_type (const gchar *mime_type); gchar *procmime_get_mime_type (const gchar *filename); gint procmime_execute_open_file (const gchar *file, const gchar *mime_type); EncodingType procmime_get_encoding_for_charset (const gchar *charset); EncodingType procmime_get_encoding_for_text_file(const gchar *file); EncodingType procmime_get_encoding_for_str (const gchar *str); const gchar *procmime_get_encoding_str (EncodingType encoding); #endif /* __PROCMIME_H__ */ libsylph-1.1.0/libsylph/procmsg.h0000644000175000017500000002233410477474026013750 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2006 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __PROCMSG_H__ #define __PROCMSG_H__ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include #include #include typedef struct _MsgInfo MsgInfo; typedef struct _MsgFlags MsgFlags; typedef struct _MsgFileInfo MsgFileInfo; typedef struct _MsgEncryptInfo MsgEncryptInfo; #include "folder.h" #include "procmime.h" typedef enum { DATA_READ, DATA_WRITE, DATA_APPEND } DataOpenMode; #define MSG_NEW (1U << 0) #define MSG_UNREAD (1U << 1) #define MSG_MARKED (1U << 2) #define MSG_DELETED (1U << 3) #define MSG_REPLIED (1U << 4) #define MSG_FORWARDED (1U << 5) #define MSG_CLABEL_SBIT (7) /* start bit of color label */ #define MAKE_MSG_CLABEL(h, m, l) (((h) << (MSG_CLABEL_SBIT + 2)) | \ ((m) << (MSG_CLABEL_SBIT + 1)) | \ ((l) << (MSG_CLABEL_SBIT + 0))) #define MSG_CLABEL_NONE MAKE_MSG_CLABEL(0U, 0U, 0U) #define MSG_CLABEL_1 MAKE_MSG_CLABEL(0U, 0U, 1U) #define MSG_CLABEL_2 MAKE_MSG_CLABEL(0U, 1U, 0U) #define MSG_CLABEL_3 MAKE_MSG_CLABEL(0U, 1U, 1U) #define MSG_CLABEL_4 MAKE_MSG_CLABEL(1U, 0U, 0U) #define MSG_CLABEL_5 MAKE_MSG_CLABEL(1U, 0U, 1U) #define MSG_CLABEL_6 MAKE_MSG_CLABEL(1U, 1U, 0U) #define MSG_CLABEL_7 MAKE_MSG_CLABEL(1U, 1U, 1U) #define MSG_CLABEL_ORANGE MSG_CLABEL_1 #define MSG_CLABEL_RED MSG_CLABEL_2 #define MSG_CLABEL_PINK MSG_CLABEL_3 #define MSG_CLABEL_SKYBLUE MSG_CLABEL_4 #define MSG_CLABEL_BLUE MSG_CLABEL_5 #define MSG_CLABEL_GREEN MSG_CLABEL_6 #define MSG_CLABEL_BROWN MSG_CLABEL_7 /* RESERVED */ #define MSG_RESERVED (1U << 31) #define MSG_CLABEL_FLAG_MASK (MSG_CLABEL_7) typedef guint32 MsgPermFlags; #define MSG_MOVE (1U << 0) #define MSG_COPY (1U << 1) #define MSG_QUEUED (1U << 16) #define MSG_DRAFT (1U << 17) #define MSG_ENCRYPTED (1U << 18) #define MSG_IMAP (1U << 19) #define MSG_NEWS (1U << 20) #define MSG_SIGNED (1U << 21) #define MSG_FLAG_CHANGED (1U << 27) #define MSG_CACHED (1U << 28) #define MSG_MIME (1U << 29) #define MSG_INVALID (1U << 30) #define MSG_RECEIVED (1U << 31) #define MSG_CACHED_FLAG_MASK (MSG_MIME) typedef guint32 MsgTmpFlags; #define MSG_SET_FLAGS(msg, flags) { (msg) |= (flags); } #define MSG_UNSET_FLAGS(msg, flags) { (msg) &= ~(flags); } #define MSG_SET_PERM_FLAGS(msg, flags) \ MSG_SET_FLAGS((msg).perm_flags, flags) #define MSG_SET_TMP_FLAGS(msg, flags) \ MSG_SET_FLAGS((msg).tmp_flags, flags) #define MSG_UNSET_PERM_FLAGS(msg, flags) \ MSG_UNSET_FLAGS((msg).perm_flags, flags) #define MSG_UNSET_TMP_FLAGS(msg, flags) \ MSG_UNSET_FLAGS((msg).tmp_flags, flags) #define MSG_IS_NEW(msg) (((msg).perm_flags & MSG_NEW) != 0) #define MSG_IS_UNREAD(msg) (((msg).perm_flags & MSG_UNREAD) != 0) #define MSG_IS_MARKED(msg) (((msg).perm_flags & MSG_MARKED) != 0) #define MSG_IS_DELETED(msg) (((msg).perm_flags & MSG_DELETED) != 0) #define MSG_IS_REPLIED(msg) (((msg).perm_flags & MSG_REPLIED) != 0) #define MSG_IS_FORWARDED(msg) (((msg).perm_flags & MSG_FORWARDED) != 0) #define MSG_GET_COLORLABEL(msg) (((msg).perm_flags & MSG_CLABEL_FLAG_MASK)) #define MSG_GET_COLORLABEL_VALUE(msg) (MSG_GET_COLORLABEL(msg) >> MSG_CLABEL_SBIT) #define MSG_SET_COLORLABEL_VALUE(msg, val) \ MSG_SET_PERM_FLAGS(msg, ((((guint)(val)) & 7) << MSG_CLABEL_SBIT)) #define MSG_IS_MOVE(msg) (((msg).tmp_flags & MSG_MOVE) != 0) #define MSG_IS_COPY(msg) (((msg).tmp_flags & MSG_COPY) != 0) #define MSG_IS_QUEUED(msg) (((msg).tmp_flags & MSG_QUEUED) != 0) #define MSG_IS_DRAFT(msg) (((msg).tmp_flags & MSG_DRAFT) != 0) #define MSG_IS_ENCRYPTED(msg) (((msg).tmp_flags & MSG_ENCRYPTED) != 0) #define MSG_IS_IMAP(msg) (((msg).tmp_flags & MSG_IMAP) != 0) #define MSG_IS_NEWS(msg) (((msg).tmp_flags & MSG_NEWS) != 0) #define MSG_IS_SIGNED(msg) (((msg).tmp_flags & MSG_SIGNED) != 0) #define MSG_IS_FLAG_CHANGED(msg) (((msg).tmp_flags & MSG_FLAG_CHANGED) != 0) #define MSG_IS_CACHED(msg) (((msg).tmp_flags & MSG_CACHED) != 0) #define MSG_IS_MIME(msg) (((msg).tmp_flags & MSG_MIME) != 0) #define MSG_IS_INVALID(msg) (((msg).tmp_flags & MSG_INVALID) != 0) #define MSG_IS_RECEIVED(msg) (((msg).tmp_flags & MSG_RECEIVED) != 0) #define WRITE_CACHE_DATA_INT(n, fp) \ { \ guint32 idata; \ \ idata = (guint32)n; \ fwrite(&idata, sizeof(idata), 1, fp); \ } #define WRITE_CACHE_DATA(data, fp) \ { \ size_t len; \ \ if (data == NULL) { \ len = 0; \ WRITE_CACHE_DATA_INT(len, fp); \ } else { \ len = strlen(data); \ WRITE_CACHE_DATA_INT(len, fp); \ if (len > 0) \ fwrite(data, len, 1, fp); \ } \ } struct _MsgFlags { MsgPermFlags perm_flags; MsgTmpFlags tmp_flags; }; struct _MsgInfo { guint msgnum; gsize size; time_t mtime; time_t date_t; MsgFlags flags; gchar *fromname; gchar *date; gchar *from; gchar *to; gchar *cc; gchar *newsgroups; gchar *subject; gchar *msgid; gchar *inreplyto; GSList *references; FolderItem *folder; FolderItem *to_folder; gchar *xface; /* used only for temporary messages */ gchar *file_path; /* used only for encrypted (and signed) messages */ MsgEncryptInfo *encinfo; }; struct _MsgFileInfo { gchar *file; MsgFlags *flags; }; struct _MsgEncryptInfo { gchar *plaintext_file; gchar *sigstatus; gchar *sigstatus_full; gboolean decryption_failed; }; typedef FILE * (*DecryptMessageFunc) (MsgInfo *msginfo, MimeInfo **mimeinfo); GHashTable *procmsg_msg_hash_table_create (GSList *mlist); void procmsg_msg_hash_table_append (GHashTable *msg_table, GSList *mlist); GHashTable *procmsg_to_folder_hash_table_create (GSList *mlist); gint procmsg_read_cache_data_str (FILE *fp, gchar **str); GSList *procmsg_read_cache (FolderItem *item, gboolean scan_file); void procmsg_set_flags (GSList *mlist, FolderItem *item); void procmsg_mark_all_read (FolderItem *item); GSList *procmsg_sort_msg_list (GSList *mlist, FolderSortKey sort_key, FolderSortType sort_type); gint procmsg_get_last_num_in_msg_list(GSList *mlist); void procmsg_msg_list_free (GSList *mlist); void procmsg_write_cache (MsgInfo *msginfo, FILE *fp); void procmsg_write_flags (MsgInfo *msginfo, FILE *fp); void procmsg_write_cache_list (FolderItem *item, GSList *mlist); void procmsg_write_flags_list (FolderItem *item, GSList *mlist); void procmsg_write_flags_for_multiple_folders (GSList *mlist); void procmsg_flush_mark_queue (FolderItem *item, FILE *fp); void procmsg_add_mark_queue (FolderItem *item, gint num, MsgFlags flags); void procmsg_add_flags (FolderItem *item, gint num, MsgFlags flags); void procmsg_get_mark_sum (FolderItem *item, gint *new, gint *unread, gint *total, gint *min, gint *max, gint first); FILE *procmsg_open_data_file (const gchar *file, guint version, DataOpenMode mode, gchar *buf, size_t buf_size); FILE *procmsg_open_cache_file (FolderItem *item, DataOpenMode mode); FILE *procmsg_open_mark_file (FolderItem *item, DataOpenMode mode); void procmsg_clear_cache (FolderItem *item); void procmsg_clear_mark (FolderItem *item); GNode *procmsg_get_thread_tree (GSList *mlist); guint procmsg_get_thread_date (GNode *node); gint procmsg_move_messages (GSList *mlist); gint procmsg_copy_messages (GSList *mlist); gchar *procmsg_get_message_file_path (MsgInfo *msginfo); gchar *procmsg_get_message_file (MsgInfo *msginfo); GSList *procmsg_get_message_file_list (GSList *mlist); void procmsg_message_file_list_free (GSList *file_list); FILE *procmsg_open_message (MsgInfo *msginfo); void procmsg_set_decrypt_message_func (DecryptMessageFunc func); FILE *procmsg_open_message_decrypted (MsgInfo *msginfo, MimeInfo **mimeinfo); gboolean procmsg_msg_exist (MsgInfo *msginfo); gboolean procmsg_trash_messages_exist (void); void procmsg_empty_trash (FolderItem *trash); void procmsg_empty_all_trash (void); void procmsg_remove_all_cached_messages (Folder *folder); gint procmsg_save_to_outbox (FolderItem *outbox, const gchar *file); void procmsg_print_message (MsgInfo *msginfo, const gchar *cmdline, gboolean all_headers); MsgInfo *procmsg_msginfo_copy (MsgInfo *msginfo); MsgInfo *procmsg_msginfo_get_full_info (MsgInfo *msginfo); gboolean procmsg_msginfo_equal (MsgInfo *msginfo_a, MsgInfo *msginfo_b); void procmsg_msginfo_free (MsgInfo *msginfo); gint procmsg_cmp_msgnum_for_sort (gconstpointer a, gconstpointer b); #endif /* __PROCMSG_H__ */ libsylph-1.1.0/libsylph/quoted-printable.h0000644000175000017500000000232010457702534015542 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __QUOTED_PRINTABLE_H__ #define __QUOTED_PRINTABLE_H__ #include void qp_encode_line (gchar *out, const guchar *in); gint qp_decode_line (gchar *str); gint qp_decode_q_encoding (guchar *out, const gchar *in, gint inlen); gint qp_get_q_encoding_len (const guchar *str); void qp_q_encode (gchar *out, const guchar *in); #endif /* __QUOTED_PRINTABLE_H__ */ libsylph-1.1.0/libsylph/recv.h0000644000175000017500000000267010457702534013232 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __RECV_H__ #define __RECV_H__ #include #include "socket.h" typedef gboolean (*RecvUIFunc) (SockInfo *sock, gint count, gint read_bytes, gpointer data); gchar *recv_bytes (SockInfo *sock, glong size); gint recv_write_to_file (SockInfo *sock, const gchar *filename); gint recv_bytes_write_to_file (SockInfo *sock, glong size, const gchar *filename); gint recv_write (SockInfo *sock, FILE *fp); gint recv_bytes_write (SockInfo *sock, glong size, FILE *fp); void recv_set_ui_func (RecvUIFunc func, gpointer data); #endif /* __RECV_H__ */ libsylph-1.1.0/libsylph/session.h0000644000175000017500000001240210530512675013745 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2006 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __SESSION_H__ #define __SESSION_H__ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include #include #include "socket.h" #define SESSION_BUFFSIZE 8192 typedef struct _Session Session; #define SESSION(obj) ((Session *)obj) typedef enum { SESSION_UNKNOWN, SESSION_IMAP, SESSION_NEWS, SESSION_SMTP, SESSION_POP3 } SessionType; typedef enum { SESSION_READY, SESSION_SEND, SESSION_RECV, SESSION_EOF, SESSION_TIMEOUT, SESSION_ERROR, SESSION_DISCONNECTED } SessionState; typedef enum { SESSION_MSG_NORMAL, SESSION_MSG_SEND_DATA, SESSION_MSG_RECV_DATA, SESSION_MSG_CONTROL, SESSION_MSG_ERROR, SESSION_MSG_UNKNOWN } SessionMsgType; #ifndef USE_SSL typedef enum { SSL_NONE } SSLType; #endif typedef gint (*RecvMsgNotify) (Session *session, const gchar *msg, gpointer user_data); typedef gint (*RecvDataProgressiveNotify) (Session *session, guint cur_len, guint total_len, gpointer user_data); typedef gint (*RecvDataNotify) (Session *session, guint len, gpointer user_data); typedef gint (*SendDataProgressiveNotify) (Session *session, guint cur_len, guint total_len, gpointer user_data); typedef gint (*SendDataNotify) (Session *session, guint len, gpointer user_data); struct _Session { SessionType type; SockInfo *sock; gchar *server; gushort port; SSLType ssl_type; gboolean nonblocking; SessionState state; time_t last_access_time; GTimeVal tv_prev; gint conn_id; gint io_tag; gchar read_buf[SESSION_BUFFSIZE]; gchar *read_buf_p; gint read_buf_len; /* buffer for short messages */ GString *read_msg_buf; /* buffer for relatively short multiple lines data */ GByteArray *read_data_buf; gchar *read_data_terminator; /* buffer for large data */ FILE *read_data_fp; gint read_data_pos; gint preread_len; /* buffer for short messages */ gchar *write_buf; gchar *write_buf_p; gint write_buf_len; /* buffer for large data */ FILE *write_data_fp; gint write_data_pos; gint write_data_len; guint timeout_tag; guint timeout_interval; guint ping_tag; gpointer data; /* virtual methods to parse server responses */ gint (*recv_msg) (Session *session, const gchar *msg); gint (*send_data_finished) (Session *session, guint len); gint (*recv_data_finished) (Session *session, guchar *data, guint len); gint (*recv_data_as_file_finished) (Session *session, FILE *fp, guint len); void (*destroy) (Session *session); /* notification functions */ RecvMsgNotify recv_msg_notify; RecvDataProgressiveNotify recv_data_progressive_notify; RecvDataNotify recv_data_notify; SendDataProgressiveNotify send_data_progressive_notify; SendDataNotify send_data_notify; gpointer recv_msg_notify_data; gpointer recv_data_progressive_notify_data; gpointer recv_data_notify_data; gpointer send_data_progressive_notify_data; gpointer send_data_notify_data; }; void session_init (Session *session); gint session_connect (Session *session, const gchar *server, gushort port); gint session_disconnect (Session *session); void session_destroy (Session *session); gboolean session_is_connected (Session *session); void session_set_access_time (Session *session); void session_set_timeout (Session *session, guint interval); void session_set_recv_message_notify (Session *session, RecvMsgNotify notify_func, gpointer data); void session_set_recv_data_progressive_notify (Session *session, RecvDataProgressiveNotify notify_func, gpointer data); void session_set_recv_data_notify (Session *session, RecvDataNotify notify_func, gpointer data); void session_set_send_data_progressive_notify (Session *session, SendDataProgressiveNotify notify_func, gpointer data); void session_set_send_data_notify (Session *session, SendDataNotify notify_func, gpointer data); #if USE_SSL gint session_start_tls (Session *session); #endif gint session_send_msg (Session *session, SessionMsgType type, const gchar *msg); gint session_recv_msg (Session *session); gint session_send_data (Session *session, FILE *data_fp, guint size); gint session_recv_data (Session *session, guint size, const gchar *terminator); gint session_recv_data_as_file (Session *session, guint size, const gchar *terminator); #endif /* __SESSION_H__ */ libsylph-1.1.0/libsylph/smtp.h0000644000175000017500000000425110530511745013245 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __SMTP_H__ #define __SMTP_H__ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include "session.h" typedef struct _SMTPSession SMTPSession; #define SMTP_SESSION(obj) ((SMTPSession *)obj) #define MSGBUFSIZE 8192 typedef enum { SM_OK = 0, SM_ERROR = 128, SM_UNRECOVERABLE = 129, SM_AUTHFAIL = 130 } SMTPErrorValue; typedef enum { ESMTP_8BITMIME = 1 << 0, ESMTP_SIZE = 1 << 1, ESMTP_ETRN = 1 << 2 } ESMTPFlag; typedef enum { SMTPAUTH_LOGIN = 1 << 0, SMTPAUTH_CRAM_MD5 = 1 << 1, SMTPAUTH_DIGEST_MD5 = 1 << 2, SMTPAUTH_PLAIN = 1 << 3 } SMTPAuthType; typedef enum { SMTP_READY, SMTP_CONNECTED, SMTP_HELO, SMTP_EHLO, SMTP_STARTTLS, SMTP_FROM, SMTP_AUTH, SMTP_AUTH_PLAIN, SMTP_AUTH_LOGIN_USER, SMTP_AUTH_LOGIN_PASS, SMTP_AUTH_CRAM_MD5, SMTP_RCPT, SMTP_DATA, SMTP_SEND_DATA, SMTP_EOM, SMTP_RSET, SMTP_QUIT, SMTP_ERROR, SMTP_DISCONNECTED, N_SMTP_PHASE } SMTPState; struct _SMTPSession { Session session; SMTPState state; gboolean tls_init_done; gchar *hostname; gchar *user; gchar *pass; gchar *from; GSList *to_list; GSList *cur_to; FILE *send_data_fp; gint send_data_len; SMTPAuthType avail_auth_type; SMTPAuthType forced_auth_type; SMTPAuthType auth_type; SMTPErrorValue error_val; gchar *error_msg; }; Session *smtp_session_new (void); #endif /* __SMTP_H__ */ libsylph-1.1.0/libsylph/socket.h0000644000175000017500000000722110530511660013546 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2006 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __SOCKET_H__ #define __SOCKET_H__ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #if HAVE_NETDB_H # include #endif typedef struct _SockInfo SockInfo; #if USE_SSL # include "ssl.h" #endif typedef enum { CONN_READY, CONN_LOOKUPSUCCESS, CONN_ESTABLISHED, CONN_LOOKUPFAILED, CONN_FAILED } ConnectionState; typedef gint (*SockConnectFunc) (SockInfo *sock, gpointer data); typedef gboolean (*SockFunc) (SockInfo *sock, GIOCondition condition, gpointer data); struct _SockInfo { gint sock; #if USE_SSL SSL *ssl; #else gpointer ssl; #endif GIOChannel *sock_ch; gchar *hostname; gushort port; ConnectionState state; gboolean nonblock; gpointer data; SockFunc callback; GIOCondition condition; }; gint sock_init (void); gint sock_cleanup (void); gint sock_set_io_timeout (guint sec); gint sock_set_nonblocking_mode (SockInfo *sock, gboolean nonblock); gboolean sock_is_nonblocking_mode (SockInfo *sock); gboolean sock_has_read_data (SockInfo *sock); guint sock_add_watch (SockInfo *sock, GIOCondition condition, SockFunc func, gpointer data); struct hostent *my_gethostbyname (const gchar *hostname); SockInfo *sock_connect (const gchar *hostname, gushort port); #ifdef G_OS_UNIX gint sock_connect_async (const gchar *hostname, gushort port, SockConnectFunc func, gpointer data); gint sock_connect_async_cancel (gint id); #endif /* Basic I/O functions */ gint sock_printf (SockInfo *sock, const gchar *format, ...) G_GNUC_PRINTF(2, 3); gint sock_read (SockInfo *sock, gchar *buf, gint len); gint sock_write (SockInfo *sock, const gchar *buf, gint len); gint sock_write_all (SockInfo *sock, const gchar *buf, gint len); gint sock_gets (SockInfo *sock, gchar *buf, gint len); gint sock_getline (SockInfo *sock, gchar **line); gint sock_puts (SockInfo *sock, const gchar *buf); gint sock_peek (SockInfo *sock, gchar *buf, gint len); gint sock_close (SockInfo *sock); /* Functions to directly work on FD. They are needed for pipes */ gint fd_connect_inet (gushort port); gint fd_open_inet (gushort port); gint fd_connect_unix (const gchar *path); gint fd_open_unix (const gchar *path); gint fd_accept (gint sock); gint fd_read (gint sock, gchar *buf, gint len); gint fd_write (gint sock, const gchar *buf, gint len); gint fd_write_all (gint sock, const gchar *buf, gint len); gint fd_gets (gint sock, gchar *buf, gint len); gint fd_getline (gint sock, gchar **line); gint fd_close (gint sock); /* Functions for SSL */ #if USE_SSL gint ssl_read (SSL *ssl, gchar *buf, gint len); gint ssl_write (SSL *ssl, const gchar *buf, gint len); gint ssl_write_all (SSL *ssl, const gchar *buf, gint len); gint ssl_gets (SSL *ssl, gchar *buf, gint len); gint ssl_getline (SSL *ssl, gchar **line); gint ssl_peek (SSL *ssl, gchar *buf, gint len); #endif #endif /* __SOCKET_H__ */ libsylph-1.1.0/libsylph/ssl.h0000644000175000017500000000274110530512214013055 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __SSL_H__ #define __SSL_H__ #ifdef HAVE_CONFIG_H # include "config.h" #endif #if USE_SSL #include #include #include #include #include #include #include "socket.h" typedef enum { SSL_METHOD_SSLv23, SSL_METHOD_TLSv1 } SSLMethod; typedef enum { SSL_NONE, SSL_TUNNEL, SSL_STARTTLS } SSLType; void ssl_init (void); void ssl_done (void); gboolean ssl_init_socket (SockInfo *sockinfo); gboolean ssl_init_socket_with_method (SockInfo *sockinfo, SSLMethod method); void ssl_done_socket (SockInfo *sockinfo); #endif /* USE_SSL */ #endif /* __SSL_H__ */ libsylph-1.1.0/libsylph/stringtable.h0000644000175000017500000000252410457702533014606 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef STRINGTABLE_H__ #define STRINGTABLE_H__ #include typedef struct { GHashTable *hash_table; } StringTable; StringTable *string_table_new (void); void string_table_free (StringTable *table); gchar *string_table_lookup_string (StringTable *table, const gchar *str); gchar *string_table_insert_string (StringTable *table, const gchar *str); void string_table_free_string (StringTable *table, const gchar *str); void string_table_get_stats (StringTable *table); #endif /* STRINGTABLE_H__ */ libsylph-1.1.0/libsylph/sylmain.h0000644000175000017500000000201010511405254013721 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2006 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __SYLMAIN_H__ #define __SYLMAIN_H__ #include void syl_init (void); gint syl_setup_rc_dir (void); void syl_save_all_state (void); void syl_cleanup (void); #endif /* __SYLMAIN_H__ */ libsylph-1.1.0/libsylph/unmime.h0000644000175000017500000000171010457702533013556 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __UNMIME_H__ #define __UNMIME_H__ #include gchar *unmime_header (const gchar *encoded_str); #endif /* __UNMIME_H__ */ libsylph-1.1.0/libsylph/utils.h0000644000175000017500000003410010734637331013424 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2007 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __UTILS_H__ #define __UTILS_H__ #ifdef HAVE_CONFIG_H # include "config.h" #endif #include #include #include #include #include #include #include #include #if HAVE_ALLOCA_H # include #endif /* Wrappers for C library function that take pathname arguments. */ #if GLIB_CHECK_VERSION(2, 6, 0) # include #else #define g_open open #define g_rename rename #define g_mkdir mkdir #define g_stat stat #define g_lstat lstat #define g_unlink unlink #define g_remove remove #define g_rmdir rmdir #define g_fopen fopen #define g_freopen freopen #endif /* GLIB_CHECK_VERSION */ #if !GLIB_CHECK_VERSION(2, 7, 0) #ifdef G_OS_UNIX #define g_chdir chdir #define g_chmod chmod #else gint g_chdir (const gchar *path); gint g_chmod (const gchar *path, gint mode); #endif /* G_OS_UNIX */ #endif /* !GLIB_CHECK_VERSION */ /* The AC_CHECK_SIZEOF() in configure fails for some machines. * we provide some fallback values here */ #if !SIZEOF_UNSIGNED_SHORT #undef SIZEOF_UNSIGNED_SHORT #define SIZEOF_UNSIGNED_SHORT 2 #endif #if !SIZEOF_UNSIGNED_INT #undef SIZEOF_UNSIGNED_INT #define SIZEOF_UNSIGNED_INT 4 #endif #if !SIZEOF_UNSIGNED_LONG #undef SIZEOF_UNSIGNED_LONG #define SIZEOF_UNSIGNED_LONG 4 #endif #ifndef HAVE_U32_TYPEDEF #undef u32 /* maybe there is a macro with this name */ typedef guint32 u32; #define HAVE_U32_TYPEDEF #endif #ifndef BIG_ENDIAN_HOST #if (G_BYTE_ORDER == G_BIG_ENDIAN) #define BIG_ENDIAN_HOST 1 #endif #endif #define CHDIR_RETURN_IF_FAIL(dir) \ { \ if (change_dir(dir) < 0) return; \ } #define CHDIR_RETURN_VAL_IF_FAIL(dir, val) \ { \ if (change_dir(dir) < 0) return val; \ } #define Xalloca(ptr, size, iffail) \ { \ if ((ptr = alloca(size)) == NULL) { \ g_warning("can't allocate memory\n"); \ iffail; \ } \ } #define Xstrdup_a(ptr, str, iffail) \ { \ gchar *__tmp; \ \ if ((__tmp = alloca(strlen(str) + 1)) == NULL) { \ g_warning("can't allocate memory\n"); \ iffail; \ } else \ strcpy(__tmp, str); \ \ ptr = __tmp; \ } #define Xstrndup_a(ptr, str, len, iffail) \ { \ gchar *__tmp; \ \ if ((__tmp = alloca(len + 1)) == NULL) { \ g_warning("can't allocate memory\n"); \ iffail; \ } else { \ strncpy(__tmp, str, len); \ __tmp[len] = '\0'; \ } \ \ ptr = __tmp; \ } #define Xstrcat_a(ptr, str1, str2, iffail) \ { \ gchar *__tmp; \ gint len1, len2; \ \ len1 = strlen(str1); \ len2 = strlen(str2); \ if ((__tmp = alloca(len1 + len2 + 1)) == NULL) { \ g_warning("can't allocate memory\n"); \ iffail; \ } else { \ memcpy(__tmp, str1, len1); \ memcpy(__tmp + len1, str2, len2 + 1); \ } \ \ ptr = __tmp; \ } #define AUTORELEASE_STR(str, iffail) \ { \ gchar *__str; \ Xstrdup_a(__str, str, iffail); \ g_free(str); \ str = __str; \ } #define FILE_OP_ERROR(file, func) \ { \ fprintf(stderr, "%s: ", file); \ fflush(stderr); \ perror(func); \ } typedef void (*UIUpdateFunc) (void); typedef void (*ProgressFunc) (gint cur, gint total); typedef gchar * (*QueryPasswordFunc) (const gchar *server, const gchar *user); typedef void (*LogFunc) (const gchar *str); /* for macro expansion */ #define Str(x) #x #define Xstr(x) Str(x) void list_free_strings (GList *list); void slist_free_strings (GSList *list); void hash_free_strings (GHashTable *table); void hash_free_value_mem (GHashTable *table); gint str_case_equal (gconstpointer v, gconstpointer v2); guint str_case_hash (gconstpointer key); void ptr_array_free_strings (GPtrArray *array); typedef gboolean (*StrFindFunc) (const gchar *haystack, const gchar *needle); gboolean str_find (const gchar *haystack, const gchar *needle); gboolean str_case_find (const gchar *haystack, const gchar *needle); gboolean str_find_equal (const gchar *haystack, const gchar *needle); gboolean str_case_find_equal (const gchar *haystack, const gchar *needle); /* number-string conversion */ gint to_number (const gchar *nstr); gchar *itos_buf (gchar *nstr, gint n); gchar *itos (gint n); gchar *to_human_readable (gint64 size); /* alternative string functions */ gint strcmp2 (const gchar *s1, const gchar *s2); gint path_cmp (const gchar *s1, const gchar *s2); gchar *strretchomp (gchar *str); gchar *strtailchomp (gchar *str, gchar tail_char); gchar *strcrchomp (gchar *str); gchar *strcasestr (const gchar *haystack, const gchar *needle); gpointer my_memmem (gconstpointer haystack, size_t haystacklen, gconstpointer needle, size_t needlelen); gchar *strncpy2 (gchar *dest, const gchar *src, size_t n); gboolean str_has_suffix_case (const gchar *str, const gchar *suffix); gint str_find_format_times (const gchar *haystack, gchar ch); gboolean is_next_nonascii (const gchar *s); gint get_next_word_len (const gchar *s); /* functions for string parsing */ gint subject_compare (const gchar *s1, const gchar *s2); gint subject_compare_for_sort (const gchar *s1, const gchar *s2); void trim_subject_for_compare (gchar *str); void trim_subject_for_sort (gchar *str); void trim_subject (gchar *str); void eliminate_parenthesis (gchar *str, gchar op, gchar cl); void extract_parenthesis (gchar *str, gchar op, gchar cl); void extract_parenthesis_with_escape (gchar *str, gchar op, gchar cl); void extract_parenthesis_with_skip_quote (gchar *str, gchar quote_chr, gchar op, gchar cl); void eliminate_quote (gchar *str, gchar quote_chr); void extract_quote (gchar *str, gchar quote_chr); void extract_quote_with_escape (gchar *str, gchar quote_chr); void eliminate_address_comment (gchar *str); gchar *strchr_with_skip_quote (const gchar *str, gint quote_chr, gint c); gchar *strrchr_with_skip_quote (const gchar *str, gint quote_chr, gint c); void extract_address (gchar *str); void extract_list_id_str (gchar *str); gchar *normalize_address_field (const gchar *str); gboolean address_equal (const gchar *addr1, const gchar *addr2); GSList *address_list_append_orig (GSList *addr_list, const gchar *str); GSList *address_list_append (GSList *addr_list, const gchar *str); GSList *references_list_prepend (GSList *msgid_list, const gchar *str); GSList *references_list_append (GSList *msgid_list, const gchar *str); GSList *newsgroup_list_append (GSList *group_list, const gchar *str); GList *add_history (GList *list, const gchar *str); /* modify string */ void remove_return (gchar *str); void remove_space (gchar *str); void unfold_line (gchar *str); void subst_char (gchar *str, gchar orig, gchar subst); void subst_chars (gchar *str, gchar *orig, gchar subst); void subst_null (gchar *str, gint len, gchar subst); void subst_control (gchar *str, gchar subst); void subst_for_filename (gchar *str); gchar *get_alt_filename (const gchar *filename, gint count); gboolean is_header_line (const gchar *str); gboolean is_ascii_str (const gchar *str); gint get_quote_level (const gchar *str); gint check_line_length (const gchar *str, gint max_chars, gint *line); gchar *strstr_with_skip_quote (const gchar *haystack, const gchar *needle); gchar *strchr_parenthesis_close (const gchar *str, gchar op, gchar cl); gchar **strsplit_parenthesis (const gchar *str, gchar op, gchar cl, gint max_tokens); gchar **strsplit_with_quote (const gchar *str, const gchar *delim, gint max_tokens); gchar **strsplit_csv (const gchar *str, gchar delim, gint max_tokens); gchar *get_abbrev_newsgroup_name (const gchar *group, gint len); gchar *trim_string (const gchar *str, gint len); gchar *trim_string_before (const gchar *str, gint len); GList *uri_list_extract_filenames (const gchar *uri_list); gboolean is_uri_string (const gchar *str); gchar *get_uri_path (const gchar *uri); gint get_uri_len (const gchar *str); void decode_uri (gchar *decoded_uri, const gchar *encoded_uri); void decode_xdigit_encoded_str (gchar *decoded, const gchar *encoded); gchar *encode_uri (const gchar *filename); gchar *uriencode_for_filename (const gchar *filename); gchar *uriencode_for_mailto (const gchar *mailto); gint scan_mailto_url (const gchar *mailto, gchar **to, gchar **cc, gchar **bcc, gchar **subject, gchar **body); void set_startup_dir (void); void set_rc_dir (const gchar *dir); /* return static strings */ const gchar *get_startup_dir (void); const gchar *get_home_dir (void); const gchar *get_document_dir (void); const gchar *get_rc_dir (void); const gchar *get_old_rc_dir (void); const gchar *get_mail_base_dir (void); const gchar *get_news_cache_dir (void); const gchar *get_imap_cache_dir (void); const gchar *get_mime_tmp_dir (void); const gchar *get_template_dir (void); const gchar *get_tmp_dir (void); gchar *get_tmp_file (void); const gchar *get_domain_name (void); /* file / directory handling */ off_t get_file_size (const gchar *file); off_t get_file_size_as_crlf (const gchar *file); off_t get_left_file_size (FILE *fp); gboolean file_exist (const gchar *file, gboolean allow_fifo); gboolean is_dir_exist (const gchar *dir); gboolean is_file_entry_exist (const gchar *file); gboolean dirent_is_regular_file (struct dirent *d); gboolean dirent_is_directory (struct dirent *d); #define is_file_exist(file) file_exist(file, FALSE) #define is_file_or_fifo_exist(file) file_exist(file, TRUE) gint change_dir (const gchar *dir); gint make_dir (const gchar *dir); gint make_dir_hier (const gchar *dir); gint remove_all_files (const gchar *dir); gint remove_numbered_files (const gchar *dir, guint first, guint last); gint remove_all_numbered_files (const gchar *dir); gint remove_expired_files (const gchar *dir, guint hours); gint remove_dir_recursive (const gchar *dir); gint rename_force (const gchar *oldpath, const gchar *newpath); gint copy_file (const gchar *src, const gchar *dest, gboolean keep_backup); gint copy_dir (const gchar *src, const gchar *dest); gint move_file (const gchar *src, const gchar *dest, gboolean overwrite); gint copy_file_part (FILE *fp, off_t offset, size_t length, const gchar *dest); gchar *canonicalize_str (const gchar *str); gint canonicalize_file (const gchar *src, const gchar *dest); gint canonicalize_file_replace (const gchar *file); FILE *canonicalize_file_stream (FILE *fp, gint *length); gint uncanonicalize_file (const gchar *src, const gchar *dest); gint uncanonicalize_file_replace(const gchar *file); gchar *normalize_newlines (const gchar *str); gchar *strchomp_all (const gchar *str); FILE *get_outgoing_rfc2822_file (FILE *fp); gchar *get_outgoing_rfc2822_str (FILE *fp); gchar *generate_mime_boundary (const gchar *prefix); gint change_file_mode_rw (FILE *fp, const gchar *file); FILE *my_tmpfile (void); FILE *str_open_as_stream (const gchar *str); gint str_write_to_file (const gchar *str, const gchar *file); gchar *file_read_to_str (const gchar *file); gchar *file_read_stream_to_str (FILE *fp); /* process execution */ gint execute_async (gchar *const argv[]); gint execute_sync (gchar *const argv[]); gint execute_command_line (const gchar *cmdline, gboolean async); gint execute_open_file (const gchar *file, const gchar *content_type); gint execute_print_file (const gchar *file); gchar *get_command_output (const gchar *cmdline); /* open URI with external browser */ gint open_uri(const gchar *uri, const gchar *cmdline); /* time functions */ time_t remote_tzoffset_sec (const gchar *zone); time_t tzoffset_sec (time_t *now); gchar *tzoffset (time_t *now); void get_rfc822_date (gchar *buf, gint len); size_t my_strftime (gchar *s, size_t max, const gchar *format, const struct tm *tm); /* UI hints */ void set_ui_update_func (UIUpdateFunc func); void ui_update (void); void set_progress_func (ProgressFunc func); void progress_show (gint cur, gint total); /* user input */ void set_input_query_password_func (QueryPasswordFunc func); gchar *input_query_password (const gchar *server, const gchar *user); /* logging */ void set_log_file (const gchar *filename); void close_log_file (void); void set_log_verbosity (gboolean verbose); gboolean get_debug_mode (void); void set_debug_mode (gboolean enable); void set_log_ui_func (LogFunc print_func, LogFunc message_func, LogFunc warning_func, LogFunc error_func); void set_log_show_status_func (LogFunc status_func); void debug_print (const gchar *format, ...) G_GNUC_PRINTF(1, 2); void status_print (const gchar *format, ...) G_GNUC_PRINTF(1, 2); void log_write (const gchar *str, const gchar *prefix); void log_print (const gchar *format, ...) G_GNUC_PRINTF(1, 2); void log_message (const gchar *format, ...) G_GNUC_PRINTF(1, 2); void log_warning (const gchar *format, ...) G_GNUC_PRINTF(1, 2); void log_error (const gchar *format, ...) G_GNUC_PRINTF(1, 2); #endif /* __UTILS_H__ */ libsylph-1.1.0/libsylph/uuencode.h0000644000175000017500000000174410532500530014065 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ int touufrombits(unsigned char *, const unsigned char *, int); int fromuutobits(char *, const char *); #define X_UUENCODE_END_LINE '`' #define UUENCODE_END_LINE ' ' libsylph-1.1.0/libsylph/virtual.h0000644000175000017500000000215210457702533013753 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2006 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __VIRTUAL_H__ #define __VIRTUAL_H__ #include #include "folder.h" typedef struct _VirtualFolder VirtualFolder; #define VIRTUAL_FOLDER(obj) ((VirtualFolder *)obj) struct _VirtualFolder { LocalFolder lfolder; }; FolderClass *virtual_get_class (void); #endif /* __VIRTUAL_H__ */ libsylph-1.1.0/libsylph/xml.h0000644000175000017500000000501410457702533013065 00000000000000/* * LibSylph -- E-Mail client library * Copyright (C) 1999-2005 Hiroyuki Yamamoto * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library 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 * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ #ifndef __XML_H__ #define __XML_H__ #include #include #define XMLBUFSIZE 8192 typedef struct _XMLAttr XMLAttr; typedef struct _XMLTag XMLTag; typedef struct _XMLNode XMLNode; typedef struct _XMLFile XMLFile; struct _XMLAttr { gchar *name; gchar *value; }; struct _XMLTag { gchar *tag; GList *attr; }; struct _XMLNode { XMLTag *tag; gchar *element; }; struct _XMLFile { FILE *fp; GString *buf; gchar *bufp; gchar *dtd; gchar *encoding; GList *tag_stack; guint level; gboolean is_empty_element; }; XMLFile *xml_open_file (const gchar *path); void xml_close_file (XMLFile *file); GNode *xml_parse_file (const gchar *path); gint xml_get_dtd (XMLFile *file); gint xml_parse_next_tag (XMLFile *file); void xml_push_tag (XMLFile *file, XMLTag *tag); void xml_pop_tag (XMLFile *file); XMLTag *xml_get_current_tag (XMLFile *file); GList *xml_get_current_tag_attr(XMLFile *file); gchar *xml_get_element (XMLFile *file); gint xml_read_line (XMLFile *file); void xml_truncate_buf (XMLFile *file); gboolean xml_compare_tag (XMLFile *file, const gchar *name); XMLNode *xml_node_new (XMLTag *tag, const gchar *text); XMLTag *xml_tag_new (const gchar *tag); XMLAttr *xml_attr_new (const gchar *name, const gchar *value); void xml_tag_add_attr (XMLTag *tag, XMLAttr *attr); XMLTag *xml_copy_tag (XMLTag *tag); XMLAttr *xml_copy_attr (XMLAttr *attr); gint xml_unescape_str (gchar *str); gint xml_file_put_escape_str (FILE *fp, const gchar *str); gint xml_file_put_xml_decl (FILE *fp); gint xml_file_put_node (FILE *fp, XMLNode *node); void xml_free_node (XMLNode *node); void xml_free_tree (GNode *node); #endif /* __XML_H__ */ libsylph-1.1.0/po/0000777000175000017500000000000010760423126010763 500000000000000libsylph-1.1.0/po/ChangeLog0000644000175000017500000003652210533167562012470 000000000000002006-11-29 * updated el.po (thanks to Stavros Giannouris). 2006-11-21 * removed unrequired lines. 2006-08-03 * updated pt_BR.po. 2006-07-31 * updated es.po, de.po and pt_BR.po. 2006-07-21 * updated lt.po, hu.po and pt_BR.po. 2006-06-27 * fixed a typo which caused crash in tr.po. * fixed a typo in ja.po. 2006-05-29 * updated es.po. 2006-05-09 * updated it.po. 2006-05-09 * updated uk.po, ro.po, nl.po and vi.po. 2006-03-30 * updated pt_BR.po. 2006-03-27 * updated ro.po. 2006-03-16 * updated pt_BR.po and it.po. 2006-03-08 * updated ro.po. 2006-02-24 * updated fr.po. 2006-02-14 * updated ro.po. 2006-02-13 * updated lt.po. 2006-02-13 * updated it.po and ro.po. 2006-02-09 * updated ro.po. 2006-02-07 * updated pt_BR.po and de.po. 2006-02-06 * updated hu.po. 2006-02-03 * updated ro.po and uk.po. 2006-02-02 * updated es.po. 2006-02-02 * updated pt_BR.po. 2006-02-01 * updated ro.po. 2006-01-31 * updated ro.po. 2006-01-27 * updated de.po. 2006-01-17 * updated de.po. 2006-01-06 * updated pt_BR.po. 2006-01-05 * updated hu.po and de.po. 2005-12-27 * updated pt_BR.po. 2005-12-20 * updated pt_BR.po and it.po. 2005-12-06 * updated pt_BR.po. 2005-12-05 * updated it.po. 2005-12-01 * updated de.po. * added vi.po (thanks to Pham Thanh Long). 2005-11-28 * updated de.po, it.po and pt_BR.po. 2005-11-14 * updated it.po. 2005-11-09 * updated de.po and pt_BR.po. 2005-10-31 * updated pt_BR.po and sv.po. 2005-10-25 * updated zh_TW.po, and renamed from zh_TW.Big5.po. 2005-10-25 * updated uk.po. 2005-10-20 * updated pt_BR.po. 2005-09-28 * updated pt_BR.po. 2005-09-20 * updated it.po. 2005-09-09 * updated zh_TW.Big5.po. 2005-09-07 * POTFILES.in: added missing files. 2005-09-07 * POTFILES.in: updated. * updated pt_BR.po. 2005-08-31 * POTFILES.in: updated. * updated pt_BR.po. 2005-08-09 * updated fr.po. 2005-08-02 * updated it.po. 2005-07-28 * updated hu.po. 2005-07-25 * updated de.po and pt_BR.po. 2005-07-20 * updated pt_BR.po, lt.po and es.po. 2005-07-12 * updated pt_BR.po, hu.po and fr.po (thanks to Nicolas Boos). 2005-07-08 * updated de.po (thanks to Joo Martin). 2005-07-05 * updated pt_BR.po. 2005-07-04 * updated lt.po. 2005-06-28 * updated hu.po, pt_BR.po (thanks to Ricardo Nabinger Sanchez) and it.po. 2005-06-20 * updated lt.po and it.po. 2005-06-15 * updated pl.po and it.po. 2005-06-09 * added lt.po (thanks to Vitalijus Valantiejus). 2005-05-30 * updated hu.po. 2005-05-18 * updated hu.po (thanks to Thomas). 2005-04-19 * updated it.po. 2005-04-12 * updated it.po. 2005-03-17 * updated zh_CN.po. 2005-03-16 * updated it.po. 2005-03-10 * updated it.po. 2005-03-07 * updated pl.po. 2005-02-09 * updated de.po. 2005-02-03 * updated zh_CN.po. 2004-12-22 * updated es.po. 2004-12-14 * updated zh_TW.Big5.po. 2004-12-10 * updated fr.po. 2004-12-08 * updated sv.po (thanks to Mattias Ostergren and Roger Lindmark). 2004-12-06 * updated ru.po. 2004-12-03 * update tr.po. 2004-11-29 * update tr.po. 2004-11-22 * updated fr.po. 2004-11-15 * updated it.po. 2004-11-04 * updated uk.po, zh_TW.Big5.po, de.po (thanks to Manfred Usselmann) and it.po. 2004-10-29 gettextize * Makefile.in.in: Upgrade to gettext-0.14.1. * Rules-quot: Upgrade to gettext-0.14.1. 2004-10-25 * updated de.po. 2004-10-01 * updated fr.po. 2004-06-17 * updated fr.po. 2004-06-16 * updated zh_TW.Big5.po and de.po. 2004-05-28 * updated es.po and fr.po. 2004-05-21 * updated de.po. 2004-03-12 * updated it.po, ru.po, uk.po and zh_TW.Big5.po. 2004-02-29 * updated fr.po and de.po. 2004-02-24 * updated it.po. 2004-02-13 * updated zh_TW.Big5.po, fr.po and es.po. 2004-02-04 * updated de.po. 2004-01-23 * updated sk.po. 2004-01-22 * updated de.po. 2004-01-15 * updated pl.po. * added bg.po (thanks to Pavel). 2003-12-15 * updated zh_TW.Big5.po. 2003-12-04 * updated de.po and es.po. 2003-11-24 gettextize * Makefile.in.in: Upgrade to gettext-0.12.1. * Rules-quot: New file, from gettext-0.12.1. * boldquot.sed: New file, from gettext-0.12.1. * en@boldquot.header: New file, from gettext-0.12.1. * en@quot.header: New file, from gettext-0.12.1. * insert-header.sin: New file, from gettext-0.12.1. * quot.sed: New file, from gettext-0.12.1. * remove-potcdate.sin: New file, from gettext-0.12.1. * cat-id-tbl.c: Remove file. * stamp-cat-id: Remove file. 2003-11-11 * updated fr.po. 2003-10-28 * updated it.po. 2003-10-22 * updated zh_TW.Big5.po. 2003-10-17 * updated pl.po. 2003-10-02 * updated zh_TW.Big5.po. 2003-09-17 * updated ru.po. 2003-09-05 * updated de.po and it.po. 2003-09-02 * updated sk.po and es.po. 2003-09-01 * updated sk.po. 2003-08-26 * updated pl.po. 2003-08-21 * updated sk.po and fr.po. 2003-08-06 * updated de.po. 2003-07-30 * updated ru.po. 2003-07-29 * updated it.po, hu.po, zh_TW.Big5.po and da.po. 2003-07-22 * updated pl.po. 2003-07-18 * updated fr.po. 2003-07-15 * updated sk.po and pl.po. 2003-07-10 * updated zh_TW.Big5.po. 2003-07-07 * updated es.po. 2003-07-04 * updated pl.po. 2003-06-26 * updated pl.po. 2003-06-18 * updated es.po. 2003-06-11 * updated pl.po. 2003-06-10 * updated cs.po. 2003-06-03 * updated zh_TW.Big5.po and it.po. 2003-05-27 * updated sk.po and pl.po. 2003-05-22 * updated pl.po. 2003-05-21 * updated de.po. 2003-05-19 * updated hu.po, zh_TW.Big5.po and it.po. 2003-05-16 * updated es.po. 2003-05-15 * updated gl.po. 2003-05-13 * updated sk.po. 2003-05-12 * updated pl.po. 2003-05-01 * updated pl.po. 2003-04-16 * updated pl.po. 2003-04-14 * updated pl.po, sk.po and fr.po. 2003-04-01 * updated de.po and pl.po. 2003-03-27 * updated sk.po. 2003-03-14 * updated zh_TW.Big5.po, it.po and pl.po. * added sk.po (thanks to Andrej Kacian). 2003-03-07 * updated es.po and fr.po. 2003-03-05 * added gl.po (thanks to Jorge Rivas). * updated ru.po. 2003-03-04 * updated da.po, pl.po and de.po. 2003-02-28 * updated fr.po. 2003-02-20 * updated nl.po. 2003-02-13 * updated fr.po and pl.po. 2003-02-04 * updated it.po, zh_TW.Big5.po and tr.po. 2003-01-30 * updated fr.po. 2003-01-29 * updated ru.po, fr.po and sl.po. 2003-01-17 * updated pl.po and es.po. 2003-01-16 * updated fr.po. 2003-01-14 * updated da.po, pl.po, pt_BR.po and de.po. 2002-12-27 * updated hu.po. 2002-12-26 * updated zh_TW.Big5.po and pl.po. 2002-12-25 * updated zh_TW.Big5.po, fr.po, nl.po and cs.po. 2002-12-20 * updated es.po and ru.po. 2002-12-19 * updated fr.po. 2002-12-09 * added sr.po (thanks to garret@garrets.tk). 2002-12-02 * updated ko.po. 2002-11-29 * updated de.po. 2002-11-27 * updated it.po and pl.po. 2002-11-26 * updated da.po. 2002-11-22 * updated pl.po. 2002-11-18 * updated zh_TW.Big5.po and es.po. 2002-11-15 * updated nl.po. 2002-11-06 * updated da.po and es.po. 2002-10-25 * updated zh_TW.Big5.po and da.po. 2002-10-09 * updated pl.po. 2002-10-07 * updated it.po and pl.po. 2002-10-03 * updated pl.po. 2002-10-02 * fixed a typo in es.po. * replaced fr.po (the encoding of the previous one was UTF-8). * updated de.po. * updated pl.po and et.po. * fixed typos of format strings in da.po, el.po, et.po, fr.po, hr.po, it.po, ro.po, sl.po, sv.po, zh_CN.po and zh_TW.Big5.po (thanks to Sergey Vlasov for reporting this). * Makefile.in.in: added --check option to msgfmt command (thanks to Ricardo Mones Lastra). 2002-10-01 * updated es.po. 2002-09-30 * updated fr.po, ru.po and et.po. 2002-09-27 * updated pl.po. 2002-09-24 * updated pl.po. 2002-09-20 * updated cs.po. 2002-09-19 * updated zh_TW.Big5.po, it.po and de.po. 2002-09-15 * updated es.po. 2002-09-09 * updated es.po and pl.po. 2002-09-03 * updated it.po. 2002-09-02 * updated pl.po and zh_CN.po. 2002-08-30 * updated pl.po and ko.po (thanks to Nam SungHyun). 2002-08-29 * updated zh_TW.Big5.po. 2002-08-28 * updated tr.po. 2002-08-26 * updated es.po and de.po. 2002-08-22 * updated fr.po and pl.po. 2002-08-21 * updated es.po and sv.po. 2002-08-09 * updated de.po and pl.po. 2002-08-06 * updated da.po. 2002-08-02 * updated es.po. 2002-07-31 * updated pl.po. 2002-07-19 * updated zh_TW.Big5.po. 2002-07-17 * updated pl.po and it.po. 2002-07-16 * updated pt_BR.po. 2002-07-15 * updated fr.po. 2002-07-12 * updated de.po. * POTFILES.in: removed src/rfc822.c. 2002-07-10 * updated da.po. 2002-07-08 * updated pl.po. 2002-07-01 * updated cs.po (thanks to Radek Vybiral), da.po, de.po and pl.po. 2002-06-27 * updated da.po. 2002-06-21 * updated pl.po. 2002-06-20 * updated sv.po. 2002-06-19 * updated sv.po. 2002-06-18 * updated de.po and it.po. 2002-06-17 * fixed a mistake in zh_TW.Big5.po that caused a crash. 2002-06-13 * updated pl.po and zh_TW.Big5.po. 2002-06-09 * updated es.po and ru.po. 2002-06-07 * updated pl.po and de.po. 2002-06-06 * updated fr.po, da.po and pt_BR.po. 2002-06-05 * updated pl.po. 2002-06-04 * updated de.po and nl.po. 2002-05-31 * updated pl.po. 2002-05-23 * updated da.po. 2002-05-22 * updated pl.po. 2002-05-20 * updated fr.po. 2002-05-20 * updated pl.po, da.po, and de.po. 2002-05-17 * updated pl.po. 2002-05-15 * added sl.po (thank to Jernej Kovacic). 2002-05-14 * updated pt_BR.po, zh_CN.po, and zh_TW.Big5.po. 2002-05-12 * updated pl.po. 2002-05-10 * updated da.po, pl.po and de.po. 2002-05-09 * updated pl.po. 2002-04-23 * updated it.po and zh_TW.Big5.po. 2002-04-22 * updated pl.po. 2002-04-21 * updated fr.po. 2002-04-18 * updated es.po. 2002-04-16 * updated de.po and da.po. 2002-04-15 * updated de.po and pl.po. 2002-04-11 * updated pl.po, et.po and es.po. 2002-04-09 * updated pl.po. 2002-04-08 * updated pl.po. 2002-03-28 * updated pl.po. 2002-03-26 * updated pl.po. 2002-03-25 * updated da.po and de.po. 2002-03-23 * updated pl.po. 2002-03-21 * updated pl.po. 2002-03-20 * updated pl.po. 2002-03-19 * updated zh_CN.po. 2002-03-18 * updated zh_CN.po. 2002-03-15 * updated zh_CN.po. 2002-03-14 * updated it.po and de.po. 2002-03-13 * updated zh_TW.Big5.po. 2002-03-11 * updated pl.po. 2002-03-09 * updated da.po. 2002-03-08 * updated pt_BR.po. 2002-03-07 * updated pl.po and zh_TW.Big5.po. 2002-03-05 * updated de.po and it.po. 2002-03-03 * updated da.po. 2002-03-02 * updated es.po, ru.po and fr.po. 2002-03-01 * updated pl.po. 2002-02-28 * updated pl.po. 2002-02-27 * updated de.po, and pl.po. 2002-02-25 * added ro.po (thanks to Radu). 2002-02-22 * updated zh_CN.po, and pl.po. 2002-02-21 * updated nl.po, and zh_TW.Big5.po. 2002-02-19 * updated da.po. 2002-02-18 * updated de.po, and pt_BR.po. 2002-02-17 * updated it.po, pl.po, and zh_CN.po. 2002-02-12 * updated es.po. 2002-02-11 * updated pt_BR.po. 2002-02-08 * updated fr.po, pl.po, ru.po, and zh_CN.po. 2002-02-07 * updated pl.po. 2002-02-06 * updated zh_CN.po, pl.po. 2002-02-05 * updated da.po, pl.po. 2002-02-03 * updated pl.po. 2002-01-31 * updated zh_CN.po, pl.po. 2002-01-29 * updated de.po. 2002-01-24 * updated pl.po. 2002-01-23 * updated pl.po. 2002-01-22 * updated zh_CN.po. 2002-01-16 * fixed a typo in ja.po. 2002-01-14 * updated es.po, zh_CN.po, it.po, and de.po. 2002-01-11 * updated fr.po, pt_BR.po, and zh_CN.po. 2002-01-08 * updated zh_TW.Big5.po. 2002-01-07 * updated zh_CN.GB2312.po and renamed it to zh_CN.po (thanks to Wang Jian). 2002-01-02 * updated pl.po, de.po, nl.po. 2001-12-31 * updated pl.po. 2001-12-30 * added da.po (thanks to Andreas Hinz). 2001-12-25 * added tr.po (thanks to Grkem etin). 2001-12-13 * added hu.po (thanks to Krisztian Szekely). * updated hr.po, ru.po. 2001-12-11 * updated pt_BR.po, fr.po, pl.po, es.po, and zh_TW.Big5.po 2001-12-10 * updated hr.po. 2001-12-08 * updated de.po and nl.po. 2001-11-25 * updated de.po, pl.po. 2001-11-19 * updated es.po. 2001-11-14 * updated it.po. 2001-11-12 * updated pl.po and pt_BR.po (thanks to Gustavo Noronha Silva). 2001-11-07 * updated fr.po. 2001-11-07 * updated zh_TW.Big5.po and ru.po. 2001-11-05 * updated de.po. 2001-11-01 * added et.po (thanks to Peeter Vois). 2001-10-25 * updated pl.po. 2001-10-23 * updated de.po. 2001-10-21 * udpated fr.po (thanks to Melvin Hadasht), es.po, hr.po, pl.po, ru.po, it.po, nl.po, zh_TW.Big5.po. 2001-10-18 * updated hr.po. 2001-10-09 * updated zh_TW.Big5.po. 2001-10-08 * added sv.po (thanks to Joakim Andreasson). * updated fr.po (thanks to Alain Vagner), hr.po, zh_TW.Big5.po, it.po, pt_BR.po (thanks to Andre Luis Lopes), el.po, zh_CN.GB2312.po (thanks to Zhangtao), pl.po, and de.po. 2001-09-17 * updated fr.po (thanks to Melvin Hadasht). 2001-09-16 * updated es.po, ru.po, el.po, it.po, hr.po, de.po, zh_TW.Big5.po, and fr.po. 2001-09-02 * added hr.po (thanks to Ante Karamati). * updated es.po, de.po, fr.po (thanks to Lol Zimmerli), pl.po and zh_TW.Big5.po. 2001-08-27 gettextize * Makefile.in.in: Upgrade to gettext-0.10.39. 2001-08-18 * updated zh_TW.Big5.po, it.po, and de.po. 2001-08-14 * updated es.po. 2001-08-07 * updated zh_TW.Big5.po. 2001-08-06 * updated pl.po, it.po, ru.po, and fr.po. 2001-08-01 * updated de.po. 2001-07-30 * updated ru.po. 2001-07-28 * updated nl.po. 2001-07-25 * updated es.po. 2001-07-22 * added pl.po (thanks to Przemyslaw Sulek). * updated it.po. 2001-07-15 * updated pt_BR.po (thanks to Andre Luis Lopes). 2001-07-06 * updated it.po and es.po. 2001-07-03 * updated de.po. 2001-07-02 * modified zh_TW.Big5.po (removed backslash escaping) so that the newer gettext can process it. 2001-07-02 gettextize * Makefile.in.in: Upgrade to gettext-0.10.38. 2001-07-01 * updated nl.po. 2001-06-25 * updated es.po, it.po and nl.po. 2001-06-21 * updated it.po and el.po. 2001-06-20 * updated nl.po and zh_TW.Big5.po. 2001-06-16 * updated de.po, el.po, nl.po, ru.po. 2001-05-01 * updated ru.po, it.po, de.po. 2001-04-20 * updated fr.po (thanks to P'tit Lu). 2001-04-19 * updated es.po (thanks to Ricardo Mones Lastra). 2001-04-17 * updated de.po and zh_TW.Big5.po (thanks to Martin Schaaf and Franklin). 2001-04-01 * added nl.po (thanks to Vincent van Adrighem). 2001-03-29 * added ru.po (thanks to Sergey Vlasov and Aleksey Novodvorsky). 2001-03-25 * added ko.po (thanks to ChiDeok Hwang). 2001-03-20 * added it.po (thanks to Danilo Bodei). 2001-03-12 * updated de.po and zh_TW.Big5.po. 2001-02-03 * updated fr.po (thanks to Sbastien Rodriguez). 2001-01-30 * added el.po (thanks to Michalis Kabrianis). 2001-01-13 * added zh_TW.Big5.po (thanks to Franklin). 2000-12-23 * updated zh_CN.GB2312.po. 2000-12-17 * updated de.po, es.po, and pt_BR.po. 2000-12-07 * added pt_BR.po (thanks to Andr Casteliano). 2000-11-29 * added cs.po (thanks to Jan Mura). 2000-11-18 * added zh_CN.GB2312.po (thanks to Xiangxin Luo). 2000-10-21 * added de.po (thanks to Martin Schaaf). 2000-10-11 * added es.po (thanks to Ricardo Mones Lastra). 2000-08-28 * fr.po: added appropriate copyright notice. 2000-08-27 * added fr.po (thanks to Paul Rolland for translation). 2000-07-30 * added this file for `make dist'. libsylph-1.1.0/po/Makefile.in.in0000644000175000017500000001641710457702566013375 00000000000000# Makefile for program source directory in GNU NLS utilities package. # Copyright (C) 1995, 1996, 1997 by Ulrich Drepper # # This file file be copied and used freely without restrictions. It can # be used in projects which are not available under the GNU Public License # but which still want to provide support for the GNU gettext functionality. # Please note that the actual code is *not* freely available. # # - Modified by Owen Taylor to use GETTEXT_PACKAGE # instead of PACKAGE and to look for po2tbl in ./ not in intl/ # # - Modified by jacob berkman to install # Makefile.in.in and po2tbl.sed.in for use with glib-gettextize GETTEXT_PACKAGE = @GETTEXT_PACKAGE@ PACKAGE = @PACKAGE@ VERSION = @VERSION@ SHELL = /bin/sh @SET_MAKE@ srcdir = @srcdir@ top_srcdir = @top_srcdir@ VPATH = @srcdir@ prefix = @prefix@ exec_prefix = @exec_prefix@ datadir = @datadir@ libdir = @libdir@ localedir = $(libdir)/locale gnulocaledir = $(datadir)/locale gettextsrcdir = $(datadir)/glib-2.0/gettext/po subdir = po INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@ CC = @CC@ GENCAT = @GENCAT@ GMSGFMT = @GMSGFMT@ MSGFMT = @MSGFMT@ XGETTEXT = @XGETTEXT@ MSGMERGE = msgmerge DEFS = @DEFS@ CFLAGS = @CFLAGS@ CPPFLAGS = @CPPFLAGS@ INCLUDES = -I.. -I$(top_srcdir)/intl COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) SOURCES = POFILES = @POFILES@ GMOFILES = @GMOFILES@ DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(GETTEXT_PACKAGE).pot \ $(POFILES) $(GMOFILES) $(SOURCES) POTFILES = \ CATALOGS = @CATALOGS@ CATOBJEXT = @CATOBJEXT@ INSTOBJEXT = @INSTOBJEXT@ .SUFFIXES: .SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat .c.o: $(COMPILE) $< .po.pox: $(MAKE) $(GETTEXT_PACKAGE).pot $(MSGMERGE) $< $(srcdir)/$(GETTEXT_PACKAGE).pot -o $*.pox .po.mo: $(MSGFMT) -c -o $@ $< .po.gmo: file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \ && rm -f $$file && $(GMSGFMT) -c --statistics -o $$file $< .po.cat: sed -f ../intl/po2msg.sed < $< > $*.msg \ && rm -f $@ && $(GENCAT) $@ $*.msg all: all-@USE_NLS@ all-yes: $(CATALOGS) all-no: $(srcdir)/$(GETTEXT_PACKAGE).pot: $(POTFILES) $(XGETTEXT) --default-domain=$(GETTEXT_PACKAGE) --directory=$(top_srcdir) \ --add-comments --keyword=_ --keyword=N_ \ --files-from=$(srcdir)/POTFILES.in \ && test ! -f $(GETTEXT_PACKAGE).po \ || ( rm -f $(srcdir)/$(GETTEXT_PACKAGE).pot \ && mv $(GETTEXT_PACKAGE).po $(srcdir)/$(GETTEXT_PACKAGE).pot ) install: install-exec install-data install-exec: install-data: install-data-@USE_NLS@ install-data-no: all install-data-yes: all if test -r "$(MKINSTALLDIRS)"; then \ $(MKINSTALLDIRS) $(DESTDIR)$(datadir); \ else \ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \ fi @catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ case "$$cat" in \ *.gmo) destdir=$(gnulocaledir);; \ *) destdir=$(localedir);; \ esac; \ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ dir=$(DESTDIR)$$destdir/$$lang/LC_MESSAGES; \ if test -r "$(MKINSTALLDIRS)"; then \ $(MKINSTALLDIRS) $$dir; \ else \ $(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \ fi; \ if test -r $$cat; then \ $(INSTALL_DATA) $$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ echo "installing $$cat as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \ else \ $(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ echo "installing $(srcdir)/$$cat as" \ "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT)"; \ fi; \ if test -r $$cat.m; then \ $(INSTALL_DATA) $$cat.m $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ echo "installing $$cat.m as $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \ else \ if test -r $(srcdir)/$$cat.m ; then \ $(INSTALL_DATA) $(srcdir)/$$cat.m \ $$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ echo "installing $(srcdir)/$$cat as" \ "$$dir/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m"; \ else \ true; \ fi; \ fi; \ done if test "$(PACKAGE)" = "glib"; then \ if test -r "$(MKINSTALLDIRS)"; then \ $(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \ else \ $(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \ fi; \ $(INSTALL_DATA) $(srcdir)/Makefile.in.in \ $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \ else \ : ; \ fi # Define this as empty until I found a useful application. installcheck: uninstall: catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \ rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \ done if test "$(PACKAGE)" = "glib"; then \ rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \ fi check: all dvi info tags TAGS ID: mostlyclean: rm -f core core.* *.pox $(GETTEXT_PACKAGE).po *.old.po cat-id-tbl.tmp rm -fr *.o clean: mostlyclean distclean: clean rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m maintainer-clean: distclean @echo "This command is intended for maintainers to use;" @echo "it deletes files that may require special tools to rebuild." rm -f $(GMOFILES) distdir = ../$(GETTEXT_PACKAGE)-$(VERSION)/$(subdir) dist distdir: update-po $(DISTFILES) dists="$(DISTFILES)"; \ for file in $$dists; do \ ln $(srcdir)/$$file $(distdir) 2> /dev/null \ || cp -p $(srcdir)/$$file $(distdir); \ done update-po: Makefile $(MAKE) $(GETTEXT_PACKAGE).pot tmpdir=`pwd`; \ cd $(srcdir); \ catalogs='$(CATALOGS)'; \ for cat in $$catalogs; do \ cat=`basename $$cat`; \ lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \ echo "$$lang:"; \ if $(MSGMERGE) $$lang.po $(GETTEXT_PACKAGE).pot -o $$tmpdir/$$lang.new.po; then \ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \ rm -f $$tmpdir/$$lang.new.po; \ else \ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \ :; \ else \ echo "msgmerge for $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \ rm -f $$tmpdir/$$lang.new.po; \ exit 1; \ fi; \ fi; \ else \ echo "msgmerge for $$cat failed!"; \ rm -f $$tmpdir/$$lang.new.po; \ fi; \ done # POTFILES is created from POTFILES.in by stripping comments, empty lines # and Intltool tags (enclosed in square brackets), and appending a full # relative path to them POTFILES: POTFILES.in ( if test 'x$(srcdir)' != 'x.'; then \ posrcprefix='$(top_srcdir)/'; \ else \ posrcprefix="../"; \ fi; \ rm -f $@-t $@ \ && (sed -e '/^#/d' \ -e "s/^\[.*\] +//" \ -e '/^[ ]*$$/d' \ -e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \ | sed -e '$$s/\\$$//') > $@-t \ && chmod a-w $@-t \ && mv $@-t $@ ) Makefile: Makefile.in.in ../config.status POTFILES cd .. \ && CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \ $(SHELL) ./config.status # Tell versions [3.59,3.63) of GNU make not to export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: libsylph-1.1.0/po/POTFILES.in0000644000175000017500000000100610466303260012450 00000000000000libsylph/account.c libsylph/base64.c libsylph/codeconv.c libsylph/filter.c libsylph/folder.c libsylph/imap.c libsylph/mbox.c libsylph/mh.c libsylph/news.c libsylph/nntp.c libsylph/pop.c libsylph/prefs.c libsylph/prefs_account.c libsylph/prefs_common.c libsylph/procheader.c libsylph/procmime.c libsylph/procmsg.c libsylph/quoted-printable.c libsylph/recv.c libsylph/session.c libsylph/smtp.c libsylph/socket.c libsylph/ssl.c libsylph/stringtable.c libsylph/unmime.c libsylph/utils.c libsylph/uuencode.c libsylph/xml.c libsylph-1.1.0/po/libsylph.pot0000644000175000017500000002560010756432604013262 00000000000000# SOME DESCRIPTIVE TITLE. # Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the PACKAGE package. # FIRST AUTHOR , YEAR. # #, fuzzy msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-02-19 10:48+0900\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=CHARSET\n" "Content-Transfer-Encoding: 8bit\n" #: libsylph/account.c:56 msgid "Reading all config for each account...\n" msgstr "" #: libsylph/imap.c:465 #, c-format msgid "IMAP4 connection to %s has been disconnected. Reconnecting...\n" msgstr "" #: libsylph/imap.c:520 libsylph/imap.c:526 msgid "IMAP4 server disables LOGIN.\n" msgstr "" #: libsylph/imap.c:602 #, c-format msgid "creating IMAP4 connection to %s:%d ...\n" msgstr "" #: libsylph/imap.c:646 msgid "Can't start TLS session.\n" msgstr "" #: libsylph/imap.c:1120 #, c-format msgid "Getting message %d" msgstr "" #: libsylph/imap.c:1236 #, c-format msgid "Appending messages to %s (%d / %d)" msgstr "" #: libsylph/imap.c:1328 #, c-format msgid "Moving messages %s to %s ..." msgstr "" #: libsylph/imap.c:1334 #, c-format msgid "Copying messages %s to %s ..." msgstr "" #: libsylph/imap.c:1473 #, c-format msgid "Removing messages %s" msgstr "" #: libsylph/imap.c:1479 #, c-format msgid "can't set deleted flags: %s\n" msgstr "" #: libsylph/imap.c:1487 libsylph/imap.c:1582 msgid "can't expunge\n" msgstr "" #: libsylph/imap.c:1570 #, c-format msgid "Removing all messages in %s" msgstr "" #: libsylph/imap.c:1576 msgid "can't set deleted flags: 1:*\n" msgstr "" #: libsylph/imap.c:1624 msgid "can't close folder\n" msgstr "" #: libsylph/imap.c:1702 #, c-format msgid "root folder %s not exist\n" msgstr "" #: libsylph/imap.c:1891 libsylph/imap.c:1899 msgid "error occurred while getting LIST.\n" msgstr "" #: libsylph/imap.c:2013 #, c-format msgid "Can't create '%s'\n" msgstr "" #: libsylph/imap.c:2018 #, c-format msgid "Can't create '%s' under INBOX\n" msgstr "" #: libsylph/imap.c:2079 msgid "can't create mailbox: LIST failed\n" msgstr "" #: libsylph/imap.c:2099 msgid "can't create mailbox\n" msgstr "" #: libsylph/imap.c:2203 #, c-format msgid "can't rename mailbox: %s to %s\n" msgstr "" #: libsylph/imap.c:2283 msgid "can't delete mailbox\n" msgstr "" #: libsylph/imap.c:2327 msgid "can't get envelope\n" msgstr "" #: libsylph/imap.c:2340 #, c-format msgid "Getting message headers (%d / %d)" msgstr "" #: libsylph/imap.c:2350 msgid "error occurred while getting envelope.\n" msgstr "" #: libsylph/imap.c:2372 #, c-format msgid "can't parse envelope: %s\n" msgstr "" #: libsylph/imap.c:2496 #, c-format msgid "Can't connect to IMAP4 server: %s:%d\n" msgstr "" #: libsylph/imap.c:2503 #, c-format msgid "Can't establish IMAP4 session with: %s:%d\n" msgstr "" #: libsylph/imap.c:2578 msgid "can't get namespace\n" msgstr "" #: libsylph/imap.c:3111 #, c-format msgid "can't select folder: %s\n" msgstr "" #: libsylph/imap.c:3146 msgid "error on imap command: STATUS\n" msgstr "" #: libsylph/imap.c:3269 libsylph/imap.c:3304 msgid "IMAP4 authentication failed.\n" msgstr "" #: libsylph/imap.c:3353 msgid "IMAP4 login failed.\n" msgstr "" #: libsylph/imap.c:3689 #, c-format msgid "can't append %s to %s\n" msgstr "" #: libsylph/imap.c:3696 msgid "(sending file...)" msgstr "" #: libsylph/imap.c:3725 #, c-format msgid "can't append message to %s\n" msgstr "" #: libsylph/imap.c:3757 #, c-format msgid "can't copy %s to %s\n" msgstr "" #: libsylph/imap.c:3781 #, c-format msgid "error while imap command: STORE %s %s\n" msgstr "" #: libsylph/imap.c:3795 msgid "error while imap command: EXPUNGE\n" msgstr "" #: libsylph/imap.c:3808 msgid "error while imap command: CLOSE\n" msgstr "" #: libsylph/imap.c:4084 #, c-format msgid "iconv cannot convert UTF-7 to %s\n" msgstr "" #: libsylph/imap.c:4114 #, c-format msgid "iconv cannot convert %s to UTF-7\n" msgstr "" #: libsylph/mbox.c:50 libsylph/mbox.c:196 msgid "can't write to temporary file\n" msgstr "" #: libsylph/mbox.c:69 #, c-format msgid "Getting messages from %s into %s...\n" msgstr "" #: libsylph/mbox.c:79 msgid "can't read mbox file.\n" msgstr "" #: libsylph/mbox.c:86 #, c-format msgid "invalid mbox format: %s\n" msgstr "" #: libsylph/mbox.c:93 #, c-format msgid "malformed mbox: %s\n" msgstr "" #: libsylph/mbox.c:110 msgid "can't open temporary file\n" msgstr "" #: libsylph/mbox.c:161 #, c-format msgid "" "unescaped From found:\n" "%s" msgstr "" #: libsylph/mbox.c:250 #, c-format msgid "%d messages found.\n" msgstr "" #: libsylph/mbox.c:268 #, c-format msgid "can't create lock file %s\n" msgstr "" #: libsylph/mbox.c:269 msgid "use 'flock' instead of 'file' if possible.\n" msgstr "" #: libsylph/mbox.c:281 #, c-format msgid "can't create %s\n" msgstr "" #: libsylph/mbox.c:287 msgid "mailbox is owned by another process, waiting...\n" msgstr "" #: libsylph/mbox.c:316 #, c-format msgid "can't lock %s\n" msgstr "" #: libsylph/mbox.c:323 libsylph/mbox.c:373 msgid "invalid lock type\n" msgstr "" #: libsylph/mbox.c:359 #, c-format msgid "can't unlock %s\n" msgstr "" #: libsylph/mbox.c:394 msgid "can't truncate mailbox to zero.\n" msgstr "" #: libsylph/mbox.c:418 #, c-format msgid "Exporting messages from %s into %s...\n" msgstr "" #: libsylph/mh.c:427 #, c-format msgid "can't copy message %s to %s\n" msgstr "" #: libsylph/mh.c:502 libsylph/mh.c:625 msgid "Can't open mark file.\n" msgstr "" #: libsylph/mh.c:509 libsylph/mh.c:631 msgid "the src folder is identical to the dest.\n" msgstr "" #: libsylph/mh.c:634 #, c-format msgid "Copying message %s%c%d to %s ...\n" msgstr "" #: libsylph/mh.c:965 libsylph/mh.c:978 #, c-format msgid "" "File `%s' already exists.\n" "Can't create folder." msgstr "" #: libsylph/mh.c:1500 #, c-format msgid "" "Directory name\n" "'%s' is not a valid UTF-8 string.\n" "Maybe the locale encoding is used for filename.\n" "If that is the case, you must set the following environmental variable\n" "(see README for detail):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" msgstr "" #: libsylph/news.c:207 #, c-format msgid "creating NNTP connection to %s:%d ...\n" msgstr "" #: libsylph/news.c:276 #, c-format msgid "NNTP connection to %s:%d has been disconnected. Reconnecting...\n" msgstr "" #: libsylph/news.c:377 #, c-format msgid "article %d has been already cached.\n" msgstr "" #: libsylph/news.c:397 #, c-format msgid "getting article %d...\n" msgstr "" #: libsylph/news.c:401 #, c-format msgid "can't read article %d\n" msgstr "" #: libsylph/news.c:676 msgid "can't post article.\n" msgstr "" #: libsylph/news.c:702 #, c-format msgid "can't retrieve article %d\n" msgstr "" #: libsylph/news.c:759 #, c-format msgid "can't select group: %s\n" msgstr "" #: libsylph/news.c:796 #, c-format msgid "invalid article range: %d - %d\n" msgstr "" #: libsylph/news.c:809 msgid "no new articles.\n" msgstr "" #: libsylph/news.c:819 #, c-format msgid "getting xover %d - %d in %s...\n" msgstr "" #: libsylph/news.c:823 msgid "can't get xover\n" msgstr "" #: libsylph/news.c:833 msgid "error occurred while getting xover.\n" msgstr "" #: libsylph/news.c:843 #, c-format msgid "invalid xover line: %s\n" msgstr "" #: libsylph/news.c:862 libsylph/news.c:894 msgid "can't get xhdr\n" msgstr "" #: libsylph/news.c:874 libsylph/news.c:906 msgid "error occurred while getting xhdr.\n" msgstr "" #: libsylph/nntp.c:68 #, c-format msgid "Can't connect to NNTP server: %s:%d\n" msgstr "" #: libsylph/nntp.c:164 libsylph/nntp.c:227 #, c-format msgid "protocol error: %s\n" msgstr "" #: libsylph/nntp.c:187 libsylph/nntp.c:233 msgid "protocol error\n" msgstr "" #: libsylph/nntp.c:283 msgid "Error occurred while posting\n" msgstr "" #: libsylph/nntp.c:363 msgid "Error occurred while sending command\n" msgstr "" #: libsylph/pop.c:155 msgid "Required APOP timestamp not found in greeting\n" msgstr "" #: libsylph/pop.c:162 msgid "Timestamp syntax error in greeting\n" msgstr "" #: libsylph/pop.c:170 msgid "Invalid timestamp in greeting\n" msgstr "" #: libsylph/pop.c:198 libsylph/pop.c:225 msgid "POP3 protocol error\n" msgstr "" #: libsylph/pop.c:270 #, c-format msgid "invalid UIDL response: %s\n" msgstr "" #: libsylph/pop.c:631 #, c-format msgid "POP3: Deleting expired message %d\n" msgstr "" #: libsylph/pop.c:640 #, c-format msgid "POP3: Skipping message %d (%d bytes)\n" msgstr "" #: libsylph/pop.c:673 msgid "mailbox is locked\n" msgstr "" #: libsylph/pop.c:676 msgid "session timeout\n" msgstr "" #: libsylph/pop.c:682 libsylph/smtp.c:561 msgid "can't start TLS session\n" msgstr "" #: libsylph/pop.c:689 libsylph/smtp.c:496 msgid "error occurred on authentication\n" msgstr "" #: libsylph/pop.c:694 msgid "command not supported\n" msgstr "" #: libsylph/pop.c:698 msgid "error occurred on POP3 session\n" msgstr "" #: libsylph/prefs.c:196 libsylph/prefs.c:224 libsylph/prefs.c:269 #: libsylph/prefs_account.c:217 libsylph/prefs_account.c:231 msgid "failed to write configuration to file\n" msgstr "" #: libsylph/prefs.c:239 #, c-format msgid "Found %s\n" msgstr "" #: libsylph/prefs.c:272 msgid "Configuration is saved.\n" msgstr "" #: libsylph/prefs_common.c:503 msgid "Junk mail filter (manual)" msgstr "" #: libsylph/prefs_common.c:506 msgid "Junk mail filter" msgstr "" #: libsylph/procmime.c:1142 msgid "procmime_get_text_content(): Code conversion failed.\n" msgstr "" #: libsylph/procmsg.c:655 msgid "can't open mark file\n" msgstr "" #: libsylph/procmsg.c:1107 #, c-format msgid "can't fetch message %d\n" msgstr "" #: libsylph/procmsg.c:1423 #, c-format msgid "Print command line is invalid: `%s'\n" msgstr "" #: libsylph/recv.c:141 msgid "error occurred while retrieving data.\n" msgstr "" #: libsylph/recv.c:183 libsylph/recv.c:215 libsylph/recv.c:230 msgid "Can't write to file.\n" msgstr "" #: libsylph/smtp.c:157 msgid "SMTP AUTH not available\n" msgstr "" #: libsylph/smtp.c:466 libsylph/smtp.c:516 msgid "bad SMTP response\n" msgstr "" #: libsylph/smtp.c:487 libsylph/smtp.c:505 libsylph/smtp.c:602 msgid "error occurred on SMTP session\n" msgstr "" #: libsylph/ssl.c:54 msgid "SSLv23 not available\n" msgstr "" #: libsylph/ssl.c:56 msgid "SSLv23 available\n" msgstr "" #: libsylph/ssl.c:65 msgid "TLSv1 not available\n" msgstr "" #: libsylph/ssl.c:67 msgid "TLSv1 available\n" msgstr "" #: libsylph/ssl.c:101 libsylph/ssl.c:108 msgid "SSL method not available\n" msgstr "" #: libsylph/ssl.c:114 msgid "Unknown SSL method *PROGRAM BUG*\n" msgstr "" #: libsylph/ssl.c:120 msgid "Error creating ssl context\n" msgstr "" #. Get the cipher #: libsylph/ssl.c:139 #, c-format msgid "SSL connection using %s\n" msgstr "" #: libsylph/ssl.c:148 msgid "Server certificate:\n" msgstr "" #: libsylph/ssl.c:151 #, c-format msgid " Subject: %s\n" msgstr "" #: libsylph/ssl.c:156 #, c-format msgid " Issuer: %s\n" msgstr "" #: libsylph/utils.c:2682 libsylph/utils.c:2804 #, c-format msgid "writing to %s failed.\n" msgstr "" libsylph-1.1.0/po/bg.po0000644000175000017500000004360410756432604011644 00000000000000# Sylpheed bulgarian translation # Copyright (C) 2003 THE PACKAGE'S COPYRIGHT HOLDER # This file is distributed under the same license as the Sylpheed package. # Pavel Pyuter , 2003. # # msgid "" msgstr "" "Project-Id-Version: Sylpheed 0.9.8\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-02-19 10:48+0900\n" "PO-Revision-Date: 2004-01-09 02:06+0200\n" "Last-Translator: Pavel Pyuter \n" "Language-Team: Bulgarian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: libsylph/account.c:56 msgid "Reading all config for each account...\n" msgstr "Четене на конфигурация за всеки акаунт...\n" #: libsylph/imap.c:465 #, c-format msgid "IMAP4 connection to %s has been disconnected. Reconnecting...\n" msgstr "IMAP4 връзката до %s се разпадна. Свързване...\n" #: libsylph/imap.c:520 libsylph/imap.c:526 #, fuzzy msgid "IMAP4 server disables LOGIN.\n" msgstr "IMAP директория на сървъра" #: libsylph/imap.c:602 #, c-format msgid "creating IMAP4 connection to %s:%d ...\n" msgstr "създаване на IMAP4 връзка до %s:%d ...\n" #: libsylph/imap.c:646 msgid "Can't start TLS session.\n" msgstr "Не може да се стартира TLS сесия.\n" #: libsylph/imap.c:1120 #, fuzzy, c-format msgid "Getting message %d" msgstr "Изтриване на съобщение %d" #: libsylph/imap.c:1236 #, fuzzy, c-format msgid "Appending messages to %s (%d / %d)" msgstr "Изпращане на съобщение (%d / %d байта)" #: libsylph/imap.c:1328 #, fuzzy, c-format msgid "Moving messages %s to %s ..." msgstr "Копиране на съобщение %s%c%d във %s ...\n" #: libsylph/imap.c:1334 #, fuzzy, c-format msgid "Copying messages %s to %s ..." msgstr "Копиране на съобщение %s%c%d във %s ...\n" #: libsylph/imap.c:1473 #, fuzzy, c-format msgid "Removing messages %s" msgstr "Получаване на съобщения от %s..." #: libsylph/imap.c:1479 #, c-format msgid "can't set deleted flags: %s\n" msgstr "не могат да се установят изтрити флагове: %s\n" #: libsylph/imap.c:1487 libsylph/imap.c:1582 msgid "can't expunge\n" msgstr "не може да се заличи\n" #: libsylph/imap.c:1570 #, fuzzy, c-format msgid "Removing all messages in %s" msgstr "Получаване на съобщения от %s..." #: libsylph/imap.c:1576 msgid "can't set deleted flags: 1:*\n" msgstr "не могат да се установят изтрити флагове: 1:*\n" #: libsylph/imap.c:1624 msgid "can't close folder\n" msgstr "не може да затвори папка\n" #: libsylph/imap.c:1702 #, c-format msgid "root folder %s not exist\n" msgstr "коренната папка %s не съществува\n" #: libsylph/imap.c:1891 libsylph/imap.c:1899 msgid "error occurred while getting LIST.\n" msgstr "грешка при получаване на LIST.\n" #: libsylph/imap.c:2013 #, c-format msgid "Can't create '%s'\n" msgstr "Не може да се създаде '%s'\n" #: libsylph/imap.c:2018 #, c-format msgid "Can't create '%s' under INBOX\n" msgstr "Не може да се създаде '%s' под Входящи\n" #: libsylph/imap.c:2079 msgid "can't create mailbox: LIST failed\n" msgstr "Не може да се създаде пощенска кутия: LIST се провали\n" #: libsylph/imap.c:2099 msgid "can't create mailbox\n" msgstr "Не може да се създаде пощенска кутия\n" #: libsylph/imap.c:2203 #, c-format msgid "can't rename mailbox: %s to %s\n" msgstr "Не може да се преименува пощенска кутия: %s до %s\n" #: libsylph/imap.c:2283 msgid "can't delete mailbox\n" msgstr "Не може да се изтрие пощенска кутия\n" #: libsylph/imap.c:2327 msgid "can't get envelope\n" msgstr "не може да се вземе envelope\n" #: libsylph/imap.c:2340 #, fuzzy, c-format msgid "Getting message headers (%d / %d)" msgstr "Изпращане на съобщение (%d / %d байта)" #: libsylph/imap.c:2350 msgid "error occurred while getting envelope.\n" msgstr "грешка при вземане на envelope.\n" #: libsylph/imap.c:2372 #, c-format msgid "can't parse envelope: %s\n" msgstr "не може да се анализира envelope: %s\n" #: libsylph/imap.c:2496 #, c-format msgid "Can't connect to IMAP4 server: %s:%d\n" msgstr "Не може да се установи връзка с IMAP4 сървър: %s:%d\n" #: libsylph/imap.c:2503 #, c-format msgid "Can't establish IMAP4 session with: %s:%d\n" msgstr "Не може да се установи IMAP4 сесия с: %s:%d\n" #: libsylph/imap.c:2578 msgid "can't get namespace\n" msgstr "не може да се получи пространството от имена\n" #: libsylph/imap.c:3111 #, c-format msgid "can't select folder: %s\n" msgstr "не може да се избере папка: %s\n" #: libsylph/imap.c:3146 #, fuzzy msgid "error on imap command: STATUS\n" msgstr "грешка при imap команда: CLOSE\n" #: libsylph/imap.c:3269 libsylph/imap.c:3304 msgid "IMAP4 authentication failed.\n" msgstr "IMAP4 удостоверяване провалено.\n" #: libsylph/imap.c:3353 msgid "IMAP4 login failed.\n" msgstr "IMAP4 влизане провалено.\n" #: libsylph/imap.c:3689 #, c-format msgid "can't append %s to %s\n" msgstr "не може да се прибави %s към %s\n" #: libsylph/imap.c:3696 msgid "(sending file...)" msgstr "(изпращане на файл...)" #: libsylph/imap.c:3725 #, c-format msgid "can't append message to %s\n" msgstr "съобщението не може да се прибави към %s\n" #: libsylph/imap.c:3757 #, c-format msgid "can't copy %s to %s\n" msgstr "не може да се копира %s в %s\n" #: libsylph/imap.c:3781 #, c-format msgid "error while imap command: STORE %s %s\n" msgstr "грешка при imap команда: STORE %s %s\n" #: libsylph/imap.c:3795 msgid "error while imap command: EXPUNGE\n" msgstr "грешка при imap команда: EXPUNGE\n" #: libsylph/imap.c:3808 msgid "error while imap command: CLOSE\n" msgstr "грешка при imap команда: CLOSE\n" #: libsylph/imap.c:4084 #, c-format msgid "iconv cannot convert UTF-7 to %s\n" msgstr "iconv не може да преобразува UTF-7 до %s\n" #: libsylph/imap.c:4114 #, c-format msgid "iconv cannot convert %s to UTF-7\n" msgstr "iconv не може да преобразува %s до UTF-7\n" #: libsylph/mbox.c:50 libsylph/mbox.c:196 msgid "can't write to temporary file\n" msgstr "не може да се запише във временен файл\n" #: libsylph/mbox.c:69 #, c-format msgid "Getting messages from %s into %s...\n" msgstr "Получаване на съобщения от %s във %s...\n" #: libsylph/mbox.c:79 msgid "can't read mbox file.\n" msgstr "не може да се прочете mbox файл.\n" #: libsylph/mbox.c:86 #, c-format msgid "invalid mbox format: %s\n" msgstr "невалиден mbox формат: %s\n" #: libsylph/mbox.c:93 #, c-format msgid "malformed mbox: %s\n" msgstr "деформиран mbox: %s\n" #: libsylph/mbox.c:110 msgid "can't open temporary file\n" msgstr "не може да се отвори временен файл\n" #: libsylph/mbox.c:161 #, c-format msgid "" "unescaped From found:\n" "%s" msgstr "" #: libsylph/mbox.c:250 #, c-format msgid "%d messages found.\n" msgstr "%d намерени съобщения.\n" #: libsylph/mbox.c:268 #, c-format msgid "can't create lock file %s\n" msgstr "не може да се създаде заключващ файл %s\n" #: libsylph/mbox.c:269 msgid "use 'flock' instead of 'file' if possible.\n" msgstr "използвайте 'flock' вместо 'file' ако е възможно.\n" #: libsylph/mbox.c:281 #, c-format msgid "can't create %s\n" msgstr "не може да се създаде %s\n" #: libsylph/mbox.c:287 msgid "mailbox is owned by another process, waiting...\n" msgstr "кутията се притежава от друг процес, изчакване...\n" #: libsylph/mbox.c:316 #, c-format msgid "can't lock %s\n" msgstr "не може да се заключи %s\n" #: libsylph/mbox.c:323 libsylph/mbox.c:373 msgid "invalid lock type\n" msgstr "невалиден тип заключване\n" #: libsylph/mbox.c:359 #, c-format msgid "can't unlock %s\n" msgstr "не може да се отключи %s\n" #: libsylph/mbox.c:394 msgid "can't truncate mailbox to zero.\n" msgstr "пощенската кутия не може да се съкрати до нула.\n" #: libsylph/mbox.c:418 #, c-format msgid "Exporting messages from %s into %s...\n" msgstr "Изнасяне на съобщения от %s във %s...\n" #: libsylph/mh.c:427 #, c-format msgid "can't copy message %s to %s\n" msgstr "не може да се копира съобщението %s във %s\n" #: libsylph/mh.c:502 libsylph/mh.c:625 msgid "Can't open mark file.\n" msgstr "Не може да се отвори файлът с маркировките.\n" #: libsylph/mh.c:509 libsylph/mh.c:631 msgid "the src folder is identical to the dest.\n" msgstr "изходната папка е еднаква с назначението.\n" #: libsylph/mh.c:634 #, c-format msgid "Copying message %s%c%d to %s ...\n" msgstr "Копиране на съобщение %s%c%d във %s ...\n" #: libsylph/mh.c:965 libsylph/mh.c:978 #, c-format msgid "" "File `%s' already exists.\n" "Can't create folder." msgstr "" "Файлът `%s' вече съществува.\n" "Папката не може да се създаде." #: libsylph/mh.c:1500 #, c-format msgid "" "Directory name\n" "'%s' is not a valid UTF-8 string.\n" "Maybe the locale encoding is used for filename.\n" "If that is the case, you must set the following environmental variable\n" "(see README for detail):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" msgstr "" #: libsylph/news.c:207 #, c-format msgid "creating NNTP connection to %s:%d ...\n" msgstr "създаване на NNTP връзка до %s:%d ...\n" #: libsylph/news.c:276 #, c-format msgid "NNTP connection to %s:%d has been disconnected. Reconnecting...\n" msgstr "NNTP връзката до %s:%d беше прекъсната. Свързване...\n" #: libsylph/news.c:377 #, c-format msgid "article %d has been already cached.\n" msgstr "статия %d е вече кеширана.\n" #: libsylph/news.c:397 #, c-format msgid "getting article %d...\n" msgstr "взимане на статия %d...\n" #: libsylph/news.c:401 #, c-format msgid "can't read article %d\n" msgstr "не може да се прочете статия %d\n" #: libsylph/news.c:676 msgid "can't post article.\n" msgstr "не може да се публикува статия.\n" #: libsylph/news.c:702 #, c-format msgid "can't retrieve article %d\n" msgstr "не може да се извлече статия %d\n" #: libsylph/news.c:759 #, fuzzy, c-format msgid "can't select group: %s\n" msgstr "не може да се избере група %s\n" #: libsylph/news.c:796 #, fuzzy, c-format msgid "invalid article range: %d - %d\n" msgstr "Невалиден обхват на статии: %d - %d\n" #: libsylph/news.c:809 msgid "no new articles.\n" msgstr "няма нови статии.\n" #: libsylph/news.c:819 #, c-format msgid "getting xover %d - %d in %s...\n" msgstr "получаване на xover %d - %d в %s...\n" #: libsylph/news.c:823 msgid "can't get xover\n" msgstr "не може да се получи xover\n" #: libsylph/news.c:833 msgid "error occurred while getting xover.\n" msgstr "грешка при получаването на xover.\n" #: libsylph/news.c:843 #, c-format msgid "invalid xover line: %s\n" msgstr "невалиден xover ред: %s\n" #: libsylph/news.c:862 libsylph/news.c:894 msgid "can't get xhdr\n" msgstr "не може да се получи xhdr\n" #: libsylph/news.c:874 libsylph/news.c:906 msgid "error occurred while getting xhdr.\n" msgstr "грешка при получаването на xhdr.\n" #: libsylph/nntp.c:68 #, c-format msgid "Can't connect to NNTP server: %s:%d\n" msgstr "Не може да се установи връзка с NNTP сървър: %s:%d\n" #: libsylph/nntp.c:164 libsylph/nntp.c:227 #, c-format msgid "protocol error: %s\n" msgstr "протоколна грешка: %s\n" #: libsylph/nntp.c:187 libsylph/nntp.c:233 msgid "protocol error\n" msgstr "протоколна грешка\n" #: libsylph/nntp.c:283 msgid "Error occurred while posting\n" msgstr "Появи се грешка при публикуване\n" #: libsylph/nntp.c:363 #, fuzzy msgid "Error occurred while sending command\n" msgstr "Появи се грешка изпращане на съобщението." #: libsylph/pop.c:155 msgid "Required APOP timestamp not found in greeting\n" msgstr "Не е намерен необходим APOP времеви отпечатък в поздрава\n" #: libsylph/pop.c:162 msgid "Timestamp syntax error in greeting\n" msgstr "Синтактична грешка във времевия отпечатък в поздрава\n" #: libsylph/pop.c:170 #, fuzzy msgid "Invalid timestamp in greeting\n" msgstr "Не е намерен необходим APOP времеви отпечатък в поздрава\n" #: libsylph/pop.c:198 libsylph/pop.c:225 msgid "POP3 protocol error\n" msgstr "POP3 протоколна грешка\n" #: libsylph/pop.c:270 #, fuzzy, c-format msgid "invalid UIDL response: %s\n" msgstr "невалиден xover ред: %s\n" #: libsylph/pop.c:631 #, c-format msgid "POP3: Deleting expired message %d\n" msgstr "POP3: Изтриване на съобщениe с изтекъл срок %d\n" #: libsylph/pop.c:640 #, c-format msgid "POP3: Skipping message %d (%d bytes)\n" msgstr "POP3: Прескачане на съобщение %d (%d байта)\n" #: libsylph/pop.c:673 msgid "mailbox is locked\n" msgstr "пощенската кутия е заключена\n" #: libsylph/pop.c:676 msgid "session timeout\n" msgstr "сесията е просрочена\n" #: libsylph/pop.c:682 libsylph/smtp.c:561 msgid "can't start TLS session\n" msgstr "не може да се стартира TLS сесия\n" #: libsylph/pop.c:689 libsylph/smtp.c:496 msgid "error occurred on authentication\n" msgstr "грешка при удостоверяване\n" #: libsylph/pop.c:694 msgid "command not supported\n" msgstr "командата не се поддържа\n" #: libsylph/pop.c:698 msgid "error occurred on POP3 session\n" msgstr "грешка при POP3 сесията\n" #: libsylph/prefs.c:196 libsylph/prefs.c:224 libsylph/prefs.c:269 #: libsylph/prefs_account.c:217 libsylph/prefs_account.c:231 msgid "failed to write configuration to file\n" msgstr "неуспешно записване на настройките във файл\n" #: libsylph/prefs.c:239 #, c-format msgid "Found %s\n" msgstr "Намерени %s\n" #: libsylph/prefs.c:272 msgid "Configuration is saved.\n" msgstr "Настройките са запазени.\n" #: libsylph/prefs_common.c:503 #, fuzzy msgid "Junk mail filter (manual)" msgstr "Папка" #: libsylph/prefs_common.c:506 #, fuzzy msgid "Junk mail filter" msgstr "Папка" #: libsylph/procmime.c:1142 msgid "procmime_get_text_content(): Code conversion failed.\n" msgstr "" #: libsylph/procmsg.c:655 msgid "can't open mark file\n" msgstr "не може да се отвори файлът с маркировките\n" #: libsylph/procmsg.c:1107 #, c-format msgid "can't fetch message %d\n" msgstr "не може да се вземе съобщението %d\n" #: libsylph/procmsg.c:1423 #, c-format msgid "Print command line is invalid: `%s'\n" msgstr "Невалиден команден ред за печат: `%s'\n" #: libsylph/recv.c:141 msgid "error occurred while retrieving data.\n" msgstr "възникна грешка при получаване на данни.\n" #: libsylph/recv.c:183 libsylph/recv.c:215 libsylph/recv.c:230 msgid "Can't write to file.\n" msgstr "Не може да се запише във файл.\n" #: libsylph/smtp.c:157 msgid "SMTP AUTH not available\n" msgstr "SMTP AUTH не е наличен\n" #: libsylph/smtp.c:466 libsylph/smtp.c:516 msgid "bad SMTP response\n" msgstr "грешен SMTP отговор\n" #: libsylph/smtp.c:487 libsylph/smtp.c:505 libsylph/smtp.c:602 msgid "error occurred on SMTP session\n" msgstr "грешка при SMTP сесията\n" #: libsylph/ssl.c:54 msgid "SSLv23 not available\n" msgstr "не е наличен SSLv23\n" #: libsylph/ssl.c:56 msgid "SSLv23 available\n" msgstr "наличен SSLv23\n" #: libsylph/ssl.c:65 msgid "TLSv1 not available\n" msgstr "не е наличен TLSv1\n" #: libsylph/ssl.c:67 msgid "TLSv1 available\n" msgstr "наличен TLSv1\n" #: libsylph/ssl.c:101 libsylph/ssl.c:108 msgid "SSL method not available\n" msgstr "не е наличен SSL метода\n" #: libsylph/ssl.c:114 msgid "Unknown SSL method *PROGRAM BUG*\n" msgstr "Непознат SSL метод *PROGRAM BUG*\n" #: libsylph/ssl.c:120 msgid "Error creating ssl context\n" msgstr "Грешка при създаване на ssl контекст\n" #. Get the cipher #: libsylph/ssl.c:139 #, c-format msgid "SSL connection using %s\n" msgstr "SSL връзка използвайки %s\n" #: libsylph/ssl.c:148 msgid "Server certificate:\n" msgstr "Сертификат на сървъра:\n" #: libsylph/ssl.c:151 #, c-format msgid " Subject: %s\n" msgstr " Субект: %s\n" #: libsylph/ssl.c:156 #, c-format msgid " Issuer: %s\n" msgstr " Издател: %s\n" #: libsylph/utils.c:2682 libsylph/utils.c:2804 #, c-format msgid "writing to %s failed.\n" msgstr "записът в %s се провали.\n" #~ msgid "can't change file mode\n" #~ msgstr "не може да се смени вида на файла\n" libsylph-1.1.0/po/cs.po0000644000175000017500000003633010756432604011657 00000000000000# Czech translation of Sylpheed # Copyright (C) 2000 Free Software Foundation, Inc. # Jan Mura , 2000. # msgid "" msgstr "" "Project-Id-Version: sylpheed\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-02-19 10:48+0900\n" "PO-Revision-Date: 2003-05-30 13:31GMT+0100\n" "Last-Translator: Radek Vybíral \n" "Language-Team: Czech \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 0.9.6\n" #: libsylph/account.c:56 msgid "Reading all config for each account...\n" msgstr "Načítám nastavení pro všechny účty...\n" #: libsylph/imap.c:465 #, fuzzy, c-format msgid "IMAP4 connection to %s has been disconnected. Reconnecting...\n" msgstr "IMAP4 spojení s %s:%d bylo rozpojeno. Obnovuji spojení...\n" #: libsylph/imap.c:520 libsylph/imap.c:526 #, fuzzy msgid "IMAP4 server disables LOGIN.\n" msgstr "adresář pro IMAP server" #: libsylph/imap.c:602 #, c-format msgid "creating IMAP4 connection to %s:%d ...\n" msgstr "vytvářím spojení IMAP4 s %s:%d ...\n" #: libsylph/imap.c:646 msgid "Can't start TLS session.\n" msgstr "Nelze spustit TLS sezení.\n" #: libsylph/imap.c:1120 #, fuzzy, c-format msgid "Getting message %d" msgstr "Vymazávám zprávu %d" #: libsylph/imap.c:1236 #, fuzzy, c-format msgid "Appending messages to %s (%d / %d)" msgstr "Posílám zprávu (%d / %d bytů)" #: libsylph/imap.c:1328 #, fuzzy, c-format msgid "Moving messages %s to %s ..." msgstr "Přesouvám zprávu %s%c%d do %s...\n" #: libsylph/imap.c:1334 #, fuzzy, c-format msgid "Copying messages %s to %s ..." msgstr "Kopíruji zprávu %s%c%d do %s...\n" #: libsylph/imap.c:1473 #, fuzzy, c-format msgid "Removing messages %s" msgstr "Získávám zprávy z %s do %s...\n" #: libsylph/imap.c:1479 #, fuzzy, c-format msgid "can't set deleted flags: %s\n" msgstr "nelze nastavit příznak smazání: %d\n" #: libsylph/imap.c:1487 libsylph/imap.c:1582 msgid "can't expunge\n" msgstr "nelze odstranit\n" #: libsylph/imap.c:1570 #, fuzzy, c-format msgid "Removing all messages in %s" msgstr "Získávám zprávy z %s do %s...\n" #: libsylph/imap.c:1576 #, fuzzy msgid "can't set deleted flags: 1:*\n" msgstr "nelze nastavit příznak smazané: 1: %d\n" #: libsylph/imap.c:1624 #, fuzzy msgid "can't close folder\n" msgstr "nelze vybrat složku: %s\n" #: libsylph/imap.c:1702 #, fuzzy, c-format msgid "root folder %s not exist\n" msgstr "Označený soubor nebyl nalezen.\n" #: libsylph/imap.c:1891 libsylph/imap.c:1899 msgid "error occurred while getting LIST.\n" msgstr "Během příkazu LIST se vyskytla chyba.\n" #: libsylph/imap.c:2013 #, c-format msgid "Can't create '%s'\n" msgstr "Nemohu vytvořit '%s'\n" #: libsylph/imap.c:2018 #, c-format msgid "Can't create '%s' under INBOX\n" msgstr "Nemohu vytvořit '%s' v Doručené poště\n" #: libsylph/imap.c:2079 msgid "can't create mailbox: LIST failed\n" msgstr "nelze vytvořit poštovní schránku: selhal příkaz LIST\n" #: libsylph/imap.c:2099 msgid "can't create mailbox\n" msgstr "nelze vytvořit poštovní schránku\n" #: libsylph/imap.c:2203 #, c-format msgid "can't rename mailbox: %s to %s\n" msgstr "nelze přejmenovat poštovní schránku: %s na %s\n" #: libsylph/imap.c:2283 msgid "can't delete mailbox\n" msgstr "nelze smazat poštovní schránku\n" #: libsylph/imap.c:2327 msgid "can't get envelope\n" msgstr "Nemohu načíst obálku\n" #: libsylph/imap.c:2340 #, fuzzy, c-format msgid "Getting message headers (%d / %d)" msgstr "Posílám zprávu (%d / %d bytů)" #: libsylph/imap.c:2350 msgid "error occurred while getting envelope.\n" msgstr "Během načítání obálky se vyskytla chyba.\n" #: libsylph/imap.c:2372 #, c-format msgid "can't parse envelope: %s\n" msgstr "Nemohu analyzovat obálku: %s\n" #: libsylph/imap.c:2496 #, c-format msgid "Can't connect to IMAP4 server: %s:%d\n" msgstr "Nemohu se spojit s IMAP4 serverem: %s:%d\n" #: libsylph/imap.c:2503 #, c-format msgid "Can't establish IMAP4 session with: %s:%d\n" msgstr "Nelze navázat relaci s IMAP4 serverem: %s:%d\n" #: libsylph/imap.c:2578 msgid "can't get namespace\n" msgstr "nemohu najít obálku\n" #: libsylph/imap.c:3111 #, c-format msgid "can't select folder: %s\n" msgstr "nelze vybrat složku: %s\n" #: libsylph/imap.c:3146 #, fuzzy msgid "error on imap command: STATUS\n" msgstr "chyba příkazu služby imap: EXPUNGE\n" #: libsylph/imap.c:3269 libsylph/imap.c:3304 #, fuzzy msgid "IMAP4 authentication failed.\n" msgstr "Autentikace selhala." #: libsylph/imap.c:3353 msgid "IMAP4 login failed.\n" msgstr "Neúspěšné přihlášení k IMAP4.\n" #: libsylph/imap.c:3689 #, c-format msgid "can't append %s to %s\n" msgstr "Nemohu přidat %s do %s\n" #: libsylph/imap.c:3696 msgid "(sending file...)" msgstr "(posílám soubor...)" #: libsylph/imap.c:3725 #, fuzzy, c-format msgid "can't append message to %s\n" msgstr "nelze přidat zprávu %s\n" #: libsylph/imap.c:3757 #, fuzzy, c-format msgid "can't copy %s to %s\n" msgstr "nelze kopírovat %d na %s\n" #: libsylph/imap.c:3781 #, fuzzy, c-format msgid "error while imap command: STORE %s %s\n" msgstr "chyba příkazu služby imap: STORE %d %d %s\n" #: libsylph/imap.c:3795 msgid "error while imap command: EXPUNGE\n" msgstr "chyba příkazu služby imap: EXPUNGE\n" #: libsylph/imap.c:3808 #, fuzzy msgid "error while imap command: CLOSE\n" msgstr "chyba příkazu služby imap: EXPUNGE\n" #: libsylph/imap.c:4084 #, c-format msgid "iconv cannot convert UTF-7 to %s\n" msgstr "iconv nemůže konvertovat UTF-7 na %s\n" #: libsylph/imap.c:4114 #, c-format msgid "iconv cannot convert %s to UTF-7\n" msgstr "iconv nemůže konvertovat %s na UTF-7\n" #: libsylph/mbox.c:50 libsylph/mbox.c:196 msgid "can't write to temporary file\n" msgstr "Nemohu zapisovat do dočasného souboru\n" #: libsylph/mbox.c:69 #, c-format msgid "Getting messages from %s into %s...\n" msgstr "Získávám zprávy z %s do %s...\n" #: libsylph/mbox.c:79 msgid "can't read mbox file.\n" msgstr "Nemohu přečíst soubor s poštovní schránkou.\n" #: libsylph/mbox.c:86 #, c-format msgid "invalid mbox format: %s\n" msgstr "Neplatný formát poštovní schránky: %s\n" #: libsylph/mbox.c:93 #, c-format msgid "malformed mbox: %s\n" msgstr "Selhání poštovní schránky: %s\n" #: libsylph/mbox.c:110 msgid "can't open temporary file\n" msgstr "Nemohu otevřít dočasný soubor\n" #: libsylph/mbox.c:161 #, c-format msgid "" "unescaped From found:\n" "%s" msgstr "" #: libsylph/mbox.c:250 #, c-format msgid "%d messages found.\n" msgstr "%d zpráv nalezeno.\n" #: libsylph/mbox.c:268 #, c-format msgid "can't create lock file %s\n" msgstr "Nemohu vytvořit uzamčený soubor %s\n" #: libsylph/mbox.c:269 msgid "use 'flock' instead of 'file' if possible.\n" msgstr "pokud to jde, použijte 'flock' místo 'file'.\n" #: libsylph/mbox.c:281 #, c-format msgid "can't create %s\n" msgstr "Nemohu vytvořit %s\n" #: libsylph/mbox.c:287 msgid "mailbox is owned by another process, waiting...\n" msgstr "poštovní schránka je vlastněna jiným procesem, čekejte...\n" #: libsylph/mbox.c:316 #, c-format msgid "can't lock %s\n" msgstr "Nemohu uzamknout %s\n" #: libsylph/mbox.c:323 libsylph/mbox.c:373 msgid "invalid lock type\n" msgstr "Neplatný typ zámku\n" #: libsylph/mbox.c:359 #, c-format msgid "can't unlock %s\n" msgstr "Nemohu odemknout %s\n" #: libsylph/mbox.c:394 msgid "can't truncate mailbox to zero.\n" msgstr "nemůžu smazat poštovní schránku.\n" #: libsylph/mbox.c:418 #, c-format msgid "Exporting messages from %s into %s...\n" msgstr "Exportuji zprávy z %s do %s...\n" #: libsylph/mh.c:427 #, c-format msgid "can't copy message %s to %s\n" msgstr "Nemohu zkopírovat zprávu %s do %s\n" #: libsylph/mh.c:502 libsylph/mh.c:625 msgid "Can't open mark file.\n" msgstr "Nemohu otevřít označený soubor.\n" #: libsylph/mh.c:509 libsylph/mh.c:631 msgid "the src folder is identical to the dest.\n" msgstr "zdrojová složka je stejná jako cílová.\n" #: libsylph/mh.c:634 #, c-format msgid "Copying message %s%c%d to %s ...\n" msgstr "Kopíruji zprávu %s%c%d do %s...\n" #: libsylph/mh.c:965 libsylph/mh.c:978 #, c-format msgid "" "File `%s' already exists.\n" "Can't create folder." msgstr "" "Soubor '%s' už existuje.\n" "Nemohu vytvořit složku." #: libsylph/mh.c:1500 #, c-format msgid "" "Directory name\n" "'%s' is not a valid UTF-8 string.\n" "Maybe the locale encoding is used for filename.\n" "If that is the case, you must set the following environmental variable\n" "(see README for detail):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" msgstr "" #: libsylph/news.c:207 #, c-format msgid "creating NNTP connection to %s:%d ...\n" msgstr "Vytvářím NNTP spojení s %s:%d ...\n" #: libsylph/news.c:276 #, c-format msgid "NNTP connection to %s:%d has been disconnected. Reconnecting...\n" msgstr "NNTP spojení %s:%d bylo přerušeno. Obnovuji spojení...\n" #: libsylph/news.c:377 #, c-format msgid "article %d has been already cached.\n" msgstr "příspěvek %d už byl v mezipaměti.\n" #: libsylph/news.c:397 #, c-format msgid "getting article %d...\n" msgstr "Získávám příspěvek %d...\n" #: libsylph/news.c:401 #, c-format msgid "can't read article %d\n" msgstr "Nemohu číst příspěvek %d\n" #: libsylph/news.c:676 msgid "can't post article.\n" msgstr "Nemohu odeslat příspěvek.\n" #: libsylph/news.c:702 #, c-format msgid "can't retrieve article %d\n" msgstr "Nemohu načíst příspěvek %d\n" #: libsylph/news.c:759 #, fuzzy, c-format msgid "can't select group: %s\n" msgstr "Nemohu vybrat skupinu: %s\n" #: libsylph/news.c:796 #, c-format msgid "invalid article range: %d - %d\n" msgstr "neplatný rozsah příspěvků: %d - %d\n" #: libsylph/news.c:809 msgid "no new articles.\n" msgstr "Žádný nový příspěvek.\n" #: libsylph/news.c:819 #, c-format msgid "getting xover %d - %d in %s...\n" msgstr "získávám xover %d - %d v %s...\n" #: libsylph/news.c:823 msgid "can't get xover\n" msgstr "nelze získat xover\n" #: libsylph/news.c:833 msgid "error occurred while getting xover.\n" msgstr "Během získávání xover se vyskytla chyba.\n" #: libsylph/news.c:843 #, c-format msgid "invalid xover line: %s\n" msgstr "Neplatná xover řádka: %s\n" #: libsylph/news.c:862 libsylph/news.c:894 msgid "can't get xhdr\n" msgstr "nelze získat xhdr\n" #: libsylph/news.c:874 libsylph/news.c:906 msgid "error occurred while getting xhdr.\n" msgstr "Během získávání xhdr se vyskytla chyba .\n" #: libsylph/nntp.c:68 #, c-format msgid "Can't connect to NNTP server: %s:%d\n" msgstr "Nemohu se spojit s NNTP serverem: %s:%d\n" #: libsylph/nntp.c:164 libsylph/nntp.c:227 #, c-format msgid "protocol error: %s\n" msgstr "Chyba protokolu: %s\n" #: libsylph/nntp.c:187 libsylph/nntp.c:233 msgid "protocol error\n" msgstr "Chyba protokolu\n" #: libsylph/nntp.c:283 msgid "Error occurred while posting\n" msgstr "Během odesílání se vyskytla chyba\n" #: libsylph/nntp.c:363 #, fuzzy msgid "Error occurred while sending command\n" msgstr "Během odesílání pošty se vyskytla chyba ." #: libsylph/pop.c:155 msgid "Required APOP timestamp not found in greeting\n" msgstr "V pozdravu nebyla nalezena APOP časová značka\n" #: libsylph/pop.c:162 msgid "Timestamp syntax error in greeting\n" msgstr "Chyba syntaxe pro časovou značku při pozdravu\n" #: libsylph/pop.c:170 #, fuzzy msgid "Invalid timestamp in greeting\n" msgstr "V pozdravu nebyla nalezena APOP časová značka\n" #: libsylph/pop.c:198 libsylph/pop.c:225 msgid "POP3 protocol error\n" msgstr "Chyba protokolu POP3\n" #: libsylph/pop.c:270 #, fuzzy, c-format msgid "invalid UIDL response: %s\n" msgstr "Neplatná xover řádka: %s\n" #: libsylph/pop.c:631 #, c-format msgid "POP3: Deleting expired message %d\n" msgstr "POP3: Vymazávám starou zprávu %d\n" #: libsylph/pop.c:640 #, c-format msgid "POP3: Skipping message %d (%d bytes)\n" msgstr "POP3: Přeskakuji zprávu %d (%d bytů)\n" #: libsylph/pop.c:673 msgid "mailbox is locked\n" msgstr "poštovní schránka je zamčena\n" #: libsylph/pop.c:676 msgid "session timeout\n" msgstr "vypršel čas relace\n" #: libsylph/pop.c:682 libsylph/smtp.c:561 msgid "can't start TLS session\n" msgstr "Nelze spustit TLS relaci\n" #: libsylph/pop.c:689 libsylph/smtp.c:496 msgid "error occurred on authentication\n" msgstr "Vyskytla se chyba v autentizaci\n" #: libsylph/pop.c:694 msgid "command not supported\n" msgstr "Příkaz není podporován\n" #: libsylph/pop.c:698 msgid "error occurred on POP3 session\n" msgstr "v POP3 relaci se vyskytla\n" #: libsylph/prefs.c:196 libsylph/prefs.c:224 libsylph/prefs.c:269 #: libsylph/prefs_account.c:217 libsylph/prefs_account.c:231 msgid "failed to write configuration to file\n" msgstr "Selhání při zápisu konfigurace do souboru\n" #: libsylph/prefs.c:239 #, c-format msgid "Found %s\n" msgstr "Nalezený %s\n" #: libsylph/prefs.c:272 msgid "Configuration is saved.\n" msgstr "Konfigurace je uložena.\n" #: libsylph/prefs_common.c:503 #, fuzzy msgid "Junk mail filter (manual)" msgstr "Složka" #: libsylph/prefs_common.c:506 #, fuzzy msgid "Junk mail filter" msgstr "Složka" #: libsylph/procmime.c:1142 msgid "procmime_get_text_content(): Code conversion failed.\n" msgstr "procmime_get_text_content(): Neúspěšná konverze kódu.\n" #: libsylph/procmsg.c:655 msgid "can't open mark file\n" msgstr "nelze otevřít označený soubor\n" #: libsylph/procmsg.c:1107 #, c-format msgid "can't fetch message %d\n" msgstr "nelze načíst zprávu %d\n" #: libsylph/procmsg.c:1423 #, c-format msgid "Print command line is invalid: `%s'\n" msgstr "Neplatný příkazový řádek tisku: '%s'\n" #: libsylph/recv.c:141 msgid "error occurred while retrieving data.\n" msgstr "Během obnovy dat se vyskytla chyba.\n" #: libsylph/recv.c:183 libsylph/recv.c:215 libsylph/recv.c:230 msgid "Can't write to file.\n" msgstr "Nemohu zapisovat do souboru.\n" #: libsylph/smtp.c:157 msgid "SMTP AUTH not available\n" msgstr "SMTP AUTH je nedostupná\n" #: libsylph/smtp.c:466 libsylph/smtp.c:516 msgid "bad SMTP response\n" msgstr "špatná odpověď od SMTP\n" #: libsylph/smtp.c:487 libsylph/smtp.c:505 libsylph/smtp.c:602 msgid "error occurred on SMTP session\n" msgstr "v SMTP relaci se vyskytla chyba\n" #: libsylph/ssl.c:54 msgid "SSLv23 not available\n" msgstr "SSLv23 je nedostupné\n" #: libsylph/ssl.c:56 msgid "SSLv23 available\n" msgstr "SSLv23 je dostupné\n" #: libsylph/ssl.c:65 msgid "TLSv1 not available\n" msgstr "TLSv1 je nedostupná\n" #: libsylph/ssl.c:67 msgid "TLSv1 available\n" msgstr "TLSv1 je dostupná\n" #: libsylph/ssl.c:101 libsylph/ssl.c:108 msgid "SSL method not available\n" msgstr "SSL metoda je nedostupná\n" #: libsylph/ssl.c:114 msgid "Unknown SSL method *PROGRAM BUG*\n" msgstr "Neznámá SSL metoda *PROGRAM BUG*\n" #: libsylph/ssl.c:120 msgid "Error creating ssl context\n" msgstr "Chyba při vytváření ssl kontextu\n" #. Get the cipher #: libsylph/ssl.c:139 #, c-format msgid "SSL connection using %s\n" msgstr "SSL spojení používá %s\n" #: libsylph/ssl.c:148 msgid "Server certificate:\n" msgstr "Certifikát serveru:\n" #: libsylph/ssl.c:151 #, c-format msgid " Subject: %s\n" msgstr " Předmět: %s\n" #: libsylph/ssl.c:156 #, c-format msgid " Issuer: %s\n" msgstr " Vydavatel: %s\n" #: libsylph/utils.c:2682 libsylph/utils.c:2804 #, c-format msgid "writing to %s failed.\n" msgstr "Neúspěšný zápis do %s.\n" #~ msgid "can't change file mode\n" #~ msgstr "nelze změnit mód souboru\n" libsylph-1.1.0/po/da.po0000644000175000017500000003516610756432604011644 00000000000000# Danish translation of Sylpheed. # Copyright (C) 2000 Free Software Foundation, Inc. # Andreas Hinz , 2002, 2003. # msgid "" msgstr "" "Project-Id-Version: sylpheed \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-02-19 10:48+0900\n" "PO-Revision-Date: 2003-07-29 09:05+0200\n" "Last-Translator: Andreas Hinz \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: libsylph/account.c:56 msgid "Reading all config for each account...\n" msgstr "Læs konfiguration for hver konto...\n" #: libsylph/imap.c:465 #, c-format msgid "IMAP4 connection to %s has been disconnected. Reconnecting...\n" msgstr "IMAP4 forbindelse til %s blev afbrudt. Forbinder...\n" #: libsylph/imap.c:520 libsylph/imap.c:526 #, fuzzy msgid "IMAP4 server disables LOGIN.\n" msgstr "IMAP server sti." #: libsylph/imap.c:602 #, c-format msgid "creating IMAP4 connection to %s:%d ...\n" msgstr "erstelle IMAP4-Verbindung zu %s:%d ...\n" #: libsylph/imap.c:646 msgid "Can't start TLS session.\n" msgstr "Kan ikke starte TLS session.\n" #: libsylph/imap.c:1120 #, fuzzy, c-format msgid "Getting message %d" msgstr "Sletter meddelelse %d" #: libsylph/imap.c:1236 #, fuzzy, c-format msgid "Appending messages to %s (%d / %d)" msgstr "Sender meddelelse (%d / %d bytes)" #: libsylph/imap.c:1328 #, fuzzy, c-format msgid "Moving messages %s to %s ..." msgstr "Flytter meddelelse %s%c%d til %s ...\n" #: libsylph/imap.c:1334 #, fuzzy, c-format msgid "Copying messages %s to %s ..." msgstr "Kopierer meddelelse %s%c%d til %s ...\n" #: libsylph/imap.c:1473 #, fuzzy, c-format msgid "Removing messages %s" msgstr "Modtager meddelelse fra %s..." #: libsylph/imap.c:1479 #, c-format msgid "can't set deleted flags: %s\n" msgstr "kan ikke sætte slettede flag: %s\n" #: libsylph/imap.c:1487 libsylph/imap.c:1582 msgid "can't expunge\n" msgstr "kan ikke slette\n" #: libsylph/imap.c:1570 #, fuzzy, c-format msgid "Removing all messages in %s" msgstr "Modtager meddelelse fra %s..." #: libsylph/imap.c:1576 #, fuzzy msgid "can't set deleted flags: 1:*\n" msgstr "kan ikke sætte slettet flag: 1:%d\n" #: libsylph/imap.c:1624 #, fuzzy msgid "can't close folder\n" msgstr "kan ikke vælge mappe %s\n" #: libsylph/imap.c:1702 #, fuzzy, c-format msgid "root folder %s not exist\n" msgstr "Markéret fil ikke fundet.\n" #: libsylph/imap.c:1891 libsylph/imap.c:1899 msgid "error occurred while getting LIST.\n" msgstr "fejl ved modtagelse af LIST.\n" #: libsylph/imap.c:2013 #, c-format msgid "Can't create '%s'\n" msgstr "kan ikke oprette '%s'\n" #: libsylph/imap.c:2018 #, c-format msgid "Can't create '%s' under INBOX\n" msgstr "kan ikke oprette '%s'\n" #: libsylph/imap.c:2079 msgid "can't create mailbox: LIST failed\n" msgstr "kan ikke oprette mailbox: LIST fejlet\n" #: libsylph/imap.c:2099 msgid "can't create mailbox\n" msgstr "kan ikke oprette mailbox\n" #: libsylph/imap.c:2203 #, c-format msgid "can't rename mailbox: %s to %s\n" msgstr "kan ikke omdøbe mailbox: %s til %s\n" #: libsylph/imap.c:2283 msgid "can't delete mailbox\n" msgstr "kan ikke slette mailbox\n" #: libsylph/imap.c:2327 msgid "can't get envelope\n" msgstr "kan ikke modtage kovert\n" #: libsylph/imap.c:2340 #, fuzzy, c-format msgid "Getting message headers (%d / %d)" msgstr "Sender meddelelse (%d / %d bytes)" #: libsylph/imap.c:2350 msgid "error occurred while getting envelope.\n" msgstr "fejl ved modtagelse af kuvert.\n" #: libsylph/imap.c:2372 #, c-format msgid "can't parse envelope: %s\n" msgstr "kan ikke læse kuvert: %s\n" #: libsylph/imap.c:2496 #, c-format msgid "Can't connect to IMAP4 server: %s:%d\n" msgstr "Ingen forbindelse med IMAP4 server: %s:%d\n" #: libsylph/imap.c:2503 #, c-format msgid "Can't establish IMAP4 session with: %s:%d\n" msgstr "Ingen forbindelse med IMAP4 server: %s:%d\n" #: libsylph/imap.c:2578 msgid "can't get namespace\n" msgstr "kan ikke modtage namespace\n" #: libsylph/imap.c:3111 #, c-format msgid "can't select folder: %s\n" msgstr "kan ikke vælge mappe %s\n" #: libsylph/imap.c:3146 #, fuzzy msgid "error on imap command: STATUS\n" msgstr "fejl ved IMAP kommand: CLOSE\n" #: libsylph/imap.c:3269 libsylph/imap.c:3304 msgid "IMAP4 authentication failed.\n" msgstr "IMAP4 godkendelse fejlede.\n" #: libsylph/imap.c:3353 msgid "IMAP4 login failed.\n" msgstr "IMAP4-Login fejlet.\n" #: libsylph/imap.c:3689 #, c-format msgid "can't append %s to %s\n" msgstr "kan ikke tilføje %s til %s\n" #: libsylph/imap.c:3696 msgid "(sending file...)" msgstr "(sender fil...)" #: libsylph/imap.c:3725 #, fuzzy, c-format msgid "can't append message to %s\n" msgstr "kan ikke tilføje meddelelse %s\n" #: libsylph/imap.c:3757 #, c-format msgid "can't copy %s to %s\n" msgstr "kan ikke kopiere %s til %s\n" #: libsylph/imap.c:3781 #, c-format msgid "error while imap command: STORE %s %s\n" msgstr "fejl ved IMAP kommando: STORE %s %s\n" #: libsylph/imap.c:3795 msgid "error while imap command: EXPUNGE\n" msgstr "fejl ved IMAP kommand: EXPUNGE\n" #: libsylph/imap.c:3808 msgid "error while imap command: CLOSE\n" msgstr "fejl ved IMAP kommand: CLOSE\n" #: libsylph/imap.c:4084 #, c-format msgid "iconv cannot convert UTF-7 to %s\n" msgstr "iconv kan ikke konvertere UTF-7 til %s\n" #: libsylph/imap.c:4114 #, c-format msgid "iconv cannot convert %s to UTF-7\n" msgstr "iconv can ikke konvertere %s til UTF-7\n" #: libsylph/mbox.c:50 libsylph/mbox.c:196 msgid "can't write to temporary file\n" msgstr "kan ikke skrive til midlertidig fil\n" #: libsylph/mbox.c:69 #, c-format msgid "Getting messages from %s into %s...\n" msgstr "Modtager meddelelse fra %s til %s...\n" #: libsylph/mbox.c:79 msgid "can't read mbox file.\n" msgstr "Kan ikke læse mbox fil.\n" #: libsylph/mbox.c:86 #, c-format msgid "invalid mbox format: %s\n" msgstr "ugyldigt mbox format: %s\n" #: libsylph/mbox.c:93 #, c-format msgid "malformed mbox: %s\n" msgstr "ugyldig mbox format: %s\n" #: libsylph/mbox.c:110 msgid "can't open temporary file\n" msgstr "kan ikke åbne midlertidig fil\n" #: libsylph/mbox.c:161 #, c-format msgid "" "unescaped From found:\n" "%s" msgstr "" "ukodet Fra fundet:\n" "%s" #: libsylph/mbox.c:250 #, c-format msgid "%d messages found.\n" msgstr "%d meddelelse fundet.\n" #: libsylph/mbox.c:268 #, c-format msgid "can't create lock file %s\n" msgstr "kan ikke oprette lock fil %s\n" #: libsylph/mbox.c:269 msgid "use 'flock' instead of 'file' if possible.\n" msgstr "benyt 'flock' i stedet for 'file' hvis muligt.\n" #: libsylph/mbox.c:281 #, c-format msgid "can't create %s\n" msgstr "kan ikke oprette %s\n" #: libsylph/mbox.c:287 msgid "mailbox is owned by another process, waiting...\n" msgstr "mailbox hører til anden process, venter...\n" #: libsylph/mbox.c:316 #, c-format msgid "can't lock %s\n" msgstr "kan ikke låse %s\n" #: libsylph/mbox.c:323 libsylph/mbox.c:373 msgid "invalid lock type\n" msgstr "ugyldig lock type\n" #: libsylph/mbox.c:359 #, c-format msgid "can't unlock %s\n" msgstr "kan ikke låse %s op\n" #: libsylph/mbox.c:394 msgid "can't truncate mailbox to zero.\n" msgstr "kan ikke tømme mailbox.\n" #: libsylph/mbox.c:418 #, c-format msgid "Exporting messages from %s into %s...\n" msgstr "Eksporterer meddelelse fra %s til %s...\n" #: libsylph/mh.c:427 #, c-format msgid "can't copy message %s to %s\n" msgstr "kan ikke kopiere meddelelse %s til %s\n" #: libsylph/mh.c:502 libsylph/mh.c:625 msgid "Can't open mark file.\n" msgstr "Kan ikke åbne markéret fil.\n" #: libsylph/mh.c:509 libsylph/mh.c:631 msgid "the src folder is identical to the dest.\n" msgstr "fra og til mappe er ens.\n" #: libsylph/mh.c:634 #, c-format msgid "Copying message %s%c%d to %s ...\n" msgstr "Kopierer meddelelse %s%c%d til %s ...\n" #: libsylph/mh.c:965 libsylph/mh.c:978 #, c-format msgid "" "File `%s' already exists.\n" "Can't create folder." msgstr "" "Filen `%s' eksisterer allerede.\n" "Kan ikke oprette mappe." #: libsylph/mh.c:1500 #, c-format msgid "" "Directory name\n" "'%s' is not a valid UTF-8 string.\n" "Maybe the locale encoding is used for filename.\n" "If that is the case, you must set the following environmental variable\n" "(see README for detail):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" msgstr "" #: libsylph/news.c:207 #, c-format msgid "creating NNTP connection to %s:%d ...\n" msgstr "oprettet NNTP forbindelse til %s:%d ...\n" #: libsylph/news.c:276 #, c-format msgid "NNTP connection to %s:%d has been disconnected. Reconnecting...\n" msgstr "NNTP forbindelse til %s:%d blev afbrudt. Genforbinder...\n" #: libsylph/news.c:377 #, c-format msgid "article %d has been already cached.\n" msgstr "Artikel %d er allerede gemt.\n" #: libsylph/news.c:397 #, c-format msgid "getting article %d...\n" msgstr "modtager artikel %d...\n" #: libsylph/news.c:401 #, c-format msgid "can't read article %d\n" msgstr "kann ikke læse artikel %d\n" #: libsylph/news.c:676 msgid "can't post article.\n" msgstr "kan ikke sende artikel.\n" #: libsylph/news.c:702 #, c-format msgid "can't retrieve article %d\n" msgstr "kan ikke modtage artikel %d\n" #: libsylph/news.c:759 #, fuzzy, c-format msgid "can't select group: %s\n" msgstr "kan ikke vælge gruppe: %s\n" #: libsylph/news.c:796 #, c-format msgid "invalid article range: %d - %d\n" msgstr "ugyldigt artikel område: %d - %d\n" #: libsylph/news.c:809 msgid "no new articles.\n" msgstr "ingen nye artikler.\n" #: libsylph/news.c:819 #, c-format msgid "getting xover %d - %d in %s...\n" msgstr "modtager XOVER %d - %d i %s...\n" #: libsylph/news.c:823 msgid "can't get xover\n" msgstr "kan ikke modtage XOVER\n" #: libsylph/news.c:833 msgid "error occurred while getting xover.\n" msgstr "fejl ved modtagelse af XOVER.\n" #: libsylph/news.c:843 #, c-format msgid "invalid xover line: %s\n" msgstr "ugyldig XOVER linie: %s\n" #: libsylph/news.c:862 libsylph/news.c:894 msgid "can't get xhdr\n" msgstr "kan ikke modtage XHDR\n" #: libsylph/news.c:874 libsylph/news.c:906 msgid "error occurred while getting xhdr.\n" msgstr "fejl ved modtagelse af XHDR.\n" #: libsylph/nntp.c:68 #, c-format msgid "Can't connect to NNTP server: %s:%d\n" msgstr "Kan ikke forbinde til NNTP server: %s:%d\n" #: libsylph/nntp.c:164 libsylph/nntp.c:227 #, c-format msgid "protocol error: %s\n" msgstr "protokol fejl: %s\n" #: libsylph/nntp.c:187 libsylph/nntp.c:233 msgid "protocol error\n" msgstr "protokol fejl\n" #: libsylph/nntp.c:283 msgid "Error occurred while posting\n" msgstr "Fejl ved afsendelse\n" #: libsylph/nntp.c:363 #, fuzzy msgid "Error occurred while sending command\n" msgstr "Fejl ved afsendelse af e-post." #: libsylph/pop.c:155 msgid "Required APOP timestamp not found in greeting\n" msgstr "Nødvendig APOP tid blev ikke fundet i velkomst\n" #: libsylph/pop.c:162 msgid "Timestamp syntax error in greeting\n" msgstr "Tid syntax fejl i velkomst\n" #: libsylph/pop.c:170 #, fuzzy msgid "Invalid timestamp in greeting\n" msgstr "Nødvendig APOP tid blev ikke fundet i velkomst\n" #: libsylph/pop.c:198 libsylph/pop.c:225 msgid "POP3 protocol error\n" msgstr "POP3 protokol fejl\n" #: libsylph/pop.c:270 #, fuzzy, c-format msgid "invalid UIDL response: %s\n" msgstr "ugyldig XOVER linie: %s\n" #: libsylph/pop.c:631 #, c-format msgid "POP3: Deleting expired message %d\n" msgstr "POP3: Sletter udløben meddelelse %d\n" #: libsylph/pop.c:640 #, c-format msgid "POP3: Skipping message %d (%d bytes)\n" msgstr "POP3: Sender meddelelse (%d / %d bytes)\n" #: libsylph/pop.c:673 msgid "mailbox is locked\n" msgstr "postkasse er låst\n" #: libsylph/pop.c:676 msgid "session timeout\n" msgstr "tid udløbet\n" #: libsylph/pop.c:682 libsylph/smtp.c:561 msgid "can't start TLS session\n" msgstr "kan ikke starte TLS session\n" #: libsylph/pop.c:689 libsylph/smtp.c:496 msgid "error occurred on authentication\n" msgstr "fejl ved godkendelse\n" #: libsylph/pop.c:694 #, fuzzy msgid "command not supported\n" msgstr "Kommando tekst" #: libsylph/pop.c:698 #, fuzzy msgid "error occurred on POP3 session\n" msgstr "fejl under POP3 session\n" #: libsylph/prefs.c:196 libsylph/prefs.c:224 libsylph/prefs.c:269 #: libsylph/prefs_account.c:217 libsylph/prefs_account.c:231 msgid "failed to write configuration to file\n" msgstr "kunne ikke gemme konfiguration til fil\n" #: libsylph/prefs.c:239 #, c-format msgid "Found %s\n" msgstr "Fundet %s\n" #: libsylph/prefs.c:272 msgid "Configuration is saved.\n" msgstr "Konfiguration er gemt.\n" #: libsylph/prefs_common.c:503 #, fuzzy msgid "Junk mail filter (manual)" msgstr "Mappe" #: libsylph/prefs_common.c:506 #, fuzzy msgid "Junk mail filter" msgstr "Mappe" #: libsylph/procmime.c:1142 msgid "procmime_get_text_content(): Code conversion failed.\n" msgstr "procmime_get_text_content(): Tegnsæt konverteringsfejl.\n" #: libsylph/procmsg.c:655 msgid "can't open mark file\n" msgstr "kan ikke åbne markéret fil\n" #: libsylph/procmsg.c:1107 #, c-format msgid "can't fetch message %d\n" msgstr "kan ikke hente meddelelse %d\n" #: libsylph/procmsg.c:1423 #, c-format msgid "Print command line is invalid: `%s'\n" msgstr "Udskrift kommando er ugyldig: `%s'\n" #: libsylph/recv.c:141 msgid "error occurred while retrieving data.\n" msgstr "fejl ved modtagelse af data.\n" #: libsylph/recv.c:183 libsylph/recv.c:215 libsylph/recv.c:230 msgid "Can't write to file.\n" msgstr "Kan ikke skrive til fil.\n" #: libsylph/smtp.c:157 msgid "SMTP AUTH not available\n" msgstr "SMTP AUTH ikke tilgænglig\n" #: libsylph/smtp.c:466 libsylph/smtp.c:516 msgid "bad SMTP response\n" msgstr "forkert SMTP svar\n" #: libsylph/smtp.c:487 libsylph/smtp.c:505 libsylph/smtp.c:602 msgid "error occurred on SMTP session\n" msgstr "fejl under SMTP session\n" #: libsylph/ssl.c:54 msgid "SSLv23 not available\n" msgstr "SSLv23 ikke tilgænglig\n" #: libsylph/ssl.c:56 msgid "SSLv23 available\n" msgstr "SSLv23 tilgænglig\n" #: libsylph/ssl.c:65 msgid "TLSv1 not available\n" msgstr "TLSv1 ikke tilgænglig\n" #: libsylph/ssl.c:67 msgid "TLSv1 available\n" msgstr "TLSv1 tilgænglig\n" #: libsylph/ssl.c:101 libsylph/ssl.c:108 msgid "SSL method not available\n" msgstr "SSL metode ikke tilgænglig\n" #: libsylph/ssl.c:114 msgid "Unknown SSL method *PROGRAM BUG*\n" msgstr "Ukendt SSL metode *PROGRAM FEJL*\n" #: libsylph/ssl.c:120 msgid "Error creating ssl context\n" msgstr "Fejl ved oprettelse af SSL kontext\n" #. Get the cipher #: libsylph/ssl.c:139 #, c-format msgid "SSL connection using %s\n" msgstr "SSL forbindelse benytter %s\n" #: libsylph/ssl.c:148 msgid "Server certificate:\n" msgstr "Server certifikat:\n" #: libsylph/ssl.c:151 #, c-format msgid " Subject: %s\n" msgstr " Emne: %s\n" #: libsylph/ssl.c:156 #, c-format msgid " Issuer: %s\n" msgstr " Afsender: %s\n" #: libsylph/utils.c:2682 libsylph/utils.c:2804 #, c-format msgid "writing to %s failed.\n" msgstr "fejl ved skrivning til %s.\n" #~ msgid "can't change file mode\n" #~ msgstr "kan ikke ændre fil mode\n" libsylph-1.1.0/po/de.po0000644000175000017500000003726410756432604011651 00000000000000# German translation of Sylpheed. # Copyright (C) 2000 Free Software Foundation, Inc. # Martin Schaaf , 2000,2001,2002,2003,2004. # Manfred Usselmann , 2004,2006. # Fridtjof Busse , 2005,2006 # msgid "" msgstr "" "Project-Id-Version: sylpheed\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-02-19 10:48+0900\n" "PO-Revision-Date: 2006-07-30 17:35+0100\n" "Last-Translator: Enrico Troeger \n" "Language-Team: German \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: German\n" "X-Poedit-Country: GERMANY\n" "X-Poedit-Basepath: /home/enrico/src/sylpheed-svn/\n" #: libsylph/account.c:56 msgid "Reading all config for each account...\n" msgstr "Lese alle Einstellungen für jeden Account...\n" #: libsylph/imap.c:465 #, c-format msgid "IMAP4 connection to %s has been disconnected. Reconnecting...\n" msgstr "IMAP4-Verbindung zu %s wurde unterbrochen. Verbinde erneut...\n" #: libsylph/imap.c:520 libsylph/imap.c:526 msgid "IMAP4 server disables LOGIN.\n" msgstr "IMAP-Server verhindert LOGIN.\n" #: libsylph/imap.c:602 #, c-format msgid "creating IMAP4 connection to %s:%d ...\n" msgstr "erstelle IMAP4-Verbindung zu %s:%d ...\n" #: libsylph/imap.c:646 msgid "Can't start TLS session.\n" msgstr "Kann TLS-Sitzung nicht beginnen.\n" #: libsylph/imap.c:1120 #, c-format msgid "Getting message %d" msgstr "Hole Nachricht %d" #: libsylph/imap.c:1236 #, c-format msgid "Appending messages to %s (%d / %d)" msgstr "Hänge Nachricht an %s (%d / %d)" #: libsylph/imap.c:1328 #, c-format msgid "Moving messages %s to %s ..." msgstr "Verschiebe Nachrichten %s nach %s ..." #: libsylph/imap.c:1334 #, c-format msgid "Copying messages %s to %s ..." msgstr "Kopiere Nachrichten %s nach %s ..." #: libsylph/imap.c:1473 #, c-format msgid "Removing messages %s" msgstr "Entferne Nachrichten von %s..." #: libsylph/imap.c:1479 #, c-format msgid "can't set deleted flags: %s\n" msgstr "kann gelöschte Flags nicht setzen: %s\n" #: libsylph/imap.c:1487 libsylph/imap.c:1582 msgid "can't expunge\n" msgstr "kann nicht löschen\n" #: libsylph/imap.c:1570 #, c-format msgid "Removing all messages in %s" msgstr "Entferne alle Nachrichten in %s..." #: libsylph/imap.c:1576 msgid "can't set deleted flags: 1:*\n" msgstr "kann gelöschte Flags nicht setzen: 1:*\n" #: libsylph/imap.c:1624 msgid "can't close folder\n" msgstr "kann Ablage nicht schließen\n" #: libsylph/imap.c:1702 #, c-format msgid "root folder %s not exist\n" msgstr "Wurzelverzeichnis %s existiert nicht\n" #: libsylph/imap.c:1891 libsylph/imap.c:1899 msgid "error occurred while getting LIST.\n" msgstr "Fehler beim Empfang von LIST.\n" #: libsylph/imap.c:2013 #, c-format msgid "Can't create '%s'\n" msgstr "Kann '%s' nicht erstellen\n" #: libsylph/imap.c:2018 #, c-format msgid "Can't create '%s' under INBOX\n" msgstr "Kann '%s' in INBOX nicht erstellen\n" #: libsylph/imap.c:2079 msgid "can't create mailbox: LIST failed\n" msgstr "kann Mailbox nicht erstellen: LIST fehlgeschlagen\n" #: libsylph/imap.c:2099 msgid "can't create mailbox\n" msgstr "kann Mailbox nicht erstellen\n" #: libsylph/imap.c:2203 #, c-format msgid "can't rename mailbox: %s to %s\n" msgstr "kann Mailbox %s nicht in %s umbenennen\n" #: libsylph/imap.c:2283 msgid "can't delete mailbox\n" msgstr "kann Mailbox nicht löschen\n" #: libsylph/imap.c:2327 msgid "can't get envelope\n" msgstr "kann die Nachrichteneigenschaften nicht empfangen\n" #: libsylph/imap.c:2340 #, c-format msgid "Getting message headers (%d / %d)" msgstr "Hole Nachrichtenkopfzeilen (%d / %d bytes)" #: libsylph/imap.c:2350 msgid "error occurred while getting envelope.\n" msgstr "Fehler beim Empfang der Nachrichteneigenschaften.\n" #: libsylph/imap.c:2372 #, c-format msgid "can't parse envelope: %s\n" msgstr "kann die Nachrichteneigenschaften nicht bearbeiten: %s\n" #: libsylph/imap.c:2496 #, c-format msgid "Can't connect to IMAP4 server: %s:%d\n" msgstr "Keine Verbindung mit IMAP4-Server: %s:%d\n" #: libsylph/imap.c:2503 #, c-format msgid "Can't establish IMAP4 session with: %s:%d\n" msgstr "Kann IMAP4-Sitzung mit %s:%d nicht aufbauen\n" #: libsylph/imap.c:2578 msgid "can't get namespace\n" msgstr "kann Namensraum nicht empfangen\n" #: libsylph/imap.c:3111 #, c-format msgid "can't select folder: %s\n" msgstr "kann Ablage %s nicht auswählen\n" #: libsylph/imap.c:3146 msgid "error on imap command: STATUS\n" msgstr "Fehler beim IMAP-Befehl: STATUS\n" #: libsylph/imap.c:3269 libsylph/imap.c:3304 msgid "IMAP4 authentication failed.\n" msgstr "IMAP4-Beglaubigung fehlgeschlagen.\n" #: libsylph/imap.c:3353 msgid "IMAP4 login failed.\n" msgstr "IMAP4-Login fehlgeschlagen.\n" #: libsylph/imap.c:3689 #, c-format msgid "can't append %s to %s\n" msgstr "kann %s nicht an %s anhängen\n" #: libsylph/imap.c:3696 msgid "(sending file...)" msgstr "(Datei versenden...)" #: libsylph/imap.c:3725 #, c-format msgid "can't append message to %s\n" msgstr "kann Nachricht nicht anhängen an %s\n" #: libsylph/imap.c:3757 #, c-format msgid "can't copy %s to %s\n" msgstr "kann %s nicht nach %s kopieren\n" #: libsylph/imap.c:3781 #, c-format msgid "error while imap command: STORE %s %s\n" msgstr "Fehler beim IMAP-Befehl: STORE %s %s\n" #: libsylph/imap.c:3795 msgid "error while imap command: EXPUNGE\n" msgstr "Fehler beim IMAP-Befehl: EXPUNGE\n" #: libsylph/imap.c:3808 msgid "error while imap command: CLOSE\n" msgstr "Fehler beim IMAP-Befehl: CLOSE\n" #: libsylph/imap.c:4084 #, c-format msgid "iconv cannot convert UTF-7 to %s\n" msgstr "iconv kann UTF-7 nicht nach %s konvertieren\n" #: libsylph/imap.c:4114 #, c-format msgid "iconv cannot convert %s to UTF-7\n" msgstr "iconv kann %s nicht nach UTF-7 konvertieren\n" #: libsylph/mbox.c:50 libsylph/mbox.c:196 msgid "can't write to temporary file\n" msgstr "kann nicht in temporäre Datei schreiben\n" #: libsylph/mbox.c:69 #, c-format msgid "Getting messages from %s into %s...\n" msgstr "Erhaltene Nachrichten von %s in %s...\n" #: libsylph/mbox.c:79 msgid "can't read mbox file.\n" msgstr "Kann Mbox-Datei nicht lesen.\n" #: libsylph/mbox.c:86 #, c-format msgid "invalid mbox format: %s\n" msgstr "Ungültiges Mbox-Format: %s\n" #: libsylph/mbox.c:93 #, c-format msgid "malformed mbox: %s\n" msgstr "zerstörte Mbox: %s\n" #: libsylph/mbox.c:110 msgid "can't open temporary file\n" msgstr "kann temporäre Datei nicht öffnen\n" #: libsylph/mbox.c:161 #, c-format msgid "" "unescaped From found:\n" "%s" msgstr "" "uncodiertes Von gefunden:\n" "%s" #: libsylph/mbox.c:250 #, c-format msgid "%d messages found.\n" msgstr "%d Nachrichten gefunden.\n" #: libsylph/mbox.c:268 #, c-format msgid "can't create lock file %s\n" msgstr "kann Sperrdatei %s nicht erstellen\n" #: libsylph/mbox.c:269 msgid "use 'flock' instead of 'file' if possible.\n" msgstr "Benutze, wenn möglich, 'flock' anstatt 'file'.\n" #: libsylph/mbox.c:281 #, c-format msgid "can't create %s\n" msgstr "Kann %s nicht erstellen\n" #: libsylph/mbox.c:287 msgid "mailbox is owned by another process, waiting...\n" msgstr "Mailbox gehört einem anderen Prozess, warten...\n" #: libsylph/mbox.c:316 #, c-format msgid "can't lock %s\n" msgstr "kann %s nicht sperren\n" #: libsylph/mbox.c:323 libsylph/mbox.c:373 msgid "invalid lock type\n" msgstr "ungültiger Sperrtyp\n" #: libsylph/mbox.c:359 #, c-format msgid "can't unlock %s\n" msgstr "kann %s nicht entperren\n" #: libsylph/mbox.c:394 msgid "can't truncate mailbox to zero.\n" msgstr "Kann Mailbox nicht auf null setzen.\n" #: libsylph/mbox.c:418 #, c-format msgid "Exporting messages from %s into %s...\n" msgstr "Exportiere Nachrichten von %s in %s...\n" #: libsylph/mh.c:427 #, c-format msgid "can't copy message %s to %s\n" msgstr "kann Nachricht %s nicht nach %s kopieren\n" #: libsylph/mh.c:502 libsylph/mh.c:625 msgid "Can't open mark file.\n" msgstr "Kann markierte Datei nicht öffnen.\n" #: libsylph/mh.c:509 libsylph/mh.c:631 msgid "the src folder is identical to the dest.\n" msgstr "Die Quellablage ist identisch mit dem Ziel.\n" #: libsylph/mh.c:634 #, c-format msgid "Copying message %s%c%d to %s ...\n" msgstr "Kopiere Nachricht %s%c%d nach %s ...\n" #: libsylph/mh.c:965 libsylph/mh.c:978 #, c-format msgid "" "File `%s' already exists.\n" "Can't create folder." msgstr "" "Datei '%s' existiert bereits.\n" "Kann Ablage nicht erstellen." #: libsylph/mh.c:1500 #, c-format msgid "" "Directory name\n" "'%s' is not a valid UTF-8 string.\n" "Maybe the locale encoding is used for filename.\n" "If that is the case, you must set the following environmental variable\n" "(see README for detail):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" msgstr "" "Verzeichnisname '%s' ist keine gültige UTF-8 Zeichenkette.\n" "Vielleicht ist der lokale Zeichensatz im Dateinamen verwendet worden.\n" "In diesem Fall musst Du die folgende Umgebungsvariable setzen (siehe README " "für Details):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" #: libsylph/news.c:207 #, c-format msgid "creating NNTP connection to %s:%d ...\n" msgstr "erstelle NNTP-Verbindung zu %s:%d ...\n" #: libsylph/news.c:276 #, c-format msgid "NNTP connection to %s:%d has been disconnected. Reconnecting...\n" msgstr "NNTP-Verbindung mit %s:%d wurde aufgehoben. Erneut verbinden...\n" #: libsylph/news.c:377 #, c-format msgid "article %d has been already cached.\n" msgstr "Artikel %d wurde schon zwischengespeichert.\n" #: libsylph/news.c:397 #, c-format msgid "getting article %d...\n" msgstr "empfange Artikel %d...\n" #: libsylph/news.c:401 #, c-format msgid "can't read article %d\n" msgstr "kann Artikel %d nicht lesen\n" #: libsylph/news.c:676 msgid "can't post article.\n" msgstr "kann Artikel nicht senden.\n" #: libsylph/news.c:702 #, c-format msgid "can't retrieve article %d\n" msgstr "kann Artikel %d nicht empfangen\n" #: libsylph/news.c:759 #, c-format msgid "can't select group: %s\n" msgstr "kann die Gruppe: %s nicht wählen\n" #: libsylph/news.c:796 #, c-format msgid "invalid article range: %d - %d\n" msgstr "ungültiger Artikelbereich: %d - %d\n" #: libsylph/news.c:809 msgid "no new articles.\n" msgstr "Keine neuen Artikel.\n" #: libsylph/news.c:819 #, c-format msgid "getting xover %d - %d in %s...\n" msgstr "bekomme Newsübersicht %d - %d in %s...\n" #: libsylph/news.c:823 msgid "can't get xover\n" msgstr "kann Newsübersicht nicht bekommen\n" #: libsylph/news.c:833 msgid "error occurred while getting xover.\n" msgstr "Fehler beim Empfang der Newsübersicht.\n" #: libsylph/news.c:843 #, c-format msgid "invalid xover line: %s\n" msgstr "ungültige Newsübersichtszeile: %s\n" #: libsylph/news.c:862 libsylph/news.c:894 msgid "can't get xhdr\n" msgstr "kann XHDR nicht bekommen\n" #: libsylph/news.c:874 libsylph/news.c:906 msgid "error occurred while getting xhdr.\n" msgstr "Fehler beim Empfang von XHDR.\n" #: libsylph/nntp.c:68 #, c-format msgid "Can't connect to NNTP server: %s:%d\n" msgstr "keine Verbindung mit NNTP-Server: %s:%d\n" #: libsylph/nntp.c:164 libsylph/nntp.c:227 #, c-format msgid "protocol error: %s\n" msgstr "Protokollfehler: %s\n" #: libsylph/nntp.c:187 libsylph/nntp.c:233 msgid "protocol error\n" msgstr "Protokollfehler\n" #: libsylph/nntp.c:283 msgid "Error occurred while posting\n" msgstr "Fehler beim Senden\n" #: libsylph/nntp.c:363 msgid "Error occurred while sending command\n" msgstr "Fehler aufgetreten beim Senden eines Befehls\n" #: libsylph/pop.c:155 msgid "Required APOP timestamp not found in greeting\n" msgstr "Erforderlichen APOP-Zeitstempel in der Begrüßung nicht gefunden\n" #: libsylph/pop.c:162 msgid "Timestamp syntax error in greeting\n" msgstr "Zeitstempel-Syntax-Fehler in Begrüßung\n" #: libsylph/pop.c:170 #, fuzzy msgid "Invalid timestamp in greeting\n" msgstr "Erforderlichen APOP-Zeitstempel in der Begrüßung nicht gefunden\n" #: libsylph/pop.c:198 libsylph/pop.c:225 msgid "POP3 protocol error\n" msgstr "POP3-Protokollfehler\n" #: libsylph/pop.c:270 #, c-format msgid "invalid UIDL response: %s\n" msgstr "ungültige UIDL-Antwort: %s\n" #: libsylph/pop.c:631 #, c-format msgid "POP3: Deleting expired message %d\n" msgstr "POP3: Lösche abgelaufene Nachricht %d\n" #: libsylph/pop.c:640 #, c-format msgid "POP3: Skipping message %d (%d bytes)\n" msgstr "POP3: Nachricht %d überspringen (%d bytes)\n" #: libsylph/pop.c:673 msgid "mailbox is locked\n" msgstr "Mailbox ist blockiert\n" #: libsylph/pop.c:676 msgid "session timeout\n" msgstr "Sitzungszeit abgelaufen\n" #: libsylph/pop.c:682 libsylph/smtp.c:561 msgid "can't start TLS session\n" msgstr "kann TLS-Sitzung nicht beginnen\n" #: libsylph/pop.c:689 libsylph/smtp.c:496 msgid "error occurred on authentication\n" msgstr "Fehler während der Beglaubigung\n" #: libsylph/pop.c:694 msgid "command not supported\n" msgstr "Befehl wird nicht unterstützt\n" #: libsylph/pop.c:698 msgid "error occurred on POP3 session\n" msgstr "Fehler während einer POP3-Sitzung\n" #: libsylph/prefs.c:196 libsylph/prefs.c:224 libsylph/prefs.c:269 #: libsylph/prefs_account.c:217 libsylph/prefs_account.c:231 msgid "failed to write configuration to file\n" msgstr "konnte nicht in die Konfigurationsdatei schreiben\n" #: libsylph/prefs.c:239 #, c-format msgid "Found %s\n" msgstr "Gefunden %s\n" #: libsylph/prefs.c:272 msgid "Configuration is saved.\n" msgstr "Konfiguration wurde gespeichert.\n" #: libsylph/prefs_common.c:503 #, fuzzy msgid "Junk mail filter (manual)" msgstr "Spam-Mail Filter" #: libsylph/prefs_common.c:506 msgid "Junk mail filter" msgstr "Spam-Mail Filter" #: libsylph/procmime.c:1142 msgid "procmime_get_text_content(): Code conversion failed.\n" msgstr "procmime_get_text_content(): Zeichensatzumsetzung fehlgeschlagen.\n" #: libsylph/procmsg.c:655 msgid "can't open mark file\n" msgstr "kann markierte Datei nicht öffnen\n" #: libsylph/procmsg.c:1107 #, c-format msgid "can't fetch message %d\n" msgstr "kann Nachricht %d nicht holen\n" #: libsylph/procmsg.c:1423 #, c-format msgid "Print command line is invalid: `%s'\n" msgstr "Druck-Befehlszeile ist ungültig: `%s'\n" #: libsylph/recv.c:141 msgid "error occurred while retrieving data.\n" msgstr "Fehler beim Empfang von Daten.\n" #: libsylph/recv.c:183 libsylph/recv.c:215 libsylph/recv.c:230 msgid "Can't write to file.\n" msgstr "Kann nicht in Datei schreiben.\n" #: libsylph/smtp.c:157 msgid "SMTP AUTH not available\n" msgstr "SMTP AUTH nicht verfügbar\n" #: libsylph/smtp.c:466 libsylph/smtp.c:516 msgid "bad SMTP response\n" msgstr "fehlerhafte SMTP-Antwort\n" #: libsylph/smtp.c:487 libsylph/smtp.c:505 libsylph/smtp.c:602 msgid "error occurred on SMTP session\n" msgstr "Fehler während einer SMTP-Sitzung\n" #: libsylph/ssl.c:54 msgid "SSLv23 not available\n" msgstr "SSLv23 nicht verfügbar\n" #: libsylph/ssl.c:56 msgid "SSLv23 available\n" msgstr "SSLv23 verfügbar\n" #: libsylph/ssl.c:65 msgid "TLSv1 not available\n" msgstr "TLSv1 nicht verfügbar\n" #: libsylph/ssl.c:67 msgid "TLSv1 available\n" msgstr "TLSv1 verfügbar\n" #: libsylph/ssl.c:101 libsylph/ssl.c:108 msgid "SSL method not available\n" msgstr "SSL-Methode nicht verfügbar\n" #: libsylph/ssl.c:114 msgid "Unknown SSL method *PROGRAM BUG*\n" msgstr "Unbekannte SSL-Methode *PROGRAMM FEHLER*\n" #: libsylph/ssl.c:120 msgid "Error creating ssl context\n" msgstr "Fehler beim Erstellen des SSL-Kontextes\n" #. Get the cipher #: libsylph/ssl.c:139 #, c-format msgid "SSL connection using %s\n" msgstr "SSL-Verbindung benutzt %s\n" #: libsylph/ssl.c:148 msgid "Server certificate:\n" msgstr "Server-Zertifikat:\n" #: libsylph/ssl.c:151 #, c-format msgid " Subject: %s\n" msgstr " Betreff: %s\n" #: libsylph/ssl.c:156 #, c-format msgid " Issuer: %s\n" msgstr " Aussteller(in): %s\n" #: libsylph/utils.c:2682 libsylph/utils.c:2804 #, c-format msgid "writing to %s failed.\n" msgstr "Schreiben in %s fehlgeschlagen.\n" #~ msgid "can't change file mode\n" #~ msgstr "kann Dateimodus nicht ändern\n" libsylph-1.1.0/po/el.po0000644000175000017500000004467610756432604011666 00000000000000# Greek translations of libSylph # Copyright (C) 2005,2006 Stavros Giannouris # This file is distributed under the same license as the libSylph package. # Stavros Giannouris , 2005,2006. # msgid "" msgstr "" "Project-Id-Version: libsylph 1.0.0beta1\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-02-19 10:48+0900\n" "PO-Revision-Date: 2006-11-22 19:05+0200\n" "Last-Translator: Stavros Giannouris \n" "Language-Team: Greek \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: libsylph/account.c:56 msgid "Reading all config for each account...\n" msgstr "Ανάγνωση ρυθμίσεων λογαριασμών...\n" #: libsylph/imap.c:465 #, c-format msgid "IMAP4 connection to %s has been disconnected. Reconnecting...\n" msgstr "Η IMAP4 σύνδεση στο %s διακόπηκε. Επανασύνδεση...\n" #: libsylph/imap.c:520 libsylph/imap.c:526 msgid "IMAP4 server disables LOGIN.\n" msgstr "Ο διακομιστής IMAP4 απενεργοποίησε το LOGIN.\n" #: libsylph/imap.c:602 #, c-format msgid "creating IMAP4 connection to %s:%d ...\n" msgstr "Δημιουργία σύνδεσης IMAP4 στο %s:%d ...\n" #: libsylph/imap.c:646 msgid "Can't start TLS session.\n" msgstr "Δεν είναι δυνατό να ξεκινήσει συνεδρία TLS.\n" #: libsylph/imap.c:1120 #, c-format msgid "Getting message %d" msgstr "Λήψη μηνύματος %d" #: libsylph/imap.c:1236 #, c-format msgid "Appending messages to %s (%d / %d)" msgstr "" #: libsylph/imap.c:1328 #, c-format msgid "Moving messages %s to %s ..." msgstr "Μετακίνηση μηνυμάτων %s στο %s ..." #: libsylph/imap.c:1334 #, c-format msgid "Copying messages %s to %s ..." msgstr "Αντιγραφή μηνυμάτων %s στο %s ..." #: libsylph/imap.c:1473 #, c-format msgid "Removing messages %s" msgstr "Διαγραφή μηνυμάτων %s" #: libsylph/imap.c:1479 #, c-format msgid "can't set deleted flags: %s\n" msgstr "" #: libsylph/imap.c:1487 libsylph/imap.c:1582 msgid "can't expunge\n" msgstr "δεν μπορώ να τα απαλείψω\n" #: libsylph/imap.c:1570 #, c-format msgid "Removing all messages in %s" msgstr "Διαγραφή όλων των μηνυμάτων στο %s" #: libsylph/imap.c:1576 msgid "can't set deleted flags: 1:*\n" msgstr "" #: libsylph/imap.c:1624 msgid "can't close folder\n" msgstr "δεν είναι δυνατό το κλείσιμο του φακέλου\n" #: libsylph/imap.c:1702 #, c-format msgid "root folder %s not exist\n" msgstr "ο ριζικός φάκελος%s δεν υπάρχει\n" #: libsylph/imap.c:1891 libsylph/imap.c:1899 msgid "error occurred while getting LIST.\n" msgstr "δημιουργήθηκε σφάλμα κατά τη λήψη της λίστας.\n" #: libsylph/imap.c:2013 #, c-format msgid "Can't create '%s'\n" msgstr "Δεν είναι δυνατή η δημιουργία του '%s'\n" #: libsylph/imap.c:2018 #, c-format msgid "Can't create '%s' under INBOX\n" msgstr "Δεν είναι δυνατή η δημιουργία του '%s' μέσα στα εισερχόμενα\n" #: libsylph/imap.c:2079 msgid "can't create mailbox: LIST failed\n" msgstr "" "δεν είναι δυνατή η δημιουργία γραμματοκιβωτίου: η εντολή LIST απέτυχε\n" #: libsylph/imap.c:2099 msgid "can't create mailbox\n" msgstr "δεν είναι δυνατή η δημιουργία γραμματοκιβωτίου\n" #: libsylph/imap.c:2203 #, c-format msgid "can't rename mailbox: %s to %s\n" msgstr "Δεν είναι δυνατή η μετονομασία του γραμματοκιβωτίου: %s σε %s\n" #: libsylph/imap.c:2283 msgid "can't delete mailbox\n" msgstr "δεν μπορώ να διαγράψω το mailbox\n" #: libsylph/imap.c:2327 msgid "can't get envelope\n" msgstr "δεν είναι δυνατή η λήψη του φακέλου\n" #: libsylph/imap.c:2340 #, c-format msgid "Getting message headers (%d / %d)" msgstr "Λήψη κεφαλίδων μηνυμάτων (%d / %d)" #: libsylph/imap.c:2350 msgid "error occurred while getting envelope.\n" msgstr "Δημιουργήθηκε σφάλμα κατά τη λήψη του φακέλου.\n" #: libsylph/imap.c:2372 #, c-format msgid "can't parse envelope: %s\n" msgstr "δεν είναι δυνατή η ανάλυση του φακέλου: %s\n" #: libsylph/imap.c:2496 #, c-format msgid "Can't connect to IMAP4 server: %s:%d\n" msgstr "Δεν είναι δυνατή η σύνδεση στον διακομιστή IMAP4: %s:%d\n" #: libsylph/imap.c:2503 #, c-format msgid "Can't establish IMAP4 session with: %s:%d\n" msgstr "Δεν είναι δυνατή η δημιουργία συνεδρίας IMAP4: %s:%d\n" #: libsylph/imap.c:2578 msgid "can't get namespace\n" msgstr "" #: libsylph/imap.c:3111 #, c-format msgid "can't select folder: %s\n" msgstr "δεν μπορώ να επιλέξω τον κατάλογο: %s\n" #: libsylph/imap.c:3146 msgid "error on imap command: STATUS\n" msgstr "σφάλμα στην εντολή imap: STATUS\n" #: libsylph/imap.c:3269 libsylph/imap.c:3304 msgid "IMAP4 authentication failed.\n" msgstr "Η πιστοποίηση στον IMAP4 απέτυχε.\n" #: libsylph/imap.c:3353 msgid "IMAP4 login failed.\n" msgstr "Η είσοδος στον IMAP4 απέτυχε.\n" #: libsylph/imap.c:3689 #, c-format msgid "can't append %s to %s\n" msgstr "δεν είναι δυνατή η προσάρτηση του %s στο %s\n" #: libsylph/imap.c:3696 msgid "(sending file...)" msgstr "(αποστολή αρχείου...)" #: libsylph/imap.c:3725 #, c-format msgid "can't append message to %s\n" msgstr "" #: libsylph/imap.c:3757 #, c-format msgid "can't copy %s to %s\n" msgstr "δεν είναι δυνατή η αντιγραφή του %s στο %s\n" #: libsylph/imap.c:3781 #, c-format msgid "error while imap command: STORE %s %s\n" msgstr "σφάλμα στην εντολή imap: STORE %s %s\n" #: libsylph/imap.c:3795 msgid "error while imap command: EXPUNGE\n" msgstr "σφάλμα στην εντολή imap: EXPUNGE\n" #: libsylph/imap.c:3808 msgid "error while imap command: CLOSE\n" msgstr "σφάλμα στην εντολή imap: CLOSE\n" #: libsylph/imap.c:4084 #, c-format msgid "iconv cannot convert UTF-7 to %s\n" msgstr "Δεν είναι δυνατή η μετατροπή του UTF-7 σε %s από το iconv\n" #: libsylph/imap.c:4114 #, c-format msgid "iconv cannot convert %s to UTF-7\n" msgstr "Δεν είναι δυνατή η μετατροπή του %s σε UTF-7 από το iconv\n" #: libsylph/mbox.c:50 libsylph/mbox.c:196 msgid "can't write to temporary file\n" msgstr "δεν είναι δυνατή η εγγραφή στο προσωρινό αρχείο.\n" #: libsylph/mbox.c:69 #, c-format msgid "Getting messages from %s into %s...\n" msgstr "Λήψη μηνυμάτων από το %s στο %s...\n" #: libsylph/mbox.c:79 msgid "can't read mbox file.\n" msgstr "δεν είναι δυνατή η ανάγνωση από το αρχείο mbox.\n" #: libsylph/mbox.c:86 #, c-format msgid "invalid mbox format: %s\n" msgstr "μη έγκυρη μορφή mbox: %s\n" #: libsylph/mbox.c:93 #, c-format msgid "malformed mbox: %s\n" msgstr "κακοσχηματισμένο mbox: %s\n" #: libsylph/mbox.c:110 msgid "can't open temporary file\n" msgstr "δεν είναι δυνατό το άνοιγμα του προσωρινού αρχείου.\n" #: libsylph/mbox.c:161 #, c-format msgid "" "unescaped From found:\n" "%s" msgstr "" #: libsylph/mbox.c:250 #, c-format msgid "%d messages found.\n" msgstr "Βρέθηκαν %d μηνύματα.\n" #: libsylph/mbox.c:268 #, c-format msgid "can't create lock file %s\n" msgstr "Δεν είναι δυνατή η δημιουργία αρχείου κλειδώματος %s\n" #: libsylph/mbox.c:269 msgid "use 'flock' instead of 'file' if possible.\n" msgstr "χρήση της εντολής 'flock' αντί 'file' αν είναι δυνατό.\n" #: libsylph/mbox.c:281 #, c-format msgid "can't create %s\n" msgstr "Δεν είναι δυνατή η δημιουργία του %s\n" #: libsylph/mbox.c:287 msgid "mailbox is owned by another process, waiting...\n" msgstr "το γραμματοκιβώτιο ανήκει σε άλλη διεργασία, αναμονή...\n" #: libsylph/mbox.c:316 #, c-format msgid "can't lock %s\n" msgstr "δεν είναι δυνατό το κλείδωμα του %s\n" #: libsylph/mbox.c:323 libsylph/mbox.c:373 msgid "invalid lock type\n" msgstr "μη έκυρος τύπος κλειδώματος\n" #: libsylph/mbox.c:359 #, c-format msgid "can't unlock %s\n" msgstr "δεν είναι δυνατό το ξεκλείδωμα του %s\n" #: libsylph/mbox.c:394 msgid "can't truncate mailbox to zero.\n" msgstr "Δεν είναι δυνατή η περικοπή του γραμματοκιβωτίου σε μηδενικό.\n" #: libsylph/mbox.c:418 #, c-format msgid "Exporting messages from %s into %s...\n" msgstr "Εξαγωγή μηνυμάτων από το %s στο %s...\n" #: libsylph/mh.c:427 #, c-format msgid "can't copy message %s to %s\n" msgstr "δεν μπορώ να αντιγράψω το μήνυμα %s στο %s\n" #: libsylph/mh.c:502 libsylph/mh.c:625 msgid "Can't open mark file.\n" msgstr "Δεν είναι δυνατή η σημείωση του αρχείου.\n" #: libsylph/mh.c:509 libsylph/mh.c:631 msgid "the src folder is identical to the dest.\n" msgstr "ο πηγαίος φάκελος είναι ίδιος με το φάκελο προορισμού.\n" #: libsylph/mh.c:634 #, c-format msgid "Copying message %s%c%d to %s ...\n" msgstr "Αντιγραφή μηνύματος %s%c%d στο %s ...\n" #: libsylph/mh.c:965 libsylph/mh.c:978 #, c-format msgid "" "File `%s' already exists.\n" "Can't create folder." msgstr "" "Το αρχείο '%s' υπάρχει ήδη.\n" "Δεν είναι δυνατή η δημιουργία του φακέλου." #: libsylph/mh.c:1500 #, c-format msgid "" "Directory name\n" "'%s' is not a valid UTF-8 string.\n" "Maybe the locale encoding is used for filename.\n" "If that is the case, you must set the following environmental variable\n" "(see README for detail):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" msgstr "" #: libsylph/news.c:207 #, c-format msgid "creating NNTP connection to %s:%d ...\n" msgstr "δημιουργώ NNTP σύνδεση στο %s:%d ...\n" #: libsylph/news.c:276 #, c-format msgid "NNTP connection to %s:%d has been disconnected. Reconnecting...\n" msgstr "Η NNTP σύνδεση στο %s:%d διακόπηκε. Επανασύνδεση...\n" #: libsylph/news.c:377 #, c-format msgid "article %d has been already cached.\n" msgstr "το άρθρο %d υπάρχει ήδη στην προσωρινή μνήμη.\n" #: libsylph/news.c:397 #, c-format msgid "getting article %d...\n" msgstr "λήψη άρθρου %d...\n" #: libsylph/news.c:401 #, c-format msgid "can't read article %d\n" msgstr "δεν είναι δυνατή η ανάγνωση του άρθρου %d\n" #: libsylph/news.c:676 msgid "can't post article.\n" msgstr "δεν μπορώ να στείλω το άρθρο.\n" #: libsylph/news.c:702 #, c-format msgid "can't retrieve article %d\n" msgstr "δεν μπορώ να λάβω το άρθρο %d\n" #: libsylph/news.c:759 #, c-format msgid "can't select group: %s\n" msgstr "δεν είναι δυνατή η επιλογή της ομάδας: %s\n" #: libsylph/news.c:796 #, c-format msgid "invalid article range: %d - %d\n" msgstr "μη έγκυρη ακολουθία άρθρων: %d - %d\n" #: libsylph/news.c:809 msgid "no new articles.\n" msgstr "δεν υπάρχουν νέα άρθρα.\n" #: libsylph/news.c:819 #, c-format msgid "getting xover %d - %d in %s...\n" msgstr "λαμβάνω xover %d - %d στο %s...\n" #: libsylph/news.c:823 msgid "can't get xover\n" msgstr "δεν μπορώ να λάβω xover\n" #: libsylph/news.c:833 msgid "error occurred while getting xover.\n" msgstr "συνέβη σφάλμα καθώς λάμβανα xover.\n" #: libsylph/news.c:843 #, c-format msgid "invalid xover line: %s\n" msgstr "μη έγκυρη γραμμή xover: %s\n" #: libsylph/news.c:862 libsylph/news.c:894 msgid "can't get xhdr\n" msgstr "δεν μπορώ να λάβω xhdr\n" #: libsylph/news.c:874 libsylph/news.c:906 msgid "error occurred while getting xhdr.\n" msgstr "συνέβη σφάλμα καθώς λάμβανα xhdr.\n" #: libsylph/nntp.c:68 #, c-format msgid "Can't connect to NNTP server: %s:%d\n" msgstr "Δεν μπορώ να συνδεθώ στον NNTP server: %s:%d\n" #: libsylph/nntp.c:164 libsylph/nntp.c:227 #, c-format msgid "protocol error: %s\n" msgstr "σφάλμα πρωτοκόλλου: %s\n" #: libsylph/nntp.c:187 libsylph/nntp.c:233 msgid "protocol error\n" msgstr "σφάλμα πρωτοκόλλου\n" #: libsylph/nntp.c:283 msgid "Error occurred while posting\n" msgstr "Προέκυψε σφάλμα κατά την αποστολή\n" #: libsylph/nntp.c:363 msgid "Error occurred while sending command\n" msgstr "Προέκυψε σφάλμα κατά την αποστολή της εντολής\n" #: libsylph/pop.c:155 msgid "Required APOP timestamp not found in greeting\n" msgstr "Προαπαιτούμενη timestamp APOP δεν βρέθηκε στο χαιρετισμό\n" #: libsylph/pop.c:162 msgid "Timestamp syntax error in greeting\n" msgstr "Συντακτικό σφάλμα timestamp στο χαιρετισμό\n" #: libsylph/pop.c:170 #, fuzzy msgid "Invalid timestamp in greeting\n" msgstr "Προαπαιτούμενη timestamp APOP δεν βρέθηκε στο χαιρετισμό\n" #: libsylph/pop.c:198 libsylph/pop.c:225 msgid "POP3 protocol error\n" msgstr "Σφάλμα πρωτοκόλλου POP3\n" #: libsylph/pop.c:270 #, c-format msgid "invalid UIDL response: %s\n" msgstr "Μη έγκυρη απάντηση UIDL: %s\n" #: libsylph/pop.c:631 #, c-format msgid "POP3: Deleting expired message %d\n" msgstr "POP3: Διαγραφή ληγμένου μηνύματος %d\n" #: libsylph/pop.c:640 #, c-format msgid "POP3: Skipping message %d (%d bytes)\n" msgstr "POP3: Προσπέραση μηνύματος (%d / %d bytes)\n" #: libsylph/pop.c:673 msgid "mailbox is locked\n" msgstr "το γραμματοκιβώτιο είναι κλειδωμένο\n" #: libsylph/pop.c:676 msgid "session timeout\n" msgstr "λήξη ορίου χρόνου συνεδρίας\n" #: libsylph/pop.c:682 libsylph/smtp.c:561 msgid "can't start TLS session\n" msgstr "δεν είναι δυνατό να ξεκινήσει συνεδρία TLS\n" #: libsylph/pop.c:689 libsylph/smtp.c:496 msgid "error occurred on authentication\n" msgstr "προέκυψε σφάλμα κατά την πιστοποίηση\n" #: libsylph/pop.c:694 msgid "command not supported\n" msgstr "η εντολή δεν υποστηρίζεται\n" #: libsylph/pop.c:698 msgid "error occurred on POP3 session\n" msgstr "Προέκυψε σφάλμα στη συνεδρία POP3\n" #: libsylph/prefs.c:196 libsylph/prefs.c:224 libsylph/prefs.c:269 #: libsylph/prefs_account.c:217 libsylph/prefs_account.c:231 msgid "failed to write configuration to file\n" msgstr "Η εγγραφή στο αρχείο ρυθμίσεων απέτυχε\n" #: libsylph/prefs.c:239 #, c-format msgid "Found %s\n" msgstr "Βρέθηκαν %s\n" #: libsylph/prefs.c:272 msgid "Configuration is saved.\n" msgstr "Οι ρυθμίσεις αποθηκεύτηκαν.\n" #: libsylph/prefs_common.c:503 msgid "Junk mail filter (manual)" msgstr "Φίλτρο ανεπιθύμητης αλληλογραφίας (χειροκίνητο)" #: libsylph/prefs_common.c:506 msgid "Junk mail filter" msgstr "Φίλτρο ανεπιθύμητης αλληλογραφίας" #: libsylph/procmime.c:1142 msgid "procmime_get_text_content(): Code conversion failed.\n" msgstr "" #: libsylph/procmsg.c:655 msgid "can't open mark file\n" msgstr "" #: libsylph/procmsg.c:1107 #, c-format msgid "can't fetch message %d\n" msgstr "δεν είναι δυνατή η λήψη του μηνύματος %d\n" #: libsylph/procmsg.c:1423 #, c-format msgid "Print command line is invalid: `%s'\n" msgstr "Η εντολή εκτύπωσης είναι άκυρη: '%s'\n" #: libsylph/recv.c:141 msgid "error occurred while retrieving data.\n" msgstr "σφάλμα κατά τη λήψη των δεδομένων.\n" #: libsylph/recv.c:183 libsylph/recv.c:215 libsylph/recv.c:230 msgid "Can't write to file.\n" msgstr "Δεν είναι δυνατή η εγγραφή στο αρχείο.\n" #: libsylph/smtp.c:157 msgid "SMTP AUTH not available\n" msgstr "Το SMTP AUTH δεν είναι διαθέσιμο\n" #: libsylph/smtp.c:466 libsylph/smtp.c:516 msgid "bad SMTP response\n" msgstr "εσφαλμένη απάντηση SMTP\n" #: libsylph/smtp.c:487 libsylph/smtp.c:505 libsylph/smtp.c:602 msgid "error occurred on SMTP session\n" msgstr "προέκυψε σφάλμα στη σύνοδο SMTP\n" #: libsylph/ssl.c:54 msgid "SSLv23 not available\n" msgstr "Το SSLv23 δεν είναι διαθέσιμο\n" #: libsylph/ssl.c:56 msgid "SSLv23 available\n" msgstr "Το SSLv23 είναι διαθέσιμο\n" #: libsylph/ssl.c:65 msgid "TLSv1 not available\n" msgstr "Το TLSv1 δεν είναι διαθέσιμο\n" #: libsylph/ssl.c:67 msgid "TLSv1 available\n" msgstr "Το TLSv1 είναι διαθέσιμο\n" #: libsylph/ssl.c:101 libsylph/ssl.c:108 msgid "SSL method not available\n" msgstr "Η μέθοδος SSL δεν είναι διαθέσιμη\n" #: libsylph/ssl.c:114 msgid "Unknown SSL method *PROGRAM BUG*\n" msgstr "Άγνωστη μέθοδος SSL *ΣΦΑΛΜΑ ΣΤΟ ΠΡΟΓΡΑΜΜΑ*\n" #: libsylph/ssl.c:120 msgid "Error creating ssl context\n" msgstr "" #. Get the cipher #: libsylph/ssl.c:139 #, c-format msgid "SSL connection using %s\n" msgstr "Σύνδεση SSL με χρήση %s\n" #: libsylph/ssl.c:148 msgid "Server certificate:\n" msgstr "Πιστοποιητικό διακομιστή:\n" #: libsylph/ssl.c:151 #, c-format msgid " Subject: %s\n" msgstr " Θέμα: %s\n" #: libsylph/ssl.c:156 #, c-format msgid " Issuer: %s\n" msgstr " Εκδότης: %s\n" #: libsylph/utils.c:2682 libsylph/utils.c:2804 #, c-format msgid "writing to %s failed.\n" msgstr "η εγγραφή στο %s απέτυχε.\n" #~ msgid "can't change file mode\n" #~ msgstr "δεν είναι δυνατή η αλλαγή της κατάστασης του αρχείου\n" libsylph-1.1.0/po/es.po0000644000175000017500000003674010756432604011666 00000000000000# Spanish translation of Sylpheed. # Copyright (C) 2000 Free Software Foundation, Inc. # Ricardo Mones , 2000-2006. # msgid "" msgstr "" "Project-Id-Version: sylpheed\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-02-19 10:48+0900\n" "PO-Revision-Date: 2006-07-29 00:32+0100\n" "Last-Translator: Ricardo Mones \n" "Language-Team: Ricardo Mones \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: libsylph/account.c:56 msgid "Reading all config for each account...\n" msgstr "Leyendo configuración de cada cuenta...\n" #: libsylph/imap.c:465 #, c-format msgid "IMAP4 connection to %s has been disconnected. Reconnecting...\n" msgstr "La conexión IMAP4 con %s se ha roto. Reconectando...\n" #: libsylph/imap.c:520 libsylph/imap.c:526 msgid "IMAP4 server disables LOGIN.\n" msgstr "El servidor IMAP4 deshabilita LOGIN.\n" #: libsylph/imap.c:602 #, c-format msgid "creating IMAP4 connection to %s:%d ...\n" msgstr "creando conexión IMAP4 con %s:%d ...\n" #: libsylph/imap.c:646 msgid "Can't start TLS session.\n" msgstr "No puedo iniciar la sesión TLS.\n" #: libsylph/imap.c:1120 #, c-format msgid "Getting message %d" msgstr "Obteniendo mensaje %d" #: libsylph/imap.c:1236 #, c-format msgid "Appending messages to %s (%d / %d)" msgstr "Agregando mensajes a %s (%d / %d)" #: libsylph/imap.c:1328 #, c-format msgid "Moving messages %s to %s ..." msgstr "Moviendo mensajes %s a %s ..." #: libsylph/imap.c:1334 #, c-format msgid "Copying messages %s to %s ..." msgstr "Copiando mensajes %s a %s ..." #: libsylph/imap.c:1473 #, c-format msgid "Removing messages %s" msgstr "Borrando mensajes %s" #: libsylph/imap.c:1479 #, c-format msgid "can't set deleted flags: %s\n" msgstr "no puedo establecer los flags borrados: %s\n" #: libsylph/imap.c:1487 libsylph/imap.c:1582 msgid "can't expunge\n" msgstr "no puedo vaciar\n" #: libsylph/imap.c:1570 #, c-format msgid "Removing all messages in %s" msgstr "Borrando todos los mensajes en %s" #: libsylph/imap.c:1576 msgid "can't set deleted flags: 1:*\n" msgstr "no puedo establecer los flags borrados: 1:*\n" #: libsylph/imap.c:1624 msgid "can't close folder\n" msgstr "no se puede cerrar la carpeta\n" #: libsylph/imap.c:1702 #, c-format msgid "root folder %s not exist\n" msgstr "la carpeta raíz %s no existe\n" #: libsylph/imap.c:1891 libsylph/imap.c:1899 msgid "error occurred while getting LIST.\n" msgstr "hubo un error obteniendo LIST.\n" #: libsylph/imap.c:2013 #, c-format msgid "Can't create '%s'\n" msgstr "No puedo crear «%s»\n" #: libsylph/imap.c:2018 #, c-format msgid "Can't create '%s' under INBOX\n" msgstr "No puedo crear «%s» bajo Entrada\n" #: libsylph/imap.c:2079 msgid "can't create mailbox: LIST failed\n" msgstr "no puedo crear el buzón: LIST falló\n" #: libsylph/imap.c:2099 msgid "can't create mailbox\n" msgstr "no puedo crear el buzón\n" #: libsylph/imap.c:2203 #, c-format msgid "can't rename mailbox: %s to %s\n" msgstr "no puedo renombrar el buzón: %s a %s\n" #: libsylph/imap.c:2283 msgid "can't delete mailbox\n" msgstr "no puedo borrar el buzón\n" #: libsylph/imap.c:2327 msgid "can't get envelope\n" msgstr "no se puede obtener la estructura del mensaje\n" #: libsylph/imap.c:2340 #, c-format msgid "Getting message headers (%d / %d)" msgstr "Obteniendo las cabeceras de mensaje (%d / %d)" #: libsylph/imap.c:2350 msgid "error occurred while getting envelope.\n" msgstr "error obteniendo la estructura del mensaje.\n" #: libsylph/imap.c:2372 #, c-format msgid "can't parse envelope: %s\n" msgstr "No se puede interpretar la estructura del mensaje: %s\n" #: libsylph/imap.c:2496 #, c-format msgid "Can't connect to IMAP4 server: %s:%d\n" msgstr "No se puede conectar con el servidor IMAP4: %s:%d\n" #: libsylph/imap.c:2503 #, c-format msgid "Can't establish IMAP4 session with: %s:%d\n" msgstr "No puedo establecer la sesión IMAP4: %s:%d\n" #: libsylph/imap.c:2578 msgid "can't get namespace\n" msgstr "no se puede obtener el espacio de nombres\n" #: libsylph/imap.c:3111 #, c-format msgid "can't select folder: %s\n" msgstr "no se puede seleccionar la carpeta: %s\n" #: libsylph/imap.c:3146 msgid "error on imap command: STATUS\n" msgstr "error en el mandato imap: STATUS\n" #: libsylph/imap.c:3269 libsylph/imap.c:3304 msgid "IMAP4 authentication failed.\n" msgstr "La autentificación IMAP falló.\n" #: libsylph/imap.c:3353 msgid "IMAP4 login failed.\n" msgstr "Autentificación IMAP4 fallida.\n" #: libsylph/imap.c:3689 #, c-format msgid "can't append %s to %s\n" msgstr "no puedo añadir %s a %s\n" #: libsylph/imap.c:3696 msgid "(sending file...)" msgstr "(enviando fichero...)" #: libsylph/imap.c:3725 #, c-format msgid "can't append message to %s\n" msgstr "no se puede añadir el mensaje a %s\n" #: libsylph/imap.c:3757 #, c-format msgid "can't copy %s to %s\n" msgstr "no puedo copiar %s a %s\n" #: libsylph/imap.c:3781 #, c-format msgid "error while imap command: STORE %s %s\n" msgstr "error en el mandato imap: STORE %s %s\n" #: libsylph/imap.c:3795 msgid "error while imap command: EXPUNGE\n" msgstr "error en el mandato imap: EXPUNGE\n" #: libsylph/imap.c:3808 msgid "error while imap command: CLOSE\n" msgstr "error en el mandato imap: CLOSE\n" #: libsylph/imap.c:4084 #, c-format msgid "iconv cannot convert UTF-7 to %s\n" msgstr "iconv no puede convertir UTF-7 a %s\n" #: libsylph/imap.c:4114 #, c-format msgid "iconv cannot convert %s to UTF-7\n" msgstr "iconv no puede convertir %s a UTF-7\n" #: libsylph/mbox.c:50 libsylph/mbox.c:196 msgid "can't write to temporary file\n" msgstr "no se puede escribir el fichero temporal\n" #: libsylph/mbox.c:69 #, c-format msgid "Getting messages from %s into %s...\n" msgstr "Obteniendo mensajes desde %s en %s...\n" #: libsylph/mbox.c:79 msgid "can't read mbox file.\n" msgstr "no puedo leer el fichero mbox.\n" #: libsylph/mbox.c:86 #, c-format msgid "invalid mbox format: %s\n" msgstr "formato de mbox inválido: %s\n" #: libsylph/mbox.c:93 #, c-format msgid "malformed mbox: %s\n" msgstr "mbox malformada: %s\n" #: libsylph/mbox.c:110 msgid "can't open temporary file\n" msgstr "no se puede abrir el fichero temporal\n" #: libsylph/mbox.c:161 #, c-format msgid "" "unescaped From found:\n" "%s" msgstr "" "Encontrado Desde sin escapar:\n" "%s" #: libsylph/mbox.c:250 #, c-format msgid "%d messages found.\n" msgstr "%d mensajes encontrados.\n" #: libsylph/mbox.c:268 #, c-format msgid "can't create lock file %s\n" msgstr "no se puede crear el fichero de bloqueo %s\n" #: libsylph/mbox.c:269 msgid "use 'flock' instead of 'file' if possible.\n" msgstr "usar 'flock' en vez de 'file' si es posible.\n" #: libsylph/mbox.c:281 #, c-format msgid "can't create %s\n" msgstr "no puedo crear %s\n" #: libsylph/mbox.c:287 msgid "mailbox is owned by another process, waiting...\n" msgstr "el buzón esta siendo usado por otro proceso, esperando...\n" #: libsylph/mbox.c:316 #, c-format msgid "can't lock %s\n" msgstr "no se puede bloquear %s\n" #: libsylph/mbox.c:323 libsylph/mbox.c:373 msgid "invalid lock type\n" msgstr "tipo de bloqueo no válido\n" #: libsylph/mbox.c:359 #, c-format msgid "can't unlock %s\n" msgstr "no se puede desbloquear %s\n" #: libsylph/mbox.c:394 msgid "can't truncate mailbox to zero.\n" msgstr "no se puede truncar a cero el buzón.\n" #: libsylph/mbox.c:418 #, c-format msgid "Exporting messages from %s into %s...\n" msgstr "Exportando mensajes de %s a %s...\n" #: libsylph/mh.c:427 #, c-format msgid "can't copy message %s to %s\n" msgstr "no se puede copiar mensaje %s a %s\n" #: libsylph/mh.c:502 libsylph/mh.c:625 msgid "Can't open mark file.\n" msgstr "No se puede abrir el fichero de marcas.\n" #: libsylph/mh.c:509 libsylph/mh.c:631 msgid "the src folder is identical to the dest.\n" msgstr "carpetas de origen y destino idénticas.\n" #: libsylph/mh.c:634 #, c-format msgid "Copying message %s%c%d to %s ...\n" msgstr "Copiando mensaje %s%c%d a %s ...\n" #: libsylph/mh.c:965 libsylph/mh.c:978 #, c-format msgid "" "File `%s' already exists.\n" "Can't create folder." msgstr "" "El fichero «%s» ya existe.\n" "No puedo crear la carpeta." #: libsylph/mh.c:1500 #, c-format msgid "" "Directory name\n" "'%s' is not a valid UTF-8 string.\n" "Maybe the locale encoding is used for filename.\n" "If that is the case, you must set the following environmental variable\n" "(see README for detail):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" msgstr "" "El nombre de directorio\n" "«%s» no es una cadena UTF-8 válida.\n" "Quizás se este usando la codificación local para el nombre.\n" "Si esto es así debería establecer la siguiente variable de entorno\n" "(Vea el README para los detalles):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" #: libsylph/news.c:207 #, c-format msgid "creating NNTP connection to %s:%d ...\n" msgstr "creando conexión NNTP con %s:%d ...\n" #: libsylph/news.c:276 #, c-format msgid "NNTP connection to %s:%d has been disconnected. Reconnecting...\n" msgstr "La conexión NNTP con %s:%d ha sido rota. Reconectando...\n" #: libsylph/news.c:377 #, c-format msgid "article %d has been already cached.\n" msgstr "el artículo %d ya esta en caché.\n" #: libsylph/news.c:397 #, c-format msgid "getting article %d...\n" msgstr "obteniendo artículo %d...\n" #: libsylph/news.c:401 #, c-format msgid "can't read article %d\n" msgstr "no puedo leer el artículo %d\n" #: libsylph/news.c:676 msgid "can't post article.\n" msgstr "no se puede enviar el artículo.\n" #: libsylph/news.c:702 #, c-format msgid "can't retrieve article %d\n" msgstr "no puedo obtener el artículo %d\n" #: libsylph/news.c:759 #, c-format msgid "can't select group: %s\n" msgstr "no puedo seleccionar el grupo: %s\n" #: libsylph/news.c:796 #, c-format msgid "invalid article range: %d - %d\n" msgstr "rango de artículos no válido: %d - %d\n" #: libsylph/news.c:809 msgid "no new articles.\n" msgstr "no hay artículos nuevos.\n" #: libsylph/news.c:819 #, c-format msgid "getting xover %d - %d in %s...\n" msgstr "obteniendo xover %d - %d en %s...\n" #: libsylph/news.c:823 msgid "can't get xover\n" msgstr "no se puede obtener xover\n" #: libsylph/news.c:833 msgid "error occurred while getting xover.\n" msgstr "hubo un error obteniendo xover.\n" #: libsylph/news.c:843 #, c-format msgid "invalid xover line: %s\n" msgstr "línea xover no válida: %s\n" #: libsylph/news.c:862 libsylph/news.c:894 msgid "can't get xhdr\n" msgstr "no se puede obtener xhdr\n" #: libsylph/news.c:874 libsylph/news.c:906 msgid "error occurred while getting xhdr.\n" msgstr "hubo un error obteniendo xhdr.\n" #: libsylph/nntp.c:68 #, c-format msgid "Can't connect to NNTP server: %s:%d\n" msgstr "No se puede conectar con el servidor NNTP: %s:%d\n" #: libsylph/nntp.c:164 libsylph/nntp.c:227 #, c-format msgid "protocol error: %s\n" msgstr "error del protocolo: %s\n" #: libsylph/nntp.c:187 libsylph/nntp.c:233 msgid "protocol error\n" msgstr "error del protocolo\n" #: libsylph/nntp.c:283 msgid "Error occurred while posting\n" msgstr "Hubo un error mientras se enviaba\n" #: libsylph/nntp.c:363 msgid "Error occurred while sending command\n" msgstr "Hubo un error enviando el mandato\n" #: libsylph/pop.c:155 msgid "Required APOP timestamp not found in greeting\n" msgstr "No se encontro en el saludo la marca temporal APOP requerida\n" #: libsylph/pop.c:162 msgid "Timestamp syntax error in greeting\n" msgstr "La marca temporal del saludo tiene un error de sintaxis\n" #: libsylph/pop.c:170 #, fuzzy msgid "Invalid timestamp in greeting\n" msgstr "No se encontro en el saludo la marca temporal APOP requerida\n" #: libsylph/pop.c:198 libsylph/pop.c:225 msgid "POP3 protocol error\n" msgstr "Error del protocolo POP3\n" #: libsylph/pop.c:270 #, c-format msgid "invalid UIDL response: %s\n" msgstr "respuesta UIDL no válida: %s\n" #: libsylph/pop.c:631 #, c-format msgid "POP3: Deleting expired message %d\n" msgstr "POP3: Borrando mensaje caducado %d\n" #: libsylph/pop.c:640 #, c-format msgid "POP3: Skipping message %d (%d bytes)\n" msgstr "POP3: Ignorando mensaje %d (%d bytes)\n" #: libsylph/pop.c:673 msgid "mailbox is locked\n" msgstr "el buzón está bloqueado\n" #: libsylph/pop.c:676 msgid "session timeout\n" msgstr "tiempo de espera agotado para la sesión\n" #: libsylph/pop.c:682 libsylph/smtp.c:561 msgid "can't start TLS session\n" msgstr "no puedo iniciar la sesión TLs\n" #: libsylph/pop.c:689 libsylph/smtp.c:496 msgid "error occurred on authentication\n" msgstr "hubo algún error en la autentificación\n" #: libsylph/pop.c:694 msgid "command not supported\n" msgstr "mandato no soportado\n" #: libsylph/pop.c:698 msgid "error occurred on POP3 session\n" msgstr "hubo algún error en la sesión POP3\n" #: libsylph/prefs.c:196 libsylph/prefs.c:224 libsylph/prefs.c:269 #: libsylph/prefs_account.c:217 libsylph/prefs_account.c:231 msgid "failed to write configuration to file\n" msgstr "fallo escribiendo la configuración al fichero\n" #: libsylph/prefs.c:239 #, c-format msgid "Found %s\n" msgstr "Encontrado %s\n" #: libsylph/prefs.c:272 msgid "Configuration is saved.\n" msgstr "Configuración guardada.\n" #: libsylph/prefs_common.c:503 #, fuzzy msgid "Junk mail filter (manual)" msgstr "Filtro de correo basura" #: libsylph/prefs_common.c:506 msgid "Junk mail filter" msgstr "Filtro de correo basura" #: libsylph/procmime.c:1142 msgid "procmime_get_text_content(): Code conversion failed.\n" msgstr "procmime_get_text_content(): Conversión de códigos fallida.\n" #: libsylph/procmsg.c:655 msgid "can't open mark file\n" msgstr "no se puede abrir el fichero de marcas\n" #: libsylph/procmsg.c:1107 #, c-format msgid "can't fetch message %d\n" msgstr "no se puede obtener el mensaje %d\n" #: libsylph/procmsg.c:1423 #, c-format msgid "Print command line is invalid: `%s'\n" msgstr "La orden para imprimir es inválida: «%s»\n" #: libsylph/recv.c:141 msgid "error occurred while retrieving data.\n" msgstr "hubo un error mientras se obtenian datos.\n" #: libsylph/recv.c:183 libsylph/recv.c:215 libsylph/recv.c:230 msgid "Can't write to file.\n" msgstr "No se puede escribir al fichero.\n" #: libsylph/smtp.c:157 msgid "SMTP AUTH not available\n" msgstr "SMTP AUTH no está disponible\n" #: libsylph/smtp.c:466 libsylph/smtp.c:516 msgid "bad SMTP response\n" msgstr "respuesta SMTP errónea\n" #: libsylph/smtp.c:487 libsylph/smtp.c:505 libsylph/smtp.c:602 msgid "error occurred on SMTP session\n" msgstr "hubo algún error en la sesión SMTP\n" #: libsylph/ssl.c:54 msgid "SSLv23 not available\n" msgstr "SSLv23 no está disponible\n" #: libsylph/ssl.c:56 msgid "SSLv23 available\n" msgstr "SSLv23 disponible\n" #: libsylph/ssl.c:65 msgid "TLSv1 not available\n" msgstr "TLSv1 no está disponible\n" #: libsylph/ssl.c:67 msgid "TLSv1 available\n" msgstr "TLSv1 disponible\n" #: libsylph/ssl.c:101 libsylph/ssl.c:108 msgid "SSL method not available\n" msgstr "Método SSL no disponible\n" #: libsylph/ssl.c:114 msgid "Unknown SSL method *PROGRAM BUG*\n" msgstr "Método SSL desconocido *ERROR EN EL PROGRAMA*\n" #: libsylph/ssl.c:120 msgid "Error creating ssl context\n" msgstr "Error creando el contexto SSL\n" #. Get the cipher #: libsylph/ssl.c:139 #, c-format msgid "SSL connection using %s\n" msgstr "Conexión SSL usando %s\n" #: libsylph/ssl.c:148 msgid "Server certificate:\n" msgstr "Certificado del servidor:\n" #: libsylph/ssl.c:151 #, c-format msgid " Subject: %s\n" msgstr " Asunto: %s\n" #: libsylph/ssl.c:156 #, c-format msgid " Issuer: %s\n" msgstr " Emisor: %s\n" #: libsylph/utils.c:2682 libsylph/utils.c:2804 #, c-format msgid "writing to %s failed.\n" msgstr "fallo escribiendo en %s.\n" #~ msgid "can't change file mode\n" #~ msgstr "no se pueden cambiar los permisos de archivo\n" libsylph-1.1.0/po/et.po0000644000175000017500000003553710756432604011672 00000000000000# Estonian translation of sylpheed. # Copyright (C) 2001 Free Software Foundation, Inc. # Peeter Vois , 2001. # msgid "" msgstr "" "Project-Id-Version: sylpheed\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-02-19 10:48+0900\n" "PO-Revision-Date: 2002-10-02 09:08+0300\n" "Last-Translator: Peeter Vois \n" "Language-Team: Estonian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: libsylph/account.c:56 msgid "Reading all config for each account...\n" msgstr "Loen kõigi kontode seaded...\n" #: libsylph/imap.c:465 #, fuzzy, c-format msgid "IMAP4 connection to %s has been disconnected. Reconnecting...\n" msgstr "IMAP4 ühendus %s:%d-ga katkes. Taasühendan...\n" #: libsylph/imap.c:520 libsylph/imap.c:526 #, fuzzy msgid "IMAP4 server disables LOGIN.\n" msgstr "IMAP serveri kataloog" #: libsylph/imap.c:602 #, c-format msgid "creating IMAP4 connection to %s:%d ...\n" msgstr "loon IMAP4 ühendust %s:%d-ga ...\n" #: libsylph/imap.c:646 msgid "Can't start TLS session.\n" msgstr "Ei suuda avada TLS sessiooni.\n" #: libsylph/imap.c:1120 #, fuzzy, c-format msgid "Getting message %d" msgstr "Kustutan kirja %d" #: libsylph/imap.c:1236 #, fuzzy, c-format msgid "Appending messages to %s (%d / %d)" msgstr "Saadan kirja (%d / %d baiti)" #: libsylph/imap.c:1328 #, fuzzy, c-format msgid "Moving messages %s to %s ..." msgstr "Liigutan kirja %s%c%d kausta %s ...\n" #: libsylph/imap.c:1334 #, fuzzy, c-format msgid "Copying messages %s to %s ..." msgstr "Kopeerin kirja %s%c%d kausta %s ...\n" #: libsylph/imap.c:1473 #, fuzzy, c-format msgid "Removing messages %s" msgstr "Võtan kirju %s-st ja panen %s-i...\n" #: libsylph/imap.c:1479 #, fuzzy, c-format msgid "can't set deleted flags: %s\n" msgstr "ei suutnud seada kustutatu lippu: %d\n" #: libsylph/imap.c:1487 libsylph/imap.c:1582 msgid "can't expunge\n" msgstr "ei suuda väljastada\n" #: libsylph/imap.c:1570 #, fuzzy, c-format msgid "Removing all messages in %s" msgstr "Võtan kirju %s-st ja panen %s-i...\n" #: libsylph/imap.c:1576 #, fuzzy msgid "can't set deleted flags: 1:*\n" msgstr "ei suutnud seada kustutatu lippu: 1:%d\n" #: libsylph/imap.c:1624 #, fuzzy msgid "can't close folder\n" msgstr "ei suuuda valida kausta: %s\n" #: libsylph/imap.c:1702 #, fuzzy, c-format msgid "root folder %s not exist\n" msgstr "*Märgi faili ei leidunud.\n" #: libsylph/imap.c:1891 libsylph/imap.c:1899 #, fuzzy msgid "error occurred while getting LIST.\n" msgstr "Nimistu saamisel tekkis viga.\n" #: libsylph/imap.c:2013 #, c-format msgid "Can't create '%s'\n" msgstr "Ei suuda luua '%s'\n" #: libsylph/imap.c:2018 #, c-format msgid "Can't create '%s' under INBOX\n" msgstr "Ei suuda luua '%s' Sisendkasti all\n" #: libsylph/imap.c:2079 msgid "can't create mailbox: LIST failed\n" msgstr "ei suuda luua kirjakasti: Nimistu ebaõnnestus\n" #: libsylph/imap.c:2099 msgid "can't create mailbox\n" msgstr "ei suuda luua kirjakasti\n" #: libsylph/imap.c:2203 #, c-format msgid "can't rename mailbox: %s to %s\n" msgstr "ei suuda kirjakasti %s-lt ümber nimetada %s-le\n" #: libsylph/imap.c:2283 msgid "can't delete mailbox\n" msgstr "ei suuda kustutada kirjakasti\n" #: libsylph/imap.c:2327 msgid "can't get envelope\n" msgstr "ei suuda võtta ümbrikut\n" #: libsylph/imap.c:2340 #, fuzzy, c-format msgid "Getting message headers (%d / %d)" msgstr "Saadan kirja (%d / %d baiti)" #: libsylph/imap.c:2350 msgid "error occurred while getting envelope.\n" msgstr "ümbriku võtmisel tekis viga.\n" #: libsylph/imap.c:2372 #, c-format msgid "can't parse envelope: %s\n" msgstr "ei suutnud avada ümbrikut: %s\n" #: libsylph/imap.c:2496 #, c-format msgid "Can't connect to IMAP4 server: %s:%d\n" msgstr "Ei suuda ühendada IMAP4 serveriga: %s:%d\n" #: libsylph/imap.c:2503 #, c-format msgid "Can't establish IMAP4 session with: %s:%d\n" msgstr "Ei suuda ühendada IMAP4 serveriga: %s:%d\n" #: libsylph/imap.c:2578 msgid "can't get namespace\n" msgstr "ei suutnud leida nime asukohta\n" #: libsylph/imap.c:3111 #, c-format msgid "can't select folder: %s\n" msgstr "ei suuuda valida kausta: %s\n" #: libsylph/imap.c:3146 #, fuzzy msgid "error on imap command: STATUS\n" msgstr "imapi käsu täitmisel tekkis viga: EXPUNGE\n" #: libsylph/imap.c:3269 libsylph/imap.c:3304 #, fuzzy msgid "IMAP4 authentication failed.\n" msgstr "Autoriseerimise meetod" #: libsylph/imap.c:3353 msgid "IMAP4 login failed.\n" msgstr "IMAP4 sissekirjutus ebaõnnestus.\n" #: libsylph/imap.c:3689 #, c-format msgid "can't append %s to %s\n" msgstr "ei suuda %s-d lisada %s-i\n" #: libsylph/imap.c:3696 msgid "(sending file...)" msgstr "(saadan faili...)" #: libsylph/imap.c:3725 #, fuzzy, c-format msgid "can't append message to %s\n" msgstr "ei suuda lisada kirja %s\n" #: libsylph/imap.c:3757 #, fuzzy, c-format msgid "can't copy %s to %s\n" msgstr "ei suuda %d-d kopeerida %s-i\n" #: libsylph/imap.c:3781 #, fuzzy, c-format msgid "error while imap command: STORE %s %s\n" msgstr "imapi käsu täitmisel tekkis viga: STORE %d:%d %s\n" #: libsylph/imap.c:3795 msgid "error while imap command: EXPUNGE\n" msgstr "imapi käsu täitmisel tekkis viga: EXPUNGE\n" #: libsylph/imap.c:3808 #, fuzzy msgid "error while imap command: CLOSE\n" msgstr "imapi käsu täitmisel tekkis viga: EXPUNGE\n" #: libsylph/imap.c:4084 #, c-format msgid "iconv cannot convert UTF-7 to %s\n" msgstr "iconv ei suuda konversteerida UTF-7-t %s-ks\n" #: libsylph/imap.c:4114 #, c-format msgid "iconv cannot convert %s to UTF-7\n" msgstr "iconv ei suuda konverteerida %s-i UTF-7-ks\n" #: libsylph/mbox.c:50 libsylph/mbox.c:196 msgid "can't write to temporary file\n" msgstr "ei suuda kirjutada ajutisse faili\n" #: libsylph/mbox.c:69 #, c-format msgid "Getting messages from %s into %s...\n" msgstr "Võtan kirju %s-st ja panen %s-i...\n" #: libsylph/mbox.c:79 msgid "can't read mbox file.\n" msgstr "Ei saa lugeda kirjakasti faili.\n" #: libsylph/mbox.c:86 #, c-format msgid "invalid mbox format: %s\n" msgstr "sobimatu kirjakasti formaat: %s\n" #: libsylph/mbox.c:93 #, c-format msgid "malformed mbox: %s\n" msgstr "paha mbox: %s\n" #: libsylph/mbox.c:110 msgid "can't open temporary file\n" msgstr "ei saa avada ajutist fili\n" #: libsylph/mbox.c:161 #, c-format msgid "" "unescaped From found:\n" "%s" msgstr "" "Vabanematuid (kellelt) leitud:\n" "%s" #: libsylph/mbox.c:250 #, c-format msgid "%d messages found.\n" msgstr "leiti %d kirju.\n" #: libsylph/mbox.c:268 #, c-format msgid "can't create lock file %s\n" msgstr "ei saa luua lukufaili %s\n" #: libsylph/mbox.c:269 msgid "use 'flock' instead of 'file' if possible.\n" msgstr "kasuta 'flock'-i 'file' asemel kui võimalik.\n" #: libsylph/mbox.c:281 #, c-format msgid "can't create %s\n" msgstr "ei suuda luua %s\n" #: libsylph/mbox.c:287 msgid "mailbox is owned by another process, waiting...\n" msgstr "kirjakasti kasutab teine protsess, ootan...\n" #: libsylph/mbox.c:316 #, c-format msgid "can't lock %s\n" msgstr "ei suuda lukustada %s\n" #: libsylph/mbox.c:323 libsylph/mbox.c:373 msgid "invalid lock type\n" msgstr "vale luku tüüp\n" #: libsylph/mbox.c:359 #, c-format msgid "can't unlock %s\n" msgstr "ei saa lukku eemaldada %s-lt\n" #: libsylph/mbox.c:394 msgid "can't truncate mailbox to zero.\n" msgstr "kirjakasti ei saa lõigata nulliks.\n" #: libsylph/mbox.c:418 #, c-format msgid "Exporting messages from %s into %s...\n" msgstr "Ekspordime teated %s-ist %s-i ...\n" #: libsylph/mh.c:427 #, c-format msgid "can't copy message %s to %s\n" msgstr "ei saa kirja kopeerida %s-st %s-i\n" #: libsylph/mh.c:502 libsylph/mh.c:625 msgid "Can't open mark file.\n" msgstr "Ei suutnud avada märgi faili.\n" #: libsylph/mh.c:509 libsylph/mh.c:631 msgid "the src folder is identical to the dest.\n" msgstr "lähtekaust on identne sihtkaustale.\n" #: libsylph/mh.c:634 #, c-format msgid "Copying message %s%c%d to %s ...\n" msgstr "Kopeerin kirja %s%c%d kausta %s ...\n" #: libsylph/mh.c:965 libsylph/mh.c:978 #, c-format msgid "" "File `%s' already exists.\n" "Can't create folder." msgstr "" "Fail %s on juba olemas.\n" "Ei saa kausta luua." #: libsylph/mh.c:1500 #, c-format msgid "" "Directory name\n" "'%s' is not a valid UTF-8 string.\n" "Maybe the locale encoding is used for filename.\n" "If that is the case, you must set the following environmental variable\n" "(see README for detail):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" msgstr "" #: libsylph/news.c:207 #, c-format msgid "creating NNTP connection to %s:%d ...\n" msgstr "loon NNTP ühendust %s:%d-ga ...\n" #: libsylph/news.c:276 #, c-format msgid "NNTP connection to %s:%d has been disconnected. Reconnecting...\n" msgstr "NNTP ühendus %s:%d-ga on katkestatud. Taasühendan...\n" #: libsylph/news.c:377 #, c-format msgid "article %d has been already cached.\n" msgstr "artikkel %d on juba hoidlas.\n" #: libsylph/news.c:397 #, c-format msgid "getting article %d...\n" msgstr "võtan artikli %d...\n" #: libsylph/news.c:401 #, c-format msgid "can't read article %d\n" msgstr "ei saanud artiklit %d\n" #: libsylph/news.c:676 msgid "can't post article.\n" msgstr "ei saanud saata artiklit.\n" #: libsylph/news.c:702 #, c-format msgid "can't retrieve article %d\n" msgstr "ei saanud artiklit %d kohale\n" #: libsylph/news.c:759 #, fuzzy, c-format msgid "can't select group: %s\n" msgstr "ei saa valida gruppi %s\n" #: libsylph/news.c:796 #, c-format msgid "invalid article range: %d - %d\n" msgstr "ebasobiv artiklite vahemik: %d - %d\n" #: libsylph/news.c:809 msgid "no new articles.\n" msgstr "uusi artikelid pole.\n" #: libsylph/news.c:819 #, c-format msgid "getting xover %d - %d in %s...\n" msgstr "*võtan xover-i %d - %d %s-is\n" #: libsylph/news.c:823 msgid "can't get xover\n" msgstr "*ei saa xover'it\n" #: libsylph/news.c:833 msgid "error occurred while getting xover.\n" msgstr "*xover'i võtmisel tekkis viga\n" #: libsylph/news.c:843 #, c-format msgid "invalid xover line: %s\n" msgstr "*vigane xover rida: %s\n" #: libsylph/news.c:862 libsylph/news.c:894 msgid "can't get xhdr\n" msgstr "*ei saa xhdr-i\n" #: libsylph/news.c:874 libsylph/news.c:906 msgid "error occurred while getting xhdr.\n" msgstr "xhdr-i võtmise käigus tekkis viga.\n" #: libsylph/nntp.c:68 #, c-format msgid "Can't connect to NNTP server: %s:%d\n" msgstr "Ei saanud NNTP serveriga %s:%d ühendust\n" #: libsylph/nntp.c:164 libsylph/nntp.c:227 #, c-format msgid "protocol error: %s\n" msgstr "protokolli viga: %s\n" #: libsylph/nntp.c:187 libsylph/nntp.c:233 msgid "protocol error\n" msgstr "protokolli viga\n" #: libsylph/nntp.c:283 msgid "Error occurred while posting\n" msgstr "Kirja saatmisel tekkis viga\n" #: libsylph/nntp.c:363 #, fuzzy msgid "Error occurred while sending command\n" msgstr "Tekkis viga kirja protsessimisel." #: libsylph/pop.c:155 msgid "Required APOP timestamp not found in greeting\n" msgstr "Nõutud APOP'i ajatemplit ei leidunud tervituses\n" #: libsylph/pop.c:162 msgid "Timestamp syntax error in greeting\n" msgstr "*Tervituses on ajamärgi süntaksi viga\n" #: libsylph/pop.c:170 #, fuzzy msgid "Invalid timestamp in greeting\n" msgstr "Nõutud APOP'i ajatemplit ei leidunud tervituses\n" #: libsylph/pop.c:198 libsylph/pop.c:225 msgid "POP3 protocol error\n" msgstr "POP3 protokolli viga\n" #: libsylph/pop.c:270 #, fuzzy, c-format msgid "invalid UIDL response: %s\n" msgstr "*vigane xover rida: %s\n" #: libsylph/pop.c:631 #, c-format msgid "POP3: Deleting expired message %d\n" msgstr "POP3: Kustutan aegunud kirja %d\n" #: libsylph/pop.c:640 #, c-format msgid "POP3: Skipping message %d (%d bytes)\n" msgstr "POP3: Jätan kirja (%d / %d baiti) vahele\n" #: libsylph/pop.c:673 msgid "mailbox is locked\n" msgstr "kirjakast on lukus\n" #: libsylph/pop.c:676 msgid "session timeout\n" msgstr "" #: libsylph/pop.c:682 libsylph/smtp.c:561 msgid "can't start TLS session\n" msgstr "ei suutnud käivitada TLS sessiooni\n" #: libsylph/pop.c:689 libsylph/smtp.c:496 msgid "error occurred on authentication\n" msgstr "autoriseerimisel tekkis viga\n" #: libsylph/pop.c:694 #, fuzzy msgid "command not supported\n" msgstr "Käsklus" #: libsylph/pop.c:698 #, fuzzy msgid "error occurred on POP3 session\n" msgstr "autoriseerimisel tekkis viga\n" #: libsylph/prefs.c:196 libsylph/prefs.c:224 libsylph/prefs.c:269 #: libsylph/prefs_account.c:217 libsylph/prefs_account.c:231 msgid "failed to write configuration to file\n" msgstr "Häälestuse salvestamine ebaõnnestus\n" #: libsylph/prefs.c:239 #, c-format msgid "Found %s\n" msgstr "Leiti %s\n" #: libsylph/prefs.c:272 msgid "Configuration is saved.\n" msgstr "Häälestus on salvestatud.\n" #: libsylph/prefs_common.c:503 #, fuzzy msgid "Junk mail filter (manual)" msgstr "Kaust" #: libsylph/prefs_common.c:506 #, fuzzy msgid "Junk mail filter" msgstr "Kaust" #: libsylph/procmime.c:1142 msgid "procmime_get_text_content(): Code conversion failed.\n" msgstr "procmime_get_text_content(): Koodi muundamine ebaõnnestus.\n" #: libsylph/procmsg.c:655 msgid "can't open mark file\n" msgstr "Ei suuda avada märgifaili\n" #: libsylph/procmsg.c:1107 #, c-format msgid "can't fetch message %d\n" msgstr "ei suuda võtta kirja %d\n" #: libsylph/procmsg.c:1423 #, c-format msgid "Print command line is invalid: `%s'\n" msgstr "Trükkimise käsurida on vale: %s\n" #: libsylph/recv.c:141 msgid "error occurred while retrieving data.\n" msgstr "tekkis viga andmete võtmisel.\n" #: libsylph/recv.c:183 libsylph/recv.c:215 libsylph/recv.c:230 msgid "Can't write to file.\n" msgstr "Ei saa kirjutada faili.\n" #: libsylph/smtp.c:157 msgid "SMTP AUTH not available\n" msgstr "SMTP AUTH pole saadav\n" #: libsylph/smtp.c:466 libsylph/smtp.c:516 msgid "bad SMTP response\n" msgstr "" #: libsylph/smtp.c:487 libsylph/smtp.c:505 libsylph/smtp.c:602 #, fuzzy msgid "error occurred on SMTP session\n" msgstr "autoriseerimisel tekkis viga\n" #: libsylph/ssl.c:54 msgid "SSLv23 not available\n" msgstr "SSLv23 pole kättesaadav\n" #: libsylph/ssl.c:56 msgid "SSLv23 available\n" msgstr "SSLv23 on kättesaadav\n" #: libsylph/ssl.c:65 msgid "TLSv1 not available\n" msgstr "TLSv1 pole saadav\n" #: libsylph/ssl.c:67 msgid "TLSv1 available\n" msgstr "TLSv1 on saadav\n" #: libsylph/ssl.c:101 libsylph/ssl.c:108 msgid "SSL method not available\n" msgstr "SSL-i meetodit ei saa kasutada\n" #: libsylph/ssl.c:114 msgid "Unknown SSL method *PROGRAM BUG*\n" msgstr "ssl.c:94: Tundmatu SSL meetod *PROGRAMMI VIGA*\n" #: libsylph/ssl.c:120 msgid "Error creating ssl context\n" msgstr "Viga ssl konteksti loomisel\n" #. Get the cipher #: libsylph/ssl.c:139 #, c-format msgid "SSL connection using %s\n" msgstr "SSL ühendus kasutab %s-i\n" #: libsylph/ssl.c:148 msgid "Server certificate:\n" msgstr "Serveri srtifikaat:\n" #: libsylph/ssl.c:151 #, c-format msgid " Subject: %s\n" msgstr " Pealkiri: %s\n" #: libsylph/ssl.c:156 #, c-format msgid " Issuer: %s\n" msgstr " Väljalaskja: %s\n" #: libsylph/utils.c:2682 libsylph/utils.c:2804 #, c-format msgid "writing to %s failed.\n" msgstr "%s-i kirjutamine ebaõnnestus.\n" #~ msgid "can't change file mode\n" #~ msgstr "Ei suuda muuta faili omadusi\n" libsylph-1.1.0/po/fr.po0000644000175000017500000004064410756432604011664 00000000000000# French translation of Sylpheed. # Copyright (C) 2000 Free Software Foundation, Inc. # # Paul Rolland , 2000. # Updated by : Sébastien Rodriguez # Updated by : Philippe trbich # Updated by : Lol Zimmerli # Updated 2002-01-07 by : Melvin Hadasht # Updated 2002-04-20 by : François Barrière # Updated by : P`tit Lu # Nicolas Boos , 2003,2004,2005,2006. # msgid "" msgstr "" "Project-Id-Version: sylpheed\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-02-19 10:48+0900\n" "PO-Revision-Date: 2006-02-23 00:32+0100\n" "Last-Translator: Nicolas Boos \n" "Language-Team: French \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: libsylph/account.c:56 msgid "Reading all config for each account...\n" msgstr "Lecture de la configuration des comptes...\n" #: libsylph/imap.c:465 #, c-format msgid "IMAP4 connection to %s has been disconnected. Reconnecting...\n" msgstr "La connexion IMAP4 vers %s a été interrompue. Reconnexion...\n" #: libsylph/imap.c:520 libsylph/imap.c:526 msgid "IMAP4 server disables LOGIN.\n" msgstr "Le serveur IMAP4 désactive LOGIN.\n" #: libsylph/imap.c:602 #, c-format msgid "creating IMAP4 connection to %s:%d ...\n" msgstr "création de la connexion IMAP4 vers %s:%d ...\n" #: libsylph/imap.c:646 msgid "Can't start TLS session.\n" msgstr "Impossible d'initier la session TLS.\n" #: libsylph/imap.c:1120 #, c-format msgid "Getting message %d" msgstr "Réception du message %d" #: libsylph/imap.c:1236 #, c-format msgid "Appending messages to %s (%d / %d)" msgstr "Ajout des messages à %s (%d / %d)" #: libsylph/imap.c:1328 #, c-format msgid "Moving messages %s to %s ..." msgstr "Déplacement des messages de %s vers %s ..." #: libsylph/imap.c:1334 #, c-format msgid "Copying messages %s to %s ..." msgstr "Copie des messages de %s vers %s ..." #: libsylph/imap.c:1473 #, c-format msgid "Removing messages %s" msgstr "Effacement des messages %s" #: libsylph/imap.c:1479 #, c-format msgid "can't set deleted flags: %s\n" msgstr "impossible de marquer pour la suppression : %s\n" #: libsylph/imap.c:1487 libsylph/imap.c:1582 msgid "can't expunge\n" msgstr "impossible de purger\n" #: libsylph/imap.c:1570 #, c-format msgid "Removing all messages in %s" msgstr "Effacement de tous les messages dans %s" #: libsylph/imap.c:1576 msgid "can't set deleted flags: 1:*\n" msgstr "impossible de marquer pour la suppression : 1 : *\n" #: libsylph/imap.c:1624 msgid "can't close folder\n" msgstr "impossible de fermer le dossier\n" #: libsylph/imap.c:1702 #, c-format msgid "root folder %s not exist\n" msgstr "le dossier racine %s n'existe pas\n" #: libsylph/imap.c:1891 libsylph/imap.c:1899 msgid "error occurred while getting LIST.\n" msgstr "Une erreur est survenue lors de la réception de LIST.\n" #: libsylph/imap.c:2013 #, c-format msgid "Can't create '%s'\n" msgstr "Impossible de créer « %s »\n" #: libsylph/imap.c:2018 #, c-format msgid "Can't create '%s' under INBOX\n" msgstr "Impossible de créer « %s » sous Réception \n" #: libsylph/imap.c:2079 msgid "can't create mailbox: LIST failed\n" msgstr "Impossible de créer la boîte aux lettres : LIST échoué.\n" #: libsylph/imap.c:2099 msgid "can't create mailbox\n" msgstr "impossible de créer la boîte aux lettres\n" #: libsylph/imap.c:2203 #, c-format msgid "can't rename mailbox: %s to %s\n" msgstr "impossible de renomer la boîte aux lettres %s en %s\n" #: libsylph/imap.c:2283 msgid "can't delete mailbox\n" msgstr "impossible de supprimer la boîte aux lettres\n" #: libsylph/imap.c:2327 msgid "can't get envelope\n" msgstr "Impossible de faire une enveloppe\n" #: libsylph/imap.c:2340 #, c-format msgid "Getting message headers (%d / %d)" msgstr "Réception des en-têtes de message (%d / %d)" #: libsylph/imap.c:2350 msgid "error occurred while getting envelope.\n" msgstr "erreur lors de la lecture de l'enveloppe.\n" #: libsylph/imap.c:2372 #, c-format msgid "can't parse envelope: %s\n" msgstr "impossible d'analyser l'enveloppe : %s\n" #: libsylph/imap.c:2496 #, c-format msgid "Can't connect to IMAP4 server: %s:%d\n" msgstr "Impossible de se connecter au serveur IMAP4 : %s:%d\n" #: libsylph/imap.c:2503 #, c-format msgid "Can't establish IMAP4 session with: %s:%d\n" msgstr "Impossible d'établir une session IMAP4 avec : %s:%d\n" #: libsylph/imap.c:2578 msgid "can't get namespace\n" msgstr "Impossible d'obtenir l'espace nom\n" #: libsylph/imap.c:3111 #, c-format msgid "can't select folder: %s\n" msgstr "Impossible de sélectionner le dossier : %s\n" #: libsylph/imap.c:3146 msgid "error on imap command: STATUS\n" msgstr "erreur avec la commande IMAP : STATUS\n" #: libsylph/imap.c:3269 libsylph/imap.c:3304 msgid "IMAP4 authentication failed.\n" msgstr "L'authentification IMAP4 a échoué.\n" #: libsylph/imap.c:3353 msgid "IMAP4 login failed.\n" msgstr "Échec au login IMAP4.\n" #: libsylph/imap.c:3689 #, c-format msgid "can't append %s to %s\n" msgstr "Impossible de d'ajouter %s à %s\n" #: libsylph/imap.c:3696 msgid "(sending file...)" msgstr "(envoi du fichier...)" #: libsylph/imap.c:3725 #, c-format msgid "can't append message to %s\n" msgstr "impossible d'ajouter le message à %s\n" #: libsylph/imap.c:3757 #, c-format msgid "can't copy %s to %s\n" msgstr "impossible de copier %s vers %s\n" #: libsylph/imap.c:3781 #, c-format msgid "error while imap command: STORE %s %s\n" msgstr "erreur avec la commande IMAP : STORE %s %s\n" #: libsylph/imap.c:3795 msgid "error while imap command: EXPUNGE\n" msgstr "erreur lors de la commande IMAP : EXPUNGE\n" #: libsylph/imap.c:3808 msgid "error while imap command: CLOSE\n" msgstr "erreur avec la commande IMAP : CLOSE\n" #: libsylph/imap.c:4084 #, c-format msgid "iconv cannot convert UTF-7 to %s\n" msgstr "iconv ne peut convertir de UTF-7 vers %s\n" #: libsylph/imap.c:4114 #, c-format msgid "iconv cannot convert %s to UTF-7\n" msgstr "iconv ne peut convertir de %s vers UTF-7\n" #: libsylph/mbox.c:50 libsylph/mbox.c:196 msgid "can't write to temporary file\n" msgstr "Impossible d'écrire dans le fichier temporaire\n" #: libsylph/mbox.c:69 #, c-format msgid "Getting messages from %s into %s...\n" msgstr "Réception des messages de %s dans %s...\n" #: libsylph/mbox.c:79 msgid "can't read mbox file.\n" msgstr "Impossible de lire le fichier mbox.\n" #: libsylph/mbox.c:86 #, c-format msgid "invalid mbox format: %s\n" msgstr "Format mbox invalide : %s\n" #: libsylph/mbox.c:93 #, c-format msgid "malformed mbox: %s\n" msgstr "mbox mal formée : %s\n" #: libsylph/mbox.c:110 msgid "can't open temporary file\n" msgstr "Impossible d'ouvrir un fichier temporaire\n" #: libsylph/mbox.c:161 #, c-format msgid "" "unescaped From found:\n" "%s" msgstr "" "From 'unescaped' trouvé:\n" "%s" #: libsylph/mbox.c:250 #, c-format msgid "%d messages found.\n" msgstr "%d messages trouvés.\n" #: libsylph/mbox.c:268 #, c-format msgid "can't create lock file %s\n" msgstr "Impossible de créer le fichier verrou %s\n" #: libsylph/mbox.c:269 msgid "use 'flock' instead of 'file' if possible.\n" msgstr "Utilisation de 'flock' à la place de 'file' si possible\n" #: libsylph/mbox.c:281 #, c-format msgid "can't create %s\n" msgstr "Impossible de créer %s\n" #: libsylph/mbox.c:287 msgid "mailbox is owned by another process, waiting...\n" msgstr "mailbox utilisée par un autre processus, attente...\n" #: libsylph/mbox.c:316 #, c-format msgid "can't lock %s\n" msgstr "Impossible de verrouiller %s\n" #: libsylph/mbox.c:323 libsylph/mbox.c:373 msgid "invalid lock type\n" msgstr "Type de verrou invalide\n" #: libsylph/mbox.c:359 #, c-format msgid "can't unlock %s\n" msgstr "Impossible de déverrouiller %s\n" #: libsylph/mbox.c:394 msgid "can't truncate mailbox to zero.\n" msgstr "Impossible de vider la boîte aux lettres.\n" #: libsylph/mbox.c:418 #, c-format msgid "Exporting messages from %s into %s...\n" msgstr "Exportation des messages de %s vers %s...\n" #: libsylph/mh.c:427 #, c-format msgid "can't copy message %s to %s\n" msgstr "Impossible de copier le message de %s à %s\n" #: libsylph/mh.c:502 libsylph/mh.c:625 msgid "Can't open mark file.\n" msgstr "Impossible d'ouvrir le fichier des marques.\n" #: libsylph/mh.c:509 libsylph/mh.c:631 msgid "the src folder is identical to the dest.\n" msgstr "dossier source identique à la destination.\n" #: libsylph/mh.c:634 #, c-format msgid "Copying message %s%c%d to %s ...\n" msgstr "Copie du message %s%c%d vers %s ...\n" #: libsylph/mh.c:965 libsylph/mh.c:978 #, c-format msgid "" "File `%s' already exists.\n" "Can't create folder." msgstr "" "Le fichier « %s » existe déjà.\n" "Impossible de créer le dossier." #: libsylph/mh.c:1500 #, c-format msgid "" "Directory name\n" "'%s' is not a valid UTF-8 string.\n" "Maybe the locale encoding is used for filename.\n" "If that is the case, you must set the following environmental variable\n" "(see README for detail):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" msgstr "" "Le nom de dossier\n" "« %s » n'est pas une chaîne UTF-8 correcte.\n" "Peut-être que le jeu de caracères local est utilisé pour le nom de fichier.\n" "Dans ce cas de figure, vous devez définir la variable d'environnement " "suivante\n" "(voir le fichier README pour les détails) :\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" #: libsylph/news.c:207 #, c-format msgid "creating NNTP connection to %s:%d ...\n" msgstr "Création de la connexion NNTP vers %s:%d ...\n" #: libsylph/news.c:276 #, c-format msgid "NNTP connection to %s:%d has been disconnected. Reconnecting...\n" msgstr "La connexion NNTP vers %s:%d a été coupée. Reconnexion...\n" #: libsylph/news.c:377 #, c-format msgid "article %d has been already cached.\n" msgstr "L'article %d a déjà été caché.\n" #: libsylph/news.c:397 #, c-format msgid "getting article %d...\n" msgstr "Récupération de l'article %d...\n" #: libsylph/news.c:401 #, c-format msgid "can't read article %d\n" msgstr "Impossible de lire l'article %d\n" #: libsylph/news.c:676 msgid "can't post article.\n" msgstr "Impossible de poster l'article.\n" #: libsylph/news.c:702 #, c-format msgid "can't retrieve article %d\n" msgstr "Impossible de récupérer l'article %d\n" #: libsylph/news.c:759 #, c-format msgid "can't select group: %s\n" msgstr "impossible de sélectionner le groupe : %s\n" #: libsylph/news.c:796 #, c-format msgid "invalid article range: %d - %d\n" msgstr "Intervalle d'articles invalide : %d - %d\n" #: libsylph/news.c:809 msgid "no new articles.\n" msgstr "Pas d'article.\n" #: libsylph/news.c:819 #, c-format msgid "getting xover %d - %d in %s...\n" msgstr "Exécution de xover %d - %d sur %s...\n" #: libsylph/news.c:823 msgid "can't get xover\n" msgstr "Impossible de faire un xover\n" #: libsylph/news.c:833 msgid "error occurred while getting xover.\n" msgstr "Une erreur a eu lieu pendant la lecture du xover.\n" #: libsylph/news.c:843 #, c-format msgid "invalid xover line: %s\n" msgstr "Ligne xover invalide : %s\n" #: libsylph/news.c:862 libsylph/news.c:894 msgid "can't get xhdr\n" msgstr "Impossible d'obtenir xhdr\n" #: libsylph/news.c:874 libsylph/news.c:906 msgid "error occurred while getting xhdr.\n" msgstr "Erreur lors de la réception de xhdr.\n" #: libsylph/nntp.c:68 #, c-format msgid "Can't connect to NNTP server: %s:%d\n" msgstr "Impossible de se connecter au serveur NNTP : %s:%d\n" #: libsylph/nntp.c:164 libsylph/nntp.c:227 #, c-format msgid "protocol error: %s\n" msgstr "Erreur de protocole : %s\n" #: libsylph/nntp.c:187 libsylph/nntp.c:233 msgid "protocol error\n" msgstr "Erreur de protocole\n" #: libsylph/nntp.c:283 msgid "Error occurred while posting\n" msgstr "Erreur lors de l'envoi.\n" #: libsylph/nntp.c:363 msgid "Error occurred while sending command\n" msgstr "Une erreur est survenue pendant l'envoi de la commande\n" #: libsylph/pop.c:155 msgid "Required APOP timestamp not found in greeting\n" msgstr "Le 'timestamp' APOP n'a pas été reçu\n" #: libsylph/pop.c:162 msgid "Timestamp syntax error in greeting\n" msgstr "Erreur de syntaxe du 'timestamp' dans la bannière\n" #: libsylph/pop.c:170 #, fuzzy msgid "Invalid timestamp in greeting\n" msgstr "Le 'timestamp' APOP n'a pas été reçu\n" #: libsylph/pop.c:198 libsylph/pop.c:225 msgid "POP3 protocol error\n" msgstr "Erreur de protocole POP3\n" #: libsylph/pop.c:270 #, c-format msgid "invalid UIDL response: %s\n" msgstr "réponse UIDL invalide : %s\n" #: libsylph/pop.c:631 #, c-format msgid "POP3: Deleting expired message %d\n" msgstr "POP3: Suppression du message expiré %d\n" #: libsylph/pop.c:640 #, c-format msgid "POP3: Skipping message %d (%d bytes)\n" msgstr "POP3: Message ignoré %d (%d octets)\n" #: libsylph/pop.c:673 msgid "mailbox is locked\n" msgstr "La boîte aux lettres est verrouillée\n" #: libsylph/pop.c:676 msgid "session timeout\n" msgstr "dépassement du délai de réponse (timeout) de la session\n" #: libsylph/pop.c:682 libsylph/smtp.c:561 msgid "can't start TLS session\n" msgstr "échec lors de l'ouverture de la session TLS\n" # #: libsylph/pop.c:689 libsylph/smtp.c:496 msgid "error occurred on authentication\n" msgstr "une erreur est survenue pendant la phase d'authentification\n" #: libsylph/pop.c:694 msgid "command not supported\n" msgstr "commande non supportée\n" # #: libsylph/pop.c:698 msgid "error occurred on POP3 session\n" msgstr "une erreur est survenue pendant la session POP3\n" #: libsylph/prefs.c:196 libsylph/prefs.c:224 libsylph/prefs.c:269 #: libsylph/prefs_account.c:217 libsylph/prefs_account.c:231 msgid "failed to write configuration to file\n" msgstr "Échec d'écriture de la configuration dans le fichier\n" #: libsylph/prefs.c:239 #, c-format msgid "Found %s\n" msgstr "Trouvé : %s\n" #: libsylph/prefs.c:272 msgid "Configuration is saved.\n" msgstr "La configuration est enregistrée.\n" #: libsylph/prefs_common.c:503 #, fuzzy msgid "Junk mail filter (manual)" msgstr "Dossier des messages indésirables" #: libsylph/prefs_common.c:506 msgid "Junk mail filter" msgstr "Dossier des messages indésirables" #: libsylph/procmime.c:1142 msgid "procmime_get_text_content(): Code conversion failed.\n" msgstr "procmime_get_text_content(): la conversion de code a échoué.\n" #: libsylph/procmsg.c:655 msgid "can't open mark file\n" msgstr "Impossible d'ouvrir le fichier des marques\n" #: libsylph/procmsg.c:1107 #, c-format msgid "can't fetch message %d\n" msgstr "impossible de récupérer le message %d\n" #: libsylph/procmsg.c:1423 #, c-format msgid "Print command line is invalid: `%s'\n" msgstr "La ligne de commande d'impression est invalide : « %s »\n" #: libsylph/recv.c:141 msgid "error occurred while retrieving data.\n" msgstr "Une erreur est survenue pendant la récupération des données.\n" #: libsylph/recv.c:183 libsylph/recv.c:215 libsylph/recv.c:230 msgid "Can't write to file.\n" msgstr "Impossible d'écrire dans le fichier.\n" #: libsylph/smtp.c:157 msgid "SMTP AUTH not available\n" msgstr "SMTP AUTH pas disponible\n" #: libsylph/smtp.c:466 libsylph/smtp.c:516 msgid "bad SMTP response\n" msgstr "mauvaise réponse SMTP\n" # #: libsylph/smtp.c:487 libsylph/smtp.c:505 libsylph/smtp.c:602 msgid "error occurred on SMTP session\n" msgstr "Une erreur est survenue pendant la session SMTP\n" #: libsylph/ssl.c:54 msgid "SSLv23 not available\n" msgstr "SSLv23 absent\n" #: libsylph/ssl.c:56 msgid "SSLv23 available\n" msgstr "SSLv23 disponible\n" #: libsylph/ssl.c:65 msgid "TLSv1 not available\n" msgstr "TLSv1 absent\n" #: libsylph/ssl.c:67 msgid "TLSv1 available\n" msgstr "TLSv1 disponible\n" #: libsylph/ssl.c:101 libsylph/ssl.c:108 msgid "SSL method not available\n" msgstr "Méthode SSL non disponible\n" #: libsylph/ssl.c:114 msgid "Unknown SSL method *PROGRAM BUG*\n" msgstr "Méthode SSL inconnue *BUG DU PROGRAMME*\n" #: libsylph/ssl.c:120 msgid "Error creating ssl context\n" msgstr "Erreur lors de la création du contexte SSL\n" #. Get the cipher #: libsylph/ssl.c:139 #, c-format msgid "SSL connection using %s\n" msgstr "Connexion SSL utilisant %s\n" #: libsylph/ssl.c:148 msgid "Server certificate:\n" msgstr "Serveur de certificat :\n" #: libsylph/ssl.c:151 #, c-format msgid " Subject: %s\n" msgstr " Sujet : %s\n" #: libsylph/ssl.c:156 #, c-format msgid " Issuer: %s\n" msgstr " Délivré par : %s\n" #: libsylph/utils.c:2682 libsylph/utils.c:2804 #, c-format msgid "writing to %s failed.\n" msgstr "L'écriture dans %s a échoué.\n" #~ msgid "can't change file mode\n" #~ msgstr "impossible de modifier les droits d'accès du fichier\n" libsylph-1.1.0/po/gl.po0000644000175000017500000003625610756432604011663 00000000000000# Galician translation of Sylpheed. # Copyright (C) 2000 Free Software Foundation, Inc. # Jorge Rivas , 2000-2003. # msgid "" msgstr "" "Project-Id-Version: sylpheed\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-02-19 10:48+0900\n" "PO-Revision-Date: 2003-01-17 10:05+0100\n" "Last-Translator: Jorge Rivas\n" "Language-Team: Jorge Rivas\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: libsylph/account.c:56 msgid "Reading all config for each account...\n" msgstr "Lendo configuración de cada conta...\n" #: libsylph/imap.c:465 #, fuzzy, c-format msgid "IMAP4 connection to %s has been disconnected. Reconnecting...\n" msgstr "Perdeuse a conexión IMAP4 con %s:%d . Reconectando...\n" #: libsylph/imap.c:520 libsylph/imap.c:526 #, fuzzy msgid "IMAP4 server disables LOGIN.\n" msgstr "Directorio do servidor IMAP4" #: libsylph/imap.c:602 #, c-format msgid "creating IMAP4 connection to %s:%d ...\n" msgstr "creando conexión IMAP4 con %s:%d ...\n" #: libsylph/imap.c:646 msgid "Can't start TLS session.\n" msgstr "Non podo iniciar a sesión TLS.\n" #: libsylph/imap.c:1120 #, fuzzy, c-format msgid "Getting message %d" msgstr "Borrando mensaxe %d" #: libsylph/imap.c:1236 #, fuzzy, c-format msgid "Appending messages to %s (%d / %d)" msgstr "Enviando mensaxe (%d / %d bytes)" #: libsylph/imap.c:1328 #, fuzzy, c-format msgid "Moving messages %s to %s ..." msgstr "Movendo mensaxe %s%c%d a %s ...\n" #: libsylph/imap.c:1334 #, fuzzy, c-format msgid "Copying messages %s to %s ..." msgstr "Copiando mensaxe %s%c%d a %s ...\n" #: libsylph/imap.c:1473 #, fuzzy, c-format msgid "Removing messages %s" msgstr "Obtendo mensaxes dende %s en %s...\n" #: libsylph/imap.c:1479 #, fuzzy, c-format msgid "can't set deleted flags: %s\n" msgstr "non podo establecer os indicadores borrados: %d\n" #: libsylph/imap.c:1487 libsylph/imap.c:1582 msgid "can't expunge\n" msgstr "non podo baleirar\n" #: libsylph/imap.c:1570 #, fuzzy, c-format msgid "Removing all messages in %s" msgstr "Obtendo mensaxes dende %s en %s...\n" #: libsylph/imap.c:1576 #, fuzzy msgid "can't set deleted flags: 1:*\n" msgstr "non podo establecer os indicadores borrados: 1:%d\n" #: libsylph/imap.c:1624 #, fuzzy msgid "can't close folder\n" msgstr "non se pode seleccionar a carpeta: %s\n" #: libsylph/imap.c:1702 #, fuzzy, c-format msgid "root folder %s not exist\n" msgstr "Ficheiro de marcas non atopado.\n" #: libsylph/imap.c:1891 libsylph/imap.c:1899 msgid "error occurred while getting LIST.\n" msgstr "ocurriu un erro obtendo LIST.\n" #: libsylph/imap.c:2013 #, c-format msgid "Can't create '%s'\n" msgstr "Non podo crear '%s'\n" #: libsylph/imap.c:2018 #, c-format msgid "Can't create '%s' under INBOX\n" msgstr "Non podo crear '%s' bajo Entrada\n" #: libsylph/imap.c:2079 msgid "can't create mailbox: LIST failed\n" msgstr "non podo crear a: LIST falló\n" #: libsylph/imap.c:2099 msgid "can't create mailbox\n" msgstr "non podo crear a caixa de correo\n" #: libsylph/imap.c:2203 #, c-format msgid "can't rename mailbox: %s to %s\n" msgstr "non podo renomear a caixa de correo: %s a %s\n" #: libsylph/imap.c:2283 msgid "can't delete mailbox\n" msgstr "non podo borrar a caixa de correo\n" #: libsylph/imap.c:2327 msgid "can't get envelope\n" msgstr "non se pode obter a estructura da mensaxe\n" #: libsylph/imap.c:2340 #, fuzzy, c-format msgid "Getting message headers (%d / %d)" msgstr "Enviando mensaxe (%d / %d bytes)" #: libsylph/imap.c:2350 msgid "error occurred while getting envelope.\n" msgstr "Erro obtendo a estructura da mensaxe.\n" #: libsylph/imap.c:2372 #, c-format msgid "can't parse envelope: %s\n" msgstr "Non se pode interpretar a estructura da mensaxe: %s\n" #: libsylph/imap.c:2496 #, c-format msgid "Can't connect to IMAP4 server: %s:%d\n" msgstr "Non se pode conectar con o servidor IMAP4: %s:%d\n" #: libsylph/imap.c:2503 #, c-format msgid "Can't establish IMAP4 session with: %s:%d\n" msgstr "Non podo establecer unha sesión IMAP4 con: %s:%d\n" #: libsylph/imap.c:2578 msgid "can't get namespace\n" msgstr "no se pode obter o espacio de nomes\n" #: libsylph/imap.c:3111 #, c-format msgid "can't select folder: %s\n" msgstr "non se pode seleccionar a carpeta: %s\n" #: libsylph/imap.c:3146 #, fuzzy msgid "error on imap command: STATUS\n" msgstr "erro no comando imap: EXPUNGE\n" #: libsylph/imap.c:3269 libsylph/imap.c:3304 #, fuzzy msgid "IMAP4 authentication failed.\n" msgstr "Fallo de autenticación" #: libsylph/imap.c:3353 msgid "IMAP4 login failed.\n" msgstr "Autentificación IMAP4 fallida.\n" #: libsylph/imap.c:3689 #, c-format msgid "can't append %s to %s\n" msgstr "non podo engadir %s a %s\n" #: libsylph/imap.c:3696 msgid "(sending file...)" msgstr "(enviando ficheiro...)" #: libsylph/imap.c:3725 #, fuzzy, c-format msgid "can't append message to %s\n" msgstr "non se pode engadir o mensaxe %s\n" #: libsylph/imap.c:3757 #, fuzzy, c-format msgid "can't copy %s to %s\n" msgstr "non podo copiar %d a %s\n" #: libsylph/imap.c:3781 #, fuzzy, c-format msgid "error while imap command: STORE %s %s\n" msgstr "erro no comando imap: STORE %d:%d %s\n" #: libsylph/imap.c:3795 msgid "error while imap command: EXPUNGE\n" msgstr "erro no comando imap: EXPUNGE\n" #: libsylph/imap.c:3808 #, fuzzy msgid "error while imap command: CLOSE\n" msgstr "erro no comando imap: EXPUNGE\n" #: libsylph/imap.c:4084 #, c-format msgid "iconv cannot convert UTF-7 to %s\n" msgstr "iconv non pode convertir UTF-7 a %s\n" #: libsylph/imap.c:4114 #, c-format msgid "iconv cannot convert %s to UTF-7\n" msgstr "iconv non pode convertir %s a UTF-7\n" #: libsylph/mbox.c:50 libsylph/mbox.c:196 msgid "can't write to temporary file\n" msgstr "non se pode escribir o ficheiro temporal\n" #: libsylph/mbox.c:69 #, c-format msgid "Getting messages from %s into %s...\n" msgstr "Obtendo mensaxes dende %s en %s...\n" #: libsylph/mbox.c:79 msgid "can't read mbox file.\n" msgstr "non podo ler o ficheiro mbox.\n" #: libsylph/mbox.c:86 #, c-format msgid "invalid mbox format: %s\n" msgstr "formato de mbox inválido: %s\n" #: libsylph/mbox.c:93 #, c-format msgid "malformed mbox: %s\n" msgstr "mbox malformada: %s\n" #: libsylph/mbox.c:110 msgid "can't open temporary file\n" msgstr "non se pode abrir o ficheiro temporal\n" #: libsylph/mbox.c:161 #, c-format msgid "" "unescaped From found:\n" "%s" msgstr "" "Atopado Dende sin escapar:\n" "%s" #: libsylph/mbox.c:250 #, c-format msgid "%d messages found.\n" msgstr "%d mensaxes atopados.\n" #: libsylph/mbox.c:268 #, c-format msgid "can't create lock file %s\n" msgstr "non se pode crear o ficheiro de bloqueo %s\n" #: libsylph/mbox.c:269 msgid "use 'flock' instead of 'file' if possible.\n" msgstr "usar 'flock' en vez de 'file' si é posible.\n" #: libsylph/mbox.c:281 #, c-format msgid "can't create %s\n" msgstr "non podo crear %s\n" #: libsylph/mbox.c:287 msgid "mailbox is owned by another process, waiting...\n" msgstr "a caixa de correo esta sendo usada por outro proceso, esperando...\n" #: libsylph/mbox.c:316 #, c-format msgid "can't lock %s\n" msgstr "non se pode bloquear %s\n" #: libsylph/mbox.c:323 libsylph/mbox.c:373 msgid "invalid lock type\n" msgstr "tipo de bloqueo non válido\n" #: libsylph/mbox.c:359 #, c-format msgid "can't unlock %s\n" msgstr "non se pode desbloquear %s\n" #: libsylph/mbox.c:394 msgid "can't truncate mailbox to zero.\n" msgstr "non se pode truncar a cero a caixa de correo.\n" #: libsylph/mbox.c:418 #, c-format msgid "Exporting messages from %s into %s...\n" msgstr "Exportando mensaxes de %s a %s...\n" #: libsylph/mh.c:427 #, c-format msgid "can't copy message %s to %s\n" msgstr "non se pode copiar mensaxe %s a %s\n" #: libsylph/mh.c:502 libsylph/mh.c:625 msgid "Can't open mark file.\n" msgstr "Non se pode abrir o ficheiro de marcas.\n" #: libsylph/mh.c:509 libsylph/mh.c:631 msgid "the src folder is identical to the dest.\n" msgstr "carpetas de orixen e destiño idénticas.\n" #: libsylph/mh.c:634 #, c-format msgid "Copying message %s%c%d to %s ...\n" msgstr "Copiando mensaxe %s%c%d a %s ...\n" #: libsylph/mh.c:965 libsylph/mh.c:978 #, c-format msgid "" "File `%s' already exists.\n" "Can't create folder." msgstr "" "o Ficheiro `%s' xa existe.\n" "Non podo crear a carpeta." #: libsylph/mh.c:1500 #, c-format msgid "" "Directory name\n" "'%s' is not a valid UTF-8 string.\n" "Maybe the locale encoding is used for filename.\n" "If that is the case, you must set the following environmental variable\n" "(see README for detail):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" msgstr "" #: libsylph/news.c:207 #, c-format msgid "creating NNTP connection to %s:%d ...\n" msgstr "creando conexión NNTP con %s:%d ...\n" #: libsylph/news.c:276 #, c-format msgid "NNTP connection to %s:%d has been disconnected. Reconnecting...\n" msgstr "perdeuse a conexión NNTP con %s:%d . Reconectando...\n" #: libsylph/news.c:377 #, c-format msgid "article %d has been already cached.\n" msgstr "o artigo %d xa esta en caché.\n" #: libsylph/news.c:397 #, c-format msgid "getting article %d...\n" msgstr "obtendo artigo %d...\n" #: libsylph/news.c:401 #, c-format msgid "can't read article %d\n" msgstr "no podo leer o artículo %d\n" #: libsylph/news.c:676 msgid "can't post article.\n" msgstr "no se pode enviar o artículo.\n" #: libsylph/news.c:702 #, c-format msgid "can't retrieve article %d\n" msgstr "no podo obter o artículo %d\n" #: libsylph/news.c:759 #, fuzzy, c-format msgid "can't select group: %s\n" msgstr "non podo seleccionar grupo %s\n" #: libsylph/news.c:796 #, c-format msgid "invalid article range: %d - %d\n" msgstr "rango de artículos no válido: %d - %d\n" #: libsylph/news.c:809 msgid "no new articles.\n" msgstr "no hai artículos novos.\n" #: libsylph/news.c:819 #, c-format msgid "getting xover %d - %d in %s...\n" msgstr "obteniendo xover %d - %d en %s...\n" #: libsylph/news.c:823 msgid "can't get xover\n" msgstr "no se pode obtener xover\n" #: libsylph/news.c:833 msgid "error occurred while getting xover.\n" msgstr "ocurriu un erro obtendo xover.\n" #: libsylph/news.c:843 #, c-format msgid "invalid xover line: %s\n" msgstr "linea xover non válida: %s\n" #: libsylph/news.c:862 libsylph/news.c:894 msgid "can't get xhdr\n" msgstr "non se pode obter xhdr\n" #: libsylph/news.c:874 libsylph/news.c:906 msgid "error occurred while getting xhdr.\n" msgstr "ocurriu un erro obtendo xhdr.\n" #: libsylph/nntp.c:68 #, c-format msgid "Can't connect to NNTP server: %s:%d\n" msgstr "Non se pode conectar con o servidor NNTP: %s:%d\n" #: libsylph/nntp.c:164 libsylph/nntp.c:227 #, c-format msgid "protocol error: %s\n" msgstr "erro do protocolo: %s\n" #: libsylph/nntp.c:187 libsylph/nntp.c:233 msgid "protocol error\n" msgstr "erro do protocolo\n" #: libsylph/nntp.c:283 msgid "Error occurred while posting\n" msgstr "Ocurríu un erro mentras se enviaba\n" #: libsylph/nntp.c:363 #, fuzzy msgid "Error occurred while sending command\n" msgstr "Ocurriu un erro mentras se enviaba o correo." #: libsylph/pop.c:155 msgid "Required APOP timestamp not found in greeting\n" msgstr "Non se atopou no saudo a marca temporal APOP requerida\n" #: libsylph/pop.c:162 msgid "Timestamp syntax error in greeting\n" msgstr "a marca temporal do saudo ten un erro de sintaxis\n" #: libsylph/pop.c:170 #, fuzzy msgid "Invalid timestamp in greeting\n" msgstr "Non se atopou no saudo a marca temporal APOP requerida\n" #: libsylph/pop.c:198 libsylph/pop.c:225 msgid "POP3 protocol error\n" msgstr "Erro do protocolo POP3\n" #: libsylph/pop.c:270 #, fuzzy, c-format msgid "invalid UIDL response: %s\n" msgstr "linea xover non válida: %s\n" #: libsylph/pop.c:631 #, c-format msgid "POP3: Deleting expired message %d\n" msgstr "POP3: Borrando mensaxe expirado %d\n" #: libsylph/pop.c:640 #, c-format msgid "POP3: Skipping message %d (%d bytes)\n" msgstr "POP3: Ignorando mensaxe %d (%d bytes)\n" #: libsylph/pop.c:673 msgid "mailbox is locked\n" msgstr "a caixa de correo está bloqueado\n" #: libsylph/pop.c:676 msgid "session timeout\n" msgstr "" #: libsylph/pop.c:682 libsylph/smtp.c:561 msgid "can't start TLS session\n" msgstr "non podo abrir a sesión TLs\n" #: libsylph/pop.c:689 libsylph/smtp.c:496 msgid "error occurred on authentication\n" msgstr "ocurriu algún erro na autenticación\n" #: libsylph/pop.c:694 msgid "command not supported\n" msgstr "Comando non soportado\n" #: libsylph/pop.c:698 msgid "error occurred on POP3 session\n" msgstr "ocurriu algún erro na sesión POP3\n" #: libsylph/prefs.c:196 libsylph/prefs.c:224 libsylph/prefs.c:269 #: libsylph/prefs_account.c:217 libsylph/prefs_account.c:231 msgid "failed to write configuration to file\n" msgstr "fallo escribiendo a configuración a ficheiro\n" #: libsylph/prefs.c:239 #, c-format msgid "Found %s\n" msgstr "Atopado %s\n" #: libsylph/prefs.c:272 msgid "Configuration is saved.\n" msgstr "Configuración gardada.\n" #: libsylph/prefs_common.c:503 #, fuzzy msgid "Junk mail filter (manual)" msgstr "Carpeta" #: libsylph/prefs_common.c:506 #, fuzzy msgid "Junk mail filter" msgstr "Carpeta" #: libsylph/procmime.c:1142 msgid "procmime_get_text_content(): Code conversion failed.\n" msgstr "procmime_get_text_content(): Conversión de códigos fallida.\n" #: libsylph/procmsg.c:655 msgid "can't open mark file\n" msgstr "no se pode abrir o ficheiro de marcas\n" #: libsylph/procmsg.c:1107 #, c-format msgid "can't fetch message %d\n" msgstr "non se pode obter o mensaxe %d\n" #: libsylph/procmsg.c:1423 #, c-format msgid "Print command line is invalid: `%s'\n" msgstr "o comando de impresión non é válido: `%s'\n" #: libsylph/recv.c:141 msgid "error occurred while retrieving data.\n" msgstr "ocurriu un erro mentras se obtían datos.\n" #: libsylph/recv.c:183 libsylph/recv.c:215 libsylph/recv.c:230 msgid "Can't write to file.\n" msgstr "Non se pode escribir ó ficheiro.\n" #: libsylph/smtp.c:157 msgid "SMTP AUTH not available\n" msgstr "SMTP AUTH non está disponible\n" #: libsylph/smtp.c:466 libsylph/smtp.c:516 msgid "bad SMTP response\n" msgstr "" #: libsylph/smtp.c:487 libsylph/smtp.c:505 libsylph/smtp.c:602 msgid "error occurred on SMTP session\n" msgstr "ocurriu algún erro na sesión SMTP\n" #: libsylph/ssl.c:54 msgid "SSLv23 not available\n" msgstr "SSLv23 non está disponible\n" #: libsylph/ssl.c:56 msgid "SSLv23 available\n" msgstr "SSLv23 disponible\n" #: libsylph/ssl.c:65 msgid "TLSv1 not available\n" msgstr "TLSv1 non está disponible\n" #: libsylph/ssl.c:67 msgid "TLSv1 available\n" msgstr "TLSv1 disponible\n" #: libsylph/ssl.c:101 libsylph/ssl.c:108 msgid "SSL method not available\n" msgstr "Método SSL non disponible\n" #: libsylph/ssl.c:114 msgid "Unknown SSL method *PROGRAM BUG*\n" msgstr "Método SSL desconocido *ERROR no PROGRAMA*\n" #: libsylph/ssl.c:120 msgid "Error creating ssl context\n" msgstr "Error creando o contexto SSL\n" #. Get the cipher #: libsylph/ssl.c:139 #, c-format msgid "SSL connection using %s\n" msgstr "Conexión SSL usando %s\n" #: libsylph/ssl.c:148 msgid "Server certificate:\n" msgstr "Certificado do servidor:\n" #: libsylph/ssl.c:151 #, c-format msgid " Subject: %s\n" msgstr " Asunto: %s\n" #: libsylph/ssl.c:156 #, c-format msgid " Issuer: %s\n" msgstr " Xenerador: %s\n" #: libsylph/utils.c:2682 libsylph/utils.c:2804 #, c-format msgid "writing to %s failed.\n" msgstr "fallo escribindo en %s.\n" #~ msgid "can't change file mode\n" #~ msgstr "non se pode cambiar os permisos de ficheiro\n" libsylph-1.1.0/po/hr.po0000644000175000017500000003562610756432604011672 00000000000000# Croatian translation of Sylpheed. # Copyright (C) 2001 Free Software Foundation, Inc. # Ante Karamatić , 2001. # msgid "" msgstr "" "Project-Id-Version: sylpheed\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-02-19 10:48+0900\n" "PO-Revision-Date: 2001-09-17 13:22+0100\n" "Last-Translator: Ante Karamatić \n" "Language-Team: Croatian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: libsylph/account.c:56 msgid "Reading all config for each account...\n" msgstr "Čitam konfiguracije za svaki račun...\n" #: libsylph/imap.c:465 #, fuzzy, c-format msgid "IMAP4 connection to %s has been disconnected. Reconnecting...\n" msgstr "IMAP4 veza prema %s:%d je pukla. Povezujem se ponovo...\n" #: libsylph/imap.c:520 libsylph/imap.c:526 #, fuzzy msgid "IMAP4 server disables LOGIN.\n" msgstr "Direktorij IMAP poslužitelja" #: libsylph/imap.c:602 #, c-format msgid "creating IMAP4 connection to %s:%d ...\n" msgstr "ostvarujem IMAP4 vezu prema %s:%d ...\n" #: libsylph/imap.c:646 msgid "Can't start TLS session.\n" msgstr "" #: libsylph/imap.c:1120 #, fuzzy, c-format msgid "Getting message %d" msgstr "Brišem poruke" #: libsylph/imap.c:1236 #, fuzzy, c-format msgid "Appending messages to %s (%d / %d)" msgstr "Šaljem poruku (%d / %d bytea)" #: libsylph/imap.c:1328 #, fuzzy, c-format msgid "Moving messages %s to %s ..." msgstr "Premještam poruke %s%c%d u %s ...\n" #: libsylph/imap.c:1334 #, fuzzy, c-format msgid "Copying messages %s to %s ..." msgstr "Kopiram poruke %s%c%d u %s ...\n" #: libsylph/imap.c:1473 #, fuzzy, c-format msgid "Removing messages %s" msgstr "Primam poruke sa %s u %s...\n" #: libsylph/imap.c:1479 #, fuzzy, c-format msgid "can't set deleted flags: %s\n" msgstr "ne mogu postaviti obrisane oznake: %d\n" #: libsylph/imap.c:1487 libsylph/imap.c:1582 msgid "can't expunge\n" msgstr "ne mogu obrisati\n" #: libsylph/imap.c:1570 #, fuzzy, c-format msgid "Removing all messages in %s" msgstr "Primam poruke sa %s u %s...\n" #: libsylph/imap.c:1576 #, fuzzy msgid "can't set deleted flags: 1:*\n" msgstr "ne mogu postaviti obrisane oznake: 1:%d\n" #: libsylph/imap.c:1624 #, fuzzy msgid "can't close folder\n" msgstr "ne mogu odabrati spis: %s\n" #: libsylph/imap.c:1702 #, fuzzy, c-format msgid "root folder %s not exist\n" msgstr "Označena datoteka ne postoji.\n" #: libsylph/imap.c:1891 libsylph/imap.c:1899 #, fuzzy msgid "error occurred while getting LIST.\n" msgstr "došlo je do greške prilikom dobivanja LISTe.\n" #: libsylph/imap.c:2013 #, fuzzy, c-format msgid "Can't create '%s'\n" msgstr "ne mogu kreirati %s\n" #: libsylph/imap.c:2018 #, fuzzy, c-format msgid "Can't create '%s' under INBOX\n" msgstr "ne mogu kreirati %s\n" #: libsylph/imap.c:2079 msgid "can't create mailbox: LIST failed\n" msgstr "ne mogu kreirati sandučić: LIST nije uspio\n" #: libsylph/imap.c:2099 msgid "can't create mailbox\n" msgstr "ne mogu kreirati sandučić\n" #: libsylph/imap.c:2203 #, fuzzy, c-format msgid "can't rename mailbox: %s to %s\n" msgstr "ne mogu kreirati sandučić\n" #: libsylph/imap.c:2283 msgid "can't delete mailbox\n" msgstr "ne mogu obrisati sandučić\n" #: libsylph/imap.c:2327 msgid "can't get envelope\n" msgstr "ne mogu dobiti omot\n" #: libsylph/imap.c:2340 #, fuzzy, c-format msgid "Getting message headers (%d / %d)" msgstr "Šaljem poruku (%d / %d bytea)" #: libsylph/imap.c:2350 msgid "error occurred while getting envelope.\n" msgstr "došlo je do greške prilikom dobivanja omota.\n" #: libsylph/imap.c:2372 #, c-format msgid "can't parse envelope: %s\n" msgstr "ne mogu analizirati omot: %s\n" #: libsylph/imap.c:2496 #, c-format msgid "Can't connect to IMAP4 server: %s:%d\n" msgstr "Ne mogu se povezati s IMAP4 poslužiteljom: %s%d\n" #: libsylph/imap.c:2503 #, fuzzy, c-format msgid "Can't establish IMAP4 session with: %s:%d\n" msgstr "Ne mogu se povezati s IMAP4 poslužiteljom: %s%d\n" #: libsylph/imap.c:2578 msgid "can't get namespace\n" msgstr "ne mogu dobiti namespace\n" #: libsylph/imap.c:3111 #, c-format msgid "can't select folder: %s\n" msgstr "ne mogu odabrati spis: %s\n" #: libsylph/imap.c:3146 #, fuzzy msgid "error on imap command: STATUS\n" msgstr "greška prilikom imap naredbe: EXPUNGE\n" #: libsylph/imap.c:3269 libsylph/imap.c:3304 #, fuzzy msgid "IMAP4 authentication failed.\n" msgstr "Autorizacija" #: libsylph/imap.c:3353 msgid "IMAP4 login failed.\n" msgstr "IMAP4 login propao.\n" #: libsylph/imap.c:3689 #, c-format msgid "can't append %s to %s\n" msgstr "ne mogu pričvrstiti %s na %s\n" #: libsylph/imap.c:3696 #, fuzzy msgid "(sending file...)" msgstr "Šaljem DATA..." #: libsylph/imap.c:3725 #, fuzzy, c-format msgid "can't append message to %s\n" msgstr "ne mogu obilježiti poruku %s\n" #: libsylph/imap.c:3757 #, fuzzy, c-format msgid "can't copy %s to %s\n" msgstr "ne mogu kopirati %d u %s\n" #: libsylph/imap.c:3781 #, fuzzy, c-format msgid "error while imap command: STORE %s %s\n" msgstr "greška prilikom imap naredbe: STORE %d:%d %s\n" #: libsylph/imap.c:3795 msgid "error while imap command: EXPUNGE\n" msgstr "greška prilikom imap naredbe: EXPUNGE\n" #: libsylph/imap.c:3808 #, fuzzy msgid "error while imap command: CLOSE\n" msgstr "greška prilikom imap naredbe: EXPUNGE\n" #: libsylph/imap.c:4084 #, c-format msgid "iconv cannot convert UTF-7 to %s\n" msgstr "" #: libsylph/imap.c:4114 #, c-format msgid "iconv cannot convert %s to UTF-7\n" msgstr "" #: libsylph/mbox.c:50 libsylph/mbox.c:196 msgid "can't write to temporary file\n" msgstr "ne mogu pisati u privremenu datoteku\n" #: libsylph/mbox.c:69 #, c-format msgid "Getting messages from %s into %s...\n" msgstr "Primam poruke sa %s u %s...\n" #: libsylph/mbox.c:79 msgid "can't read mbox file.\n" msgstr "ne mogu čitati mbox datoteku.\n" #: libsylph/mbox.c:86 #, c-format msgid "invalid mbox format: %s\n" msgstr "pogrešan mbox format: %s\n" #: libsylph/mbox.c:93 #, c-format msgid "malformed mbox: %s\n" msgstr "pokvaren mbox: %s\n" #: libsylph/mbox.c:110 msgid "can't open temporary file\n" msgstr "ne mogu otvoriti privremenu datoteku\n" #: libsylph/mbox.c:161 #, c-format msgid "" "unescaped From found:\n" "%s" msgstr "" "neizbježan Od pronađen:\n" "%s" #: libsylph/mbox.c:250 #, c-format msgid "%d messages found.\n" msgstr "%d poruka pronađeno.\n" #: libsylph/mbox.c:268 #, c-format msgid "can't create lock file %s\n" msgstr "ne mogu kreirati lock datoteku %s\n" #: libsylph/mbox.c:269 msgid "use 'flock' instead of 'file' if possible.\n" msgstr "koristi 'flock' umjesto 'file' ako je moguće.\n" #: libsylph/mbox.c:281 #, c-format msgid "can't create %s\n" msgstr "ne mogu kreirati %s\n" #: libsylph/mbox.c:287 msgid "mailbox is owned by another process, waiting...\n" msgstr "neki drugi proces koristi sandučić, čekam...\n" #: libsylph/mbox.c:316 #, c-format msgid "can't lock %s\n" msgstr "ne mogu zaključati %s\n" #: libsylph/mbox.c:323 libsylph/mbox.c:373 msgid "invalid lock type\n" msgstr "neispravan tip zaključavanja\n" #: libsylph/mbox.c:359 #, c-format msgid "can't unlock %s\n" msgstr "ne mogu otključati %s\n" #: libsylph/mbox.c:394 msgid "can't truncate mailbox to zero.\n" msgstr "ne mogu skratiti sandučić na nulu.\n" #: libsylph/mbox.c:418 #, c-format msgid "Exporting messages from %s into %s...\n" msgstr "Izvozim poruke iz %s u %s...\n" #: libsylph/mh.c:427 #, c-format msgid "can't copy message %s to %s\n" msgstr "ne mogu kopirati poruku %s u %s\n" #: libsylph/mh.c:502 libsylph/mh.c:625 msgid "Can't open mark file.\n" msgstr "Ne mogu otvoriti označenu datoteku.\n" #: libsylph/mh.c:509 libsylph/mh.c:631 msgid "the src folder is identical to the dest.\n" msgstr "izvorni spis jednak je destinaciji.\n" #: libsylph/mh.c:634 #, c-format msgid "Copying message %s%c%d to %s ...\n" msgstr "Kopiram poruke %s%c%d u %s ...\n" #: libsylph/mh.c:965 libsylph/mh.c:978 #, c-format msgid "" "File `%s' already exists.\n" "Can't create folder." msgstr "" "Datoteka `%s' već postoji.\n" "Ne mogu stvoriti spis." #: libsylph/mh.c:1500 #, c-format msgid "" "Directory name\n" "'%s' is not a valid UTF-8 string.\n" "Maybe the locale encoding is used for filename.\n" "If that is the case, you must set the following environmental variable\n" "(see README for detail):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" msgstr "" #: libsylph/news.c:207 #, c-format msgid "creating NNTP connection to %s:%d ...\n" msgstr "uspostavljam NNTP vezu s %s:%d ...\n" #: libsylph/news.c:276 #, c-format msgid "NNTP connection to %s:%d has been disconnected. Reconnecting...\n" msgstr "NNTP veza s %s:%d je pukla. Povezujem ponovo...\n" #: libsylph/news.c:377 #, c-format msgid "article %d has been already cached.\n" msgstr "članak %d već je pohranjen.\n" #: libsylph/news.c:397 #, c-format msgid "getting article %d...\n" msgstr "primam članak %d...\n" #: libsylph/news.c:401 #, c-format msgid "can't read article %d\n" msgstr "ne mogu pročitati članak %d\n" #: libsylph/news.c:676 msgid "can't post article.\n" msgstr "ne mogu poslati članak.\n" #: libsylph/news.c:702 #, c-format msgid "can't retrieve article %d\n" msgstr "ne mogu primiti članak %d\n" #: libsylph/news.c:759 #, fuzzy, c-format msgid "can't select group: %s\n" msgstr "ne mogu odabrati grupu %s\n" #: libsylph/news.c:796 #, c-format msgid "invalid article range: %d - %d\n" msgstr "pogrešan opseg članaka: %d - %d\n" #: libsylph/news.c:809 msgid "no new articles.\n" msgstr "nema novih članaka.\n" #: libsylph/news.c:819 #, c-format msgid "getting xover %d - %d in %s...\n" msgstr "primam xover %d - %d u %s...\n" #: libsylph/news.c:823 msgid "can't get xover\n" msgstr "ne mogu dobiti xover\n" #: libsylph/news.c:833 msgid "error occurred while getting xover.\n" msgstr "došlo je do greške prilikom dobivanja xovera.\n" #: libsylph/news.c:843 #, c-format msgid "invalid xover line: %s\n" msgstr "pogrešna xover linija: %s\n" #: libsylph/news.c:862 libsylph/news.c:894 msgid "can't get xhdr\n" msgstr "ne mogu dobiti xhdr\n" #: libsylph/news.c:874 libsylph/news.c:906 msgid "error occurred while getting xhdr.\n" msgstr "došlo je do greške prilikom dobivanja xhdra.\n" #: libsylph/nntp.c:68 #, c-format msgid "Can't connect to NNTP server: %s:%d\n" msgstr "Ne mogu uspostaviti vezu s NNTP poslužiteljem: %s:%d\n" #: libsylph/nntp.c:164 libsylph/nntp.c:227 #, c-format msgid "protocol error: %s\n" msgstr "protokol greška: %s\n" #: libsylph/nntp.c:187 libsylph/nntp.c:233 msgid "protocol error\n" msgstr "protokol greška\n" #: libsylph/nntp.c:283 msgid "Error occurred while posting\n" msgstr "Došlo je do greške prilikom slanja\n" #: libsylph/nntp.c:363 #, fuzzy msgid "Error occurred while sending command\n" msgstr "Došlo je do greške pri radu s poštom." #: libsylph/pop.c:155 msgid "Required APOP timestamp not found in greeting\n" msgstr "Nužni APOP timestamp nije pronađen u pozdravu\n" #: libsylph/pop.c:162 msgid "Timestamp syntax error in greeting\n" msgstr "Syntax greška u timestampu kod pozdrava\n" #: libsylph/pop.c:170 #, fuzzy msgid "Invalid timestamp in greeting\n" msgstr "Nužni APOP timestamp nije pronađen u pozdravu\n" #: libsylph/pop.c:198 libsylph/pop.c:225 msgid "POP3 protocol error\n" msgstr "POP3 protokol greška\n" #: libsylph/pop.c:270 #, fuzzy, c-format msgid "invalid UIDL response: %s\n" msgstr "pogrešna xover linija: %s\n" #: libsylph/pop.c:631 #, fuzzy, c-format msgid "POP3: Deleting expired message %d\n" msgstr "Brišim duplicirane poruke..." #: libsylph/pop.c:640 #, fuzzy, c-format msgid "POP3: Skipping message %d (%d bytes)\n" msgstr "Šaljem poruku (%d / %d bytea)" #: libsylph/pop.c:673 #, fuzzy msgid "mailbox is locked\n" msgstr "Postavke sandučića" #: libsylph/pop.c:676 msgid "session timeout\n" msgstr "" #: libsylph/pop.c:682 libsylph/smtp.c:561 #, fuzzy msgid "can't start TLS session\n" msgstr "Korsiti STARTTLS naredbu za pokretanje SSL-a" #: libsylph/pop.c:689 libsylph/smtp.c:496 msgid "error occurred on authentication\n" msgstr "greška prilikom ovjeravanja\n" #: libsylph/pop.c:694 #, fuzzy msgid "command not supported\n" msgstr "Naredba" #: libsylph/pop.c:698 #, fuzzy msgid "error occurred on POP3 session\n" msgstr "greška prilikom ovjeravanja\n" #: libsylph/prefs.c:196 libsylph/prefs.c:224 libsylph/prefs.c:269 #: libsylph/prefs_account.c:217 libsylph/prefs_account.c:231 msgid "failed to write configuration to file\n" msgstr "neuspjeh pri pisanju konfiguracije u datoteku\n" #: libsylph/prefs.c:239 #, c-format msgid "Found %s\n" msgstr "Pronađen %s\n" #: libsylph/prefs.c:272 msgid "Configuration is saved.\n" msgstr "Konfiguracija je spremljena.\n" #: libsylph/prefs_common.c:503 #, fuzzy msgid "Junk mail filter (manual)" msgstr "Spis" #: libsylph/prefs_common.c:506 #, fuzzy msgid "Junk mail filter" msgstr "Spis" #: libsylph/procmime.c:1142 msgid "procmime_get_text_content(): Code conversion failed.\n" msgstr "procmime_get_text_content(): Promjena koda nije uspjela.\n" #: libsylph/procmsg.c:655 msgid "can't open mark file\n" msgstr "ne mogu otvoriti obilježenu datoteku\n" #: libsylph/procmsg.c:1107 #, c-format msgid "can't fetch message %d\n" msgstr "ne mogu dohvatiti poruku %d\n" #: libsylph/procmsg.c:1423 #, c-format msgid "Print command line is invalid: `%s'\n" msgstr "Naredba za ispis nije dobra: `%s'\n" #: libsylph/recv.c:141 msgid "error occurred while retrieving data.\n" msgstr "došlo je do greške prilikom prihvaćanja podataka.\n" #: libsylph/recv.c:183 libsylph/recv.c:215 libsylph/recv.c:230 msgid "Can't write to file.\n" msgstr "Ne mogu pisati u datoteku.\n" #: libsylph/smtp.c:157 #, fuzzy msgid "SMTP AUTH not available\n" msgstr "TLSv1 nije dostupan\n" #: libsylph/smtp.c:466 libsylph/smtp.c:516 msgid "bad SMTP response\n" msgstr "" #: libsylph/smtp.c:487 libsylph/smtp.c:505 libsylph/smtp.c:602 #, fuzzy msgid "error occurred on SMTP session\n" msgstr "greška prilikom ovjeravanja\n" #: libsylph/ssl.c:54 msgid "SSLv23 not available\n" msgstr "SSLv23 nije dostupan\n" #: libsylph/ssl.c:56 msgid "SSLv23 available\n" msgstr "SSLv23 dostupan\n" #: libsylph/ssl.c:65 msgid "TLSv1 not available\n" msgstr "TLSv1 nije dostupan\n" #: libsylph/ssl.c:67 msgid "TLSv1 available\n" msgstr "TLSv1 dostupan\n" #: libsylph/ssl.c:101 libsylph/ssl.c:108 msgid "SSL method not available\n" msgstr "SSL metoda nije dostupna\n" #: libsylph/ssl.c:114 msgid "Unknown SSL method *PROGRAM BUG*\n" msgstr "Nepoznata SSL metoda *BUG PROGRAMA*\n" #: libsylph/ssl.c:120 msgid "Error creating ssl context\n" msgstr "Greška pri kreiranju ssl konteksta\n" #. Get the cipher #: libsylph/ssl.c:139 #, c-format msgid "SSL connection using %s\n" msgstr "SSL veza koristeći %s\n" #: libsylph/ssl.c:148 msgid "Server certificate:\n" msgstr "Certifikat poslužitelja:\n" #: libsylph/ssl.c:151 #, c-format msgid " Subject: %s\n" msgstr " Tema: %s\n" #: libsylph/ssl.c:156 #, c-format msgid " Issuer: %s\n" msgstr " Izdavač: %s\n" #: libsylph/utils.c:2682 libsylph/utils.c:2804 #, c-format msgid "writing to %s failed.\n" msgstr "pisanje u %s nije uspjelo.\n" #~ msgid "can't change file mode\n" #~ msgstr "ne mogu promjeniti atribut datoteke\n" libsylph-1.1.0/po/hu.po0000644000175000017500000003725510756432604011675 00000000000000# Hungarian translation of Sylpheed. # Copyright (C) 2000 Free Software Foundation, Inc. # Székely Kriszitán , 2001. # Zahemszky Gábor , 2002, 2003, 2004. # Németh Tamás , 2005, 2006. msgid "" msgstr "" "Project-Id-Version: Sylpheed-2.2.6\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-02-19 10:48+0900\n" "PO-Revision-Date: 2006-07-15 17:27+0100\n" "Last-Translator: Németh Tamás \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: libsylph/account.c:56 msgid "Reading all config for each account...\n" msgstr "Beállítások beolvasása az összes hozzáféréshez...\n" #: libsylph/imap.c:465 #, c-format msgid "IMAP4 connection to %s has been disconnected. Reconnecting...\n" msgstr "Az IMAP4 kapcsolat %s felé megszakadt. Újrakapcsolódás...\n" #: libsylph/imap.c:520 libsylph/imap.c:526 msgid "IMAP4 server disables LOGIN.\n" msgstr "IMAP szerver LOGIN kikapcsolva.\n" #: libsylph/imap.c:602 #, c-format msgid "creating IMAP4 connection to %s:%d ...\n" msgstr "%s:%d IMAP4 kapcsolat létrehozása ...\n" #: libsylph/imap.c:646 msgid "Can't start TLS session.\n" msgstr "Nem lehet TLS menetet indítani.\n" #: libsylph/imap.c:1120 #, c-format msgid "Getting message %d" msgstr "%d üzenet letöltése" #: libsylph/imap.c:1236 #, c-format msgid "Appending messages to %s (%d / %d)" msgstr "Üzenetek hozzáfűzése ide: %s (%d / %d)" #: libsylph/imap.c:1328 #, c-format msgid "Moving messages %s to %s ..." msgstr "%s üzenetek áthelyezése ide: %s ..." #: libsylph/imap.c:1334 #, c-format msgid "Copying messages %s to %s ..." msgstr "%s üzenetek másolása ide: %s ..." #: libsylph/imap.c:1473 #, c-format msgid "Removing messages %s" msgstr "%s üzenetek eltávolítása" #: libsylph/imap.c:1479 #, c-format msgid "can't set deleted flags: %s\n" msgstr "nem lehet beállítani a törölt jelzést: %s\n" #: libsylph/imap.c:1487 libsylph/imap.c:1582 msgid "can't expunge\n" msgstr "nem lehet törölni\n" #: libsylph/imap.c:1570 #, c-format msgid "Removing all messages in %s" msgstr "Minden üzenet eltávolítása ebből: %s?" #: libsylph/imap.c:1576 msgid "can't set deleted flags: 1:*\n" msgstr "nem lehet beállítani a törölt jelzést: 1:*\n" #: libsylph/imap.c:1624 msgid "can't close folder\n" msgstr "mappa bezárása nem sikerült\n" #: libsylph/imap.c:1702 #, c-format msgid "root folder %s not exist\n" msgstr "%s root mappa nem létezik\n" #: libsylph/imap.c:1891 libsylph/imap.c:1899 msgid "error occurred while getting LIST.\n" msgstr "hiba történt a LIST lekérdezése közben.\n" #: libsylph/imap.c:2013 #, c-format msgid "Can't create '%s'\n" msgstr "'%s' nem hozható létre\n" #: libsylph/imap.c:2018 #, c-format msgid "Can't create '%s' under INBOX\n" msgstr "'%s' nem hozható létre a BEJÖVŐ mappa alatt\n" #: libsylph/imap.c:2079 msgid "can't create mailbox: LIST failed\n" msgstr "nem lehet létrehozni postaládát: LIST sikertelen\n" #: libsylph/imap.c:2099 msgid "can't create mailbox\n" msgstr "nem lehet létrehozni postaládát\n" #: libsylph/imap.c:2203 #, c-format msgid "can't rename mailbox: %s to %s\n" msgstr "nem lehet a postaládát átnevezni: %s -> %s\n" #: libsylph/imap.c:2283 msgid "can't delete mailbox\n" msgstr "nem lehet törölni a postaládát\n" #: libsylph/imap.c:2327 msgid "can't get envelope\n" msgstr "a borítékot nem lehet megszerezni\n" #: libsylph/imap.c:2340 #, c-format msgid "Getting message headers (%d / %d)" msgstr "Üzenetfejlécek letöltése (%d / %d)" #: libsylph/imap.c:2350 msgid "error occurred while getting envelope.\n" msgstr "hiba történt a boríték fogadása közben.\n" #: libsylph/imap.c:2372 #, c-format msgid "can't parse envelope: %s\n" msgstr "nem lehet értelmezni a borítékot: %s\n" #: libsylph/imap.c:2496 #, c-format msgid "Can't connect to IMAP4 server: %s:%d\n" msgstr "%s:%d IMAP4 szerverhez nem lehet kapcsolódni\n" #: libsylph/imap.c:2503 #, c-format msgid "Can't establish IMAP4 session with: %s:%d\n" msgstr "IMAP4 szerverhez nem sikerült kapcsolódni: %s:%d\n" #: libsylph/imap.c:2578 msgid "can't get namespace\n" msgstr "névtér nem elérhető\n" #: libsylph/imap.c:3111 #, c-format msgid "can't select folder: %s\n" msgstr "%s mappa kiválasztása nem sikerült\n" #: libsylph/imap.c:3146 msgid "error on imap command: STATUS\n" msgstr "hiba az IMAP parancs közben: STATUS\n" #: libsylph/imap.c:3269 libsylph/imap.c:3304 msgid "IMAP4 authentication failed.\n" msgstr "Az IMAP4 azonosítás nem sikerült.\n" #: libsylph/imap.c:3353 msgid "IMAP4 login failed.\n" msgstr "IMAP4 bejelentkezés sikertelen.\n" #: libsylph/imap.c:3689 #, c-format msgid "can't append %s to %s\n" msgstr "%s nem fűzhető hozzá ehhez: %s\n" #: libsylph/imap.c:3696 msgid "(sending file...)" msgstr "(fájl küldése...)" #: libsylph/imap.c:3725 #, c-format msgid "can't append message to %s\n" msgstr "üzenet nem fűzhető hozzá ehhez: %s\n" #: libsylph/imap.c:3757 #, c-format msgid "can't copy %s to %s\n" msgstr "%s nem másolható ide: %s\n" #: libsylph/imap.c:3781 #, c-format msgid "error while imap command: STORE %s %s\n" msgstr "hiba az IMAP parancs közben: STORE %s %s\n" #: libsylph/imap.c:3795 msgid "error while imap command: EXPUNGE\n" msgstr "hiba az IMAP parancs közben: EXPUNGE\n" #: libsylph/imap.c:3808 msgid "error while imap command: CLOSE\n" msgstr "hiba az IMAP parancs közben: CLOSE\n" #: libsylph/imap.c:4084 #, c-format msgid "iconv cannot convert UTF-7 to %s\n" msgstr "az iconv nem tud UTF-7-ből konvertálni ebbe: %s\n" #: libsylph/imap.c:4114 #, c-format msgid "iconv cannot convert %s to UTF-7\n" msgstr "az iconv nem tudja UTF-7-re konvertálni ezt: %s\n" #: libsylph/mbox.c:50 libsylph/mbox.c:196 msgid "can't write to temporary file\n" msgstr "nem lehet az ideiglenes fájlba írni\n" #: libsylph/mbox.c:69 #, c-format msgid "Getting messages from %s into %s...\n" msgstr "Üzenetek fogadása innen: %s ide: %s...\n" #: libsylph/mbox.c:79 msgid "can't read mbox file.\n" msgstr "az mbox fájlt nem lehet olvasni.\n" #: libsylph/mbox.c:86 #, c-format msgid "invalid mbox format: %s\n" msgstr "érvénytelen mbox formátum: %s\n" #: libsylph/mbox.c:93 #, c-format msgid "malformed mbox: %s\n" msgstr "sérült mbox: %s\n" #: libsylph/mbox.c:110 msgid "can't open temporary file\n" msgstr "nem lehet ideiglenes fájlt megnyitni\n" #: libsylph/mbox.c:161 #, c-format msgid "" "unescaped From found:\n" "%s" msgstr "" "Kódolatlan feladó található:\n" "%s" #: libsylph/mbox.c:250 #, c-format msgid "%d messages found.\n" msgstr "%d üzenet található.\n" #: libsylph/mbox.c:268 #, c-format msgid "can't create lock file %s\n" msgstr "%s zároló fájlt nem lehet létrehozni\n" #: libsylph/mbox.c:269 msgid "use 'flock' instead of 'file' if possible.\n" msgstr "'flock' használata 'file' helyett, ha lehet.\n" #: libsylph/mbox.c:281 #, c-format msgid "can't create %s\n" msgstr "%s nem hozható létre\n" #: libsylph/mbox.c:287 msgid "mailbox is owned by another process, waiting...\n" msgstr "A postaláda egy másik processzhez tartozik, várakozás...\n" #: libsylph/mbox.c:316 #, c-format msgid "can't lock %s\n" msgstr "%s nem zárolható\n" #: libsylph/mbox.c:323 libsylph/mbox.c:373 msgid "invalid lock type\n" msgstr "érvénytelen zároló típus\n" #: libsylph/mbox.c:359 #, c-format msgid "can't unlock %s\n" msgstr "%s zárolása nem oldható fel\n" #: libsylph/mbox.c:394 msgid "can't truncate mailbox to zero.\n" msgstr "nem lehet nulla méretűre változtatni a postafiókot.\n" #: libsylph/mbox.c:418 #, c-format msgid "Exporting messages from %s into %s...\n" msgstr "Üzenetek exportálása innen: %s ide: %s...\n" #: libsylph/mh.c:427 #, c-format msgid "can't copy message %s to %s\n" msgstr "%s üzenet nem másolható ide: %s\n" #: libsylph/mh.c:502 libsylph/mh.c:625 msgid "Can't open mark file.\n" msgstr "A jelölő fájlt nem lehet megnyitni.\n" #: libsylph/mh.c:509 libsylph/mh.c:631 msgid "the src folder is identical to the dest.\n" msgstr "A forrás- és célmappa azonos.\n" #: libsylph/mh.c:634 #, c-format msgid "Copying message %s%c%d to %s ...\n" msgstr "%s%c%d üzenet másolása ide: %s ...\n" #: libsylph/mh.c:965 libsylph/mh.c:978 #, c-format msgid "" "File `%s' already exists.\n" "Can't create folder." msgstr "" "`%s' fájl már létezik.\n" "Mappa nem hozható létre." #: libsylph/mh.c:1500 #, c-format msgid "" "Directory name\n" "'%s' is not a valid UTF-8 string.\n" "Maybe the locale encoding is used for filename.\n" "If that is the case, you must set the following environmental variable\n" "(see README for detail):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" msgstr "" "Könyvtár neve\n" "A(z) '%s' nem valós UTF-8 sztring.\n" "Lehetséges, hogy helyi karakterkódolást használ a fájlnevekre.\n" "Ha ez a helyzet, akkor be kell állítania a következő környezeti változót\n" "(lásd a README-t a részletekhez):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" #: libsylph/news.c:207 #, c-format msgid "creating NNTP connection to %s:%d ...\n" msgstr "NNTP kapcsolat létesítése %s:%d ...\n" #: libsylph/news.c:276 #, c-format msgid "NNTP connection to %s:%d has been disconnected. Reconnecting...\n" msgstr "Az NNTP kapcsolat %s:%d megszakadt. Újrakapcsolódás...\n" #: libsylph/news.c:377 #, c-format msgid "article %d has been already cached.\n" msgstr "%d cikk már a gyorstárban van.\n" #: libsylph/news.c:397 #, c-format msgid "getting article %d...\n" msgstr "%d cikk fogadása...\n" #: libsylph/news.c:401 #, c-format msgid "can't read article %d\n" msgstr "%d cikk nem olvasható\n" #: libsylph/news.c:676 msgid "can't post article.\n" msgstr "A cikk nem küldhető el.\n" #: libsylph/news.c:702 #, c-format msgid "can't retrieve article %d\n" msgstr "%d cikket nem lehet fogadni\n" #: libsylph/news.c:759 #, c-format msgid "can't select group: %s\n" msgstr "%s csoport nem választható ki\n" #: libsylph/news.c:796 #, c-format msgid "invalid article range: %d - %d\n" msgstr "érvénytelen cikk tartomány: %d - %d\n" #: libsylph/news.c:809 msgid "no new articles.\n" msgstr "Nincsenek új cikkek.\n" #: libsylph/news.c:819 #, c-format msgid "getting xover %d - %d in %s...\n" msgstr "%d - %d hírjegyzék fogadása ide: %s...\n" #: libsylph/news.c:823 msgid "can't get xover\n" msgstr "A hírjegyzék nem elérhető\n" #: libsylph/news.c:833 msgid "error occurred while getting xover.\n" msgstr "Hiba a hírjegyzék fogadása közben.\n" #: libsylph/news.c:843 #, c-format msgid "invalid xover line: %s\n" msgstr "érvénytelen hírjegyzék sor: %s\n" #: libsylph/news.c:862 libsylph/news.c:894 msgid "can't get xhdr\n" msgstr "xhdr nem elérhető\n" #: libsylph/news.c:874 libsylph/news.c:906 msgid "error occurred while getting xhdr.\n" msgstr "Hiba történt xhdr vétele közben.\n" #: libsylph/nntp.c:68 #, c-format msgid "Can't connect to NNTP server: %s:%d\n" msgstr "%s:%d NNTP szerverhez nem sikerült kapcsolódni\n" #: libsylph/nntp.c:164 libsylph/nntp.c:227 #, c-format msgid "protocol error: %s\n" msgstr "Protokollhiba: %s\n" #: libsylph/nntp.c:187 libsylph/nntp.c:233 msgid "protocol error\n" msgstr "Protokollhiba\n" #: libsylph/nntp.c:283 msgid "Error occurred while posting\n" msgstr "Hiba küldés közben\n" #: libsylph/nntp.c:363 msgid "Error occurred while sending command\n" msgstr "Hiba történt parancsküldés közben\n" #: libsylph/pop.c:155 msgid "Required APOP timestamp not found in greeting\n" msgstr "A szükséges APOP időpecsét nem található az üdvözletben\n" #: libsylph/pop.c:162 msgid "Timestamp syntax error in greeting\n" msgstr "Időpecsét szintaktikai hiba az üdvözletben\n" #: libsylph/pop.c:170 #, fuzzy msgid "Invalid timestamp in greeting\n" msgstr "A szükséges APOP időpecsét nem található az üdvözletben\n" #: libsylph/pop.c:198 libsylph/pop.c:225 msgid "POP3 protocol error\n" msgstr "POP3 protokollhiba\n" #: libsylph/pop.c:270 #, c-format msgid "invalid UIDL response: %s\n" msgstr "érvénytelen UIDL válasz: %s\n" #: libsylph/pop.c:631 #, c-format msgid "POP3: Deleting expired message %d\n" msgstr "POP3: Lejárt üzenetek törlése %d\n" #: libsylph/pop.c:640 #, c-format msgid "POP3: Skipping message %d (%d bytes)\n" msgstr "POP3: üzenet átugrása %d (%d bájt)\n" #: libsylph/pop.c:673 msgid "mailbox is locked\n" msgstr "a postafiók zárolt\n" #: libsylph/pop.c:676 msgid "session timeout\n" msgstr "kapcsolat időtúllépése\n" #: libsylph/pop.c:682 libsylph/smtp.c:561 msgid "can't start TLS session\n" msgstr "nem lehet TLS menetet indítani\n" #: libsylph/pop.c:689 libsylph/smtp.c:496 msgid "error occurred on authentication\n" msgstr "Hiba történt az azonosításkor\n" #: libsylph/pop.c:694 msgid "command not supported\n" msgstr "A parancs nem támogatott\n" #: libsylph/pop.c:698 msgid "error occurred on POP3 session\n" msgstr "hiba történt a POP3 kapcsolat közben\n" #: libsylph/prefs.c:196 libsylph/prefs.c:224 libsylph/prefs.c:269 #: libsylph/prefs_account.c:217 libsylph/prefs_account.c:231 msgid "failed to write configuration to file\n" msgstr "a beállításokat nem lehetett elmenteni\n" #: libsylph/prefs.c:239 #, c-format msgid "Found %s\n" msgstr "Találat %s\n" #: libsylph/prefs.c:272 msgid "Configuration is saved.\n" msgstr "Beállítások tárolva.\n" #: libsylph/prefs_common.c:503 #, fuzzy msgid "Junk mail filter (manual)" msgstr "Levélszemét szűrő" #: libsylph/prefs_common.c:506 msgid "Junk mail filter" msgstr "Levélszemét szűrő" #: libsylph/procmime.c:1142 msgid "procmime_get_text_content(): Code conversion failed.\n" msgstr "procmime_get_text_content(): Kód konverziós hiba.\n" #: libsylph/procmsg.c:655 msgid "can't open mark file\n" msgstr "A kijelölt fájl nem nyitható meg\n" #: libsylph/procmsg.c:1107 #, c-format msgid "can't fetch message %d\n" msgstr "%d üzenet vétele nem sikerült\n" #: libsylph/procmsg.c:1423 #, c-format msgid "Print command line is invalid: `%s'\n" msgstr "Érvénytelen nyomtató parancs: `%s'\n" #: libsylph/recv.c:141 msgid "error occurred while retrieving data.\n" msgstr "hiba az adatok fogadása közben.\n" #: libsylph/recv.c:183 libsylph/recv.c:215 libsylph/recv.c:230 msgid "Can't write to file.\n" msgstr "Nem lehet a fájlba írni.\n" #: libsylph/smtp.c:157 msgid "SMTP AUTH not available\n" msgstr "SMTP AUTH nem elérhető\n" #: libsylph/smtp.c:466 libsylph/smtp.c:516 msgid "bad SMTP response\n" msgstr "hibás SMTP válasz\n" #: libsylph/smtp.c:487 libsylph/smtp.c:505 libsylph/smtp.c:602 msgid "error occurred on SMTP session\n" msgstr "hiba történt az SMTP kapcsolat közben\n" #: libsylph/ssl.c:54 msgid "SSLv23 not available\n" msgstr "SSLv23 nem elérhető\n" #: libsylph/ssl.c:56 msgid "SSLv23 available\n" msgstr "SSLv23 elérhető\n" #: libsylph/ssl.c:65 msgid "TLSv1 not available\n" msgstr "TLSv1 nem elérhető\n" #: libsylph/ssl.c:67 msgid "TLSv1 available\n" msgstr "TLSv1 elérhető\n" #: libsylph/ssl.c:101 libsylph/ssl.c:108 msgid "SSL method not available\n" msgstr "SSL eljárás nem elérhető\n" #: libsylph/ssl.c:114 msgid "Unknown SSL method *PROGRAM BUG*\n" msgstr "Ismeretlen SSL eljárás *PROGRAM HIBA*\n" #: libsylph/ssl.c:120 msgid "Error creating ssl context\n" msgstr "Hiba az ssl környezet létrehozása közben\n" #. Get the cipher #: libsylph/ssl.c:139 #, c-format msgid "SSL connection using %s\n" msgstr "SSL kapcsolat %s használatával\n" #: libsylph/ssl.c:148 msgid "Server certificate:\n" msgstr "Szerver igazolvány:\n" #: libsylph/ssl.c:151 #, c-format msgid " Subject: %s\n" msgstr " Tárgy: %s\n" #: libsylph/ssl.c:156 #, c-format msgid " Issuer: %s\n" msgstr " Szerző: %s\n" #: libsylph/utils.c:2682 libsylph/utils.c:2804 #, c-format msgid "writing to %s failed.\n" msgstr "%s fájlba nem sikerült írni.\n" #~ msgid "can't change file mode\n" #~ msgstr "fájl módja nem változtatható\n" libsylph-1.1.0/po/it.po0000644000175000017500000003770710756432604011677 00000000000000# Italian translation of Sylpheed pot file # Copyright (C) 2000 Free Software Foundation, Inc. # Danilo Bodei 2001-2006. # # msgid "" msgstr "" "Project-Id-Version: Sylpheed 2.2.4\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-02-19 10:48+0900\n" "PO-Revision-Date: 2006-03-31 18:46+0200\n" "Last-Translator: Danilo Bodei \n" "Language-Team: Italian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: libsylph/account.c:56 msgid "Reading all config for each account...\n" msgstr "Lettura della configurazione per ogni account...\n" #: libsylph/imap.c:465 #, c-format msgid "IMAP4 connection to %s has been disconnected. Reconnecting...\n" msgstr "La connessione IMAP4 a %s è stata interrotta. Riconnessione...\n" #: libsylph/imap.c:520 libsylph/imap.c:526 msgid "IMAP4 server disables LOGIN.\n" msgstr "Il server IMAP4 disabilita il LOGIN.\n" #: libsylph/imap.c:602 #, c-format msgid "creating IMAP4 connection to %s:%d ...\n" msgstr "creazione della connessione IMAP4 a %s:%d ...\n" #: libsylph/imap.c:646 msgid "Can't start TLS session.\n" msgstr "Impossibile avviare la sessione TLS.\n" #: libsylph/imap.c:1120 #, c-format msgid "Getting message %d" msgstr "Ricezione del messaggio %d" #: libsylph/imap.c:1236 #, c-format msgid "Appending messages to %s (%d / %d)" msgstr "Aggiunta di messaggi in %s (%d / %d)" #: libsylph/imap.c:1328 #, c-format msgid "Moving messages %s to %s ..." msgstr "Spostamento dei messaggi da %s in %s ..." #: libsylph/imap.c:1334 #, c-format msgid "Copying messages %s to %s ..." msgstr "Copia dei messaggi da %s in %s ..." #: libsylph/imap.c:1473 #, c-format msgid "Removing messages %s" msgstr "Rimozione messaggi %s" #: libsylph/imap.c:1479 #, c-format msgid "can't set deleted flags: %s\n" msgstr "impossibile impostare i flag eliminati: %s\n" #: libsylph/imap.c:1487 libsylph/imap.c:1582 msgid "can't expunge\n" msgstr "impossibile cancellare\n" #: libsylph/imap.c:1570 #, c-format msgid "Removing all messages in %s" msgstr "Rimozione di tutti i messaggi in %s" #: libsylph/imap.c:1576 msgid "can't set deleted flags: 1:*\n" msgstr "impossibile impostare i flag eliminati: 1:*\n" #: libsylph/imap.c:1624 msgid "can't close folder\n" msgstr "impossibile chiudere la cartella\n" #: libsylph/imap.c:1702 #, c-format msgid "root folder %s not exist\n" msgstr "la cartella radice %s non esiste\n" #: libsylph/imap.c:1891 libsylph/imap.c:1899 msgid "error occurred while getting LIST.\n" msgstr "si è verificato un errore durante la ricezione di LIST.\n" #: libsylph/imap.c:2013 #, c-format msgid "Can't create '%s'\n" msgstr "Impossibile creare «%s»\n" #: libsylph/imap.c:2018 #, c-format msgid "Can't create '%s' under INBOX\n" msgstr "Impossibile creare «%s» sotto IN ENTRATA\n" #: libsylph/imap.c:2079 msgid "can't create mailbox: LIST failed\n" msgstr "impossibile creare la casella postale: LIST fallito\n" #: libsylph/imap.c:2099 msgid "can't create mailbox\n" msgstr "impossibile creare la casella postale\n" #: libsylph/imap.c:2203 #, c-format msgid "can't rename mailbox: %s to %s\n" msgstr "impossibile rinominare la casella postale: %s in %s\n" #: libsylph/imap.c:2283 msgid "can't delete mailbox\n" msgstr "impossibile eliminare la casella postale\n" #: libsylph/imap.c:2327 msgid "can't get envelope\n" msgstr "impossibile ricevere la busta\n" #: libsylph/imap.c:2340 #, c-format msgid "Getting message headers (%d / %d)" msgstr "Ricezione intestazioni del messaggio (%d / %d)" #: libsylph/imap.c:2350 msgid "error occurred while getting envelope.\n" msgstr "si è verificato un errore durante la ricezione della busta.\n" #: libsylph/imap.c:2372 #, c-format msgid "can't parse envelope: %s\n" msgstr "impossibile analizzare la busta: %s\n" #: libsylph/imap.c:2496 #, c-format msgid "Can't connect to IMAP4 server: %s:%d\n" msgstr "Impossibile connettersi al server IMAP4: %s:%d\n" #: libsylph/imap.c:2503 #, c-format msgid "Can't establish IMAP4 session with: %s:%d\n" msgstr "Impossibile stabilire la sessione IMAP4 con: %s:%d\n" #: libsylph/imap.c:2578 msgid "can't get namespace\n" msgstr "impossibile ricevere il namespace\n" #: libsylph/imap.c:3111 #, c-format msgid "can't select folder: %s\n" msgstr "impossibile selezionare la cartella: %s\n" #: libsylph/imap.c:3146 msgid "error on imap command: STATUS\n" msgstr "errore durante il comando imap: STATUS\n" #: libsylph/imap.c:3269 libsylph/imap.c:3304 msgid "IMAP4 authentication failed.\n" msgstr "Autenticazione IMAP4 fallita.\n" #: libsylph/imap.c:3353 msgid "IMAP4 login failed.\n" msgstr "Login IMAP4 fallito.\n" #: libsylph/imap.c:3689 #, c-format msgid "can't append %s to %s\n" msgstr "impossibile aggiungere %s a %s\n" #: libsylph/imap.c:3696 msgid "(sending file...)" msgstr "(spedizione del file...)" #: libsylph/imap.c:3725 #, c-format msgid "can't append message to %s\n" msgstr "impossibile aggiungere a %s\n" #: libsylph/imap.c:3757 #, c-format msgid "can't copy %s to %s\n" msgstr "impossibile copiare %s in %s\n" #: libsylph/imap.c:3781 #, c-format msgid "error while imap command: STORE %s %s\n" msgstr "errore durante il comando imap: STORE %s %s\n" #: libsylph/imap.c:3795 msgid "error while imap command: EXPUNGE\n" msgstr "errore durante il comando imap: EXPUNGE\n" #: libsylph/imap.c:3808 msgid "error while imap command: CLOSE\n" msgstr "errore durante il comando imap: CLOSE\n" #: libsylph/imap.c:4084 #, c-format msgid "iconv cannot convert UTF-7 to %s\n" msgstr "iconv non può convertire UTF-7 in %s\n" #: libsylph/imap.c:4114 #, c-format msgid "iconv cannot convert %s to UTF-7\n" msgstr "iconv non può convertire %s in UTF-7\n" #: libsylph/mbox.c:50 libsylph/mbox.c:196 msgid "can't write to temporary file\n" msgstr "impossibile scrivere sul file temporaneo\n" #: libsylph/mbox.c:69 #, c-format msgid "Getting messages from %s into %s...\n" msgstr "Ricezione in %s dei messaggi da %s...\n" #: libsylph/mbox.c:79 msgid "can't read mbox file.\n" msgstr "impossibile leggere il file mbox.\n" #: libsylph/mbox.c:86 #, c-format msgid "invalid mbox format: %s\n" msgstr "formato mbox non valido: %s\n" #: libsylph/mbox.c:93 #, c-format msgid "malformed mbox: %s\n" msgstr "mbox non valida: %s\n" #: libsylph/mbox.c:110 msgid "can't open temporary file\n" msgstr "impossibile aprire il file temporaneo\n" #: libsylph/mbox.c:161 #, c-format msgid "" "unescaped From found:\n" "%s" msgstr "" "trovato un Da senza la sequenza di escape:\n" "%s" #: libsylph/mbox.c:250 #, c-format msgid "%d messages found.\n" msgstr "trovati %d messaggi.\n" #: libsylph/mbox.c:268 #, c-format msgid "can't create lock file %s\n" msgstr "impossibile creare il file di lock %s\n" #: libsylph/mbox.c:269 msgid "use 'flock' instead of 'file' if possible.\n" msgstr "se possibile usare «flock» al posto di «file».\n" #: libsylph/mbox.c:281 #, c-format msgid "can't create %s\n" msgstr "impossibile creare %s\n" #: libsylph/mbox.c:287 msgid "mailbox is owned by another process, waiting...\n" msgstr "la casella postale è occupata da un altro processo, attendo...\n" #: libsylph/mbox.c:316 #, c-format msgid "can't lock %s\n" msgstr "impossibile effettuare il lock %s\n" #: libsylph/mbox.c:323 libsylph/mbox.c:373 msgid "invalid lock type\n" msgstr "tipo di lock non valido\n" #: libsylph/mbox.c:359 #, c-format msgid "can't unlock %s\n" msgstr "impossibile liberare il lock su %s\n" #: libsylph/mbox.c:394 msgid "can't truncate mailbox to zero.\n" msgstr "impossibile troncare a zero la casella postale.\n" #: libsylph/mbox.c:418 #, c-format msgid "Exporting messages from %s into %s...\n" msgstr "Esportazione dei messaggi da %s in %s...\n" #: libsylph/mh.c:427 #, c-format msgid "can't copy message %s to %s\n" msgstr "impossibile copiare il messaggio %s in %s\n" #: libsylph/mh.c:502 libsylph/mh.c:625 msgid "Can't open mark file.\n" msgstr "impossibile aprire il file delle segnature.\n" #: libsylph/mh.c:509 libsylph/mh.c:631 msgid "the src folder is identical to the dest.\n" msgstr "la cartella sorgente é identica a quella di destinazione.\n" #: libsylph/mh.c:634 #, c-format msgid "Copying message %s%c%d to %s ...\n" msgstr "Copia del messaggio %s%c%d in %s ...\n" #: libsylph/mh.c:965 libsylph/mh.c:978 #, c-format msgid "" "File `%s' already exists.\n" "Can't create folder." msgstr "" "Il file «%s» esiste già.\n" "Impossibile creare la cartella." #: libsylph/mh.c:1500 #, c-format msgid "" "Directory name\n" "'%s' is not a valid UTF-8 string.\n" "Maybe the locale encoding is used for filename.\n" "If that is the case, you must set the following environmental variable\n" "(see README for detail):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" msgstr "" "Il nome della directory \n" "«%s» non è una stringa UTF-8 valida.\n" "Probabilmente la codifica locale è usata per il nome del file.\n" "Se è questo il caso, si deve impostare la seguente variabile di ambiente\n" "(vedere README per i dettagli):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" #: libsylph/news.c:207 #, c-format msgid "creating NNTP connection to %s:%d ...\n" msgstr "Creazione della connessione NNTP con %s:%d ...\n" #: libsylph/news.c:276 #, c-format msgid "NNTP connection to %s:%d has been disconnected. Reconnecting...\n" msgstr "La connessione NNTP a %s:%d è stata interrotta. Riconnessione...\n" #: libsylph/news.c:377 #, c-format msgid "article %d has been already cached.\n" msgstr "l'articolo %d è già nella cache.\n" #: libsylph/news.c:397 #, c-format msgid "getting article %d...\n" msgstr "ricezione dell'articolo %d...\n" #: libsylph/news.c:401 #, c-format msgid "can't read article %d\n" msgstr "impossibile leggere l'articolo %d\n" #: libsylph/news.c:676 msgid "can't post article.\n" msgstr "impossibile inviare l'articolo.\n" #: libsylph/news.c:702 #, c-format msgid "can't retrieve article %d\n" msgstr "impossibile recuperare l'articolo %d\n" #: libsylph/news.c:759 #, c-format msgid "can't select group: %s\n" msgstr "impossibile selezionare il gruppo: %s\n" #: libsylph/news.c:796 #, c-format msgid "invalid article range: %d - %d\n" msgstr "intervallo di articoli non valido: %d - %d\n" #: libsylph/news.c:809 msgid "no new articles.\n" msgstr "non ci sono nuovi articoli.\n" #: libsylph/news.c:819 #, c-format msgid "getting xover %d - %d in %s...\n" msgstr "ricezione di xover %d - %d in %s...\n" #: libsylph/news.c:823 msgid "can't get xover\n" msgstr "impossibile ricevere xover\n" #: libsylph/news.c:833 msgid "error occurred while getting xover.\n" msgstr "si è verificato un errore durante la ricezione di xover.\n" #: libsylph/news.c:843 #, c-format msgid "invalid xover line: %s\n" msgstr "riga xover non valida: %s\n" #: libsylph/news.c:862 libsylph/news.c:894 msgid "can't get xhdr\n" msgstr "impossibile ricevere xhdr\n" #: libsylph/news.c:874 libsylph/news.c:906 msgid "error occurred while getting xhdr.\n" msgstr "si è verificato un errore durante la ricezione di xhdr.\n" #: libsylph/nntp.c:68 #, c-format msgid "Can't connect to NNTP server: %s:%d\n" msgstr "Impossibile connettersi al server NNTP: %s:%d\n" #: libsylph/nntp.c:164 libsylph/nntp.c:227 #, c-format msgid "protocol error: %s\n" msgstr "errore del protocollo: %s\n" #: libsylph/nntp.c:187 libsylph/nntp.c:233 msgid "protocol error\n" msgstr "errore del protocollo\n" #: libsylph/nntp.c:283 msgid "Error occurred while posting\n" msgstr "Si è verificato un errore durante l'invio dell'articolo\n" #: libsylph/nntp.c:363 msgid "Error occurred while sending command\n" msgstr "Si è verificato un errore durante l'invio del comando\n" #: libsylph/pop.c:155 msgid "Required APOP timestamp not found in greeting\n" msgstr "Nel saluto non è stata trovata la necessaria data/ora APOP\n" #: libsylph/pop.c:162 msgid "Timestamp syntax error in greeting\n" msgstr "Errore di sintassi nella data/ora del saluto\n" #: libsylph/pop.c:170 #, fuzzy msgid "Invalid timestamp in greeting\n" msgstr "Nel saluto non è stata trovata la necessaria data/ora APOP\n" #: libsylph/pop.c:198 libsylph/pop.c:225 msgid "POP3 protocol error\n" msgstr "Errore nel protocollo POP3\n" #: libsylph/pop.c:270 #, c-format msgid "invalid UIDL response: %s\n" msgstr "risposta UIDL non valida: %s\n" #: libsylph/pop.c:631 #, c-format msgid "POP3: Deleting expired message %d\n" msgstr "POP3: Eliminazione del messaggio scaduto %d\n" #: libsylph/pop.c:640 #, c-format msgid "POP3: Skipping message %d (%d bytes)\n" msgstr "POP3: Salto il messaggio %d (%d byte)\n" #: libsylph/pop.c:673 msgid "mailbox is locked\n" msgstr "la casella postale è bloccata\n" #: libsylph/pop.c:676 msgid "session timeout\n" msgstr "timeout della sessione \n" #: libsylph/pop.c:682 libsylph/smtp.c:561 msgid "can't start TLS session\n" msgstr "impossibile avviare la sessione TLS\n" #: libsylph/pop.c:689 libsylph/smtp.c:496 msgid "error occurred on authentication\n" msgstr "si è verificato un errore durante l'autenticazione\n" #: libsylph/pop.c:694 msgid "command not supported\n" msgstr "comando non supportato\n" #: libsylph/pop.c:698 msgid "error occurred on POP3 session\n" msgstr "si è verificato un errore durante la sessione POP3\n" #: libsylph/prefs.c:196 libsylph/prefs.c:224 libsylph/prefs.c:269 #: libsylph/prefs_account.c:217 libsylph/prefs_account.c:231 msgid "failed to write configuration to file\n" msgstr "la scrittura della configurazione sul file è fallita\n" #: libsylph/prefs.c:239 #, c-format msgid "Found %s\n" msgstr "Trovato %s\n" #: libsylph/prefs.c:272 msgid "Configuration is saved.\n" msgstr "La configurazione è stata salvata.\n" #: libsylph/prefs_common.c:503 #, fuzzy msgid "Junk mail filter (manual)" msgstr "Filtro mail spazzatura" #: libsylph/prefs_common.c:506 msgid "Junk mail filter" msgstr "Filtro mail spazzatura" #: libsylph/procmime.c:1142 msgid "procmime_get_text_content(): Code conversion failed.\n" msgstr "procmime_get_text_content(): Conversione del codice fallita.\n" #: libsylph/procmsg.c:655 msgid "can't open mark file\n" msgstr "Impossibile aprire il file delle segnature\n" #: libsylph/procmsg.c:1107 #, c-format msgid "can't fetch message %d\n" msgstr "impossibile prelevare il messaggio %d\n" #: libsylph/procmsg.c:1423 #, c-format msgid "Print command line is invalid: `%s'\n" msgstr "La riga di comando di stampa non è valida: «%s»\n" #: libsylph/recv.c:141 msgid "error occurred while retrieving data.\n" msgstr "si è verificato un errore durante il recupero dei dati.\n" #: libsylph/recv.c:183 libsylph/recv.c:215 libsylph/recv.c:230 msgid "Can't write to file.\n" msgstr "Impossibile scrivere sul file.\n" #: libsylph/smtp.c:157 msgid "SMTP AUTH not available\n" msgstr "SMTP AUTH non disponibile\n" #: libsylph/smtp.c:466 libsylph/smtp.c:516 msgid "bad SMTP response\n" msgstr "risposta SMTP difettosa\n" #: libsylph/smtp.c:487 libsylph/smtp.c:505 libsylph/smtp.c:602 msgid "error occurred on SMTP session\n" msgstr "si è verificato un errore durante la sessione SMTP\n" #: libsylph/ssl.c:54 msgid "SSLv23 not available\n" msgstr "SSLv23 non disponibile\n" #: libsylph/ssl.c:56 msgid "SSLv23 available\n" msgstr "SSLv23 disponibile\n" #: libsylph/ssl.c:65 msgid "TLSv1 not available\n" msgstr "TLSv1 non disponibile\n" #: libsylph/ssl.c:67 msgid "TLSv1 available\n" msgstr "TLSv1 disponibile\n" #: libsylph/ssl.c:101 libsylph/ssl.c:108 msgid "SSL method not available\n" msgstr "Metodo SSL non disponibile\n" #: libsylph/ssl.c:114 msgid "Unknown SSL method *PROGRAM BUG*\n" msgstr "Metodo SSL sconosciuto *BUG DEL PROGRAMMA*\n" #: libsylph/ssl.c:120 msgid "Error creating ssl context\n" msgstr "Errore creando il contesto ssl\n" #. Get the cipher #: libsylph/ssl.c:139 #, c-format msgid "SSL connection using %s\n" msgstr "Connessione SSL usando %s\n" #: libsylph/ssl.c:148 msgid "Server certificate:\n" msgstr "Certificato del server:\n" #: libsylph/ssl.c:151 #, c-format msgid " Subject: %s\n" msgstr " Oggetto: %s\n" #: libsylph/ssl.c:156 #, c-format msgid " Issuer: %s\n" msgstr " Distributore: %s\n" #: libsylph/utils.c:2682 libsylph/utils.c:2804 #, c-format msgid "writing to %s failed.\n" msgstr "la scrittura su %s è fallita.\n" #~ msgid "can't change file mode\n" #~ msgstr "impossibile cambiare i permessi del file\n" libsylph-1.1.0/po/ja.po0000644000175000017500000004206310756432604011644 00000000000000# Japanese translation of Sylpheed # Copyright (C) 1999 Free Software Foundation, Inc. # Hiroyuki Yamamoto , 1999,2000,2001,2002,2003. # msgid "" msgstr "" "Project-Id-Version: sylpheed\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-02-19 10:48+0900\n" "PO-Revision-Date: 1999-10-12\n" "Last-Translator: Hiroyuki Yamamoto \n" "Language-Team: Japanese \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: libsylph/account.c:56 msgid "Reading all config for each account...\n" msgstr "すべてのアカウント毎の設定を読み込み中...\n" #: libsylph/imap.c:465 #, c-format msgid "IMAP4 connection to %s has been disconnected. Reconnecting...\n" msgstr "%s へのIMAP4の接続が切れています。再接続します...\n" #: libsylph/imap.c:520 libsylph/imap.c:526 msgid "IMAP4 server disables LOGIN.\n" msgstr "IMAPサーバは LOGIN を無効にしています。\n" #: libsylph/imap.c:602 #, c-format msgid "creating IMAP4 connection to %s:%d ...\n" msgstr "%s:%d へのIMAP4の接続を確立中...\n" #: libsylph/imap.c:646 msgid "Can't start TLS session.\n" msgstr "TLS セッションを開始できません。\n" #: libsylph/imap.c:1120 #, c-format msgid "Getting message %d" msgstr "メッセージ %d を取得中" #: libsylph/imap.c:1236 #, c-format msgid "Appending messages to %s (%d / %d)" msgstr "メッセージを %s に追加しています (%d / %d)" #: libsylph/imap.c:1328 #, c-format msgid "Moving messages %s to %s ..." msgstr "メッセージ %s を %s に移動しています..." #: libsylph/imap.c:1334 #, c-format msgid "Copying messages %s to %s ..." msgstr "メッセージ %s を %s にコピーしています..." #: libsylph/imap.c:1473 #, c-format msgid "Removing messages %s" msgstr "メッセージ %s を削除しています" #: libsylph/imap.c:1479 #, c-format msgid "can't set deleted flags: %s\n" msgstr "deleted フラグをセットできません: %s\n" #: libsylph/imap.c:1487 libsylph/imap.c:1582 msgid "can't expunge\n" msgstr "expunge できません\n" #: libsylph/imap.c:1570 #, c-format msgid "Removing all messages in %s" msgstr "%s のすべてのメッセージを削除しています" #: libsylph/imap.c:1576 msgid "can't set deleted flags: 1:*\n" msgstr "deleted フラグをセットできません: 1:*\n" #: libsylph/imap.c:1624 msgid "can't close folder\n" msgstr "フォルダをクローズできません\n" #: libsylph/imap.c:1702 #, c-format msgid "root folder %s not exist\n" msgstr "ルートフォルダ %s が存在しません\n" #: libsylph/imap.c:1891 libsylph/imap.c:1899 msgid "error occurred while getting LIST.\n" msgstr "LIST の取得中にエラーが発生しました。\n" #: libsylph/imap.c:2013 #, c-format msgid "Can't create '%s'\n" msgstr "'%s' を作成できません。\n" #: libsylph/imap.c:2018 #, c-format msgid "Can't create '%s' under INBOX\n" msgstr "INBOX の下に '%s' を作成できません。\n" #: libsylph/imap.c:2079 msgid "can't create mailbox: LIST failed\n" msgstr "メールボックスを作成できません: LIST に失敗\n" #: libsylph/imap.c:2099 msgid "can't create mailbox\n" msgstr "メールボックスを作成できません\n" #: libsylph/imap.c:2203 #, c-format msgid "can't rename mailbox: %s to %s\n" msgstr "メールボックスを名称変更できません: %s -> %s\n" #: libsylph/imap.c:2283 msgid "can't delete mailbox\n" msgstr "メールボックスを削除できません\n" #: libsylph/imap.c:2327 msgid "can't get envelope\n" msgstr "エンベロープを取得できません\n" #: libsylph/imap.c:2340 #, c-format msgid "Getting message headers (%d / %d)" msgstr "メッセージのヘッダを取得中 (%d / %d)" #: libsylph/imap.c:2350 msgid "error occurred while getting envelope.\n" msgstr "エンベロープを取得中にエラーが発生しました。\n" #: libsylph/imap.c:2372 #, c-format msgid "can't parse envelope: %s\n" msgstr "エンベロープを解析できません: %s\n" #: libsylph/imap.c:2496 #, c-format msgid "Can't connect to IMAP4 server: %s:%d\n" msgstr "IMAP4 サーバ: %s:%d に接続できません\n" #: libsylph/imap.c:2503 #, c-format msgid "Can't establish IMAP4 session with: %s:%d\n" msgstr "%s:%d との IMAP4 セッションを確立できません\n" #: libsylph/imap.c:2578 msgid "can't get namespace\n" msgstr "namespace を取得できません\n" #: libsylph/imap.c:3111 #, c-format msgid "can't select folder: %s\n" msgstr "フォルダ %s を選択できません\n" #: libsylph/imap.c:3146 msgid "error on imap command: STATUS\n" msgstr "imap コマンド中のエラー: STATUS\n" #: libsylph/imap.c:3269 libsylph/imap.c:3304 msgid "IMAP4 authentication failed.\n" msgstr "IMAP4 の認証に失敗しました。\n" #: libsylph/imap.c:3353 msgid "IMAP4 login failed.\n" msgstr "IMAP4のログインに失敗しました。\n" #: libsylph/imap.c:3689 #, c-format msgid "can't append %s to %s\n" msgstr "%s を %s に追加できません\n" #: libsylph/imap.c:3696 msgid "(sending file...)" msgstr "(ファイルを送信中...)" #: libsylph/imap.c:3725 #, c-format msgid "can't append message to %s\n" msgstr "メッセージを %s に追加できません\n" #: libsylph/imap.c:3757 #, c-format msgid "can't copy %s to %s\n" msgstr "%s を %s にコピーできません\n" #: libsylph/imap.c:3781 #, c-format msgid "error while imap command: STORE %s %s\n" msgstr "imap コマンド中のエラー: STORE %s %s\n" #: libsylph/imap.c:3795 msgid "error while imap command: EXPUNGE\n" msgstr "imap コマンド中のエラー: EXPUNGE\n" #: libsylph/imap.c:3808 msgid "error while imap command: CLOSE\n" msgstr "imap コマンド中のエラー: CLOSE\n" #: libsylph/imap.c:4084 #, c-format msgid "iconv cannot convert UTF-7 to %s\n" msgstr "iconv が UTF-7 を %s に変換できません\n" #: libsylph/imap.c:4114 #, c-format msgid "iconv cannot convert %s to UTF-7\n" msgstr "iconv が %s を UTF-7 に変換できません\n" #: libsylph/mbox.c:50 libsylph/mbox.c:196 msgid "can't write to temporary file\n" msgstr "一時ファイルに書き込めません\n" #: libsylph/mbox.c:69 #, c-format msgid "Getting messages from %s into %s...\n" msgstr "メッセージを %s から %s に取り込んでいます...\n" #: libsylph/mbox.c:79 msgid "can't read mbox file.\n" msgstr "メールボックスファイルを読み込めません。\n" #: libsylph/mbox.c:86 #, c-format msgid "invalid mbox format: %s\n" msgstr "無効なメールボックスの形式: %s\n" #: libsylph/mbox.c:93 #, c-format msgid "malformed mbox: %s\n" msgstr "メールボックスが異常です: %s\n" #: libsylph/mbox.c:110 msgid "can't open temporary file\n" msgstr "一時ファイルを開けません\n" #: libsylph/mbox.c:161 #, c-format msgid "" "unescaped From found:\n" "%s" msgstr "" "エスケープされていない From が見つかりました:\n" "%s" #: libsylph/mbox.c:250 #, c-format msgid "%d messages found.\n" msgstr "%d 通のメッセージが見つかりました。\n" #: libsylph/mbox.c:268 #, c-format msgid "can't create lock file %s\n" msgstr "ロックファイル %s を開けません\n" #: libsylph/mbox.c:269 msgid "use 'flock' instead of 'file' if possible.\n" msgstr "可能であれば 'file' の代わりに 'flock' を使用してください。\n" #: libsylph/mbox.c:281 #, c-format msgid "can't create %s\n" msgstr "%s を作成できません。\n" #: libsylph/mbox.c:287 msgid "mailbox is owned by another process, waiting...\n" msgstr "メールボックスは別のプロセスによって所有されています。待機中...\n" #: libsylph/mbox.c:316 #, c-format msgid "can't lock %s\n" msgstr "%s をロックできません\n" #: libsylph/mbox.c:323 libsylph/mbox.c:373 msgid "invalid lock type\n" msgstr "無効なロックタイプです\n" #: libsylph/mbox.c:359 #, c-format msgid "can't unlock %s\n" msgstr "%s をロック解除できません\n" #: libsylph/mbox.c:394 msgid "can't truncate mailbox to zero.\n" msgstr "メールボックスをゼロに切り詰められません。\n" #: libsylph/mbox.c:418 #, c-format msgid "Exporting messages from %s into %s...\n" msgstr "メッセージを %s から %s に書き出しています...\n" #: libsylph/mh.c:427 #, c-format msgid "can't copy message %s to %s\n" msgstr "メッセージ %s を %s にコピーできません\n" #: libsylph/mh.c:502 libsylph/mh.c:625 msgid "Can't open mark file.\n" msgstr "マークファイルを開けません。\n" #: libsylph/mh.c:509 libsylph/mh.c:631 msgid "the src folder is identical to the dest.\n" msgstr "移動元フォルダが移動先と同一です。\n" #: libsylph/mh.c:634 #, c-format msgid "Copying message %s%c%d to %s ...\n" msgstr "メッセージ %s%c%d を %s にコピーしています...\n" #: libsylph/mh.c:965 libsylph/mh.c:978 #, c-format msgid "" "File `%s' already exists.\n" "Can't create folder." msgstr "" "ファイル `%s' がすでに存在します。\n" "フォルダを作成できません。" #: libsylph/mh.c:1500 #, c-format msgid "" "Directory name\n" "'%s' is not a valid UTF-8 string.\n" "Maybe the locale encoding is used for filename.\n" "If that is the case, you must set the following environmental variable\n" "(see README for detail):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" msgstr "" "ディレクトリ名\n" "'%s' は有効な UTF-8 文字列ではありません。\n" "ファイル名にロケールエンコーディングが使用されている可能性があります。\n" "その場合は、以下の環境変数を指定する必要があります\n" "(詳細は README を参照):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" #: libsylph/news.c:207 #, c-format msgid "creating NNTP connection to %s:%d ...\n" msgstr "%s:%d への NNTP の接続を確立中...\n" #: libsylph/news.c:276 #, c-format msgid "NNTP connection to %s:%d has been disconnected. Reconnecting...\n" msgstr "%s:%d への NNTP の接続が切れています。再接続します...\n" #: libsylph/news.c:377 #, c-format msgid "article %d has been already cached.\n" msgstr "%d 番の記事はすでにキャッシュされています。\n" #: libsylph/news.c:397 #, c-format msgid "getting article %d...\n" msgstr "%d 番の記事を取得しています...\n" #: libsylph/news.c:401 #, c-format msgid "can't read article %d\n" msgstr "%d 番の記事を読めません\n" #: libsylph/news.c:676 msgid "can't post article.\n" msgstr "記事をポストできません。\n" #: libsylph/news.c:702 #, c-format msgid "can't retrieve article %d\n" msgstr "%d 番の記事を取得できません\n" #: libsylph/news.c:759 #, c-format msgid "can't select group: %s\n" msgstr "グループを選択できません: %s\n" #: libsylph/news.c:796 #, c-format msgid "invalid article range: %d - %d\n" msgstr "無効な記事の範囲です: %d - %d\n" #: libsylph/news.c:809 msgid "no new articles.\n" msgstr "新着記事はありません。\n" #: libsylph/news.c:819 #, c-format msgid "getting xover %d - %d in %s...\n" msgstr "xover %d - %d を取得中 (%s)...\n" #: libsylph/news.c:823 msgid "can't get xover\n" msgstr "xover 情報を取得できません\n" #: libsylph/news.c:833 msgid "error occurred while getting xover.\n" msgstr "xover 情報を取得中にエラーが発生しました。\n" #: libsylph/news.c:843 #, c-format msgid "invalid xover line: %s\n" msgstr "無効な xover 行です: %s\n" #: libsylph/news.c:862 libsylph/news.c:894 msgid "can't get xhdr\n" msgstr "xhdr 情報を取得できません\n" #: libsylph/news.c:874 libsylph/news.c:906 msgid "error occurred while getting xhdr.\n" msgstr "xhdr 情報を取得中にエラーが発生しました。\n" #: libsylph/nntp.c:68 #, c-format msgid "Can't connect to NNTP server: %s:%d\n" msgstr "NNTPサーバ: %s:%d に接続できません\n" #: libsylph/nntp.c:164 libsylph/nntp.c:227 #, c-format msgid "protocol error: %s\n" msgstr "プロトコルエラー: %s\n" #: libsylph/nntp.c:187 libsylph/nntp.c:233 msgid "protocol error\n" msgstr "プロトコルエラー\n" #: libsylph/nntp.c:283 msgid "Error occurred while posting\n" msgstr "ポスト中にエラーが発生しました\n" #: libsylph/nntp.c:363 msgid "Error occurred while sending command\n" msgstr "コマンドの送信中にエラーが発生しました\n" #: libsylph/pop.c:155 msgid "Required APOP timestamp not found in greeting\n" msgstr "必要なAPOPタイムスタンプが応答メッセージにありません\n" #: libsylph/pop.c:162 msgid "Timestamp syntax error in greeting\n" msgstr "応答メッセージのタイムスタンプの文法エラー\n" #: libsylph/pop.c:170 #, fuzzy msgid "Invalid timestamp in greeting\n" msgstr "必要なAPOPタイムスタンプが応答メッセージにありません\n" #: libsylph/pop.c:198 libsylph/pop.c:225 msgid "POP3 protocol error\n" msgstr "POP3 プロトコルエラー\n" #: libsylph/pop.c:270 #, c-format msgid "invalid UIDL response: %s\n" msgstr "無効な UIDL 応答です: %s\n" #: libsylph/pop.c:631 #, c-format msgid "POP3: Deleting expired message %d\n" msgstr "POP3: 期限切れのメッセージ %d を削除します\n" #: libsylph/pop.c:640 #, c-format msgid "POP3: Skipping message %d (%d bytes)\n" msgstr "POP3: メッセージ %d をスキップします (%d bytes)\n" #: libsylph/pop.c:673 msgid "mailbox is locked\n" msgstr "メールボックスはロックされています\n" #: libsylph/pop.c:676 msgid "session timeout\n" msgstr "セッションがタイムアウトしました\n" #: libsylph/pop.c:682 libsylph/smtp.c:561 msgid "can't start TLS session\n" msgstr "TLS セッションを開始できません\n" #: libsylph/pop.c:689 libsylph/smtp.c:496 msgid "error occurred on authentication\n" msgstr "認証中にエラーが発生しました\n" #: libsylph/pop.c:694 msgid "command not supported\n" msgstr "コマンドがサポートされていません\n" #: libsylph/pop.c:698 msgid "error occurred on POP3 session\n" msgstr "POP3 セッション中にエラーが発生しました\n" #: libsylph/prefs.c:196 libsylph/prefs.c:224 libsylph/prefs.c:269 #: libsylph/prefs_account.c:217 libsylph/prefs_account.c:231 msgid "failed to write configuration to file\n" msgstr "設定のファイルへの書き込みに失敗しました\n" #: libsylph/prefs.c:239 #, c-format msgid "Found %s\n" msgstr "%s が見つかりました\n" #: libsylph/prefs.c:272 msgid "Configuration is saved.\n" msgstr "設定を保存しました。\n" #: libsylph/prefs_common.c:503 msgid "Junk mail filter (manual)" msgstr "迷惑メールフィルタ (手動)" #: libsylph/prefs_common.c:506 msgid "Junk mail filter" msgstr "迷惑メールフィルタ" #: libsylph/procmime.c:1142 msgid "procmime_get_text_content(): Code conversion failed.\n" msgstr "procmime_get_text_content(): コード変換に失敗しました。\n" #: libsylph/procmsg.c:655 msgid "can't open mark file\n" msgstr "マークファイルを開けません\n" #: libsylph/procmsg.c:1107 #, c-format msgid "can't fetch message %d\n" msgstr "メッセージ %d を取り込めません\n" #: libsylph/procmsg.c:1423 #, c-format msgid "Print command line is invalid: `%s'\n" msgstr "印刷のコマンドラインが無効です: `%s'\n" #: libsylph/recv.c:141 msgid "error occurred while retrieving data.\n" msgstr "データの取得中にエラーが発生しました。\n" #: libsylph/recv.c:183 libsylph/recv.c:215 libsylph/recv.c:230 msgid "Can't write to file.\n" msgstr "ファイルに書き込めません。\n" #: libsylph/smtp.c:157 msgid "SMTP AUTH not available\n" msgstr "SMTP AUTH が利用できません\n" #: libsylph/smtp.c:466 libsylph/smtp.c:516 msgid "bad SMTP response\n" msgstr "不正な SMTP 応答です\n" #: libsylph/smtp.c:487 libsylph/smtp.c:505 libsylph/smtp.c:602 msgid "error occurred on SMTP session\n" msgstr "SMTP セッション中にエラーが発生しました\n" #: libsylph/ssl.c:54 msgid "SSLv23 not available\n" msgstr "SSLv23 は利用できません\n" #: libsylph/ssl.c:56 msgid "SSLv23 available\n" msgstr "SSLv23 は利用可能です\n" #: libsylph/ssl.c:65 msgid "TLSv1 not available\n" msgstr "TLSv1 は利用できません\n" #: libsylph/ssl.c:67 msgid "TLSv1 available\n" msgstr "TLSv1 は利用可能です\n" #: libsylph/ssl.c:101 libsylph/ssl.c:108 msgid "SSL method not available\n" msgstr "SSL メソッドが利用できません\n" #: libsylph/ssl.c:114 msgid "Unknown SSL method *PROGRAM BUG*\n" msgstr "未知の SSL メソッド *PROGRAM BUG*\n" #: libsylph/ssl.c:120 msgid "Error creating ssl context\n" msgstr "ssl コンテキスト生成中にエラー発生\n" #. Get the cipher #: libsylph/ssl.c:139 #, c-format msgid "SSL connection using %s\n" msgstr "%s を用いて SSL 接続\n" #: libsylph/ssl.c:148 msgid "Server certificate:\n" msgstr "サーバ証明書:\n" #: libsylph/ssl.c:151 #, c-format msgid " Subject: %s\n" msgstr " Subject: %s\n" #: libsylph/ssl.c:156 #, c-format msgid " Issuer: %s\n" msgstr " 発行者: %s\n" #: libsylph/utils.c:2682 libsylph/utils.c:2804 #, c-format msgid "writing to %s failed.\n" msgstr "%s への書き込みに失敗しました。\n" #~ msgid "can't change file mode\n" #~ msgstr "ファイルモードを変更できません\n" libsylph-1.1.0/po/ko.po0000644000175000017500000004036310756432604011664 00000000000000# korean po file for sylpheed mailer # Copyright (C) 2001 Free Software Foundation, Inc. # ChiDeok, Hwang , 2001 # msgid "" msgstr "" "Project-Id-Version: sylpheed 0.8.6\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-02-19 10:48+0900\n" "PO-Revision-Date: 2002-12-02 11:09+0900\n" "Last-Translator: Nam SungHyun \n" "Language-Team: Korean \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: libsylph/account.c:56 msgid "Reading all config for each account...\n" msgstr "각 계정에대한 모든 설정을 읽습니다...\n" #: libsylph/imap.c:465 #, fuzzy, c-format msgid "IMAP4 connection to %s has been disconnected. Reconnecting...\n" msgstr "%s:%d에대한 IMAP4 접속이 끊어졌습니다. 다시 접속...\n" #: libsylph/imap.c:520 libsylph/imap.c:526 #, fuzzy msgid "IMAP4 server disables LOGIN.\n" msgstr "IMAP 서버 디렉토리" #: libsylph/imap.c:602 #, c-format msgid "creating IMAP4 connection to %s:%d ...\n" msgstr "%s:%d에대한 IMAP4 접속을 만듭니다 ...\n" #: libsylph/imap.c:646 msgid "Can't start TLS session.\n" msgstr "TLS 세션을 시작할 수 없습니다.\n" #: libsylph/imap.c:1120 #, fuzzy, c-format msgid "Getting message %d" msgstr "%d 메시지를 삭제하는 중" #: libsylph/imap.c:1236 #, fuzzy, c-format msgid "Appending messages to %s (%d / %d)" msgstr "메시지를 보내는 중 (%d / %d 바이트)" #: libsylph/imap.c:1328 #, fuzzy, c-format msgid "Moving messages %s to %s ..." msgstr "메시지 %s%c%d를 %s로 이동합니다...\n" #: libsylph/imap.c:1334 #, fuzzy, c-format msgid "Copying messages %s to %s ..." msgstr "메시지 %s%c%d를 %s로 복사중입니다 ...\n" #: libsylph/imap.c:1473 #, fuzzy, c-format msgid "Removing messages %s" msgstr "%s로부터 %s로 메시지를 가져옵니다...\n" #: libsylph/imap.c:1479 #, fuzzy, c-format msgid "can't set deleted flags: %s\n" msgstr "삭제 플래그를 설정할 수가 없습니다: %d\n" #: libsylph/imap.c:1487 libsylph/imap.c:1582 msgid "can't expunge\n" msgstr "지울 수가 없습니다\n" #: libsylph/imap.c:1570 #, fuzzy, c-format msgid "Removing all messages in %s" msgstr "%s로부터 %s로 메시지를 가져옵니다...\n" #: libsylph/imap.c:1576 #, fuzzy msgid "can't set deleted flags: 1:*\n" msgstr "삭제 플래그를 설정할 수가 없습니다: 1:%d\n" #: libsylph/imap.c:1624 #, fuzzy msgid "can't close folder\n" msgstr "폴더를 선택할 수가 없습니다: %s\n" #: libsylph/imap.c:1702 #, fuzzy, c-format msgid "root folder %s not exist\n" msgstr "표시 파일이 발견되지않음.\n" #: libsylph/imap.c:1891 libsylph/imap.c:1899 #, fuzzy msgid "error occurred while getting LIST.\n" msgstr "LIST를 얻는 도중 에러가 발생.\n" #: libsylph/imap.c:2013 #, c-format msgid "Can't create '%s'\n" msgstr "'%s'를 생성할 수가 없습니다\n" #: libsylph/imap.c:2018 #, c-format msgid "Can't create '%s' under INBOX\n" msgstr "INBOX 아래에 '%s'를 생성할 수가 없습니다\n" #: libsylph/imap.c:2079 msgid "can't create mailbox: LIST failed\n" msgstr "우편함을 생성할 수 없습니다: LIST 실패\n" #: libsylph/imap.c:2099 msgid "can't create mailbox\n" msgstr "우편함을 생성할 수 없습니다\n" #: libsylph/imap.c:2203 #, c-format msgid "can't rename mailbox: %s to %s\n" msgstr "우편함명을 바꿀 수 없습니다: %s에서 %s로\n" #: libsylph/imap.c:2283 msgid "can't delete mailbox\n" msgstr "우편함을 삭제할 수 없습니다\n" #: libsylph/imap.c:2327 msgid "can't get envelope\n" msgstr "envelope를 얻을 수가 없습니다\n" #: libsylph/imap.c:2340 #, fuzzy, c-format msgid "Getting message headers (%d / %d)" msgstr "메시지를 보내는 중 (%d / %d 바이트)" #: libsylph/imap.c:2350 msgid "error occurred while getting envelope.\n" msgstr "envelope를 얻는 중 에러 발생.\n" #: libsylph/imap.c:2372 #, c-format msgid "can't parse envelope: %s\n" msgstr "envelope를 파싱할 수가 없습니다: %s\n" #: libsylph/imap.c:2496 #, c-format msgid "Can't connect to IMAP4 server: %s:%d\n" msgstr "%s:%d IMAP4 서버에 연결할 수가 없습니다\n" #: libsylph/imap.c:2503 #, c-format msgid "Can't establish IMAP4 session with: %s:%d\n" msgstr "IMAP4 세션을 만들 수 없습니다: %s: %d\n" #: libsylph/imap.c:2578 msgid "can't get namespace\n" msgstr "namespace를 얻을 수 없습니다\n" #: libsylph/imap.c:3111 #, c-format msgid "can't select folder: %s\n" msgstr "폴더를 선택할 수가 없습니다: %s\n" #: libsylph/imap.c:3146 #, fuzzy msgid "error on imap command: STATUS\n" msgstr "imap 명령어 실행중 에러: EXPUNGE\n" #: libsylph/imap.c:3269 libsylph/imap.c:3304 #, fuzzy msgid "IMAP4 authentication failed.\n" msgstr "인증 방법" #: libsylph/imap.c:3353 msgid "IMAP4 login failed.\n" msgstr "IMAP4 로그인을 실패했습니다.\n" #: libsylph/imap.c:3689 #, c-format msgid "can't append %s to %s\n" msgstr "%s를 %s에 붙일 수 없습니다\n" #: libsylph/imap.c:3696 msgid "(sending file...)" msgstr "(파일을 보냅니다...)" #: libsylph/imap.c:3725 #, fuzzy, c-format msgid "can't append message to %s\n" msgstr "%s 메시지를 추가할 수가 없습니다\n" #: libsylph/imap.c:3757 #, fuzzy, c-format msgid "can't copy %s to %s\n" msgstr "%d를 %s로 복사할 수가 없습니다\n" #: libsylph/imap.c:3781 #, fuzzy, c-format msgid "error while imap command: STORE %s %s\n" msgstr "imap 명령어 실행중 에러: STORE %d:%d %s\n" #: libsylph/imap.c:3795 msgid "error while imap command: EXPUNGE\n" msgstr "imap 명령어 실행중 에러: EXPUNGE\n" #: libsylph/imap.c:3808 #, fuzzy msgid "error while imap command: CLOSE\n" msgstr "imap 명령어 실행중 에러: EXPUNGE\n" #: libsylph/imap.c:4084 #, c-format msgid "iconv cannot convert UTF-7 to %s\n" msgstr "iconv가 UTF-7를 %s로 변환할 수 없습니다\n" #: libsylph/imap.c:4114 #, c-format msgid "iconv cannot convert %s to UTF-7\n" msgstr "iconv가 %s를 UTF-7로 변환할 수 없습니다\n" #: libsylph/mbox.c:50 libsylph/mbox.c:196 msgid "can't write to temporary file\n" msgstr "임시 파일에 쓸 수가 없습니다\n" #: libsylph/mbox.c:69 #, c-format msgid "Getting messages from %s into %s...\n" msgstr "%s로부터 %s로 메시지를 가져옵니다...\n" #: libsylph/mbox.c:79 msgid "can't read mbox file.\n" msgstr "mbox 파일을 읽을 수가 없습니다.\n" #: libsylph/mbox.c:86 #, c-format msgid "invalid mbox format: %s\n" msgstr "올바르지않은 mbox 포멧: %s\n" #: libsylph/mbox.c:93 #, c-format msgid "malformed mbox: %s\n" msgstr "제대로되어있지않은 mbox: %s\n" #: libsylph/mbox.c:110 msgid "can't open temporary file\n" msgstr "임시파일을 열 수가 없습니다\n" #: libsylph/mbox.c:161 #, c-format msgid "" "unescaped From found:\n" "%s" msgstr "" "메시지 본문중 From으로 시작하는 줄이 있습니다:\n" "%s" #: libsylph/mbox.c:250 #, c-format msgid "%d messages found.\n" msgstr "%d개의 메시지가 발견되었습니다.\n" #: libsylph/mbox.c:268 #, c-format msgid "can't create lock file %s\n" msgstr "잠금 파일 %s을 만들수가 없습니다\n" #: libsylph/mbox.c:269 msgid "use 'flock' instead of 'file' if possible.\n" msgstr "가능하면 'file'대신에 'flock'를 사용하세요.\n" #: libsylph/mbox.c:281 #, c-format msgid "can't create %s\n" msgstr "%s를 생성할 수가 없습니다\n" #: libsylph/mbox.c:287 msgid "mailbox is owned by another process, waiting...\n" msgstr "메일박스를 다른 프로세스가 읽고있습니다. 잠시 기다리세요...\n" #: libsylph/mbox.c:316 #, c-format msgid "can't lock %s\n" msgstr "%s에 lock를 걸수가 없습니다\n" #: libsylph/mbox.c:323 libsylph/mbox.c:373 msgid "invalid lock type\n" msgstr "올바르지않은 잠금 타입\n" #: libsylph/mbox.c:359 #, c-format msgid "can't unlock %s\n" msgstr "%s에 lock를 풀 수가 없습니다\n" #: libsylph/mbox.c:394 msgid "can't truncate mailbox to zero.\n" msgstr "메일박스의 크기를 0으로 만들수가 없습니다.\n" #: libsylph/mbox.c:418 #, c-format msgid "Exporting messages from %s into %s...\n" msgstr "메시지를 %s에서 %s로 보냅니다...\n" #: libsylph/mh.c:427 #, c-format msgid "can't copy message %s to %s\n" msgstr "메시지 %s을 %s로 복사할 수가 없습니다\n" #: libsylph/mh.c:502 libsylph/mh.c:625 msgid "Can't open mark file.\n" msgstr "표시 파일을 열 수가 없습니다.\n" #: libsylph/mh.c:509 libsylph/mh.c:631 msgid "the src folder is identical to the dest.\n" msgstr "옮길 폴더와 옮겨질 폴더가 같습니다.\n" #: libsylph/mh.c:634 #, c-format msgid "Copying message %s%c%d to %s ...\n" msgstr "메시지 %s%c%d를 %s로 복사중입니다 ...\n" #: libsylph/mh.c:965 libsylph/mh.c:978 #, c-format msgid "" "File `%s' already exists.\n" "Can't create folder." msgstr "" "파일 `%s'가 이미 존재합니다.\n" "폴더를 생성할 수가 없습니다." #: libsylph/mh.c:1500 #, c-format msgid "" "Directory name\n" "'%s' is not a valid UTF-8 string.\n" "Maybe the locale encoding is used for filename.\n" "If that is the case, you must set the following environmental variable\n" "(see README for detail):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" msgstr "" #: libsylph/news.c:207 #, c-format msgid "creating NNTP connection to %s:%d ...\n" msgstr "%s:%d로 NNTP 접속을 생성합니다...\n" #: libsylph/news.c:276 #, c-format msgid "NNTP connection to %s:%d has been disconnected. Reconnecting...\n" msgstr "%s:%d로의 NNTP 연결이 끊어졌습니다. 다시 연결합니다...\n" #: libsylph/news.c:377 #, c-format msgid "article %d has been already cached.\n" msgstr "기사 %d는 이미 캐쉬되었습니다.\n" #: libsylph/news.c:397 #, c-format msgid "getting article %d...\n" msgstr "기사 %d를 얻습니다...\n" #: libsylph/news.c:401 #, c-format msgid "can't read article %d\n" msgstr "기사 %d를 읽을 수가 없습니다\n" #: libsylph/news.c:676 msgid "can't post article.\n" msgstr "기사를 올릴 수가 없습니다.\n" #: libsylph/news.c:702 #, c-format msgid "can't retrieve article %d\n" msgstr "기사 %d를 가져올 수가 없습니다\n" #: libsylph/news.c:759 #, fuzzy, c-format msgid "can't select group: %s\n" msgstr "%s 그룹을 선택할 수가 없습니다\n" #: libsylph/news.c:796 #, c-format msgid "invalid article range: %d - %d\n" msgstr "올바르지않은 기사 범위: %d - %d\n" #: libsylph/news.c:809 msgid "no new articles.\n" msgstr "새 기사가 없습니다.\n" #: libsylph/news.c:819 #, c-format msgid "getting xover %d - %d in %s...\n" msgstr "%3$s에서 %1$d - %2$d xover를 가져옴...\n" #: libsylph/news.c:823 msgid "can't get xover\n" msgstr "xover를 가져올 수가 없습니다\n" #: libsylph/news.c:833 msgid "error occurred while getting xover.\n" msgstr "xover를 얻는 도중 에러가 발생.\n" #: libsylph/news.c:843 #, c-format msgid "invalid xover line: %s\n" msgstr "올바르지않은 xover line: %s\n" #: libsylph/news.c:862 libsylph/news.c:894 msgid "can't get xhdr\n" msgstr "xhdr을 가져올 수가 없습니다\n" #: libsylph/news.c:874 libsylph/news.c:906 msgid "error occurred while getting xhdr.\n" msgstr "xhdr을 얻는 도중 에러가 발생.\n" #: libsylph/nntp.c:68 #, c-format msgid "Can't connect to NNTP server: %s:%d\n" msgstr "%s:%d NNTP 서버에 연결할 수가 없습니다\n" #: libsylph/nntp.c:164 libsylph/nntp.c:227 #, c-format msgid "protocol error: %s\n" msgstr "프로토콜 에러: %s\n" #: libsylph/nntp.c:187 libsylph/nntp.c:233 msgid "protocol error\n" msgstr "프로토콜 에러\n" #: libsylph/nntp.c:283 msgid "Error occurred while posting\n" msgstr "글을 올리는 도중 에러 발생\n" #: libsylph/nntp.c:363 #, fuzzy msgid "Error occurred while sending command\n" msgstr "메일을 처리하는 도중 에러" #: libsylph/pop.c:155 msgid "Required APOP timestamp not found in greeting\n" msgstr "greeting에서 발견되지않은 APOP 타임 스탬프가 요구됨\n" #: libsylph/pop.c:162 msgid "Timestamp syntax error in greeting\n" msgstr "greeting에서 타임 스탬프에 문법 오류\n" #: libsylph/pop.c:170 #, fuzzy msgid "Invalid timestamp in greeting\n" msgstr "greeting에서 발견되지않은 APOP 타임 스탬프가 요구됨\n" #: libsylph/pop.c:198 libsylph/pop.c:225 msgid "POP3 protocol error\n" msgstr "POP3 프로토콜 에러\n" #: libsylph/pop.c:270 #, fuzzy, c-format msgid "invalid UIDL response: %s\n" msgstr "올바르지않은 xover line: %s\n" #: libsylph/pop.c:631 #, c-format msgid "POP3: Deleting expired message %d\n" msgstr "POP3: 만료된 메시지 %d를 삭제합니다\n" #: libsylph/pop.c:640 #, c-format msgid "POP3: Skipping message %d (%d bytes)\n" msgstr "POP3: 메시지 %d를 건너뜁니다 (%d 바이트)\n" #: libsylph/pop.c:673 msgid "mailbox is locked\n" msgstr "우편함이 잠겨있습니다\n" #: libsylph/pop.c:676 msgid "session timeout\n" msgstr "" #: libsylph/pop.c:682 libsylph/smtp.c:561 msgid "can't start TLS session\n" msgstr "TLS 세션을 시작할 수 없습니다\n" #: libsylph/pop.c:689 libsylph/smtp.c:496 msgid "error occurred on authentication\n" msgstr "인증 도중 에러 발생\n" #: libsylph/pop.c:694 #, fuzzy msgid "command not supported\n" msgstr "명령어" #: libsylph/pop.c:698 #, fuzzy msgid "error occurred on POP3 session\n" msgstr "인증 도중 에러 발생\n" #: libsylph/prefs.c:196 libsylph/prefs.c:224 libsylph/prefs.c:269 #: libsylph/prefs_account.c:217 libsylph/prefs_account.c:231 msgid "failed to write configuration to file\n" msgstr "파일에 설정을 쓰기가 실패했습니다\n" #: libsylph/prefs.c:239 #, c-format msgid "Found %s\n" msgstr "%s을 발견\n" #: libsylph/prefs.c:272 msgid "Configuration is saved.\n" msgstr "설정이 저장되었습니다.\n" #: libsylph/prefs_common.c:503 #, fuzzy msgid "Junk mail filter (manual)" msgstr "폴더" #: libsylph/prefs_common.c:506 #, fuzzy msgid "Junk mail filter" msgstr "폴더" #: libsylph/procmime.c:1142 msgid "procmime_get_text_content(): Code conversion failed.\n" msgstr "procmime_get_text_content(): 코드 변환이 실패했습니다.\n" #: libsylph/procmsg.c:655 msgid "can't open mark file\n" msgstr "표시 파일을 열수가 없습니다\n" #: libsylph/procmsg.c:1107 #, c-format msgid "can't fetch message %d\n" msgstr "메시지 %d를 가져올 수가 없습니다\n" #: libsylph/procmsg.c:1423 #, c-format msgid "Print command line is invalid: `%s'\n" msgstr "인쇄 명령어가 올바르지않습니다: `%s'\n" #: libsylph/recv.c:141 msgid "error occurred while retrieving data.\n" msgstr "데이타를 가져오는 중 에러가 발생했습니다.\n" #: libsylph/recv.c:183 libsylph/recv.c:215 libsylph/recv.c:230 msgid "Can't write to file.\n" msgstr "파일에 쓸 수가 없습니다.\n" #: libsylph/smtp.c:157 msgid "SMTP AUTH not available\n" msgstr "SMTP 인증을 사용할 수 없습니다\n" #: libsylph/smtp.c:466 libsylph/smtp.c:516 msgid "bad SMTP response\n" msgstr "" #: libsylph/smtp.c:487 libsylph/smtp.c:505 libsylph/smtp.c:602 #, fuzzy msgid "error occurred on SMTP session\n" msgstr "인증 도중 에러 발생\n" #: libsylph/ssl.c:54 msgid "SSLv23 not available\n" msgstr "SSLv23을 사용할 수 없습니다\n" #: libsylph/ssl.c:56 msgid "SSLv23 available\n" msgstr "SSLv23을 사용할 수 있습니다\n" #: libsylph/ssl.c:65 msgid "TLSv1 not available\n" msgstr "TLSv1을 사용할 수 없습니다\n" #: libsylph/ssl.c:67 msgid "TLSv1 available\n" msgstr "TLSv1을 사용할 수 있습니다\n" #: libsylph/ssl.c:101 libsylph/ssl.c:108 msgid "SSL method not available\n" msgstr "SSL를 사용할 수 없습니다\n" #: libsylph/ssl.c:114 msgid "Unknown SSL method *PROGRAM BUG*\n" msgstr "모르는 SSL *프로그램 버그*\n" #: libsylph/ssl.c:120 msgid "Error creating ssl context\n" msgstr "ssl 문맥 생성 에러\n" #. Get the cipher #: libsylph/ssl.c:139 #, c-format msgid "SSL connection using %s\n" msgstr "%s 사용하여 SSL 연결\n" #: libsylph/ssl.c:148 msgid "Server certificate:\n" msgstr "서버 증명:\n" #: libsylph/ssl.c:151 #, c-format msgid " Subject: %s\n" msgstr " 제목: %s\n" #: libsylph/ssl.c:156 #, c-format msgid " Issuer: %s\n" msgstr " 발행인: %s\n" #: libsylph/utils.c:2682 libsylph/utils.c:2804 #, c-format msgid "writing to %s failed.\n" msgstr "%s로 쓰기가 실패했습니다.\n" #~ msgid "can't change file mode\n" #~ msgstr "파일 모드를 바꿀수가 없습니다\n" libsylph-1.1.0/po/lt.po0000644000175000017500000003623610756432604011676 00000000000000# Lithuanian translation of Sylpheed. # Copyright (C) 2001 Free Software Foundation, Inc. # Vitalijus Valantiejus , 2005. # msgid "" msgstr "" "Project-Id-Version: Sylpheed\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-02-19 10:48+0900\n" "PO-Revision-Date: 2005-06-09 13:51+0300\n" "Last-Translator: Vitalijus Valantiejus \n" "Language-Team: Lithuanian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: libsylph/account.c:56 msgid "Reading all config for each account...\n" msgstr "Skaitoma kiekvienos sąskaitos konfigūracija...\n" #: libsylph/imap.c:465 #, c-format msgid "IMAP4 connection to %s has been disconnected. Reconnecting...\n" msgstr "IMAP4 prisijungimas prie %s buvo nutrauktas. Jungiamasi...\n" #: libsylph/imap.c:520 libsylph/imap.c:526 msgid "IMAP4 server disables LOGIN.\n" msgstr "IMAP4 serveris panaikina LOGIN.\n" #: libsylph/imap.c:602 #, c-format msgid "creating IMAP4 connection to %s:%d ...\n" msgstr "sukuriamas IMAP4 prisijungimas prie %s:%d ...\n" #: libsylph/imap.c:646 msgid "Can't start TLS session.\n" msgstr "Negaliu sukurti TLS sesijos.\n" #: libsylph/imap.c:1120 #, c-format msgid "Getting message %d" msgstr "Gaunamas laiškas %d" #: libsylph/imap.c:1236 #, c-format msgid "Appending messages to %s (%d / %d)" msgstr "Pridedami laiškai į %s (%d / %d)" #: libsylph/imap.c:1328 #, c-format msgid "Moving messages %s to %s ..." msgstr "Perkeliami laiškai %s į %s ..." #: libsylph/imap.c:1334 #, c-format msgid "Copying messages %s to %s ..." msgstr "Kopijuojami laiškai %s į %s ..." #: libsylph/imap.c:1473 #, c-format msgid "Removing messages %s" msgstr "Šalinami laiškai %s..." #: libsylph/imap.c:1479 #, c-format msgid "can't set deleted flags: %s\n" msgstr "negaliu nustatyti ištrynimo žymų: %s\n" #: libsylph/imap.c:1487 libsylph/imap.c:1582 msgid "can't expunge\n" msgstr "negaliu išbraukti\n" #: libsylph/imap.c:1570 #, c-format msgid "Removing all messages in %s" msgstr "Trinami laiškai iš %s..." #: libsylph/imap.c:1576 msgid "can't set deleted flags: 1:*\n" msgstr "negaliu nustatyti ištrynimo žymų: 1:*\n" #: libsylph/imap.c:1624 msgid "can't close folder\n" msgstr "negaliu uždaryti katalogo\n" #: libsylph/imap.c:1702 #, c-format msgid "root folder %s not exist\n" msgstr "šakninis katalogas %s neegzistuoja\n" #: libsylph/imap.c:1891 libsylph/imap.c:1899 msgid "error occurred while getting LIST.\n" msgstr "klaida gaunant LIST.\n" #: libsylph/imap.c:2013 #, c-format msgid "Can't create '%s'\n" msgstr "Negaliu sukurti „%s“\n" #: libsylph/imap.c:2018 #, c-format msgid "Can't create '%s' under INBOX\n" msgstr "negaliu sukurti „%s“ po INBOX\n" #: libsylph/imap.c:2079 msgid "can't create mailbox: LIST failed\n" msgstr "negaliu sukurti dėžutės: nepavyko LIST\n" #: libsylph/imap.c:2099 msgid "can't create mailbox\n" msgstr "negaliu sukurti dėžutės\n" #: libsylph/imap.c:2203 #, c-format msgid "can't rename mailbox: %s to %s\n" msgstr "negaliu pervadinti dėžutės: %s į %s\n" #: libsylph/imap.c:2283 msgid "can't delete mailbox\n" msgstr "negaliu ištrinti dėžutės\n" #: libsylph/imap.c:2327 msgid "can't get envelope\n" msgstr "nagaliu gauti voko\n" #: libsylph/imap.c:2340 #, c-format msgid "Getting message headers (%d / %d)" msgstr "Gaunamos laiškų antraštės (%d / %d)" #: libsylph/imap.c:2350 msgid "error occurred while getting envelope.\n" msgstr "klaida gaunant voką.\n" #: libsylph/imap.c:2372 #, c-format msgid "can't parse envelope: %s\n" msgstr "negaliu išanalizuoti voko: %s\n" #: libsylph/imap.c:2496 #, c-format msgid "Can't connect to IMAP4 server: %s:%d\n" msgstr "Negaliu prisijungti prie IMAP4 serverio: %s:%d\n" #: libsylph/imap.c:2503 #, c-format msgid "Can't establish IMAP4 session with: %s:%d\n" msgstr "Negaliu sukurti IMAP4 sesijos su: %s:%d\n" #: libsylph/imap.c:2578 msgid "can't get namespace\n" msgstr "negalių gauti vardų zonos\n" #: libsylph/imap.c:3111 #, c-format msgid "can't select folder: %s\n" msgstr "negaliu pasirinkti katalogo: %s\n" #: libsylph/imap.c:3146 msgid "error on imap command: STATUS\n" msgstr "klaida vykdant imap komandą: STATUS\n" #: libsylph/imap.c:3269 libsylph/imap.c:3304 msgid "IMAP4 authentication failed.\n" msgstr "IMAP4 autentiškumo tikrinimas nepavyko.\n" #: libsylph/imap.c:3353 msgid "IMAP4 login failed.\n" msgstr "nepavyko prisijungti prie IMAP4\n" #: libsylph/imap.c:3689 #, c-format msgid "can't append %s to %s\n" msgstr "negaliu prirašyti %s į %s\n" #: libsylph/imap.c:3696 msgid "(sending file...)" msgstr "(siunčiamas failas...)" #: libsylph/imap.c:3725 #, c-format msgid "can't append message to %s\n" msgstr "negaliu pridėti laiško į %s\n" #: libsylph/imap.c:3757 #, c-format msgid "can't copy %s to %s\n" msgstr "negaliu nukopijuoti %s į %s\n" #: libsylph/imap.c:3781 #, c-format msgid "error while imap command: STORE %s %s\n" msgstr "klaida vykdant imap komandą: STORE %s %s\n" #: libsylph/imap.c:3795 msgid "error while imap command: EXPUNGE\n" msgstr "klaida vykdant imap komandą: EXPUNGE\n" #: libsylph/imap.c:3808 msgid "error while imap command: CLOSE\n" msgstr "klaida vykdant imap komandą: CLOSE\n" #: libsylph/imap.c:4084 #, c-format msgid "iconv cannot convert UTF-7 to %s\n" msgstr "iconv negali konvertuoti UTF-7 į %s\n" #: libsylph/imap.c:4114 #, c-format msgid "iconv cannot convert %s to UTF-7\n" msgstr "iconv negali konvertuoti %s į UTF-7\n" #: libsylph/mbox.c:50 libsylph/mbox.c:196 msgid "can't write to temporary file\n" msgstr "negaliu rašyti į laikinąjį failą\n" #: libsylph/mbox.c:69 #, c-format msgid "Getting messages from %s into %s...\n" msgstr "Gaunami laiškai iš %s į %s...\n" #: libsylph/mbox.c:79 msgid "can't read mbox file.\n" msgstr "negaliu perskaityti „mbox“ failo.\n" #: libsylph/mbox.c:86 #, c-format msgid "invalid mbox format: %s\n" msgstr "neteisingas „mbox“ formatas: %s\n" #: libsylph/mbox.c:93 #, c-format msgid "malformed mbox: %s\n" msgstr "pažeistas „mbox“ failas: %s\n" #: libsylph/mbox.c:110 msgid "can't open temporary file\n" msgstr "negaliu atverti laikinojo failo\n" #: libsylph/mbox.c:161 #, c-format msgid "" "unescaped From found:\n" "%s" msgstr "" "unescaped From found:\n" "%s" #: libsylph/mbox.c:250 #, c-format msgid "%d messages found.\n" msgstr "Rasta laiškų: %d.\n" #: libsylph/mbox.c:268 #, c-format msgid "can't create lock file %s\n" msgstr "negaliu sukurti užrakto failo %s\n" #: libsylph/mbox.c:269 msgid "use 'flock' instead of 'file' if possible.\n" msgstr "naudokite „flock“ vietoj „file“ jei įmanoma.\n" #: libsylph/mbox.c:281 #, c-format msgid "can't create %s\n" msgstr "negaliu sukurti %s\n" #: libsylph/mbox.c:287 msgid "mailbox is owned by another process, waiting...\n" msgstr "dėžutę turi kitas procesas, laukiu...\n" #: libsylph/mbox.c:316 #, c-format msgid "can't lock %s\n" msgstr "negaliu užrakinti %s\n" #: libsylph/mbox.c:323 libsylph/mbox.c:373 msgid "invalid lock type\n" msgstr "blogas užrakto tipas\n" #: libsylph/mbox.c:359 #, c-format msgid "can't unlock %s\n" msgstr "negaliu atrakinti %s\n" #: libsylph/mbox.c:394 msgid "can't truncate mailbox to zero.\n" msgstr "negaliu sumažinti dėžutės iki nulio.\n" #: libsylph/mbox.c:418 #, c-format msgid "Exporting messages from %s into %s...\n" msgstr "Eksportuojami laiškai iš %s į %s...\n" #: libsylph/mh.c:427 #, c-format msgid "can't copy message %s to %s\n" msgstr "negaliu nukopijuoti laiško %s į %s\n" #: libsylph/mh.c:502 libsylph/mh.c:625 msgid "Can't open mark file.\n" msgstr "Negaliu atidaryti žymų failo.\n" #: libsylph/mh.c:509 libsylph/mh.c:631 msgid "the src folder is identical to the dest.\n" msgstr "pradinis katalogas identiškas paskirties katalogui.\n" #: libsylph/mh.c:634 #, c-format msgid "Copying message %s%c%d to %s ...\n" msgstr "Kopijuoju laišką %s%c%d į %s ...\n" #: libsylph/mh.c:965 libsylph/mh.c:978 #, c-format msgid "" "File `%s' already exists.\n" "Can't create folder." msgstr "" "Failas „%s“ jau egzistuoja.\n" "Negaliu sukurti katalogo." #: libsylph/mh.c:1500 #, c-format msgid "" "Directory name\n" "'%s' is not a valid UTF-8 string.\n" "Maybe the locale encoding is used for filename.\n" "If that is the case, you must set the following environmental variable\n" "(see README for detail):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" msgstr "" "Katalogo pavadinimas\n" "'%s' nėra teisingas UTF-8 tekstas.\n" "Galbūt failų pavadinimams naudojama lokalės koduotė.\n" "Tokiu atveju jūs turite nustatyti aplinkos kintamąjį\n" "(detalesnės instrukcijos faile „README“):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" #: libsylph/news.c:207 #, c-format msgid "creating NNTP connection to %s:%d ...\n" msgstr "sukuriu NNTP prisijungimą prie %s:%d ...\n" #: libsylph/news.c:276 #, c-format msgid "NNTP connection to %s:%d has been disconnected. Reconnecting...\n" msgstr "NNTP prisijungimas prie %s:%d buvo nutrauktas. Jungiuosi iš naujo...\n" #: libsylph/news.c:377 #, c-format msgid "article %d has been already cached.\n" msgstr "žinutė %d jau buvo įkelta.\n" #: libsylph/news.c:397 #, c-format msgid "getting article %d...\n" msgstr "gaunama žinutė %d...\n" #: libsylph/news.c:401 #, c-format msgid "can't read article %d\n" msgstr "negaliu perskaityti žinutės %d\n" #: libsylph/news.c:676 msgid "can't post article.\n" msgstr "negaliu paskelbti žinutės.\n" #: libsylph/news.c:702 #, c-format msgid "can't retrieve article %d\n" msgstr "negaliu gauti žinutės %d\n" #: libsylph/news.c:759 #, c-format msgid "can't select group: %s\n" msgstr "negaliu pažymėti grupės: %s\n" #: libsylph/news.c:796 #, c-format msgid "invalid article range: %d - %d\n" msgstr "neteisingas žinučių intervalas: %d - %d\n" #: libsylph/news.c:809 msgid "no new articles.\n" msgstr "nėra naujų žinučių.\n" #: libsylph/news.c:819 #, c-format msgid "getting xover %d - %d in %s...\n" msgstr "gaunamas xover %d - %d, %s...\n" #: libsylph/news.c:823 msgid "can't get xover\n" msgstr "negaliu gauti xover\n" #: libsylph/news.c:833 msgid "error occurred while getting xover.\n" msgstr "klaida gaunant xover.\n" #: libsylph/news.c:843 #, c-format msgid "invalid xover line: %s\n" msgstr "bloga xover eilutė: %s\n" #: libsylph/news.c:862 libsylph/news.c:894 msgid "can't get xhdr\n" msgstr "negaliu gauti xhdr\n" #: libsylph/news.c:874 libsylph/news.c:906 msgid "error occurred while getting xhdr.\n" msgstr "klaida gaunant xhdr.\n" #: libsylph/nntp.c:68 #, c-format msgid "Can't connect to NNTP server: %s:%d\n" msgstr "Negaliu prisijungti prie NNTP serverio: %s:%d\n" #: libsylph/nntp.c:164 libsylph/nntp.c:227 #, c-format msgid "protocol error: %s\n" msgstr "protokolo klaida: %s\n" #: libsylph/nntp.c:187 libsylph/nntp.c:233 msgid "protocol error\n" msgstr "protokolo klaida\n" #: libsylph/nntp.c:283 msgid "Error occurred while posting\n" msgstr "Klaida skelbiant žinutę\n" #: libsylph/nntp.c:363 msgid "Error occurred while sending command\n" msgstr "Klaida siunčiant komandą\n" #: libsylph/pop.c:155 msgid "Required APOP timestamp not found in greeting\n" msgstr "Reikalinga APOP žyma nerasta pasisveikinime\n" #: libsylph/pop.c:162 msgid "Timestamp syntax error in greeting\n" msgstr "Sintaksės klaida pasisveikinime\n" #: libsylph/pop.c:170 #, fuzzy msgid "Invalid timestamp in greeting\n" msgstr "Reikalinga APOP žyma nerasta pasisveikinime\n" #: libsylph/pop.c:198 libsylph/pop.c:225 msgid "POP3 protocol error\n" msgstr "POP3 protokolo klaida\n" #: libsylph/pop.c:270 #, c-format msgid "invalid UIDL response: %s\n" msgstr "blogas UIDL atsakymas: %s\n" #: libsylph/pop.c:631 #, c-format msgid "POP3: Deleting expired message %d\n" msgstr "POP3: Trinamas senas laiškas %d\n" #: libsylph/pop.c:640 #, c-format msgid "POP3: Skipping message %d (%d bytes)\n" msgstr "POP3: praleidžiamas laiškas %d (%d B)\n" #: libsylph/pop.c:673 msgid "mailbox is locked\n" msgstr "dėžutė užrakinta\n" #: libsylph/pop.c:676 msgid "session timeout\n" msgstr "baigėsi sesijai skirtas laikas\n" #: libsylph/pop.c:682 libsylph/smtp.c:561 msgid "can't start TLS session\n" msgstr "negaliu pradėti TLS sesijos\n" #: libsylph/pop.c:689 libsylph/smtp.c:496 msgid "error occurred on authentication\n" msgstr "klaida tikrinant autentiškumą\n" #: libsylph/pop.c:694 msgid "command not supported\n" msgstr "komanda nepalaikoma\n" #: libsylph/pop.c:698 msgid "error occurred on POP3 session\n" msgstr "klaida POP3 sesijoje\n" #: libsylph/prefs.c:196 libsylph/prefs.c:224 libsylph/prefs.c:269 #: libsylph/prefs_account.c:217 libsylph/prefs_account.c:231 msgid "failed to write configuration to file\n" msgstr "nepavyko įrašyti konfigūracijos į failą\n" #: libsylph/prefs.c:239 #, c-format msgid "Found %s\n" msgstr "Rasta %s\n" #: libsylph/prefs.c:272 msgid "Configuration is saved.\n" msgstr "Nustatymai išsaugoti.\n" #: libsylph/prefs_common.c:503 #, fuzzy msgid "Junk mail filter (manual)" msgstr "Nereikalingo pašto filtras" #: libsylph/prefs_common.c:506 msgid "Junk mail filter" msgstr "Nereikalingo pašto filtras" #: libsylph/procmime.c:1142 msgid "procmime_get_text_content(): Code conversion failed.\n" msgstr "procmime_get_text_content(): Nepavyko konvertuoti kodo.\n" #: libsylph/procmsg.c:655 msgid "can't open mark file\n" msgstr "negali atidaryti žymų failo\n" #: libsylph/procmsg.c:1107 #, c-format msgid "can't fetch message %d\n" msgstr "negaliu gauti laiško %d\n" #: libsylph/procmsg.c:1423 #, c-format msgid "Print command line is invalid: `%s'\n" msgstr "Bloga spausdinimo komanda: „%s“\n" #: libsylph/recv.c:141 msgid "error occurred while retrieving data.\n" msgstr "kalaida gaunant duomenis.\n" #: libsylph/recv.c:183 libsylph/recv.c:215 libsylph/recv.c:230 msgid "Can't write to file.\n" msgstr "Negaliu rašyti į failą.\n" #: libsylph/smtp.c:157 msgid "SMTP AUTH not available\n" msgstr "SMTP AUTH neprieinamas\n" #: libsylph/smtp.c:466 libsylph/smtp.c:516 msgid "bad SMTP response\n" msgstr "blogas SMTP atsakymas\n" #: libsylph/smtp.c:487 libsylph/smtp.c:505 libsylph/smtp.c:602 msgid "error occurred on SMTP session\n" msgstr "klaida SMTP sesijoje\n" #: libsylph/ssl.c:54 msgid "SSLv23 not available\n" msgstr "SSLv23 neprieinamas\n" #: libsylph/ssl.c:56 msgid "SSLv23 available\n" msgstr "SSLv23 prieinamas\n" #: libsylph/ssl.c:65 msgid "TLSv1 not available\n" msgstr "TLSv1 neprieinamas\n" #: libsylph/ssl.c:67 msgid "TLSv1 available\n" msgstr "TLSv1 prieinamas\n" #: libsylph/ssl.c:101 libsylph/ssl.c:108 msgid "SSL method not available\n" msgstr "SSL metodas neprieinamas\n" #: libsylph/ssl.c:114 msgid "Unknown SSL method *PROGRAM BUG*\n" msgstr "Nežinomas SSL metodas PROGRAMOS KLAIDA\n" #: libsylph/ssl.c:120 msgid "Error creating ssl context\n" msgstr "Klaida sukuriant SSL kontekstą\n" #. Get the cipher #: libsylph/ssl.c:139 #, c-format msgid "SSL connection using %s\n" msgstr "SSL prisijungimas naudojant %s\n" #: libsylph/ssl.c:148 msgid "Server certificate:\n" msgstr "Serverio sertifikatas:\n" #: libsylph/ssl.c:151 #, c-format msgid " Subject: %s\n" msgstr " Tema: %s\n" #: libsylph/ssl.c:156 #, c-format msgid " Issuer: %s\n" msgstr " Leidėjas: %s\n" #: libsylph/utils.c:2682 libsylph/utils.c:2804 #, c-format msgid "writing to %s failed.\n" msgstr "nepavyko įrašyti į „%s“.\n" #~ msgid "can't change file mode\n" #~ msgstr "negaliu pakeisti failo rėžimo\n" libsylph-1.1.0/po/nl.po0000644000175000017500000003711410756432604011664 00000000000000# Dutch translation of Sylpheed. # Copyright (C) 2001 Free Software Foundation, Inc. # Vincent van Adrighem , 2001. # msgid "" msgstr "" "Project-Id-Version: Sylpheed 0.8\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-02-19 10:48+0900\n" "PO-Revision-Date: 2006-04-30 01:11+0100\n" "Last-Translator: Vincent van Adrighem \n" "Language-Team: Dutch \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: libsylph/account.c:56 msgid "Reading all config for each account...\n" msgstr "Configuratie inlezen van alle accounts...\n" #: libsylph/imap.c:465 #, c-format msgid "IMAP4 connection to %s has been disconnected. Reconnecting...\n" msgstr "" "IMAP4 verbinding naar %s is verbroken. Contact wordt opnieuw gelegd...\n" #: libsylph/imap.c:520 libsylph/imap.c:526 msgid "IMAP4 server disables LOGIN.\n" msgstr "IMAP4 server schakelt LOGIN uit.\n" #: libsylph/imap.c:602 #, c-format msgid "creating IMAP4 connection to %s:%d ...\n" msgstr "IMAP4 verbinding naar %s:%d wordt opgezet...\n" #: libsylph/imap.c:646 msgid "Can't start TLS session.\n" msgstr "Kan geen TLS sessie starten.\n" #: libsylph/imap.c:1120 #, c-format msgid "Getting message %d" msgstr "Ophalen van bericht %d" #: libsylph/imap.c:1236 #, c-format msgid "Appending messages to %s (%d / %d)" msgstr "Berichten toevoegen aan %s (%d / %d)" #: libsylph/imap.c:1328 #, c-format msgid "Moving messages %s to %s ..." msgstr "Berichten %s worden verplaatst naar %s ..." #: libsylph/imap.c:1334 #, c-format msgid "Copying messages %s to %s ..." msgstr "Berichten %s worden gekopieerd naar %s..." #: libsylph/imap.c:1473 #, c-format msgid "Removing messages %s" msgstr "Berichten %s worden verwijderd" #: libsylph/imap.c:1479 #, c-format msgid "can't set deleted flags: %s\n" msgstr "kan verwijderd-vlaggen niet instellen: %s\n" #: libsylph/imap.c:1487 libsylph/imap.c:1582 msgid "can't expunge\n" msgstr "kan niet wissen\n" #: libsylph/imap.c:1570 #, c-format msgid "Removing all messages in %s" msgstr "Alle berichten in %s worden verwijderd" #: libsylph/imap.c:1576 msgid "can't set deleted flags: 1:*\n" msgstr "kan de verwijderd-vlaggen niet instellen: 1:*\n" #: libsylph/imap.c:1624 msgid "can't close folder\n" msgstr "kan map niet sluiten\n" #: libsylph/imap.c:1702 #, c-format msgid "root folder %s not exist\n" msgstr "De beginmap %s bestaat niet\n" #: libsylph/imap.c:1891 libsylph/imap.c:1899 msgid "error occurred while getting LIST.\n" msgstr "er is een fout opgetreden bij het ophalen van de lijst.\n" #: libsylph/imap.c:2013 #, c-format msgid "Can't create '%s'\n" msgstr "" "kan %s niet aanmaken\n" "\n" #: libsylph/imap.c:2018 #, c-format msgid "Can't create '%s' under INBOX\n" msgstr "kan %s niet aanmaken onder INBOX\n" #: libsylph/imap.c:2079 msgid "can't create mailbox: LIST failed\n" msgstr "kan geen mailbox maken: LIST mislukt\n" #: libsylph/imap.c:2099 msgid "can't create mailbox\n" msgstr "kan geen mailbox maken\n" #: libsylph/imap.c:2203 #, c-format msgid "can't rename mailbox: %s to %s\n" msgstr "kan de mailbox niet hernoemen van %s naar %s\n" #: libsylph/imap.c:2283 msgid "can't delete mailbox\n" msgstr "kan de mailbox niet verwijderen\n" #: libsylph/imap.c:2327 msgid "can't get envelope\n" msgstr "kan de envelop niet verkrijgen\n" #: libsylph/imap.c:2340 #, c-format msgid "Getting message headers (%d / %d)" msgstr "Ophalen van berichtkoppen (%d / %d)" #: libsylph/imap.c:2350 msgid "error occurred while getting envelope.\n" msgstr "Er is een fout opgetreden bij het verkrijgen van de envelop.\n" #: libsylph/imap.c:2372 #, c-format msgid "can't parse envelope: %s\n" msgstr "kan de envelop niet verwerken: %s\n" #: libsylph/imap.c:2496 #, c-format msgid "Can't connect to IMAP4 server: %s:%d\n" msgstr "Kan niet verbinden met de IMAP4 server: %s:%d\n" #: libsylph/imap.c:2503 #, c-format msgid "Can't establish IMAP4 session with: %s:%d\n" msgstr "Kan gaan sessie opzetten met de IMAP4 server: %s:%d\n" #: libsylph/imap.c:2578 msgid "can't get namespace\n" msgstr "kan de NAMESPACE niet vinden\n" #: libsylph/imap.c:3111 #, c-format msgid "can't select folder: %s\n" msgstr "kan map niet selecteren: %s\n" #: libsylph/imap.c:3146 msgid "error on imap command: STATUS\n" msgstr "Fout bij IMAP-opdracht: STATUS\n" #: libsylph/imap.c:3269 libsylph/imap.c:3304 msgid "IMAP4 authentication failed.\n" msgstr "IMAP4-identificatie mislukt.\n" #: libsylph/imap.c:3353 msgid "IMAP4 login failed.\n" msgstr "IMAP4 login mislukt.\n" #: libsylph/imap.c:3689 #, c-format msgid "can't append %s to %s\n" msgstr "kan %s niet toevoegen aan %s\n" #: libsylph/imap.c:3696 msgid "(sending file...)" msgstr "(bestand wordt verzonden...)" #: libsylph/imap.c:3725 #, c-format msgid "can't append message to %s\n" msgstr "kan bericht niet toevoegen aan %s\n" #: libsylph/imap.c:3757 #, c-format msgid "can't copy %s to %s\n" msgstr "kan %s niet naar %s kopiëren\n" #: libsylph/imap.c:3781 #, c-format msgid "error while imap command: STORE %s %s\n" msgstr "Fout bij IMAP-opdracht: STORE %s %s\n" #: libsylph/imap.c:3795 msgid "error while imap command: EXPUNGE\n" msgstr "Fout tijdens IMAP opdracht: EXPUNGE\n" #: libsylph/imap.c:3808 msgid "error while imap command: CLOSE\n" msgstr "Fout bij IMAP-opdracht: CLOSE\n" #: libsylph/imap.c:4084 #, c-format msgid "iconv cannot convert UTF-7 to %s\n" msgstr "iconv kan UTF-7 niet naar %s omzetten\n" #: libsylph/imap.c:4114 #, c-format msgid "iconv cannot convert %s to UTF-7\n" msgstr "iconv kan %s niet naar UTF-7 omzetten\n" #: libsylph/mbox.c:50 libsylph/mbox.c:196 msgid "can't write to temporary file\n" msgstr "kan niet naar tijdelijk bestand schrijven\n" #: libsylph/mbox.c:69 #, c-format msgid "Getting messages from %s into %s...\n" msgstr "Berichten worden van %s naar %s opgehaald...\n" #: libsylph/mbox.c:79 msgid "can't read mbox file.\n" msgstr "kan mbox bestand niet inlezen.\n" #: libsylph/mbox.c:86 #, c-format msgid "invalid mbox format: %s\n" msgstr "mbox formaat is onjuist: %s\n" #: libsylph/mbox.c:93 #, c-format msgid "malformed mbox: %s\n" msgstr "onjuist formaat in mbox: %s\n" #: libsylph/mbox.c:110 msgid "can't open temporary file\n" msgstr "kan tijdelijk bestand niet openen\n" #: libsylph/mbox.c:161 #, c-format msgid "" "unescaped From found:\n" "%s" msgstr "" "Afzender zonder escapecodes gevonden:\n" "%s" #: libsylph/mbox.c:250 #, c-format msgid "%d messages found.\n" msgstr "%d berichten gevonden\n" #: libsylph/mbox.c:268 #, c-format msgid "can't create lock file %s\n" msgstr "kan lock-bestand niet aanmaken: %s\n" #: libsylph/mbox.c:269 msgid "use 'flock' instead of 'file' if possible.\n" msgstr "gebruik 'flock' in plaats van 'file' waar mogelijk\n" #: libsylph/mbox.c:281 #, c-format msgid "can't create %s\n" msgstr "kan %s niet aanmaken\n" #: libsylph/mbox.c:287 msgid "mailbox is owned by another process, waiting...\n" msgstr "mailbox wordt vastgehouden door een ander proces. we wachten even...\n" #: libsylph/mbox.c:316 #, c-format msgid "can't lock %s\n" msgstr "kan %s niet locken\n" #: libsylph/mbox.c:323 libsylph/mbox.c:373 msgid "invalid lock type\n" msgstr "ongeldig locktype\n" #: libsylph/mbox.c:359 #, c-format msgid "can't unlock %s\n" msgstr "kan de lock niet verwijderen van %s\n" #: libsylph/mbox.c:394 msgid "can't truncate mailbox to zero.\n" msgstr "kan de mailbox niet inkorten tot 0.\n" #: libsylph/mbox.c:418 #, c-format msgid "Exporting messages from %s into %s...\n" msgstr "Berichten worden geëxporteerd van %s naar %s...\n" #: libsylph/mh.c:427 #, c-format msgid "can't copy message %s to %s\n" msgstr "kan bericht niet kopiëren van %s naar %s\n" #: libsylph/mh.c:502 libsylph/mh.c:625 msgid "Can't open mark file.\n" msgstr "kan het bestand met markeringen niet openen\n" #: libsylph/mh.c:509 libsylph/mh.c:631 msgid "the src folder is identical to the dest.\n" msgstr "de bronmap is hetzelfde als de doelmap.\n" #: libsylph/mh.c:634 #, c-format msgid "Copying message %s%c%d to %s ...\n" msgstr "Bericht %s%c%d wordt gekopieerd naar %s...\n" #: libsylph/mh.c:965 libsylph/mh.c:978 #, c-format msgid "" "File `%s' already exists.\n" "Can't create folder." msgstr "" "Bestand '%s' bestaat al.\n" "Kan geen map aanmaken." #: libsylph/mh.c:1500 #, c-format msgid "" "Directory name\n" "'%s' is not a valid UTF-8 string.\n" "Maybe the locale encoding is used for filename.\n" "If that is the case, you must set the following environmental variable\n" "(see README for detail):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" msgstr "" "De naam\n" "'%s' is geen geldige UTF-8 tekenreeks.\n" "Misschien wordt de codering van de taalinstelling gebruikt.\n" "Als dit zo is, kunt u de volgende omgevingsvariabele instellen\n" "(lees de README voor meer info):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" #: libsylph/news.c:207 #, c-format msgid "creating NNTP connection to %s:%d ...\n" msgstr "verbinding met nieuwsserver (NNTP) %s%d wordt opgezet...\n" #: libsylph/news.c:276 #, c-format msgid "NNTP connection to %s:%d has been disconnected. Reconnecting...\n" msgstr "" "De NNTP-verbinding met %s:%d is verbroken. Opnieuw contact aan het " "leggen...\n" #: libsylph/news.c:377 #, c-format msgid "article %d has been already cached.\n" msgstr "artikel %d is al gebufferd.\n" #: libsylph/news.c:397 #, c-format msgid "getting article %d...\n" msgstr "artikel %d wordt opgehaald...\n" #: libsylph/news.c:401 #, c-format msgid "can't read article %d\n" msgstr "kan artikel %d niet lezen\n" #: libsylph/news.c:676 msgid "can't post article.\n" msgstr "kan het ertikel niet versturen.\n" #: libsylph/news.c:702 #, c-format msgid "can't retrieve article %d\n" msgstr "kan het artikel %d niet ophalen\n" #: libsylph/news.c:759 #, c-format msgid "can't select group: %s\n" msgstr "kan de groep niet selecteren: %s\n" #: libsylph/news.c:796 #, c-format msgid "invalid article range: %d - %d\n" msgstr "ongeldig artikelbereik: %d - %d\n" #: libsylph/news.c:809 msgid "no new articles.\n" msgstr "geen nieuwe artikelen.\n" #: libsylph/news.c:819 #, c-format msgid "getting xover %d - %d in %s...\n" msgstr "xover %d - %d uit %s wordt opgehaald...\n" #: libsylph/news.c:823 msgid "can't get xover\n" msgstr "Kan xover niet ophalen\n" #: libsylph/news.c:833 msgid "error occurred while getting xover.\n" msgstr "er is een fout opgetreden tijdens het ophalen van de xover.\n" #: libsylph/news.c:843 #, c-format msgid "invalid xover line: %s\n" msgstr "Ongeldige xover regel: %s\n" #: libsylph/news.c:862 libsylph/news.c:894 msgid "can't get xhdr\n" msgstr "Kan xhdr niet ophalen\n" #: libsylph/news.c:874 libsylph/news.c:906 msgid "error occurred while getting xhdr.\n" msgstr "er is een fout opgetreden tijdens het ophalen van de xhdr.\n" #: libsylph/nntp.c:68 #, c-format msgid "Can't connect to NNTP server: %s:%d\n" msgstr "Kan niet verbinden met de NNTP-server: %s:%d\n" #: libsylph/nntp.c:164 libsylph/nntp.c:227 #, c-format msgid "protocol error: %s\n" msgstr "protocolfout: %s\n" #: libsylph/nntp.c:187 libsylph/nntp.c:233 msgid "protocol error\n" msgstr "protocolfout\n" #: libsylph/nntp.c:283 msgid "Error occurred while posting\n" msgstr "Er is een fout opgetreden bij het versturen\n" #: libsylph/nntp.c:363 msgid "Error occurred while sending command\n" msgstr "Fout opgetreden bij sturen van de opdracht\n" #: libsylph/pop.c:155 msgid "Required APOP timestamp not found in greeting\n" msgstr "Er is geen APOP timestamp gevonden in de begroeting\n" #: libsylph/pop.c:162 msgid "Timestamp syntax error in greeting\n" msgstr "APOP Timestamp in de begroeting is ongeldig\n" #: libsylph/pop.c:170 #, fuzzy msgid "Invalid timestamp in greeting\n" msgstr "Er is geen APOP timestamp gevonden in de begroeting\n" #: libsylph/pop.c:198 libsylph/pop.c:225 msgid "POP3 protocol error\n" msgstr "POP3 protocolfout\n" #: libsylph/pop.c:270 #, c-format msgid "invalid UIDL response: %s\n" msgstr "Ongeldige UIDL-reactie: %s\n" #: libsylph/pop.c:631 #, c-format msgid "POP3: Deleting expired message %d\n" msgstr "POP3: Bezig met verwijderen van verlopen bericht %d\n" #: libsylph/pop.c:640 #, c-format msgid "POP3: Skipping message %d (%d bytes)\n" msgstr "POP3: Bericht %d wordt overgeslagen (%d bytes)\n" #: libsylph/pop.c:673 msgid "mailbox is locked\n" msgstr "postbusis vergrendeld\n" #: libsylph/pop.c:676 msgid "session timeout\n" msgstr "sessie time-out\n" #: libsylph/pop.c:682 libsylph/smtp.c:561 msgid "can't start TLS session\n" msgstr "Kan TLS sessie niet starten\n" #: libsylph/pop.c:689 libsylph/smtp.c:496 msgid "error occurred on authentication\n" msgstr "er is een fout opgetreden tijdens de identificatie\n" #: libsylph/pop.c:694 msgid "command not supported\n" msgstr "opdracht niet ondersteund\n" #: libsylph/pop.c:698 msgid "error occurred on POP3 session\n" msgstr "er is een fout opgetreden tijdens de POP3-sessie\n" #: libsylph/prefs.c:196 libsylph/prefs.c:224 libsylph/prefs.c:269 #: libsylph/prefs_account.c:217 libsylph/prefs_account.c:231 msgid "failed to write configuration to file\n" msgstr "opslaan van de configuratie is mislukt\n" #: libsylph/prefs.c:239 #, c-format msgid "Found %s\n" msgstr "%s gevonden\n" #: libsylph/prefs.c:272 msgid "Configuration is saved.\n" msgstr "Configuratie is opgeslagen.\n" #: libsylph/prefs_common.c:503 #, fuzzy msgid "Junk mail filter (manual)" msgstr "Troepfilter" #: libsylph/prefs_common.c:506 msgid "Junk mail filter" msgstr "Troepfilter" #: libsylph/procmime.c:1142 msgid "procmime_get_text_content(): Code conversion failed.\n" msgstr "procmime_get_text_content(): Codeconversie mislukt\n" #: libsylph/procmsg.c:655 msgid "can't open mark file\n" msgstr "kan het bestand met markeringen niet openen\n" #: libsylph/procmsg.c:1107 #, c-format msgid "can't fetch message %d\n" msgstr "kan bericht %d niet ophalen\n" #: libsylph/procmsg.c:1423 #, c-format msgid "Print command line is invalid: `%s'\n" msgstr "Adrukopdracht is ongeldig: '%s'\n" #: libsylph/recv.c:141 msgid "error occurred while retrieving data.\n" msgstr "er is een fout opgetreden bij het ontvangen van de gegevens.\n" #: libsylph/recv.c:183 libsylph/recv.c:215 libsylph/recv.c:230 msgid "Can't write to file.\n" msgstr "Het bestand is niet beschrijfbaar.\n" #: libsylph/smtp.c:157 msgid "SMTP AUTH not available\n" msgstr "SMTP AUTH niet beschikbaar\n" #: libsylph/smtp.c:466 libsylph/smtp.c:516 msgid "bad SMTP response\n" msgstr "ongeldige SMTP-reactie\n" #: libsylph/smtp.c:487 libsylph/smtp.c:505 libsylph/smtp.c:602 msgid "error occurred on SMTP session\n" msgstr "er is een fout opgetreden tijdens de SMTP-sessie\n" #: libsylph/ssl.c:54 msgid "SSLv23 not available\n" msgstr "SSLv23 niet beschikbaar\n" #: libsylph/ssl.c:56 msgid "SSLv23 available\n" msgstr "SSL v23 beschikbaar\n" #: libsylph/ssl.c:65 msgid "TLSv1 not available\n" msgstr "TLSv1 niet beschikbaar\n" #: libsylph/ssl.c:67 msgid "TLSv1 available\n" msgstr "TLSv1 beschikbaar\n" #: libsylph/ssl.c:101 libsylph/ssl.c:108 msgid "SSL method not available\n" msgstr "SSL methode niet beschikbaar\n" #: libsylph/ssl.c:114 msgid "Unknown SSL method *PROGRAM BUG*\n" msgstr "Onbekende SSL methode * PROGRAM BUG*\n" #: libsylph/ssl.c:120 msgid "Error creating ssl context\n" msgstr "Fout bij het maken van de ssl context\n" #. Get the cipher #: libsylph/ssl.c:139 #, c-format msgid "SSL connection using %s\n" msgstr "SSL verbinding met %s\n" #: libsylph/ssl.c:148 msgid "Server certificate:\n" msgstr "Server-certificaat:\n" #: libsylph/ssl.c:151 #, c-format msgid " Subject: %s\n" msgstr " Onderwerp: %s\n" #: libsylph/ssl.c:156 #, c-format msgid " Issuer: %s\n" msgstr " Uitgever: %s\n" #: libsylph/utils.c:2682 libsylph/utils.c:2804 #, c-format msgid "writing to %s failed.\n" msgstr "schrijven naar %s is mislukt.\n" #~ msgid "can't change file mode\n" #~ msgstr "kan de bestandmodus niet veranderen\n" libsylph-1.1.0/po/pl.po0000644000175000017500000003657310756432605011677 00000000000000# Polish translation of Sylpheed msgid "" msgstr "" "Project-Id-Version: sylpheed 1.9.8 \n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-02-19 10:48+0900\n" "PO-Revision-Date: 2005-03-05 18:57+0100\n" "Last-Translator: Wit Wilinski \n" "Language-Team: POLISH \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: libsylph/account.c:56 msgid "Reading all config for each account...\n" msgstr "Odczyt ustawień wszystkich kont...\n" #: libsylph/imap.c:465 #, c-format msgid "IMAP4 connection to %s has been disconnected. Reconnecting...\n" msgstr "" "Połączenie IMAP4 z %s zostało przerwane. Ponowne nawiązywanie połączenia...\n" #: libsylph/imap.c:520 libsylph/imap.c:526 #, fuzzy msgid "IMAP4 server disables LOGIN.\n" msgstr "Katalog serwera IMAP4." #: libsylph/imap.c:602 #, c-format msgid "creating IMAP4 connection to %s:%d ...\n" msgstr "tworzenie połączenia IMAP4 do %s:%d ...\n" #: libsylph/imap.c:646 msgid "Can't start TLS session.\n" msgstr "Nie można uruchomić sesji TLS\n" #: libsylph/imap.c:1120 #, fuzzy, c-format msgid "Getting message %d" msgstr "Usuwanie wiadomości %d" #: libsylph/imap.c:1236 #, fuzzy, c-format msgid "Appending messages to %s (%d / %d)" msgstr "Wysyłanie wiadomości (%d / %d)" #: libsylph/imap.c:1328 #, fuzzy, c-format msgid "Moving messages %s to %s ..." msgstr "Kopiowanie wiadomości %s%c%d do %s ...\n" #: libsylph/imap.c:1334 #, fuzzy, c-format msgid "Copying messages %s to %s ..." msgstr "Kopiowanie wiadomości %s%c%d do %s ...\n" #: libsylph/imap.c:1473 #, fuzzy, c-format msgid "Removing messages %s" msgstr "Pobieranie wiadomości z %s..." #: libsylph/imap.c:1479 #, c-format msgid "can't set deleted flags: %s\n" msgstr "nie można ustawić flag skasowany: %s\n" #: libsylph/imap.c:1487 libsylph/imap.c:1582 msgid "can't expunge\n" msgstr "nie można zlikwidować\n" #: libsylph/imap.c:1570 #, fuzzy, c-format msgid "Removing all messages in %s" msgstr "Pobieranie wiadomości z %s..." #: libsylph/imap.c:1576 msgid "can't set deleted flags: 1:*\n" msgstr "nie można ustawić flagi skasowany: 1:*\n" #: libsylph/imap.c:1624 msgid "can't close folder\n" msgstr "nie można zamknąć katalogu\n" #: libsylph/imap.c:1702 #, c-format msgid "root folder %s not exist\n" msgstr "brak głównego katalogu %s\n" #: libsylph/imap.c:1891 libsylph/imap.c:1899 msgid "error occurred while getting LIST.\n" msgstr "wystąpił błąd podczas przy pobieraniu LIST.\n" #: libsylph/imap.c:2013 #, c-format msgid "Can't create '%s'\n" msgstr "nie można utworzyć \"%s\"\n" #: libsylph/imap.c:2018 #, c-format msgid "Can't create '%s' under INBOX\n" msgstr "nie można utworzyć \"%s\" w INBOX\n" #: libsylph/imap.c:2079 msgid "can't create mailbox: LIST failed\n" msgstr "nie można utworzyć skrzynki: błąd LIST.\n" #: libsylph/imap.c:2099 msgid "can't create mailbox\n" msgstr "nie można utworzyć skrzynki\n" #: libsylph/imap.c:2203 #, c-format msgid "can't rename mailbox: %s to %s\n" msgstr "nie można zmienić nazwy skrzynki: %s na %s\n" #: libsylph/imap.c:2283 msgid "can't delete mailbox\n" msgstr "nie można skasować skrzynki\n" #: libsylph/imap.c:2327 msgid "can't get envelope\n" msgstr "nie można pobrać koperty\n" #: libsylph/imap.c:2340 #, fuzzy, c-format msgid "Getting message headers (%d / %d)" msgstr "Wysyłanie wiadomości (%d / %d)" #: libsylph/imap.c:2350 msgid "error occurred while getting envelope.\n" msgstr "wystąpił błąd podczas pobierania koperty.\n" #: libsylph/imap.c:2372 #, c-format msgid "can't parse envelope: %s\n" msgstr "nie można przetworzyć koperty: %s\n" #: libsylph/imap.c:2496 #, c-format msgid "Can't connect to IMAP4 server: %s:%d\n" msgstr "Nie można nawiązać połączenia z serwerem IMAP4: %s:%d\n" #: libsylph/imap.c:2503 #, c-format msgid "Can't establish IMAP4 session with: %s:%d\n" msgstr "Nie można ustanowić sesji IMAP4 z: %s:%d\n" #: libsylph/imap.c:2578 msgid "can't get namespace\n" msgstr "nie można pobrać przestrzeni nazw\n" #: libsylph/imap.c:3111 #, c-format msgid "can't select folder: %s\n" msgstr "nie można wybrać katalogu: %s\n" #: libsylph/imap.c:3146 #, fuzzy msgid "error on imap command: STATUS\n" msgstr "wystąpił błąd przy wykonywaniu polecenia IMAP: CLOSE\n" #: libsylph/imap.c:3269 libsylph/imap.c:3304 msgid "IMAP4 authentication failed.\n" msgstr "Błąd uwierzytelniania IMAP4.\n" #: libsylph/imap.c:3353 msgid "IMAP4 login failed.\n" msgstr "Nie można zalogować się do serwera IMAP4.\n" #: libsylph/imap.c:3689 #, c-format msgid "can't append %s to %s\n" msgstr "nie można dołączyć %s do %s\n" #: libsylph/imap.c:3696 msgid "(sending file...)" msgstr "(wysyłanie pliku...)" #: libsylph/imap.c:3725 #, c-format msgid "can't append message to %s\n" msgstr "nie można dołączyć wiadomości do %s\n" #: libsylph/imap.c:3757 #, c-format msgid "can't copy %s to %s\n" msgstr "nie można skopiować %s do %s\n" #: libsylph/imap.c:3781 #, c-format msgid "error while imap command: STORE %s %s\n" msgstr "wystąpił błąd przy wykonywaniu polecenia IMAP: STORE %s %s\n" #: libsylph/imap.c:3795 msgid "error while imap command: EXPUNGE\n" msgstr "wystąpił błąd przy wykonywaniu polecenia IMAP: EXPUNGE\n" #: libsylph/imap.c:3808 msgid "error while imap command: CLOSE\n" msgstr "wystąpił błąd przy wykonywaniu polecenia IMAP: CLOSE\n" #: libsylph/imap.c:4084 #, c-format msgid "iconv cannot convert UTF-7 to %s\n" msgstr "nie można skonwertować UTF-7 do %s za pomocą programu iconv\n" #: libsylph/imap.c:4114 #, c-format msgid "iconv cannot convert %s to UTF-7\n" msgstr "nie można skonwertować %s do UTF-7 za pomocą programu iconv\n" #: libsylph/mbox.c:50 libsylph/mbox.c:196 msgid "can't write to temporary file\n" msgstr "nie można zapisać do pliku tymczasowego\n" #: libsylph/mbox.c:69 #, c-format msgid "Getting messages from %s into %s...\n" msgstr "Pobieranie wiadomości z %s do %s...\n" #: libsylph/mbox.c:79 msgid "can't read mbox file.\n" msgstr "nie można odczytać pliku mbox.\n" #: libsylph/mbox.c:86 #, c-format msgid "invalid mbox format: %s\n" msgstr "niepoprawny format mbox: %s\n" #: libsylph/mbox.c:93 #, c-format msgid "malformed mbox: %s\n" msgstr "uszkodzona skrzynka: %s\n" #: libsylph/mbox.c:110 msgid "can't open temporary file\n" msgstr "nie można otworzyć pliku tymczasowego\n" #: libsylph/mbox.c:161 #, c-format msgid "" "unescaped From found:\n" "%s" msgstr "" "znaleziono \"unescaped\" From:\n" "%s" #: libsylph/mbox.c:250 #, c-format msgid "%d messages found.\n" msgstr "znaleziono %d wiadomości.\n" #: libsylph/mbox.c:268 #, c-format msgid "can't create lock file %s\n" msgstr "nie można utworzyć pliku lock %s\n" #: libsylph/mbox.c:269 msgid "use 'flock' instead of 'file' if possible.\n" msgstr "jeśli to możliwe, należy użyć \"flock\" zamiast \"file\".\n" #: libsylph/mbox.c:281 #, c-format msgid "can't create %s\n" msgstr "nie można utworzyć %s\n" #: libsylph/mbox.c:287 msgid "mailbox is owned by another process, waiting...\n" msgstr "skrzynka jest kontrolowana przez inny proces, oczekiwanie...\n" #: libsylph/mbox.c:316 #, c-format msgid "can't lock %s\n" msgstr "nie można zablokować %s\n" #: libsylph/mbox.c:323 libsylph/mbox.c:373 msgid "invalid lock type\n" msgstr "nieprawidłowy typ blokady\n" #: libsylph/mbox.c:359 #, c-format msgid "can't unlock %s\n" msgstr "nie można odblokować %s\n" #: libsylph/mbox.c:394 msgid "can't truncate mailbox to zero.\n" msgstr "nie można skrócić do zera.\n" #: libsylph/mbox.c:418 #, c-format msgid "Exporting messages from %s into %s...\n" msgstr "Eksportowanie wiadomości z %s do %s...\n" #: libsylph/mh.c:427 #, c-format msgid "can't copy message %s to %s\n" msgstr "nie można skopiować wiadomości %s do %s\n" #: libsylph/mh.c:502 libsylph/mh.c:625 msgid "Can't open mark file.\n" msgstr "Nie można otworzyć pliku zaznaczeń.\n" #: libsylph/mh.c:509 libsylph/mh.c:631 msgid "the src folder is identical to the dest.\n" msgstr "katalog źródłowy jest taki sam jak docelowy.\n" #: libsylph/mh.c:634 #, c-format msgid "Copying message %s%c%d to %s ...\n" msgstr "Kopiowanie wiadomości %s%c%d do %s ...\n" #: libsylph/mh.c:965 libsylph/mh.c:978 #, c-format msgid "" "File `%s' already exists.\n" "Can't create folder." msgstr "" "Plik \"%s\" już istnieje.\n" "Nie można utworzyć katalogu." #: libsylph/mh.c:1500 #, c-format msgid "" "Directory name\n" "'%s' is not a valid UTF-8 string.\n" "Maybe the locale encoding is used for filename.\n" "If that is the case, you must set the following environmental variable\n" "(see README for detail):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" msgstr "" #: libsylph/news.c:207 #, c-format msgid "creating NNTP connection to %s:%d ...\n" msgstr "tworzenie połączenia NNTP z %s:%d ...\n" #: libsylph/news.c:276 #, c-format msgid "NNTP connection to %s:%d has been disconnected. Reconnecting...\n" msgstr "" "Połączenie NNTP %s:%d zostało zerwane. Ponowne nawiązywanie połączenia...\n" #: libsylph/news.c:377 #, c-format msgid "article %d has been already cached.\n" msgstr "artykuł %d został już zapamiętany.\n" #: libsylph/news.c:397 #, c-format msgid "getting article %d...\n" msgstr "pobieranie artykułu %d...\n" #: libsylph/news.c:401 #, c-format msgid "can't read article %d\n" msgstr "nie można odczytać artykułu %d\n" #: libsylph/news.c:676 msgid "can't post article.\n" msgstr "nie można wysłać artykułu.\n" #: libsylph/news.c:702 #, c-format msgid "can't retrieve article %d\n" msgstr "nie można odebrać artykułu %d\n" #: libsylph/news.c:759 #, c-format msgid "can't select group: %s\n" msgstr "nie można wybrać grupy: %s\n" #: libsylph/news.c:796 #, c-format msgid "invalid article range: %d - %d\n" msgstr "niepoprawny zakres artykułu: %d - %d\n" #: libsylph/news.c:809 msgid "no new articles.\n" msgstr "brak nowych artykułów.\n" #: libsylph/news.c:819 #, c-format msgid "getting xover %d - %d in %s...\n" msgstr "pobieranie xover %d - %d w %s...\n" #: libsylph/news.c:823 msgid "can't get xover\n" msgstr "nie można pobrać xover\n" #: libsylph/news.c:833 msgid "error occurred while getting xover.\n" msgstr "błąd podczas pobierania xover.\n" #: libsylph/news.c:843 #, c-format msgid "invalid xover line: %s\n" msgstr "niepoprawna linia xover: %s\n" #: libsylph/news.c:862 libsylph/news.c:894 msgid "can't get xhdr\n" msgstr "nie można pobrać xhdr\n" #: libsylph/news.c:874 libsylph/news.c:906 msgid "error occurred while getting xhdr.\n" msgstr "błąd podczas pobierania xhdr.\n" #: libsylph/nntp.c:68 #, c-format msgid "Can't connect to NNTP server: %s:%d\n" msgstr "Nie można połączyć się z serwerem NNTP: %s:%d\n" #: libsylph/nntp.c:164 libsylph/nntp.c:227 #, c-format msgid "protocol error: %s\n" msgstr "błąd protokołu: %s\n" #: libsylph/nntp.c:187 libsylph/nntp.c:233 msgid "protocol error\n" msgstr "błąd protokołu\n" #: libsylph/nntp.c:283 msgid "Error occurred while posting\n" msgstr "Wystąpił błąd podczas publikowania\n" #: libsylph/nntp.c:363 msgid "Error occurred while sending command\n" msgstr "Błąd podczas wysyłania polecenia\n" #: libsylph/pop.c:155 msgid "Required APOP timestamp not found in greeting\n" msgstr "Przy powitaniu zabrakło wymaganego znacznika czasowego APOP\n" #: libsylph/pop.c:162 msgid "Timestamp syntax error in greeting\n" msgstr "Błąd składni przy znaczniku czasowym powitania\n" #: libsylph/pop.c:170 #, fuzzy msgid "Invalid timestamp in greeting\n" msgstr "Przy powitaniu zabrakło wymaganego znacznika czasowego APOP\n" #: libsylph/pop.c:198 libsylph/pop.c:225 msgid "POP3 protocol error\n" msgstr "Błąd protokołu POP3\n" #: libsylph/pop.c:270 #, fuzzy, c-format msgid "invalid UIDL response: %s\n" msgstr "niepoprawna linia xover: %s\n" #: libsylph/pop.c:631 #, c-format msgid "POP3: Deleting expired message %d\n" msgstr "POP3: Usuwanie przestarzałej wiadomości %d\n" #: libsylph/pop.c:640 #, c-format msgid "POP3: Skipping message %d (%d bytes)\n" msgstr "POP3: Pomijanie wiadomości %d (%d bajtów)\n" #: libsylph/pop.c:673 msgid "mailbox is locked\n" msgstr "skrzynka jest zablokowana\n" #: libsylph/pop.c:676 msgid "session timeout\n" msgstr "przekroczenie czasu sesji\n" #: libsylph/pop.c:682 libsylph/smtp.c:561 msgid "can't start TLS session\n" msgstr "nie można uruchomić sesji TLS\n" #: libsylph/pop.c:689 libsylph/smtp.c:496 msgid "error occurred on authentication\n" msgstr "wystąpił błąd podczas uwierzytelniania\n" #: libsylph/pop.c:694 msgid "command not supported\n" msgstr "nieobsługiwane polecenie\n" #: libsylph/pop.c:698 msgid "error occurred on POP3 session\n" msgstr "wystąpił błąd podczas sesji POP3\n" #: libsylph/prefs.c:196 libsylph/prefs.c:224 libsylph/prefs.c:269 #: libsylph/prefs_account.c:217 libsylph/prefs_account.c:231 msgid "failed to write configuration to file\n" msgstr "błąd podczas zapisu konfiguracji do pliku\n" #: libsylph/prefs.c:239 #, c-format msgid "Found %s\n" msgstr "Znaleziono: %s\n" #: libsylph/prefs.c:272 msgid "Configuration is saved.\n" msgstr "Konfiguracja zapisana.\n" #: libsylph/prefs_common.c:503 #, fuzzy msgid "Junk mail filter (manual)" msgstr "Niechciana poczta" #: libsylph/prefs_common.c:506 #, fuzzy msgid "Junk mail filter" msgstr "Niechciana poczta" #: libsylph/procmime.c:1142 msgid "procmime_get_text_content(): Code conversion failed.\n" msgstr "procmine_get_text_content(): Błąd konwersji kodu.\n" #: libsylph/procmsg.c:655 msgid "can't open mark file\n" msgstr "nie można otworzyć pliku zaznaczeń\n" #: libsylph/procmsg.c:1107 #, c-format msgid "can't fetch message %d\n" msgstr "nie można pobrać wiadomości %d\n" #: libsylph/procmsg.c:1423 #, c-format msgid "Print command line is invalid: `%s'\n" msgstr "Błędny wiersz polecenia wydruku: \"%s\"\n" #: libsylph/recv.c:141 msgid "error occurred while retrieving data.\n" msgstr "błąd podczas odbierania danych.\n" #: libsylph/recv.c:183 libsylph/recv.c:215 libsylph/recv.c:230 msgid "Can't write to file.\n" msgstr "Nie można zapisać do pliku.\n" #: libsylph/smtp.c:157 msgid "SMTP AUTH not available\n" msgstr "SMTP AUTH niedostępna\n" #: libsylph/smtp.c:466 libsylph/smtp.c:516 msgid "bad SMTP response\n" msgstr "nieprawidłowa odpowiedź SMTP\n" #: libsylph/smtp.c:487 libsylph/smtp.c:505 libsylph/smtp.c:602 msgid "error occurred on SMTP session\n" msgstr "wystąpił błąd w sesji SMTP\n" #: libsylph/ssl.c:54 msgid "SSLv23 not available\n" msgstr "SSLv23 niedostępny\n" #: libsylph/ssl.c:56 msgid "SSLv23 available\n" msgstr "SSLv23 dostępny\n" #: libsylph/ssl.c:65 msgid "TLSv1 not available\n" msgstr "TLSv1 niedostępny\n" #: libsylph/ssl.c:67 msgid "TLSv1 available\n" msgstr "TLSv1 dostępny\n" #: libsylph/ssl.c:101 libsylph/ssl.c:108 msgid "SSL method not available\n" msgstr "Niedostępna metoda SSL\n" #: libsylph/ssl.c:114 msgid "Unknown SSL method *PROGRAM BUG*\n" msgstr "Nieznana metoda SSL *PROGRAM BUG*\n" #: libsylph/ssl.c:120 msgid "Error creating ssl context\n" msgstr "Błąd tworzenia kontekstu ssl\n" #. Get the cipher #: libsylph/ssl.c:139 #, c-format msgid "SSL connection using %s\n" msgstr "Połączenie SSL z użyciem %s\n" #: libsylph/ssl.c:148 msgid "Server certificate:\n" msgstr "Ceryfikat serwera:\n" #: libsylph/ssl.c:151 #, c-format msgid " Subject: %s\n" msgstr "Temat: %s\n" #: libsylph/ssl.c:156 #, c-format msgid " Issuer: %s\n" msgstr " Nadawca: %s\n" #: libsylph/utils.c:2682 libsylph/utils.c:2804 #, c-format msgid "writing to %s failed.\n" msgstr "błąd zapisu do %s.\n" #~ msgid "can't change file mode\n" #~ msgstr "nie można zmienić trybu pliku\n" libsylph-1.1.0/po/pt_BR.po0000644000175000017500000003757710756432605012277 00000000000000# Brazillian-Portuguese translation of Sylpheed. # Copyright (C) 2000 Free Software Foundation, Inc. # André Casteliano , 2000. # Ricardo Nabinger Sanchez , 2005, 2006 # # Former translators: # André Casteliano # Isaías V. Prestes # André Luís Lopes # Debian-BR # Gustavo Noronha Silva # msgid "" msgstr "" "Project-Id-Version: sylpheed\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-02-19 10:48+0900\n" "PO-Revision-Date: 2006-08-03 14:50-0300\n" "Last-Translator: Ricardo Nabinger Sanchez \n" "Language-Team: Ricardo Nabinger Sanchez \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: libsylph/account.c:56 msgid "Reading all config for each account...\n" msgstr "Lendo as configurações de cada conta...\n" #: libsylph/imap.c:465 #, c-format msgid "IMAP4 connection to %s has been disconnected. Reconnecting...\n" msgstr "A conexão IMAP4 com %s terminou. Reconectando...\n" #: libsylph/imap.c:520 libsylph/imap.c:526 msgid "IMAP4 server disables LOGIN.\n" msgstr "servidor IMAP4 desabilita LOGIN.\n" #: libsylph/imap.c:602 #, c-format msgid "creating IMAP4 connection to %s:%d ...\n" msgstr "criando conexão IMAP4 com %s:%d ...\n" #: libsylph/imap.c:646 msgid "Can't start TLS session.\n" msgstr "Não foi possível iniciar sessão TLS.\n" #: libsylph/imap.c:1120 #, c-format msgid "Getting message %d" msgstr "Buscando mensagem %d" #: libsylph/imap.c:1236 #, c-format msgid "Appending messages to %s (%d / %d)" msgstr "Adicionando mensagens em %s (%d / %d)" #: libsylph/imap.c:1328 #, c-format msgid "Moving messages %s to %s ..." msgstr "Movendo mensagens %s para %s ..." #: libsylph/imap.c:1334 #, c-format msgid "Copying messages %s to %s ..." msgstr "Copiando mensagesn %s para %s ..." #: libsylph/imap.c:1473 #, c-format msgid "Removing messages %s" msgstr "Removendo mensagens %s" #: libsylph/imap.c:1479 #, c-format msgid "can't set deleted flags: %s\n" msgstr "não posso marcar como apagado: %s\n" #: libsylph/imap.c:1487 libsylph/imap.c:1582 msgid "can't expunge\n" msgstr "não posso eliminar\n" #: libsylph/imap.c:1570 #, c-format msgid "Removing all messages in %s" msgstr "Removendo todas as mensagens em %s" #: libsylph/imap.c:1576 msgid "can't set deleted flags: 1:*\n" msgstr "não posso marcar como apagado: 1:*\n" #: libsylph/imap.c:1624 msgid "can't close folder\n" msgstr "não posso fechar pasta\n" #: libsylph/imap.c:1702 #, c-format msgid "root folder %s not exist\n" msgstr "pasta raiz %s inexistente\n" #: libsylph/imap.c:1891 libsylph/imap.c:1899 msgid "error occurred while getting LIST.\n" msgstr "erro recebendo resultados do LIST.\n" #: libsylph/imap.c:2013 #, c-format msgid "Can't create '%s'\n" msgstr "Não foi possível criar '%s'\n" #: libsylph/imap.c:2018 #, c-format msgid "Can't create '%s' under INBOX\n" msgstr "não foi possível criar '%s' em baixo da INBOX\n" #: libsylph/imap.c:2079 msgid "can't create mailbox: LIST failed\n" msgstr "não posso criar caixa de correio: LIST falhou\n" #: libsylph/imap.c:2099 msgid "can't create mailbox\n" msgstr "não posso criar caixa de correio\n" #: libsylph/imap.c:2203 #, c-format msgid "can't rename mailbox: %s to %s\n" msgstr "não é possível renomear caixa de correio: %s para %s\n" #: libsylph/imap.c:2283 msgid "can't delete mailbox\n" msgstr "não posso apagar caixa de correio\n" #: libsylph/imap.c:2327 msgid "can't get envelope\n" msgstr "Não foi possível obter o 'envelope'\n" #: libsylph/imap.c:2340 #, c-format msgid "Getting message headers (%d / %d)" msgstr "Buscando cabeçalhos das mensagens (%d / %d)" #: libsylph/imap.c:2350 msgid "error occurred while getting envelope.\n" msgstr "Ocorreu um erro ao obter 'envelope'\n" #: libsylph/imap.c:2372 #, c-format msgid "can't parse envelope: %s\n" msgstr "não foi possível realizar o parse no envelope: %s\n" #: libsylph/imap.c:2496 #, c-format msgid "Can't connect to IMAP4 server: %s:%d\n" msgstr "Não foi possível se conectar ao servidor IMAP4: %s:%d\n" #: libsylph/imap.c:2503 #, c-format msgid "Can't establish IMAP4 session with: %s:%d\n" msgstr "Não foi possível estabelecer uma sessão IMAP4 com: %s:%d\n" #: libsylph/imap.c:2578 msgid "can't get namespace\n" msgstr "Não foi possível obter o 'envelope'\n" #: libsylph/imap.c:3111 #, c-format msgid "can't select folder: %s\n" msgstr "não posso selecionar pasta: %s\n" #: libsylph/imap.c:3146 msgid "error on imap command: STATUS\n" msgstr "erro no comando imap: STATUS\n" #: libsylph/imap.c:3269 libsylph/imap.c:3304 msgid "IMAP4 authentication failed.\n" msgstr "Falha na autenticação IMAP4.\n" #: libsylph/imap.c:3353 msgid "IMAP4 login failed.\n" msgstr "Falha ao logar no servidor IMAP4.\n" #: libsylph/imap.c:3689 #, c-format msgid "can't append %s to %s\n" msgstr "não foi possível copiar a mensagem %s para %s\n" #: libsylph/imap.c:3696 msgid "(sending file...)" msgstr "(enviando arquivo...)" #: libsylph/imap.c:3725 #, c-format msgid "can't append message to %s\n" msgstr "não foi possível anexar a mensagem em %s\n" #: libsylph/imap.c:3757 #, c-format msgid "can't copy %s to %s\n" msgstr "não posso copiar %s para %s\n" #: libsylph/imap.c:3781 #, c-format msgid "error while imap command: STORE %s %s\n" msgstr "erro no comando imap: STORE %s %s\n" #: libsylph/imap.c:3795 msgid "error while imap command: EXPUNGE\n" msgstr "erro no comando imap: EXPUNGE\n" #: libsylph/imap.c:3808 msgid "error while imap command: CLOSE\n" msgstr "erro no comando imap: CLOSE\n" #: libsylph/imap.c:4084 #, c-format msgid "iconv cannot convert UTF-7 to %s\n" msgstr "o iconv não pode converter UTF-7 para %s\n" #: libsylph/imap.c:4114 #, c-format msgid "iconv cannot convert %s to UTF-7\n" msgstr "o iconv não pode converter %s para UTF-7\n" #: libsylph/mbox.c:50 libsylph/mbox.c:196 msgid "can't write to temporary file\n" msgstr "não é possível gravar no arquivo temporário\n" #: libsylph/mbox.c:69 #, c-format msgid "Getting messages from %s into %s...\n" msgstr "Obtendo Mensagens de %s até %s...\n" #: libsylph/mbox.c:79 msgid "can't read mbox file.\n" msgstr "não foi possível ler o arquivo mbox.\n" #: libsylph/mbox.c:86 #, c-format msgid "invalid mbox format: %s\n" msgstr "formato de mbox inválido: %s\n" #: libsylph/mbox.c:93 #, c-format msgid "malformed mbox: %s\n" msgstr "mbox corrompida: %s\n" #: libsylph/mbox.c:110 msgid "can't open temporary file\n" msgstr "não foi possível abrir o arquivo temporário\n" #: libsylph/mbox.c:161 #, c-format msgid "" "unescaped From found:\n" "%s" msgstr "" "Encontrado De sem codificar:\n" "%s" #: libsylph/mbox.c:250 #, c-format msgid "%d messages found.\n" msgstr "%d mensagens encontradas.\n" #: libsylph/mbox.c:268 #, c-format msgid "can't create lock file %s\n" msgstr "não foi possível criar o arquivo de trava %s\n" #: libsylph/mbox.c:269 msgid "use 'flock' instead of 'file' if possible.\n" msgstr "usar 'flock' em vez de 'file' se for possível.\n" #: libsylph/mbox.c:281 #, c-format msgid "can't create %s\n" msgstr "não foi possível criar %s\n" #: libsylph/mbox.c:287 msgid "mailbox is owned by another process, waiting...\n" msgstr "o correio está sendo usado por outro processo, aguardando...\n" #: libsylph/mbox.c:316 #, c-format msgid "can't lock %s\n" msgstr "não foi possível travar %s\n" #: libsylph/mbox.c:323 libsylph/mbox.c:373 msgid "invalid lock type\n" msgstr "tipo de trava inválido\n" #: libsylph/mbox.c:359 #, c-format msgid "can't unlock %s\n" msgstr "não foi possível destravar %s\n" #: libsylph/mbox.c:394 msgid "can't truncate mailbox to zero.\n" msgstr "não foi possível zerar o mailbox.\n" #: libsylph/mbox.c:418 #, c-format msgid "Exporting messages from %s into %s...\n" msgstr "Exportando mensagens de %s em %s...\n" #: libsylph/mh.c:427 #, c-format msgid "can't copy message %s to %s\n" msgstr "não foi possível copiar a mensagem %s para %s\n" #: libsylph/mh.c:502 libsylph/mh.c:625 msgid "Can't open mark file.\n" msgstr "Não foi possível abrir o arquivo de marcas.\n" #: libsylph/mh.c:509 libsylph/mh.c:631 msgid "the src folder is identical to the dest.\n" msgstr "pastas de origem e destino são idênticas.\n" #: libsylph/mh.c:634 #, c-format msgid "Copying message %s%c%d to %s ...\n" msgstr "Copiando mensagem %s%c%d para %s ...\n" #: libsylph/mh.c:965 libsylph/mh.c:978 #, c-format msgid "" "File `%s' already exists.\n" "Can't create folder." msgstr "" "O arquivo `%s' já existe.\n" "Não foi possível criar a pasta." #: libsylph/mh.c:1500 #, c-format msgid "" "Directory name\n" "'%s' is not a valid UTF-8 string.\n" "Maybe the locale encoding is used for filename.\n" "If that is the case, you must set the following environmental variable\n" "(see README for detail):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" msgstr "" "Diretório de nome\n" "'%s' não é uma string UTF-8 válida.\n" "Talvez a codificação local seja usada para o nome de arquivo.\n" "Se este for o caso, você deve definir a seguinte variável de ambiente\n" "(veja o README para detalhes):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" #: libsylph/news.c:207 #, c-format msgid "creating NNTP connection to %s:%d ...\n" msgstr "criando conexão NNTP com %s:%d ...\n" #: libsylph/news.c:276 #, c-format msgid "NNTP connection to %s:%d has been disconnected. Reconnecting...\n" msgstr "A conexão NNTP com %s:%d terminou. Reconectando...\n" #: libsylph/news.c:377 #, c-format msgid "article %d has been already cached.\n" msgstr "o artigo %d já está no cache.\n" #: libsylph/news.c:397 #, c-format msgid "getting article %d...\n" msgstr "obtendo artigo %d...\n" #: libsylph/news.c:401 #, c-format msgid "can't read article %d\n" msgstr "não foi possível ler o artigo %d\n" #: libsylph/news.c:676 msgid "can't post article.\n" msgstr "não posso postar artigo.\n" #: libsylph/news.c:702 #, c-format msgid "can't retrieve article %d\n" msgstr "não foi possível obter o artigo %d\n" #: libsylph/news.c:759 #, c-format msgid "can't select group: %s\n" msgstr "não foi possível selecionar o grupo: %s\n" #: libsylph/news.c:796 #, c-format msgid "invalid article range: %d - %d\n" msgstr "intervalo de artigos inválido: %d - %d\n" #: libsylph/news.c:809 msgid "no new articles.\n" msgstr "não há novos artigos.\n" #: libsylph/news.c:819 #, c-format msgid "getting xover %d - %d in %s...\n" msgstr "obtendo xover %d - %d en %s...\n" #: libsylph/news.c:823 msgid "can't get xover\n" msgstr "não foi possível obter xover\n" #: libsylph/news.c:833 msgid "error occurred while getting xover.\n" msgstr "ocorreu um erro ao obter xover.\n" #: libsylph/news.c:843 #, c-format msgid "invalid xover line: %s\n" msgstr "linha xover inválida: %s\n" #: libsylph/news.c:862 libsylph/news.c:894 msgid "can't get xhdr\n" msgstr "não foi possível obter xover\n" #: libsylph/news.c:874 libsylph/news.c:906 msgid "error occurred while getting xhdr.\n" msgstr "ocorreu um erro ao obter xover.\n" #: libsylph/nntp.c:68 #, c-format msgid "Can't connect to NNTP server: %s:%d\n" msgstr "Não foi possível se conectar com o servidor NNTP: %s:%d\n" #: libsylph/nntp.c:164 libsylph/nntp.c:227 #, c-format msgid "protocol error: %s\n" msgstr "erro do protocolo: %s\n" #: libsylph/nntp.c:187 libsylph/nntp.c:233 msgid "protocol error\n" msgstr "erro do protocolo\n" #: libsylph/nntp.c:283 msgid "Error occurred while posting\n" msgstr "Ocorreu um erro quando postando\n" #: libsylph/nntp.c:363 msgid "Error occurred while sending command\n" msgstr "Erro ao enviar comando\n" #: libsylph/pop.c:155 msgid "Required APOP timestamp not found in greeting\n" msgstr "Timestamp APOP requerida não encontrada no greeting\n" #: libsylph/pop.c:162 msgid "Timestamp syntax error in greeting\n" msgstr "Erro de sintaxe no greeting\n" #: libsylph/pop.c:170 #, fuzzy msgid "Invalid timestamp in greeting\n" msgstr "Timestamp APOP requerida não encontrada no greeting\n" #: libsylph/pop.c:198 libsylph/pop.c:225 msgid "POP3 protocol error\n" msgstr "Erro do protocolo POP3\n" #: libsylph/pop.c:270 #, c-format msgid "invalid UIDL response: %s\n" msgstr "resposta UIDL inválida: %s\n" #: libsylph/pop.c:631 #, c-format msgid "POP3: Deleting expired message %d\n" msgstr "POP3: Apagando mensagem expirada %d\n" #: libsylph/pop.c:640 #, c-format msgid "POP3: Skipping message %d (%d bytes)\n" msgstr "POP3: Pulando mensagem %d (%d bytes)\n" #: libsylph/pop.c:673 msgid "mailbox is locked\n" msgstr "a caixa de correio está travada\n" #: libsylph/pop.c:676 msgid "session timeout\n" msgstr "tempo limite da sessão\n" #: libsylph/pop.c:682 libsylph/smtp.c:561 msgid "can't start TLS session\n" msgstr "não foi possível iniciar sessão TLS\n" #: libsylph/pop.c:689 libsylph/smtp.c:496 msgid "error occurred on authentication\n" msgstr "ocorreu um erro na autenticação\n" #: libsylph/pop.c:694 msgid "command not supported\n" msgstr "comando não suportado\n" #: libsylph/pop.c:698 msgid "error occurred on POP3 session\n" msgstr "Erro na sessão POP3\n" #: libsylph/prefs.c:196 libsylph/prefs.c:224 libsylph/prefs.c:269 #: libsylph/prefs_account.c:217 libsylph/prefs_account.c:231 msgid "failed to write configuration to file\n" msgstr "falhou ao gravar a configuração no arquivo\n" #: libsylph/prefs.c:239 #, c-format msgid "Found %s\n" msgstr "Encontrado %s\n" #: libsylph/prefs.c:272 msgid "Configuration is saved.\n" msgstr "Configuração salva.\n" #: libsylph/prefs_common.c:503 #, fuzzy msgid "Junk mail filter (manual)" msgstr "Filtro de spam" #: libsylph/prefs_common.c:506 msgid "Junk mail filter" msgstr "Filtro de spam" #: libsylph/procmime.c:1142 msgid "procmime_get_text_content(): Code conversion failed.\n" msgstr "procmime_get_text_content(): Conversão de código falhou.\n" #: libsylph/procmsg.c:655 msgid "can't open mark file\n" msgstr "não foi possível abrir o arquivo de marcas\n" #: libsylph/procmsg.c:1107 #, c-format msgid "can't fetch message %d\n" msgstr "não posso obter mensagem %d\n" #: libsylph/procmsg.c:1423 #, c-format msgid "Print command line is invalid: `%s'\n" msgstr "O comando de impressão é inválido: `%s'\n" #: libsylph/recv.c:141 msgid "error occurred while retrieving data.\n" msgstr "ocorreu um erro enquanto os dados eram obtidos.\n" #: libsylph/recv.c:183 libsylph/recv.c:215 libsylph/recv.c:230 msgid "Can't write to file.\n" msgstr "Não foi possível gravar no arquivo.\n" #: libsylph/smtp.c:157 msgid "SMTP AUTH not available\n" msgstr "SMTP AUTH não disponível\n" #: libsylph/smtp.c:466 libsylph/smtp.c:516 msgid "bad SMTP response\n" msgstr "resposta SMTP inválida\n" #: libsylph/smtp.c:487 libsylph/smtp.c:505 libsylph/smtp.c:602 msgid "error occurred on SMTP session\n" msgstr "erro na sessão SMTP\n" #: libsylph/ssl.c:54 msgid "SSLv23 not available\n" msgstr "SSLv23 não disponível\n" #: libsylph/ssl.c:56 msgid "SSLv23 available\n" msgstr "SSLv23 disponível\n" #: libsylph/ssl.c:65 msgid "TLSv1 not available\n" msgstr "TLSv1 não disponível\n" #: libsylph/ssl.c:67 msgid "TLSv1 available\n" msgstr "TLSv1 disponível\n" #: libsylph/ssl.c:101 libsylph/ssl.c:108 msgid "SSL method not available\n" msgstr "método SSL não disponível\n" #: libsylph/ssl.c:114 msgid "Unknown SSL method *PROGRAM BUG*\n" msgstr "Método SSL desconhecido *ERRO DE PROGRAMA*\n" #: libsylph/ssl.c:120 msgid "Error creating ssl context\n" msgstr "Erro criando contexto SSL\n" #. Get the cipher #: libsylph/ssl.c:139 #, c-format msgid "SSL connection using %s\n" msgstr "Conexão SSL usando %s\n" #: libsylph/ssl.c:148 msgid "Server certificate:\n" msgstr "Certificado do servidor:\n" #: libsylph/ssl.c:151 #, c-format msgid " Subject: %s\n" msgstr " Assunto: %s\n" #: libsylph/ssl.c:156 #, c-format msgid " Issuer: %s\n" msgstr "Emissor: %s\n" #: libsylph/utils.c:2682 libsylph/utils.c:2804 #, c-format msgid "writing to %s failed.\n" msgstr "erro ao gravar em %s.\n" #~ msgid "can't change file mode\n" #~ msgstr "não foi possível modificar as permissões do arquivo\n" libsylph-1.1.0/po/ro.po0000644000175000017500000003745410756432605011703 00000000000000# Romanian translation of Sylpheed # Copyright (C) 2000 - 2006 Free Software Foundation, Inc. # Cristian Secară , 2006. # msgid "" msgstr "" "Project-Id-Version: sylpheed 2.2.0\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-02-19 10:48+0900\n" "PO-Revision-Date: 2006-04-17 02:04+0200\n" "Last-Translator: Cristian Secară \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: Romanian\n" "X-Poedit-Country: Romania\n" #: libsylph/account.c:56 msgid "Reading all config for each account...\n" msgstr "Citire configurări pentru fiecare cont...\n" #: libsylph/imap.c:465 #, c-format msgid "IMAP4 connection to %s has been disconnected. Reconnecting...\n" msgstr "Conexiunea IMAP4 la %s a fost întreruptă. Reconectare...\n" #: libsylph/imap.c:520 libsylph/imap.c:526 msgid "IMAP4 server disables LOGIN.\n" msgstr "Serverul IMAP4 dezactivează LOGIN.\n" #: libsylph/imap.c:602 #, c-format msgid "creating IMAP4 connection to %s:%d ...\n" msgstr "creare conexiune IMAP4 la %s:%d ...\n" #: libsylph/imap.c:646 msgid "Can't start TLS session.\n" msgstr "Nu se poate lansa sesiunea TLS.\n" #: libsylph/imap.c:1120 #, c-format msgid "Getting message %d" msgstr "Obţinere mesaj %d" #: libsylph/imap.c:1236 #, c-format msgid "Appending messages to %s (%d / %d)" msgstr "Adăugare mesaje la %s (%d / %d)" #: libsylph/imap.c:1328 #, c-format msgid "Moving messages %s to %s ..." msgstr "Mutare mesaje %s la %s ..." #: libsylph/imap.c:1334 #, c-format msgid "Copying messages %s to %s ..." msgstr "Copiere mesaje %s la %s ..." #: libsylph/imap.c:1473 #, c-format msgid "Removing messages %s" msgstr "Ştergere mesaje %s" #: libsylph/imap.c:1479 #, c-format msgid "can't set deleted flags: %s\n" msgstr "nu se poate seta marcajul de ştergere: %s\n" #: libsylph/imap.c:1487 libsylph/imap.c:1582 msgid "can't expunge\n" msgstr "nu se poate elimina\n" # hm ? din sau în ? #: libsylph/imap.c:1570 #, c-format msgid "Removing all messages in %s" msgstr "Ştergere mesaje din %s" #: libsylph/imap.c:1576 msgid "can't set deleted flags: 1:*\n" msgstr "nu se poate seta marcajul de ştergere: 1:*\n" #: libsylph/imap.c:1624 msgid "can't close folder\n" msgstr "nu se poate închide folderul\n" #: libsylph/imap.c:1702 #, c-format msgid "root folder %s not exist\n" msgstr "folderul root %s nu există\n" #: libsylph/imap.c:1891 libsylph/imap.c:1899 msgid "error occurred while getting LIST.\n" msgstr "a avut loc o eroare în timpul obţineriii LIST.\n" #: libsylph/imap.c:2013 #, c-format msgid "Can't create '%s'\n" msgstr "Nu se poate crea '%s'\n" #: libsylph/imap.c:2018 #, c-format msgid "Can't create '%s' under INBOX\n" msgstr "Nu se poate crea '%s' în INBOX\n" #: libsylph/imap.c:2079 msgid "can't create mailbox: LIST failed\n" msgstr "nu se poate crea căsuţa poştală: LIST a eşuat.\n" #: libsylph/imap.c:2099 msgid "can't create mailbox\n" msgstr "nu se poate crea căsuţa poştală\n" #: libsylph/imap.c:2203 #, c-format msgid "can't rename mailbox: %s to %s\n" msgstr "nu se poate redenumi căsuţa poştală: %s în %s\n" #: libsylph/imap.c:2283 msgid "can't delete mailbox\n" msgstr "nu se poate şterge căsuţa poştală\n" # hm ? envelope conform wikipedia #: libsylph/imap.c:2327 msgid "can't get envelope\n" msgstr "nu se poate obţine 'envelope' (informaţia de routing)\n" #: libsylph/imap.c:2340 #, c-format msgid "Getting message headers (%d / %d)" msgstr "Obţinere header-e mesaje (%d / %d)" # hm ? envelope conform wikipedia #: libsylph/imap.c:2350 msgid "error occurred while getting envelope.\n" msgstr "" "a avut loc o eroare în timpul obţinerii 'envelope' (informaţia de routing).\n" # hm ? envelope conform wikipedia #: libsylph/imap.c:2372 #, c-format msgid "can't parse envelope: %s\n" msgstr "'envelope' (informaţia de routing) nu poate fi analizat: %s\n" #: libsylph/imap.c:2496 #, c-format msgid "Can't connect to IMAP4 server: %s:%d\n" msgstr "Nu se poate efectua conexiunea la serverul IMAP4: %s:%d\n" #: libsylph/imap.c:2503 #, c-format msgid "Can't establish IMAP4 session with: %s:%d\n" msgstr "Nu se poate stabili sesiunea IMAP4 cu: %s:%d\n" # hm ? #: libsylph/imap.c:2578 msgid "can't get namespace\n" msgstr "nu se poate obţine spaţiul de nume\n" #: libsylph/imap.c:3111 #, c-format msgid "can't select folder: %s\n" msgstr "nu se poate selecta folderul: %s\n" #: libsylph/imap.c:3146 msgid "error on imap command: STATUS\n" msgstr "eroare la comanda IMAP: STATUS\n" #: libsylph/imap.c:3269 libsylph/imap.c:3304 msgid "IMAP4 authentication failed.\n" msgstr "Autentificarea IMAP4 a eşuat.\n" # hm ? cu ce diferă de authentication ? #: libsylph/imap.c:3353 msgid "IMAP4 login failed.\n" msgstr "Autentificarea IMAP4 a eşuat.\n" #: libsylph/imap.c:3689 #, c-format msgid "can't append %s to %s\n" msgstr "nu se poate adăuga %s la %s\n" #: libsylph/imap.c:3696 msgid "(sending file...)" msgstr "(trimitere fişier...)" #: libsylph/imap.c:3725 #, c-format msgid "can't append message to %s\n" msgstr "nu se poate adăuga mesajul la %s\n" #: libsylph/imap.c:3757 #, c-format msgid "can't copy %s to %s\n" msgstr "nu se poate copia %s la %s\n" #: libsylph/imap.c:3781 #, c-format msgid "error while imap command: STORE %s %s\n" msgstr "eroare comandă IMAP: STORE:%s %s\n" #: libsylph/imap.c:3795 msgid "error while imap command: EXPUNGE\n" msgstr "eroare comandă IMAP: EXPUNGE\n" #: libsylph/imap.c:3808 msgid "error while imap command: CLOSE\n" msgstr "eroare comandă IMAP: CLOSE\n" #: libsylph/imap.c:4084 #, c-format msgid "iconv cannot convert UTF-7 to %s\n" msgstr "iconv nu poate efectua conversia UTF-7 la %s\n" #: libsylph/imap.c:4114 #, c-format msgid "iconv cannot convert %s to UTF-7\n" msgstr "iconv nu poate efectua conversia %s la UTF-7\n" #: libsylph/mbox.c:50 libsylph/mbox.c:196 msgid "can't write to temporary file\n" msgstr "fişierul temporar nu a putut fi scris\n" #: libsylph/mbox.c:69 #, c-format msgid "Getting messages from %s into %s...\n" msgstr "Obţinere mesaje de la %s în %s...\n" #: libsylph/mbox.c:79 msgid "can't read mbox file.\n" msgstr "nu se poate citi fişierul mbox.\n" #: libsylph/mbox.c:86 #, c-format msgid "invalid mbox format: %s\n" msgstr "format mbox invalid: %s\n" #: libsylph/mbox.c:93 #, c-format msgid "malformed mbox: %s\n" msgstr "mbox malformat: %s\n" #: libsylph/mbox.c:110 msgid "can't open temporary file\n" msgstr "nu se poate deschide fişier temporar\n" #: libsylph/mbox.c:161 #, c-format msgid "" "unescaped From found:\n" "%s" msgstr "" "s-a găsit câmp From 'unescaped':\n" "%s" #: libsylph/mbox.c:250 #, c-format msgid "%d messages found.\n" msgstr "%d mesaje găsite.\n" #: libsylph/mbox.c:268 #, c-format msgid "can't create lock file %s\n" msgstr "nu se poate crea fişierul lock %s\n" #: libsylph/mbox.c:269 msgid "use 'flock' instead of 'file' if possible.\n" msgstr "dacă este posibil, folosiţi 'flock' în loc de 'file'.\n" #: libsylph/mbox.c:281 #, c-format msgid "can't create %s\n" msgstr "nu se poate crea %s\n" #: libsylph/mbox.c:287 msgid "mailbox is owned by another process, waiting...\n" msgstr "căsuţa poştală este folosită de alt proces, aşteaptaţi...\n" #: libsylph/mbox.c:316 #, c-format msgid "can't lock %s\n" msgstr "nu se poate bloca %s\n" #: libsylph/mbox.c:323 libsylph/mbox.c:373 msgid "invalid lock type\n" msgstr "tip blocare invalid\n" #: libsylph/mbox.c:359 #, c-format msgid "can't unlock %s\n" msgstr "nu se poate debloca %s\n" #: libsylph/mbox.c:394 msgid "can't truncate mailbox to zero.\n" msgstr "nu se poate reteza la zero căsuţa poştală.\n" #: libsylph/mbox.c:418 #, c-format msgid "Exporting messages from %s into %s...\n" msgstr "Exportare mesaje din %s în %s...\n" #: libsylph/mh.c:427 #, c-format msgid "can't copy message %s to %s\n" msgstr "nu se poate copia mesajului %s în %s\n" #: libsylph/mh.c:502 libsylph/mh.c:625 msgid "Can't open mark file.\n" msgstr "Nu se poate deschide fişierul de marcaj.\n" #: libsylph/mh.c:509 libsylph/mh.c:631 msgid "the src folder is identical to the dest.\n" msgstr "folderul sursă este identic cu cel destinaţie.\n" #: libsylph/mh.c:634 #, c-format msgid "Copying message %s%c%d to %s ...\n" msgstr "Copiere mesaj %s%c%d în %s ...\n" #: libsylph/mh.c:965 libsylph/mh.c:978 #, c-format msgid "" "File `%s' already exists.\n" "Can't create folder." msgstr "" "Fişierul '%s' există deja.\n" "Nu se poate crea folderul." #: libsylph/mh.c:1500 #, c-format msgid "" "Directory name\n" "'%s' is not a valid UTF-8 string.\n" "Maybe the locale encoding is used for filename.\n" "If that is the case, you must set the following environmental variable\n" "(see README for detail):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" msgstr "" "Numele directorului\n" "'%s' nu este un şir valid UTF-8.\n" "Este posibil ca numele să utilizeze codarea locale.\n" "Dacă acesta este cazul, va trebui să setaţi următoarea variabilă de mediu\n" "(vezi README pentru detalii):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" #: libsylph/news.c:207 #, c-format msgid "creating NNTP connection to %s:%d ...\n" msgstr "creare conexiune NNTP la %s:%d ...\n" #: libsylph/news.c:276 #, c-format msgid "NNTP connection to %s:%d has been disconnected. Reconnecting...\n" msgstr "Conexiunea NNTP la %s:%d a fost întreruptă. Reconectare...\n" #: libsylph/news.c:377 #, c-format msgid "article %d has been already cached.\n" msgstr "Articolul %d a fost deja memorat în cache.\n" #: libsylph/news.c:397 #, c-format msgid "getting article %d...\n" msgstr "obţinere articol %d...\n" #: libsylph/news.c:401 #, c-format msgid "can't read article %d\n" msgstr "nu se poate citi articolul %d\n" #: libsylph/news.c:676 msgid "can't post article.\n" msgstr "nu se poate trimite articolul.\n" #: libsylph/news.c:702 #, c-format msgid "can't retrieve article %d\n" msgstr "nu se poate recepţiona articolul %d\n" #: libsylph/news.c:759 #, c-format msgid "can't select group: %s\n" msgstr "nu se poate selecta grupul: %s\n" #: libsylph/news.c:796 #, c-format msgid "invalid article range: %d - %d\n" msgstr "interval invalid: %d - %d\n" #: libsylph/news.c:809 msgid "no new articles.\n" msgstr "nu există articole noi.\n" #: libsylph/news.c:819 #, c-format msgid "getting xover %d - %d in %s...\n" msgstr "obţinere xover %d - %d în %s...\n" #: libsylph/news.c:823 msgid "can't get xover\n" msgstr "nu se poate obţine xover\n" #: libsylph/news.c:833 msgid "error occurred while getting xover.\n" msgstr "a avut loc o eroare în timpul obţinerii xover.\n" #: libsylph/news.c:843 #, c-format msgid "invalid xover line: %s\n" msgstr "linie xover invalidă: %s\n" #: libsylph/news.c:862 libsylph/news.c:894 msgid "can't get xhdr\n" msgstr "nu se poate obţine xhdr\n" #: libsylph/news.c:874 libsylph/news.c:906 msgid "error occurred while getting xhdr.\n" msgstr "a avut loc o eroare în timpul obţinerii xhdr.\n" #: libsylph/nntp.c:68 #, c-format msgid "Can't connect to NNTP server: %s:%d\n" msgstr "Nu se poate efectua conexiunea la serverul NNTP: %s:%d\n" #: libsylph/nntp.c:164 libsylph/nntp.c:227 #, c-format msgid "protocol error: %s\n" msgstr "eroare de protocol: %s\n" #: libsylph/nntp.c:187 libsylph/nntp.c:233 msgid "protocol error\n" msgstr "eroare de protocol\n" #: libsylph/nntp.c:283 msgid "Error occurred while posting\n" msgstr "A avut loc o eroare în timpul trimiterii\n" #: libsylph/nntp.c:363 msgid "Error occurred while sending command\n" msgstr "A avut loc o eroare în timpul trimiterii comenzii\n" # hm ? greting ? #: libsylph/pop.c:155 msgid "Required APOP timestamp not found in greeting\n" msgstr "Nu s-a găsit în salut marcajul de timp APOP necesar \n" #: libsylph/pop.c:162 msgid "Timestamp syntax error in greeting\n" msgstr "Eroare de sintaxă timestamp\n" # hm ? greting ? #: libsylph/pop.c:170 #, fuzzy msgid "Invalid timestamp in greeting\n" msgstr "Nu s-a găsit în salut marcajul de timp APOP necesar \n" #: libsylph/pop.c:198 libsylph/pop.c:225 msgid "POP3 protocol error\n" msgstr "Eroare protocol POP3\n" #: libsylph/pop.c:270 #, c-format msgid "invalid UIDL response: %s\n" msgstr "răspuns UIDL invalid: %s\n" #: libsylph/pop.c:631 #, c-format msgid "POP3: Deleting expired message %d\n" msgstr "POP3: Ştergere mesaje expirate %d\n" # hm ? sau săritură ? #: libsylph/pop.c:640 #, c-format msgid "POP3: Skipping message %d (%d bytes)\n" msgstr "PO3: Trecere peste mesajul %d (%d bytes)\n" #: libsylph/pop.c:673 msgid "mailbox is locked\n" msgstr "căsuţa poştală este blocată\n" #: libsylph/pop.c:676 msgid "session timeout\n" msgstr "timpul sesiunii a expirat\n" #: libsylph/pop.c:682 libsylph/smtp.c:561 msgid "can't start TLS session\n" msgstr "nu se poate porni sesiunea TLS\n" #: libsylph/pop.c:689 libsylph/smtp.c:496 msgid "error occurred on authentication\n" msgstr "a avut loc o eroare la autentificare\n" #: libsylph/pop.c:694 msgid "command not supported\n" msgstr "comandă nesuportată\n" #: libsylph/pop.c:698 msgid "error occurred on POP3 session\n" msgstr "a avut loc o eroare la sesiunea POP3\n" #: libsylph/prefs.c:196 libsylph/prefs.c:224 libsylph/prefs.c:269 #: libsylph/prefs_account.c:217 libsylph/prefs_account.c:231 msgid "failed to write configuration to file\n" msgstr "scrierea configuraţie în fişier a eşuat\n" #: libsylph/prefs.c:239 #, c-format msgid "Found %s\n" msgstr "Găsit %s\n" #: libsylph/prefs.c:272 msgid "Configuration is saved.\n" msgstr "Configuraţia a fost salvată.\n" #: libsylph/prefs_common.c:503 #, fuzzy msgid "Junk mail filter (manual)" msgstr "Filtru spam" #: libsylph/prefs_common.c:506 msgid "Junk mail filter" msgstr "Filtru spam" #: libsylph/procmime.c:1142 msgid "procmime_get_text_content(): Code conversion failed.\n" msgstr "procmime_get_text_content(): conversia codului a eşuat.\n" #: libsylph/procmsg.c:655 msgid "can't open mark file\n" msgstr "nu se poate deschide fişierul de marcaj\n" #: libsylph/procmsg.c:1107 #, c-format msgid "can't fetch message %d\n" msgstr "nu se poate verifica mesajul %d\n" #: libsylph/procmsg.c:1423 #, c-format msgid "Print command line is invalid: `%s'\n" msgstr "Linia de comandă pentru imprimare este invalidă: '%s'\n" #: libsylph/recv.c:141 msgid "error occurred while retrieving data.\n" msgstr "a avut loc o eroare în timpul recepţionării datelor.\n" #: libsylph/recv.c:183 libsylph/recv.c:215 libsylph/recv.c:230 msgid "Can't write to file.\n" msgstr "Nu se poate scrie în fişier.\n" #: libsylph/smtp.c:157 msgid "SMTP AUTH not available\n" msgstr "SMTP AUTH indisponibil\n" #: libsylph/smtp.c:466 libsylph/smtp.c:516 msgid "bad SMTP response\n" msgstr "răspuns SMTP greşit\n" #: libsylph/smtp.c:487 libsylph/smtp.c:505 libsylph/smtp.c:602 msgid "error occurred on SMTP session\n" msgstr "a avut loc o eroare la sesiunea SMTP\n" #: libsylph/ssl.c:54 msgid "SSLv23 not available\n" msgstr "SSLv23 indisponibil\n" #: libsylph/ssl.c:56 msgid "SSLv23 available\n" msgstr "SSLv23 disponibil\n" #: libsylph/ssl.c:65 msgid "TLSv1 not available\n" msgstr "TLSv1 indisponibil\n" #: libsylph/ssl.c:67 msgid "TLSv1 available\n" msgstr "TLSv1 disponibil\n" #: libsylph/ssl.c:101 libsylph/ssl.c:108 msgid "SSL method not available\n" msgstr "Metodă SSL indisponibilă\n" #: libsylph/ssl.c:114 msgid "Unknown SSL method *PROGRAM BUG*\n" msgstr "Metodă SSL necunoscută *PROGRAM BUG*\n" #: libsylph/ssl.c:120 msgid "Error creating ssl context\n" msgstr "Eroare creare context SSL\n" #. Get the cipher #: libsylph/ssl.c:139 #, c-format msgid "SSL connection using %s\n" msgstr "Conexiune SSL utilizând %s\n" #: libsylph/ssl.c:148 msgid "Server certificate:\n" msgstr "Server de certificate:\n" #: libsylph/ssl.c:151 #, c-format msgid " Subject: %s\n" msgstr " Subiect: %s\n" #: libsylph/ssl.c:156 #, c-format msgid " Issuer: %s\n" msgstr " Eliberat de: %s\n" #: libsylph/utils.c:2682 libsylph/utils.c:2804 #, c-format msgid "writing to %s failed.\n" msgstr "scrierea în %s a eşuat.\n" #~ msgid "can't change file mode\n" #~ msgstr "nu se pot schimba permisiunile fişierului\n" libsylph-1.1.0/po/ru.po0000644000175000017500000004502710756432605011704 00000000000000# Russian translation for Sylpheed # Copyright (C) 2001-2006 Free Software Foundation, Inc. # First version by Aleksey Novodvorsky , 2001. # Updated by Sergey Vlasov , 2001. # Updated by Dmitry S. Sivachenko , 2001. # msgid "" msgstr "" "Project-Id-Version: sylpheed 2.2.6\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-02-19 10:48+0900\n" "PO-Revision-Date: 2006-06-09 14:30+0400\n" "Last-Translator: Sergey Vlasov \n" "Language-Team: Russian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: libsylph/account.c:56 msgid "Reading all config for each account...\n" msgstr "Чтение настроек учётных записей...\n" #: libsylph/imap.c:465 #, c-format msgid "IMAP4 connection to %s has been disconnected. Reconnecting...\n" msgstr "Соединение IMAP4 с %s прервано. Восстановление соединения...\n" #: libsylph/imap.c:520 libsylph/imap.c:526 msgid "IMAP4 server disables LOGIN.\n" msgstr "Сервер IMAP4 запрещает использование команды LOGIN.\n" #: libsylph/imap.c:602 #, c-format msgid "creating IMAP4 connection to %s:%d ...\n" msgstr "установление соединения IMAP4 с %s:%d ...\n" #: libsylph/imap.c:646 msgid "Can't start TLS session.\n" msgstr "Не удалось начать сеанс TLS.\n" #: libsylph/imap.c:1120 #, c-format msgid "Getting message %d" msgstr "Получение сообщения %d" #: libsylph/imap.c:1236 #, c-format msgid "Appending messages to %s (%d / %d)" msgstr "Добавление сообщений в %s (%d / %d)" #: libsylph/imap.c:1328 #, c-format msgid "Moving messages %s to %s ..." msgstr "Перемещение сообщений %s в %s ..." #: libsylph/imap.c:1334 #, c-format msgid "Copying messages %s to %s ..." msgstr "Копирование сообщений %s в %s ..." #: libsylph/imap.c:1473 #, c-format msgid "Removing messages %s" msgstr "Удаление сообщений %s" #: libsylph/imap.c:1479 #, c-format msgid "can't set deleted flags: %s\n" msgstr "не удалось установить флаг удаления: %s\n" #: libsylph/imap.c:1487 libsylph/imap.c:1582 msgid "can't expunge\n" msgstr "не удалось очистить папку от удалённых сообщений\n" #: libsylph/imap.c:1570 #, c-format msgid "Removing all messages in %s" msgstr "Удаление всех сообщений из %s" #: libsylph/imap.c:1576 msgid "can't set deleted flags: 1:*\n" msgstr "не удалось установить флаг удаления: 1:*\n" #: libsylph/imap.c:1624 msgid "can't close folder\n" msgstr "невозможно закрыть папку\n" #: libsylph/imap.c:1702 #, c-format msgid "root folder %s not exist\n" msgstr "корневая папка %s не существует\n" #: libsylph/imap.c:1891 libsylph/imap.c:1899 msgid "error occurred while getting LIST.\n" msgstr "произошла ошибка при получении LIST.\n" #: libsylph/imap.c:2013 #, c-format msgid "Can't create '%s'\n" msgstr "Ошибка при создании \"%s\"\n" #: libsylph/imap.c:2018 #, c-format msgid "Can't create '%s' under INBOX\n" msgstr "Ошибка при создании \"%s\" внутри INBOX\n" #: libsylph/imap.c:2079 msgid "can't create mailbox: LIST failed\n" msgstr "не удалось создать почтовый ящик: ошибка LIST\n" #: libsylph/imap.c:2099 msgid "can't create mailbox\n" msgstr "не удалось создать почтовый ящик\n" #: libsylph/imap.c:2203 #, c-format msgid "can't rename mailbox: %s to %s\n" msgstr "не удалось переименовать почтовый ящик %s в %s\n" #: libsylph/imap.c:2283 msgid "can't delete mailbox\n" msgstr "не удалось удалить почтовый ящик\n" #: libsylph/imap.c:2327 msgid "can't get envelope\n" msgstr "не удалось получить данные конверта\n" #: libsylph/imap.c:2340 #, c-format msgid "Getting message headers (%d / %d)" msgstr "Получение заголовков сообщений (%d / %d)" #: libsylph/imap.c:2350 msgid "error occurred while getting envelope.\n" msgstr "ошибка при получении данных конверта.\n" #: libsylph/imap.c:2372 #, c-format msgid "can't parse envelope: %s\n" msgstr "ошибка при разборе данных конверта: %s\n" #: libsylph/imap.c:2496 #, c-format msgid "Can't connect to IMAP4 server: %s:%d\n" msgstr "Не удалось соединиться с сервером IMAP4: %s:%d\n" #: libsylph/imap.c:2503 #, c-format msgid "Can't establish IMAP4 session with: %s:%d\n" msgstr "Не удалось открыть сеанс связи IMAP4 c %s:%d\n" #: libsylph/imap.c:2578 msgid "can't get namespace\n" msgstr "не удалось получить пространство имён\n" #: libsylph/imap.c:3111 #, c-format msgid "can't select folder: %s\n" msgstr "невозможно выбрать папку: %s\n" #: libsylph/imap.c:3146 msgid "error on imap command: STATUS\n" msgstr "ошибка при выполнении команды IMAP: STATUS\n" #: libsylph/imap.c:3269 libsylph/imap.c:3304 msgid "IMAP4 authentication failed.\n" msgstr "Ошибка аутентификации IMAP4.\n" #: libsylph/imap.c:3353 msgid "IMAP4 login failed.\n" msgstr "Ошибка авторизации IMAP4.\n" #: libsylph/imap.c:3689 #, c-format msgid "can't append %s to %s\n" msgstr "не удалось добавить %s к %s\n" #: libsylph/imap.c:3696 msgid "(sending file...)" msgstr "(передача файла...)" #: libsylph/imap.c:3725 #, c-format msgid "can't append message to %s\n" msgstr "не удалось добавить сообщение к %s\n" #: libsylph/imap.c:3757 #, c-format msgid "can't copy %s to %s\n" msgstr "не удалось скопировать %s в %s\n" #: libsylph/imap.c:3781 #, c-format msgid "error while imap command: STORE %s %s\n" msgstr "ошибка при выполнении команды IMAP: STORE %s %s\n" #: libsylph/imap.c:3795 msgid "error while imap command: EXPUNGE\n" msgstr "ошибка при выполнении команды IMAP: EXPUNGE\n" #: libsylph/imap.c:3808 msgid "error while imap command: CLOSE\n" msgstr "ошибка при выполнении команды IMAP: CLOSE\n" #: libsylph/imap.c:4084 #, c-format msgid "iconv cannot convert UTF-7 to %s\n" msgstr "ошибка преобразования iconv из UTF-7 в %s\n" #: libsylph/imap.c:4114 #, c-format msgid "iconv cannot convert %s to UTF-7\n" msgstr "ошибка преобразования iconv из %s в UTF-7\n" #: libsylph/mbox.c:50 libsylph/mbox.c:196 msgid "can't write to temporary file\n" msgstr "ошибка записи во временный файл\n" #: libsylph/mbox.c:69 #, c-format msgid "Getting messages from %s into %s...\n" msgstr "Получение сообщений из %s в %s...\n" #: libsylph/mbox.c:79 msgid "can't read mbox file.\n" msgstr "ошибка чтения файла mbox.\n" #: libsylph/mbox.c:86 #, c-format msgid "invalid mbox format: %s\n" msgstr "неверный формат почтового ящика: %s\n" #: libsylph/mbox.c:93 #, c-format msgid "malformed mbox: %s\n" msgstr "испорченный почтовый ящик: %s\n" #: libsylph/mbox.c:110 msgid "can't open temporary file\n" msgstr "ошибка при открытии временного файла \n" #: libsylph/mbox.c:161 #, c-format msgid "" "unescaped From found:\n" "%s" msgstr "" "найдена незащищённая строка From:\n" "%s" #: libsylph/mbox.c:250 #, c-format msgid "%d messages found.\n" msgstr "найдено %d сообщений.\n" #: libsylph/mbox.c:268 #, c-format msgid "can't create lock file %s\n" msgstr "ошибка создания файла блокировки %s\n" #: libsylph/mbox.c:269 msgid "use 'flock' instead of 'file' if possible.\n" msgstr "используйте \"flock\" вместо \"file\", если возможно.\n" #: libsylph/mbox.c:281 #, c-format msgid "can't create %s\n" msgstr "не удалось создать %s\n" #: libsylph/mbox.c:287 msgid "mailbox is owned by another process, waiting...\n" msgstr "почтовый ящик занят другим процессом, ожидание...\n" #: libsylph/mbox.c:316 #, fuzzy, c-format msgid "can't lock %s\n" msgstr "не удалось создать %s\n" #: libsylph/mbox.c:323 libsylph/mbox.c:373 #, fuzzy msgid "invalid lock type\n" msgstr "Неверный тип MIME." #: libsylph/mbox.c:359 #, fuzzy, c-format msgid "can't unlock %s\n" msgstr "не удалось создать %s\n" #: libsylph/mbox.c:394 msgid "can't truncate mailbox to zero.\n" msgstr "не удалось обрезать почтовый ящик до нуля.\n" #: libsylph/mbox.c:418 #, c-format msgid "Exporting messages from %s into %s...\n" msgstr "Экспорт сообщений из %s в %s...\n" #: libsylph/mh.c:427 #, c-format msgid "can't copy message %s to %s\n" msgstr "не удалось скопировать сообщение %s в %s\n" #: libsylph/mh.c:502 libsylph/mh.c:625 msgid "Can't open mark file.\n" msgstr "Не удалось открыть файл пометок.\n" #: libsylph/mh.c:509 libsylph/mh.c:631 msgid "the src folder is identical to the dest.\n" msgstr "исходная папка совпадает с папкой назначения.\n" #: libsylph/mh.c:634 #, c-format msgid "Copying message %s%c%d to %s ...\n" msgstr "Копирование сообщения %s%c%d в %s ...\n" #: libsylph/mh.c:965 libsylph/mh.c:978 #, c-format msgid "" "File `%s' already exists.\n" "Can't create folder." msgstr "" "Файл \"%s\" уже существует.\n" "Нельзя создать папку с таким же именем." #: libsylph/mh.c:1500 #, c-format msgid "" "Directory name\n" "'%s' is not a valid UTF-8 string.\n" "Maybe the locale encoding is used for filename.\n" "If that is the case, you must set the following environmental variable\n" "(see README for detail):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" msgstr "" "Имя каталога\n" "\"%s\" не является допустимой строкой в кодировке UTF-8.\n" "Возможно, для этого имени используется кодировка локали.\n" "В этом случае необходимо установить следующую переменную окружения\n" "(см. более подробное описание в файле README):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" #: libsylph/news.c:207 #, c-format msgid "creating NNTP connection to %s:%d ...\n" msgstr "соединение NNTP с %s:%d ...\n" #: libsylph/news.c:276 #, c-format msgid "NNTP connection to %s:%d has been disconnected. Reconnecting...\n" msgstr "Потеряно соединение NNTP с %s:%d. Попытка восстановления...\n" #: libsylph/news.c:377 #, c-format msgid "article %d has been already cached.\n" msgstr "статья %d уже в кеше.\n" #: libsylph/news.c:397 #, c-format msgid "getting article %d...\n" msgstr "получение статьи %d...\n" #: libsylph/news.c:401 #, c-format msgid "can't read article %d\n" msgstr "ошибка чтения статьи %d\n" #: libsylph/news.c:676 msgid "can't post article.\n" msgstr "ошибка отправки статьи.\n" #: libsylph/news.c:702 #, c-format msgid "can't retrieve article %d\n" msgstr "ошибка получения статьи %d\n" #: libsylph/news.c:759 #, c-format msgid "can't select group: %s\n" msgstr "не удалось выбрать группу: %s\n" #: libsylph/news.c:796 #, c-format msgid "invalid article range: %d - %d\n" msgstr "неверный диапазон статей: %d - %d\n" #: libsylph/news.c:809 msgid "no new articles.\n" msgstr "новых статей нет.\n" #: libsylph/news.c:819 #, c-format msgid "getting xover %d - %d in %s...\n" msgstr "загрузка xover %d - %d в %s...\n" #: libsylph/news.c:823 msgid "can't get xover\n" msgstr "не удалось загрузить xover\n" #: libsylph/news.c:833 msgid "error occurred while getting xover.\n" msgstr "произошла ошибка при получении xover.\n" #: libsylph/news.c:843 #, c-format msgid "invalid xover line: %s\n" msgstr "неверная строка xover: %s\n" #: libsylph/news.c:862 libsylph/news.c:894 msgid "can't get xhdr\n" msgstr "не удалось загрузить xhdr\n" #: libsylph/news.c:874 libsylph/news.c:906 msgid "error occurred while getting xhdr.\n" msgstr "произошла ошибка при получении xhdr.\n" #: libsylph/nntp.c:68 #, c-format msgid "Can't connect to NNTP server: %s:%d\n" msgstr "Ошибка соединения с сервером NNTP: %s:%d\n" #: libsylph/nntp.c:164 libsylph/nntp.c:227 #, c-format msgid "protocol error: %s\n" msgstr "ошибка протокола: %s\n" #: libsylph/nntp.c:187 libsylph/nntp.c:233 msgid "protocol error\n" msgstr "ошибка протокола\n" #: libsylph/nntp.c:283 msgid "Error occurred while posting\n" msgstr "Произошла ошибка при отправке статьи\n" #: libsylph/nntp.c:363 msgid "Error occurred while sending command\n" msgstr "Произошла ошибка при передаче команды.\n" #: libsylph/pop.c:155 msgid "Required APOP timestamp not found in greeting\n" msgstr "В сообщении сервера не найдена требуемая метка времени APOP\n" #: libsylph/pop.c:162 msgid "Timestamp syntax error in greeting\n" msgstr "Ошибка синтаксиса метки времени в сообщении сервера\n" #: libsylph/pop.c:170 #, fuzzy msgid "Invalid timestamp in greeting\n" msgstr "В сообщении сервера не найдена требуемая метка времени APOP\n" #: libsylph/pop.c:198 libsylph/pop.c:225 msgid "POP3 protocol error\n" msgstr "Ошибка протокола POP3\n" #: libsylph/pop.c:270 #, c-format msgid "invalid UIDL response: %s\n" msgstr "неверный ответ UIDL: %s\n" #: libsylph/pop.c:631 #, c-format msgid "POP3: Deleting expired message %d\n" msgstr "POP3: Удаление устаревшего сообщения %d\n" #: libsylph/pop.c:640 #, c-format msgid "POP3: Skipping message %d (%d bytes)\n" msgstr "POP3: Пропускается сообщение %d (%d байт)\n" #: libsylph/pop.c:673 msgid "mailbox is locked\n" msgstr "почтовый ящик занят\n" #: libsylph/pop.c:676 msgid "session timeout\n" msgstr "время сеанса истекло\n" #: libsylph/pop.c:682 libsylph/smtp.c:561 msgid "can't start TLS session\n" msgstr "не удалось начать сеанс TLS\n" #: libsylph/pop.c:689 libsylph/smtp.c:496 msgid "error occurred on authentication\n" msgstr "ошибка при аутентификации\n" #: libsylph/pop.c:694 msgid "command not supported\n" msgstr "команда не поддерживается\n" #: libsylph/pop.c:698 msgid "error occurred on POP3 session\n" msgstr "ошибка сеанса POP3\n" #: libsylph/prefs.c:196 libsylph/prefs.c:224 libsylph/prefs.c:269 #: libsylph/prefs_account.c:217 libsylph/prefs_account.c:231 msgid "failed to write configuration to file\n" msgstr "ошибка при записи настроек в файл\n" #: libsylph/prefs.c:239 #, c-format msgid "Found %s\n" msgstr "Найдено %s\n" #: libsylph/prefs.c:272 msgid "Configuration is saved.\n" msgstr "Настройки сохранены.\n" #: libsylph/prefs_common.c:503 #, fuzzy msgid "Junk mail filter (manual)" msgstr "Фильтр спама" #: libsylph/prefs_common.c:506 msgid "Junk mail filter" msgstr "Фильтр спама" #: libsylph/procmime.c:1142 msgid "procmime_get_text_content(): Code conversion failed.\n" msgstr "procmime_get_text_content(): Ошибка преобразования кодировки.\n" #: libsylph/procmsg.c:655 msgid "can't open mark file\n" msgstr "ошибка открытия файла пометок\n" #: libsylph/procmsg.c:1107 #, c-format msgid "can't fetch message %d\n" msgstr "не удалось получить сообщение %d\n" #: libsylph/procmsg.c:1423 #, c-format msgid "Print command line is invalid: `%s'\n" msgstr "Неправильная команда печати: \"%s\"\n" #: libsylph/recv.c:141 msgid "error occurred while retrieving data.\n" msgstr "произошла ошибка при получении данных.\n" #: libsylph/recv.c:183 libsylph/recv.c:215 libsylph/recv.c:230 msgid "Can't write to file.\n" msgstr "Ошибка записи в файл.\n" #: libsylph/smtp.c:157 msgid "SMTP AUTH not available\n" msgstr "Аутентификация SMTP недоступна\n" #: libsylph/smtp.c:466 libsylph/smtp.c:516 msgid "bad SMTP response\n" msgstr "неверный ответ SMTP\n" #: libsylph/smtp.c:487 libsylph/smtp.c:505 libsylph/smtp.c:602 msgid "error occurred on SMTP session\n" msgstr "ошибка сеанса SMTP\n" #: libsylph/ssl.c:54 msgid "SSLv23 not available\n" msgstr "SSLv23 недоступен\n" #: libsylph/ssl.c:56 msgid "SSLv23 available\n" msgstr "SSLv23 доступен\n" #: libsylph/ssl.c:65 msgid "TLSv1 not available\n" msgstr "TLSv1 недоступен\n" #: libsylph/ssl.c:67 msgid "TLSv1 available\n" msgstr "TLSv1 доступен\n" #: libsylph/ssl.c:101 libsylph/ssl.c:108 msgid "SSL method not available\n" msgstr "Метод SSL недоступен\n" #: libsylph/ssl.c:114 msgid "Unknown SSL method *PROGRAM BUG*\n" msgstr "Неизвестный метод SSL *ОШИБКА В ПРОГРАММЕ*\n" #: libsylph/ssl.c:120 msgid "Error creating ssl context\n" msgstr "Ошибка при создании контекста SSL\n" #. Get the cipher #: libsylph/ssl.c:139 #, c-format msgid "SSL connection using %s\n" msgstr "Соединение SSL с использованием %s\n" #: libsylph/ssl.c:148 msgid "Server certificate:\n" msgstr "Сертификат сервера:\n" #: libsylph/ssl.c:151 #, c-format msgid " Subject: %s\n" msgstr " Субъект: %s\n" #: libsylph/ssl.c:156 #, c-format msgid " Issuer: %s\n" msgstr " Сертификат выдал: %s\n" #: libsylph/utils.c:2682 libsylph/utils.c:2804 #, c-format msgid "writing to %s failed.\n" msgstr "запись в %s не удалась.\n" #~ msgid "can't change file mode\n" #~ msgstr "не удалось изменить свойства файла\n" libsylph-1.1.0/po/sk.po0000644000175000017500000003637410756432605011700 00000000000000# translation of Sylpheed to Slovak # Copyright (C) 2003 Andrej Kacian # This file is distributed under the same license as the Sylpheed package. # Andrej Kacian , 2003, 2004. # msgid "" msgstr "" "Project-Id-Version: sylpheed\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-02-19 10:48+0900\n" "PO-Revision-Date: 2004-01-22 17:46+0100\n" "Last-Translator: Andrej Kacian \n" "Language-Team: Slovak \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.2\n" #: libsylph/account.c:56 msgid "Reading all config for each account...\n" msgstr "Načítavam nastavenia pre všetky kontá...\n" #: libsylph/imap.c:465 #, c-format msgid "IMAP4 connection to %s has been disconnected. Reconnecting...\n" msgstr "IMAP4 spojenie k %s sa prerušilo. Znovu pripájam...\n" #: libsylph/imap.c:520 libsylph/imap.c:526 #, fuzzy msgid "IMAP4 server disables LOGIN.\n" msgstr "Priečinok serveru IMAP" #: libsylph/imap.c:602 #, c-format msgid "creating IMAP4 connection to %s:%d ...\n" msgstr "vytváram IMAP4 spojenie k %s:%d ...\n" #: libsylph/imap.c:646 msgid "Can't start TLS session.\n" msgstr "Nedá sa vytvoriť TLS spojenie.\n" #: libsylph/imap.c:1120 #, fuzzy, c-format msgid "Getting message %d" msgstr "Odstraňujem správu %d" #: libsylph/imap.c:1236 #, fuzzy, c-format msgid "Appending messages to %s (%d / %d)" msgstr "Odosielam správu (%d / %d bajtov)" #: libsylph/imap.c:1328 #, fuzzy, c-format msgid "Moving messages %s to %s ..." msgstr "Kopírujem správu %s%c%d do %s ...\n" #: libsylph/imap.c:1334 #, fuzzy, c-format msgid "Copying messages %s to %s ..." msgstr "Kopírujem správu %s%c%d do %s ...\n" #: libsylph/imap.c:1473 #, fuzzy, c-format msgid "Removing messages %s" msgstr "Prijímam správy z %s..." #: libsylph/imap.c:1479 #, c-format msgid "can't set deleted flags: %s\n" msgstr "nedá sa nastaviť príznak zmazania: %s\n" #: libsylph/imap.c:1487 libsylph/imap.c:1582 msgid "can't expunge\n" msgstr "nedá sa odstrániť\n" #: libsylph/imap.c:1570 #, fuzzy, c-format msgid "Removing all messages in %s" msgstr "Prijímam správy z %s..." #: libsylph/imap.c:1576 msgid "can't set deleted flags: 1:*\n" msgstr "nedá sa nastaviť príznak zmazania: 1:*\n" #: libsylph/imap.c:1624 msgid "can't close folder\n" msgstr "priečinok sa nedá zatvoriť\n" #: libsylph/imap.c:1702 #, c-format msgid "root folder %s not exist\n" msgstr "koreňový priečinok %s neexistuje\n" #: libsylph/imap.c:1891 libsylph/imap.c:1899 msgid "error occurred while getting LIST.\n" msgstr "pri príkaze LIST sa vyskytla chyba.\n" #: libsylph/imap.c:2013 #, c-format msgid "Can't create '%s'\n" msgstr "Nedá sa vytvoriť '%s'\n" #: libsylph/imap.c:2018 #, c-format msgid "Can't create '%s' under INBOX\n" msgstr "Nedá sa vytvoriť '%s' v INBOXe\n" #: libsylph/imap.c:2079 msgid "can't create mailbox: LIST failed\n" msgstr "nedá sa vytvoriť schránka: príkaz LIST zlyhal\n" #: libsylph/imap.c:2099 msgid "can't create mailbox\n" msgstr "nedá sa vytvoriť schránka\n" #: libsylph/imap.c:2203 #, c-format msgid "can't rename mailbox: %s to %s\n" msgstr "nedá sa premenovať schránka: %s na %s\n" #: libsylph/imap.c:2283 msgid "can't delete mailbox\n" msgstr "schránka sa nedá odstrániť \n" #: libsylph/imap.c:2327 msgid "can't get envelope\n" msgstr "obálka sa nedá načítať\n" #: libsylph/imap.c:2340 #, fuzzy, c-format msgid "Getting message headers (%d / %d)" msgstr "Odosielam správu (%d / %d bajtov)" #: libsylph/imap.c:2350 msgid "error occurred while getting envelope.\n" msgstr "pri získavaní obálky sa vyskytla chyba.\n" #: libsylph/imap.c:2372 #, c-format msgid "can't parse envelope: %s\n" msgstr "obálka sa nedá prečítať: %s\n" #: libsylph/imap.c:2496 #, c-format msgid "Can't connect to IMAP4 server: %s:%d\n" msgstr "Nedá sa pripojiť k serveru IMAP4: %s:%d\n" #: libsylph/imap.c:2503 #, c-format msgid "Can't establish IMAP4 session with: %s:%d\n" msgstr "Nedá sa vytvoriť IMAP4 spojenie s: %s:%d\n" #: libsylph/imap.c:2578 msgid "can't get namespace\n" msgstr "nedá sa nájsť obálka\n" #: libsylph/imap.c:3111 #, c-format msgid "can't select folder: %s\n" msgstr "priečinok sa nedá vytvoriť: %s\n" #: libsylph/imap.c:3146 #, fuzzy msgid "error on imap command: STATUS\n" msgstr "chyba pri IMAP príkaze: CLOSE\n" #: libsylph/imap.c:3269 libsylph/imap.c:3304 msgid "IMAP4 authentication failed.\n" msgstr "IMAP4 autentizácia bola neúspešná.\n" #: libsylph/imap.c:3353 msgid "IMAP4 login failed.\n" msgstr "neúspešné prihlásenie k IMAP4.\n" #: libsylph/imap.c:3689 #, c-format msgid "can't append %s to %s\n" msgstr "nedá sa napojiť %s k %s\n" #: libsylph/imap.c:3696 msgid "(sending file...)" msgstr "(posielam súbor...)" #: libsylph/imap.c:3725 #, c-format msgid "can't append message to %s\n" msgstr "nedá sa napojiť správa k %s\n" #: libsylph/imap.c:3757 #, c-format msgid "can't copy %s to %s\n" msgstr "nedá sa kopírovať %s do %s\n" #: libsylph/imap.c:3781 #, c-format msgid "error while imap command: STORE %s %s\n" msgstr "chyba pri IMAP príkaze: STORE %s %s\n" #: libsylph/imap.c:3795 msgid "error while imap command: EXPUNGE\n" msgstr "chyba pri IMAP príkaze: EXPUNGE\n" #: libsylph/imap.c:3808 msgid "error while imap command: CLOSE\n" msgstr "chyba pri IMAP príkaze: CLOSE\n" #: libsylph/imap.c:4084 #, c-format msgid "iconv cannot convert UTF-7 to %s\n" msgstr "iconv nemôže skonvertovať UTF-7 na %s\n" #: libsylph/imap.c:4114 #, c-format msgid "iconv cannot convert %s to UTF-7\n" msgstr "iconv nemôže skonvertovať %s na UTF-7\n" #: libsylph/mbox.c:50 libsylph/mbox.c:196 msgid "can't write to temporary file\n" msgstr "nemôžem zapisovať do dočasného súboru\n" #: libsylph/mbox.c:69 #, c-format msgid "Getting messages from %s into %s...\n" msgstr "Prijímam správy z %s do %s...\n" #: libsylph/mbox.c:79 msgid "can't read mbox file.\n" msgstr "nemôžem prečítať súbor mbox.\n" #: libsylph/mbox.c:86 #, c-format msgid "invalid mbox format: %s\n" msgstr "neplatný formát mbox: %s\n" #: libsylph/mbox.c:93 #, c-format msgid "malformed mbox: %s\n" msgstr "poškodený mbox: %s\n" #: libsylph/mbox.c:110 msgid "can't open temporary file\n" msgstr "nemôžem otvoriť dočasný súbor\n" #: libsylph/mbox.c:161 #, c-format msgid "" "unescaped From found:\n" "%s" msgstr "" "neukončené From:\n" "%s" #: libsylph/mbox.c:250 #, c-format msgid "%d messages found.\n" msgstr "nájdených %d správ.\n" #: libsylph/mbox.c:268 #, c-format msgid "can't create lock file %s\n" msgstr "nemôžem vytvoriť zámkový súbor %s\n" #: libsylph/mbox.c:269 msgid "use 'flock' instead of 'file' if possible.\n" msgstr "ak je to možné, miesto 'file' použite 'flock'.\n" #: libsylph/mbox.c:281 #, c-format msgid "can't create %s\n" msgstr "nemôžem vytvoriť %s\n" #: libsylph/mbox.c:287 msgid "mailbox is owned by another process, waiting...\n" msgstr "iný proces vlastní mailbox, čakám...\n" #: libsylph/mbox.c:316 #, c-format msgid "can't lock %s\n" msgstr "nemôžem uzamknúť %s\n" #: libsylph/mbox.c:323 libsylph/mbox.c:373 msgid "invalid lock type\n" msgstr "neplatný typ zámku\n" #: libsylph/mbox.c:359 #, c-format msgid "can't unlock %s\n" msgstr "nemôžem odomknúť %s\n" #: libsylph/mbox.c:394 msgid "can't truncate mailbox to zero.\n" msgstr "nemôžem skrátiť mailbox na nulovú dĺžku.\n" #: libsylph/mbox.c:418 #, c-format msgid "Exporting messages from %s into %s...\n" msgstr "Exportujem správy z %s do %s...\n" #: libsylph/mh.c:427 #, c-format msgid "can't copy message %s to %s\n" msgstr "nemôžem kopírovať správu %s do %s\n" #: libsylph/mh.c:502 libsylph/mh.c:625 msgid "Can't open mark file.\n" msgstr "Nemôžem označiť súbor so značkami.\n" #: libsylph/mh.c:509 libsylph/mh.c:631 msgid "the src folder is identical to the dest.\n" msgstr "zdrojový priečinok je ten istý ako cieľový.\n" #: libsylph/mh.c:634 #, c-format msgid "Copying message %s%c%d to %s ...\n" msgstr "Kopírujem správu %s%c%d do %s ...\n" #: libsylph/mh.c:965 libsylph/mh.c:978 #, c-format msgid "" "File `%s' already exists.\n" "Can't create folder." msgstr "" "Súbor '%s' už existuje.\n" "Priečinok sa nedá vytvoriť." #: libsylph/mh.c:1500 #, c-format msgid "" "Directory name\n" "'%s' is not a valid UTF-8 string.\n" "Maybe the locale encoding is used for filename.\n" "If that is the case, you must set the following environmental variable\n" "(see README for detail):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" msgstr "" #: libsylph/news.c:207 #, c-format msgid "creating NNTP connection to %s:%d ...\n" msgstr "nadväzujem NNTP spojenie k %s:%d ...\n" #: libsylph/news.c:276 #, c-format msgid "NNTP connection to %s:%d has been disconnected. Reconnecting...\n" msgstr "NNTP spojenie k %s:%d bolo prerušené. Obnovujem spojenie...\n" #: libsylph/news.c:377 #, c-format msgid "article %d has been already cached.\n" msgstr "článok %d už je v medzipamäti.\n" #: libsylph/news.c:397 #, c-format msgid "getting article %d...\n" msgstr "prijímam článok %d...\n" #: libsylph/news.c:401 #, c-format msgid "can't read article %d\n" msgstr "nemôžem prečítať článok %d\n" #: libsylph/news.c:676 msgid "can't post article.\n" msgstr "nemôžem odoslať článok.\n" #: libsylph/news.c:702 #, c-format msgid "can't retrieve article %d\n" msgstr "nemôžem prijať článok %d\n" #: libsylph/news.c:759 #, fuzzy, c-format msgid "can't select group: %s\n" msgstr "nemôžem vybrať skupinu %s\n" #: libsylph/news.c:796 #, c-format msgid "invalid article range: %d - %d\n" msgstr "neplatný rozsah článkov: %d - %d\n" #: libsylph/news.c:809 msgid "no new articles.\n" msgstr "žiadne nové články.\n" #: libsylph/news.c:819 #, c-format msgid "getting xover %d - %d in %s...\n" msgstr "prijímam xover %d - %d v %s...\n" #: libsylph/news.c:823 msgid "can't get xover\n" msgstr "nemôžem prijať xover\n" #: libsylph/news.c:833 msgid "error occurred while getting xover.\n" msgstr "pri prijímaní xover sa vyskytla chyba.\n" #: libsylph/news.c:843 #, c-format msgid "invalid xover line: %s\n" msgstr "neplatný xover riadok: %s\n" #: libsylph/news.c:862 libsylph/news.c:894 msgid "can't get xhdr\n" msgstr "nemôžem prijať xhdr\n" #: libsylph/news.c:874 libsylph/news.c:906 msgid "error occurred while getting xhdr.\n" msgstr "pri prijímaní xhdr sa vyskytla chyba.\n" #: libsylph/nntp.c:68 #, c-format msgid "Can't connect to NNTP server: %s:%d\n" msgstr "Nedá sa pripojiŤ k serveru NNTP: %s:%d\n" #: libsylph/nntp.c:164 libsylph/nntp.c:227 #, c-format msgid "protocol error: %s\n" msgstr "chyba protokolu: %s\n" #: libsylph/nntp.c:187 libsylph/nntp.c:233 msgid "protocol error\n" msgstr "chyba protokolu\n" #: libsylph/nntp.c:283 msgid "Error occurred while posting\n" msgstr "Pri odosielaní sa vyskytla chyba\n" #: libsylph/nntp.c:363 #, fuzzy msgid "Error occurred while sending command\n" msgstr "Pri odosielaní správy nastala chyba." #: libsylph/pop.c:155 msgid "Required APOP timestamp not found in greeting\n" msgstr "V pozdrave nebola nájdená vyžadovaná APOP časová značka\n" #: libsylph/pop.c:162 msgid "Timestamp syntax error in greeting\n" msgstr "Chybná časová značka v pozdrave\n" #: libsylph/pop.c:170 #, fuzzy msgid "Invalid timestamp in greeting\n" msgstr "V pozdrave nebola nájdená vyžadovaná APOP časová značka\n" #: libsylph/pop.c:198 libsylph/pop.c:225 msgid "POP3 protocol error\n" msgstr "Chyba protokolu POP3\n" #: libsylph/pop.c:270 #, fuzzy, c-format msgid "invalid UIDL response: %s\n" msgstr "neplatný xover riadok: %s\n" #: libsylph/pop.c:631 #, c-format msgid "POP3: Deleting expired message %d\n" msgstr "POP3: Odstraňujem starú správu %d\n" #: libsylph/pop.c:640 #, c-format msgid "POP3: Skipping message %d (%d bytes)\n" msgstr "POP3: Preskakujem správu %d (%d bajtov)\n" #: libsylph/pop.c:673 msgid "mailbox is locked\n" msgstr "mailbox je zamknutý\n" #: libsylph/pop.c:676 msgid "session timeout\n" msgstr "čas spojenia vypršal\n" #: libsylph/pop.c:682 libsylph/smtp.c:561 msgid "can't start TLS session\n" msgstr "nemôžem vytvoriť TLS reláciu\n" #: libsylph/pop.c:689 libsylph/smtp.c:496 msgid "error occurred on authentication\n" msgstr "vyskytla sa chyba v autentizácii\n" #: libsylph/pop.c:694 msgid "command not supported\n" msgstr "príkaz nie je podporovaný\n" #: libsylph/pop.c:698 msgid "error occurred on POP3 session\n" msgstr "vyskytla sa chyba pri POP3 spojení\n" #: libsylph/prefs.c:196 libsylph/prefs.c:224 libsylph/prefs.c:269 #: libsylph/prefs_account.c:217 libsylph/prefs_account.c:231 msgid "failed to write configuration to file\n" msgstr "nepodarilo sa zapísať nastavenie do súboru\n" #: libsylph/prefs.c:239 #, c-format msgid "Found %s\n" msgstr "Nájdené %s\n" #: libsylph/prefs.c:272 msgid "Configuration is saved.\n" msgstr "Nastavenie uložené.\n" #: libsylph/prefs_common.c:503 #, fuzzy msgid "Junk mail filter (manual)" msgstr "Priečinok" #: libsylph/prefs_common.c:506 #, fuzzy msgid "Junk mail filter" msgstr "Priečinok" #: libsylph/procmime.c:1142 msgid "procmime_get_text_content(): Code conversion failed.\n" msgstr "procmime_get_text_content(): Nepodarilo sa skonvertovať kód.\n" #: libsylph/procmsg.c:655 msgid "can't open mark file\n" msgstr "nemôžem otvoriť súbor so značkami\n" #: libsylph/procmsg.c:1107 #, c-format msgid "can't fetch message %d\n" msgstr "nedá sa prijať správa %d\n" #: libsylph/procmsg.c:1423 #, c-format msgid "Print command line is invalid: `%s'\n" msgstr "Príkazový riadok tlače je neplatný: '%s'\n" #: libsylph/recv.c:141 msgid "error occurred while retrieving data.\n" msgstr "pri prijímaní dát sa vyskytla chyba.\n" #: libsylph/recv.c:183 libsylph/recv.c:215 libsylph/recv.c:230 msgid "Can't write to file.\n" msgstr "Do súboru sa nedá zapisovať.\n" #: libsylph/smtp.c:157 msgid "SMTP AUTH not available\n" msgstr "SMTP AUTH nie je dostupné\n" #: libsylph/smtp.c:466 libsylph/smtp.c:516 msgid "bad SMTP response\n" msgstr "neplatná odozva SMTP\n" #: libsylph/smtp.c:487 libsylph/smtp.c:505 libsylph/smtp.c:602 msgid "error occurred on SMTP session\n" msgstr "vyskytla sa chyba pri SMTP spojení\n" #: libsylph/ssl.c:54 msgid "SSLv23 not available\n" msgstr "SSLv23 nie je dostupné\n" #: libsylph/ssl.c:56 msgid "SSLv23 available\n" msgstr "SSLv23 je dostupné\n" #: libsylph/ssl.c:65 msgid "TLSv1 not available\n" msgstr "TLSv1 nie je dostupné\n" #: libsylph/ssl.c:67 msgid "TLSv1 available\n" msgstr "TLSv1 je dostupné\n" #: libsylph/ssl.c:101 libsylph/ssl.c:108 msgid "SSL method not available\n" msgstr "Metóda SSL nie je dostupná\n" #: libsylph/ssl.c:114 msgid "Unknown SSL method *PROGRAM BUG*\n" msgstr "Neznáma metóda SSL *CHYBA PROGRAMU*\n" #: libsylph/ssl.c:120 msgid "Error creating ssl context\n" msgstr "Pri vytváraní SSL kontextu sa vyskytla chyba\n" #. Get the cipher #: libsylph/ssl.c:139 #, c-format msgid "SSL connection using %s\n" msgstr "SSL spojenie pri použití %s zlyhalo\n" #: libsylph/ssl.c:148 msgid "Server certificate:\n" msgstr "Certifikát serveru:\n" #: libsylph/ssl.c:151 #, c-format msgid " Subject: %s\n" msgstr " Predmet: %s\n" #: libsylph/ssl.c:156 #, c-format msgid " Issuer: %s\n" msgstr " Vydavateľ: %s\n" #: libsylph/utils.c:2682 libsylph/utils.c:2804 #, c-format msgid "writing to %s failed.\n" msgstr "nepodaril sa zápis do %s.\n" #~ msgid "can't change file mode\n" #~ msgstr "nedá sa zmeniť mód súboru\n" libsylph-1.1.0/po/sl.po0000644000175000017500000003654310756432605011677 00000000000000# Slovenian translation of Sylpheed # Copyright (C) 2002 Free Software Foundation, Inc. # Jernej Kovacic , 2002. msgid "" msgstr "" "Project-Id-Version: sylpheed\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-02-19 10:48+0900\n" "PO-Revision-Date: 2003-01-24 20:39CET\n" "Last-Translator: Jernej Kovacic \n" "Language-Team: Slovenian \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 0.9.5\n" #: libsylph/account.c:56 msgid "Reading all config for each account...\n" msgstr "Berem vse nastavitve za vsak račun...\n" #: libsylph/imap.c:465 #, fuzzy, c-format msgid "IMAP4 connection to %s has been disconnected. Reconnecting...\n" msgstr "Povezava IMAP4 do %s%d se je prekinila. Povezujem se znova...\n" #: libsylph/imap.c:520 libsylph/imap.c:526 #, fuzzy msgid "IMAP4 server disables LOGIN.\n" msgstr "Imenik strežnika IMAP" #: libsylph/imap.c:602 #, c-format msgid "creating IMAP4 connection to %s:%d ...\n" msgstr "delam povezavo IMAP4 do %s:%d ...\n" #: libsylph/imap.c:646 msgid "Can't start TLS session.\n" msgstr "Ne morem pričeti seje TLS.\n" #: libsylph/imap.c:1120 #, fuzzy, c-format msgid "Getting message %d" msgstr "Brišem sporočilo %d" #: libsylph/imap.c:1236 #, fuzzy, c-format msgid "Appending messages to %s (%d / %d)" msgstr "Pošiljam sporočilo (%d / %d zlogov)" #: libsylph/imap.c:1328 #, fuzzy, c-format msgid "Moving messages %s to %s ..." msgstr "Prestavljam sporočilo %s%c%d v %s ...\n" #: libsylph/imap.c:1334 #, fuzzy, c-format msgid "Copying messages %s to %s ..." msgstr "Kopiram sporočilo %s%c%d v %s ...\n" #: libsylph/imap.c:1473 #, fuzzy, c-format msgid "Removing messages %s" msgstr "Sprejemam sporočila iz %s v %s...\n" #: libsylph/imap.c:1479 #, fuzzy, c-format msgid "can't set deleted flags: %s\n" msgstr "ne morem nastaviti izbrisanih zastavic: %d\n" #: libsylph/imap.c:1487 libsylph/imap.c:1582 msgid "can't expunge\n" msgstr "ne morem izbrisati\n" #: libsylph/imap.c:1570 #, fuzzy, c-format msgid "Removing all messages in %s" msgstr "Sprejemam sporočila iz %s v %s...\n" #: libsylph/imap.c:1576 #, fuzzy msgid "can't set deleted flags: 1:*\n" msgstr "ne morem nastaviti izbrisanih zastavic: 1:%d\n" #: libsylph/imap.c:1624 #, fuzzy msgid "can't close folder\n" msgstr "ne morem izbrati mape: %s\n" #: libsylph/imap.c:1702 #, fuzzy, c-format msgid "root folder %s not exist\n" msgstr "Datoteka z oznakami ni bila najdena.\n" #: libsylph/imap.c:1891 libsylph/imap.c:1899 #, fuzzy msgid "error occurred while getting LIST.\n" msgstr "med dobivanjem LIST je prišlo do napake.\n" #: libsylph/imap.c:2013 #, c-format msgid "Can't create '%s'\n" msgstr "Ne morem narediti '%s'\n" #: libsylph/imap.c:2018 #, c-format msgid "Can't create '%s' under INBOX\n" msgstr "Ne morem narediti '%s' pod mapo Prejeto\n" #: libsylph/imap.c:2079 msgid "can't create mailbox: LIST failed\n" msgstr "ne morem narediti poštnega predala: LIST ni uspel\n" #: libsylph/imap.c:2099 msgid "can't create mailbox\n" msgstr "ne morem narediti poštnega predala\n" #: libsylph/imap.c:2203 #, c-format msgid "can't rename mailbox: %s to %s\n" msgstr "ne morem preimenovati poštnega predala: %s v %s\n" #: libsylph/imap.c:2283 msgid "can't delete mailbox\n" msgstr "ne morem izbrisati poštnega predala\n" #: libsylph/imap.c:2327 msgid "can't get envelope\n" msgstr "ne morem dobiti ovojnice\n" #: libsylph/imap.c:2340 #, fuzzy, c-format msgid "Getting message headers (%d / %d)" msgstr "Pošiljam sporočilo (%d / %d zlogov)" #: libsylph/imap.c:2350 msgid "error occurred while getting envelope.\n" msgstr "med dobivanjem ovojnice je prišlo do napake.\n" #: libsylph/imap.c:2372 #, c-format msgid "can't parse envelope: %s\n" msgstr "ne morem razčleniti ovojnice: %s\n" #: libsylph/imap.c:2496 #, c-format msgid "Can't connect to IMAP4 server: %s:%d\n" msgstr "Ne morem se povezati s strežnikom IMAP4: %s%d\n" #: libsylph/imap.c:2503 #, c-format msgid "Can't establish IMAP4 session with: %s:%d\n" msgstr "Ne morem vzpostaviti seje IMAP4 z: %s%d\n" #: libsylph/imap.c:2578 msgid "can't get namespace\n" msgstr "ne morem dobiti imenskega prostora\n" #: libsylph/imap.c:3111 #, c-format msgid "can't select folder: %s\n" msgstr "ne morem izbrati mape: %s\n" #: libsylph/imap.c:3146 #, fuzzy msgid "error on imap command: STATUS\n" msgstr "napaka med IMAPovim ukazom: EXPUNGE\n" #: libsylph/imap.c:3269 libsylph/imap.c:3304 #, fuzzy msgid "IMAP4 authentication failed.\n" msgstr "Overovitvena metoda" #: libsylph/imap.c:3353 msgid "IMAP4 login failed.\n" msgstr "Prijava na IMAP4 ni uspela.\n" #: libsylph/imap.c:3689 #, c-format msgid "can't append %s to %s\n" msgstr "ne morem pripeti %s na %s\n" #: libsylph/imap.c:3696 msgid "(sending file...)" msgstr "(pošiljam datoteko...)" #: libsylph/imap.c:3725 #, fuzzy, c-format msgid "can't append message to %s\n" msgstr "ne morem dodati sporočila %s\n" #: libsylph/imap.c:3757 #, fuzzy, c-format msgid "can't copy %s to %s\n" msgstr "ne morem kopirati %d na %s\n" #: libsylph/imap.c:3781 #, fuzzy, c-format msgid "error while imap command: STORE %s %s\n" msgstr "napaka med IMAPovim ukazom: STORE %d:%d %s\n" #: libsylph/imap.c:3795 msgid "error while imap command: EXPUNGE\n" msgstr "napaka med IMAPovim ukazom: EXPUNGE\n" #: libsylph/imap.c:3808 #, fuzzy msgid "error while imap command: CLOSE\n" msgstr "napaka med IMAPovim ukazom: EXPUNGE\n" #: libsylph/imap.c:4084 #, c-format msgid "iconv cannot convert UTF-7 to %s\n" msgstr "iconv ne more pretvoriti UTF-7 v %s\n" #: libsylph/imap.c:4114 #, c-format msgid "iconv cannot convert %s to UTF-7\n" msgstr "iconv ne more pretvoriti %s v UTF-7\n" #: libsylph/mbox.c:50 libsylph/mbox.c:196 msgid "can't write to temporary file\n" msgstr "ne morem pisati v začasno datoteko\n" #: libsylph/mbox.c:69 #, c-format msgid "Getting messages from %s into %s...\n" msgstr "Sprejemam sporočila iz %s v %s...\n" #: libsylph/mbox.c:79 msgid "can't read mbox file.\n" msgstr "ne morem prebrati datoteke mbox.\n" #: libsylph/mbox.c:86 #, c-format msgid "invalid mbox format: %s\n" msgstr "napačen format mbox: %s\n" #: libsylph/mbox.c:93 #, c-format msgid "malformed mbox: %s\n" msgstr "napačno oblikovan mbox: %s\n" #: libsylph/mbox.c:110 msgid "can't open temporary file\n" msgstr "ne morem odpreti začasne datoteke\n" #: libsylph/mbox.c:161 #, c-format msgid "" "unescaped From found:\n" "%s" msgstr "" "najdeno neubežno polje Od:\n" "%s" #: libsylph/mbox.c:250 #, c-format msgid "%d messages found.\n" msgstr "najdenih %d sporočil.\n" #: libsylph/mbox.c:268 #, c-format msgid "can't create lock file %s\n" msgstr "ne morem narediti datoteke za zaklepanje %s\n" #: libsylph/mbox.c:269 msgid "use 'flock' instead of 'file' if possible.\n" msgstr "če je mogoče, uporabi 'flock' namesto 'file'.\n" #: libsylph/mbox.c:281 #, c-format msgid "can't create %s\n" msgstr "ne morem narediti %s\n" #: libsylph/mbox.c:287 msgid "mailbox is owned by another process, waiting...\n" msgstr "poštni predal si lasti drug proces, čakam...\n" #: libsylph/mbox.c:316 #, c-format msgid "can't lock %s\n" msgstr "ne morem zakleniti %s\n" #: libsylph/mbox.c:323 libsylph/mbox.c:373 msgid "invalid lock type\n" msgstr "neveljaven tip zaklepanja\n" #: libsylph/mbox.c:359 #, c-format msgid "can't unlock %s\n" msgstr "ne morem odkleniti %s\n" #: libsylph/mbox.c:394 msgid "can't truncate mailbox to zero.\n" msgstr "ne morem prisekati poštnega predala na ničlo.\n" #: libsylph/mbox.c:418 #, c-format msgid "Exporting messages from %s into %s...\n" msgstr "Izvažam sporočila iz %s v %s...\n" #: libsylph/mh.c:427 #, c-format msgid "can't copy message %s to %s\n" msgstr "ne morem prepisati sporočila %s v %s\n" #: libsylph/mh.c:502 libsylph/mh.c:625 msgid "Can't open mark file.\n" msgstr "Ne morem odpreti označene datoteke.\n" #: libsylph/mh.c:509 libsylph/mh.c:631 msgid "the src folder is identical to the dest.\n" msgstr "Izvorna mapa je identična ciljni.\n" #: libsylph/mh.c:634 #, c-format msgid "Copying message %s%c%d to %s ...\n" msgstr "Kopiram sporočilo %s%c%d v %s ...\n" #: libsylph/mh.c:965 libsylph/mh.c:978 #, c-format msgid "" "File `%s' already exists.\n" "Can't create folder." msgstr "" "Datoteka `%s' že obstaja.\n" "Ne morem narediti imenika." #: libsylph/mh.c:1500 #, c-format msgid "" "Directory name\n" "'%s' is not a valid UTF-8 string.\n" "Maybe the locale encoding is used for filename.\n" "If that is the case, you must set the following environmental variable\n" "(see README for detail):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" msgstr "" #: libsylph/news.c:207 #, c-format msgid "creating NNTP connection to %s:%d ...\n" msgstr "ustvarjam povezavo NNTP do %s:%d ...\n" #: libsylph/news.c:276 #, c-format msgid "NNTP connection to %s:%d has been disconnected. Reconnecting...\n" msgstr "Povezava NNTP do %s:%d je bila prekinjena. Povezujem se znova...\n" #: libsylph/news.c:377 #, c-format msgid "article %d has been already cached.\n" msgstr "članek %d je že v predpomnilniku.\n" #: libsylph/news.c:397 #, c-format msgid "getting article %d...\n" msgstr "sprejemam članek %d...\n" #: libsylph/news.c:401 #, c-format msgid "can't read article %d\n" msgstr "ne morem prebrati članka %d\n" #: libsylph/news.c:676 msgid "can't post article.\n" msgstr "ne morem poslati članka.\n" #: libsylph/news.c:702 #, c-format msgid "can't retrieve article %d\n" msgstr "ne morem sprejeti članka %d\n" #: libsylph/news.c:759 #, fuzzy, c-format msgid "can't select group: %s\n" msgstr "ne morem izbrati skupine %s\n" #: libsylph/news.c:796 #, c-format msgid "invalid article range: %d - %d\n" msgstr "neveljavno območje člankov: %d - %d\n" #: libsylph/news.c:809 msgid "no new articles.\n" msgstr "ni novih člankov.\n" #: libsylph/news.c:819 #, c-format msgid "getting xover %d - %d in %s...\n" msgstr "sprejemam xover %d - %d v %s...\n" #: libsylph/news.c:823 msgid "can't get xover\n" msgstr "ne morem prejeti xoverja\n" #: libsylph/news.c:833 msgid "error occurred while getting xover.\n" msgstr "med prejemanjem xoverja je prišlo do napake.\n" #: libsylph/news.c:843 #, c-format msgid "invalid xover line: %s\n" msgstr "neveljavna vrstica xover: %s\n" #: libsylph/news.c:862 libsylph/news.c:894 msgid "can't get xhdr\n" msgstr "ne morem prejeti xhdr-ja\n" #: libsylph/news.c:874 libsylph/news.c:906 msgid "error occurred while getting xhdr.\n" msgstr "med prejemanjem xhdr-ja je prišlo do napake.\n" #: libsylph/nntp.c:68 #, c-format msgid "Can't connect to NNTP server: %s:%d\n" msgstr "Ne morem se povezati s strežnikom NNTP: %s:%d\n" #: libsylph/nntp.c:164 libsylph/nntp.c:227 #, c-format msgid "protocol error: %s\n" msgstr "napaka v protokolu: %s\n" #: libsylph/nntp.c:187 libsylph/nntp.c:233 msgid "protocol error\n" msgstr "napaka v protokolu\n" #: libsylph/nntp.c:283 msgid "Error occurred while posting\n" msgstr "Med pošiljanjem je prišlo do napake\n" #: libsylph/nntp.c:363 #, fuzzy msgid "Error occurred while sending command\n" msgstr "Med obdelavo pošte je prišlo do napake." #: libsylph/pop.c:155 msgid "Required APOP timestamp not found in greeting\n" msgstr "V pozdravu ni bila najdena zahtevana časovna značka APOP\n" #: libsylph/pop.c:162 msgid "Timestamp syntax error in greeting\n" msgstr "Skladenjska napaka časovne značke v pozdravu\n" #: libsylph/pop.c:170 #, fuzzy msgid "Invalid timestamp in greeting\n" msgstr "V pozdravu ni bila najdena zahtevana časovna značka APOP\n" #: libsylph/pop.c:198 libsylph/pop.c:225 msgid "POP3 protocol error\n" msgstr "Napaka v protokolu POP3\n" #: libsylph/pop.c:270 #, fuzzy, c-format msgid "invalid UIDL response: %s\n" msgstr "neveljavna vrstica xover: %s\n" #: libsylph/pop.c:631 #, c-format msgid "POP3: Deleting expired message %d\n" msgstr "POP3: brišem poteklo sporočilo %d\n" #: libsylph/pop.c:640 #, c-format msgid "POP3: Skipping message %d (%d bytes)\n" msgstr "POP3: Izpuščam sporočilo %d (%d zlogov)\n" #: libsylph/pop.c:673 msgid "mailbox is locked\n" msgstr "poštni predal je zaklenjen\n" #: libsylph/pop.c:676 msgid "session timeout\n" msgstr "" #: libsylph/pop.c:682 libsylph/smtp.c:561 msgid "can't start TLS session\n" msgstr "ne morem pričeti seje TLS\n" #: libsylph/pop.c:689 libsylph/smtp.c:496 msgid "error occurred on authentication\n" msgstr "Med preverjanjem istovetnosti je prišlo do napake\n" #: libsylph/pop.c:694 #, fuzzy msgid "command not supported\n" msgstr "Ukaz" #: libsylph/pop.c:698 #, fuzzy msgid "error occurred on POP3 session\n" msgstr "Med preverjanjem istovetnosti je prišlo do napake\n" #: libsylph/prefs.c:196 libsylph/prefs.c:224 libsylph/prefs.c:269 #: libsylph/prefs_account.c:217 libsylph/prefs_account.c:231 msgid "failed to write configuration to file\n" msgstr "neuspešen poskus zapisa konfiguracije v datoteko\n" #: libsylph/prefs.c:239 #, c-format msgid "Found %s\n" msgstr "Najden %s\n" #: libsylph/prefs.c:272 msgid "Configuration is saved.\n" msgstr "Konfiguracija je shranjena.\n" #: libsylph/prefs_common.c:503 #, fuzzy msgid "Junk mail filter (manual)" msgstr "Mapa" #: libsylph/prefs_common.c:506 #, fuzzy msgid "Junk mail filter" msgstr "Mapa" #: libsylph/procmime.c:1142 msgid "procmime_get_text_content(): Code conversion failed.\n" msgstr "procmime_get_text_content(): Pretvorba kodiranja ni uspela.\n" #: libsylph/procmsg.c:655 msgid "can't open mark file\n" msgstr "Ne morem odpreti datoteke z oznakami.\n" #: libsylph/procmsg.c:1107 #, c-format msgid "can't fetch message %d\n" msgstr "ne morem prenesti sporočila %d\n" #: libsylph/procmsg.c:1423 #, c-format msgid "Print command line is invalid: `%s'\n" msgstr "Ukazna vrstica za tiskanje ni veljavna: `%s'\n" #: libsylph/recv.c:141 msgid "error occurred while retrieving data.\n" msgstr "med popravljanjem podatkov je prišlo do napake.\n" #: libsylph/recv.c:183 libsylph/recv.c:215 libsylph/recv.c:230 msgid "Can't write to file.\n" msgstr "Ne morem pisati v datoteko.\n" #: libsylph/smtp.c:157 msgid "SMTP AUTH not available\n" msgstr "SMTP AUTH ni na razpolago\n" #: libsylph/smtp.c:466 libsylph/smtp.c:516 msgid "bad SMTP response\n" msgstr "" #: libsylph/smtp.c:487 libsylph/smtp.c:505 libsylph/smtp.c:602 #, fuzzy msgid "error occurred on SMTP session\n" msgstr "Med preverjanjem istovetnosti je prišlo do napake\n" #: libsylph/ssl.c:54 msgid "SSLv23 not available\n" msgstr "SSLv23 ni na razpolago\n" #: libsylph/ssl.c:56 msgid "SSLv23 available\n" msgstr "SSLv23 je na razpolago\n" #: libsylph/ssl.c:65 msgid "TLSv1 not available\n" msgstr "TLSv1 ni na razpolago\n" #: libsylph/ssl.c:67 msgid "TLSv1 available\n" msgstr "TLSv1 je na razpolago\n" #: libsylph/ssl.c:101 libsylph/ssl.c:108 msgid "SSL method not available\n" msgstr "Metoda SSL ni na razpolago\n" #: libsylph/ssl.c:114 msgid "Unknown SSL method *PROGRAM BUG*\n" msgstr "Neznana metoda SSL *PROGRAM BUG*\n" #: libsylph/ssl.c:120 msgid "Error creating ssl context\n" msgstr "Napaka pri ustvarjanju konteksta ssl\n" #. Get the cipher #: libsylph/ssl.c:139 #, c-format msgid "SSL connection using %s\n" msgstr "Povezava SSL z uporabo %s\n" #: libsylph/ssl.c:148 msgid "Server certificate:\n" msgstr "Certifikat strežnika:\n" #: libsylph/ssl.c:151 #, c-format msgid " Subject: %s\n" msgstr " Zadeva: %s\n" #: libsylph/ssl.c:156 #, c-format msgid " Issuer: %s\n" msgstr " Izdajatelj: %s\n" #: libsylph/utils.c:2682 libsylph/utils.c:2804 #, c-format msgid "writing to %s failed.\n" msgstr "pisanje v %s ni uspelo.\n" #~ msgid "can't change file mode\n" #~ msgstr "Ne morem spremeniti pravic do dostopa do datoteke\n" libsylph-1.1.0/po/sr.po0000644000175000017500000003603110756432605011675 00000000000000# Serbian translation of Sylpheed. # Copyright (C) 2002 Free Software Foundation, Inc. # garret , 2002. # msgid "" msgstr "" "Project-Id-Version: sylpheed\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-02-19 10:48+0900\n" "PO-Revision-Date: 2002-11-29 21:08+0100\n" "Last-Translator: garret \n" "Language-Team: Serbian\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 0.9.6\n" #: libsylph/account.c:56 msgid "Reading all config for each account...\n" msgstr "Čitanje konfiguracije za svaki nalog...\n" #: libsylph/imap.c:465 #, fuzzy, c-format msgid "IMAP4 connection to %s has been disconnected. Reconnecting...\n" msgstr "IMAP4 veza prema %s:%d je pukla. Povezujem se ponovo...\n" #: libsylph/imap.c:520 libsylph/imap.c:526 #, fuzzy msgid "IMAP4 server disables LOGIN.\n" msgstr "Direktorijum IMAP servera" #: libsylph/imap.c:602 #, c-format msgid "creating IMAP4 connection to %s:%d ...\n" msgstr "ostvarujem IMAP4 vezu prema %s:%d ...\n" #: libsylph/imap.c:646 msgid "Can't start TLS session.\n" msgstr "Ne mogu pokrenuti TLS sesiju.\n" #: libsylph/imap.c:1120 #, fuzzy, c-format msgid "Getting message %d" msgstr "Brišem poruke %d" #: libsylph/imap.c:1236 #, fuzzy, c-format msgid "Appending messages to %s (%d / %d)" msgstr "Šaljem poruku (%d / %d bajtova)" #: libsylph/imap.c:1328 #, fuzzy, c-format msgid "Moving messages %s to %s ..." msgstr "Pomeram poruke %s%c%d u %s ...\n" #: libsylph/imap.c:1334 #, fuzzy, c-format msgid "Copying messages %s to %s ..." msgstr "Kopiram poruke %s%c%d u %s ...\n" #: libsylph/imap.c:1473 #, fuzzy, c-format msgid "Removing messages %s" msgstr "Primam poruke sa %s u %s...\n" #: libsylph/imap.c:1479 #, fuzzy, c-format msgid "can't set deleted flags: %s\n" msgstr "ne mogu postaviti obrisane oznake: %d\n" #: libsylph/imap.c:1487 libsylph/imap.c:1582 msgid "can't expunge\n" msgstr "ne mogu obrisati\n" #: libsylph/imap.c:1570 #, fuzzy, c-format msgid "Removing all messages in %s" msgstr "Primam poruke sa %s u %s...\n" #: libsylph/imap.c:1576 #, fuzzy msgid "can't set deleted flags: 1:*\n" msgstr "ne mogu postaviti obrisane oznake: 1:%d\n" #: libsylph/imap.c:1624 #, fuzzy msgid "can't close folder\n" msgstr "ne mogu odabrati direktorijum: %s\n" #: libsylph/imap.c:1702 #, fuzzy, c-format msgid "root folder %s not exist\n" msgstr "Označena datoteka ne postoji.\n" #: libsylph/imap.c:1891 libsylph/imap.c:1899 #, fuzzy msgid "error occurred while getting LIST.\n" msgstr "došlo je do greške prilikom dohvatanja LISTe.\n" #: libsylph/imap.c:2013 #, c-format msgid "Can't create '%s'\n" msgstr "ne mogu kreirati '%s'\n" #: libsylph/imap.c:2018 #, c-format msgid "Can't create '%s' under INBOX\n" msgstr "ne mogu kreirati '%s' ispod INBOX\n" #: libsylph/imap.c:2079 msgid "can't create mailbox: LIST failed\n" msgstr "ne mogu kreirati sanduče: LIST nije uspeo\n" #: libsylph/imap.c:2099 msgid "can't create mailbox\n" msgstr "ne mogu kreirati sanduče\n" #: libsylph/imap.c:2203 #, c-format msgid "can't rename mailbox: %s to %s\n" msgstr "ne mogu promeniti ime sandučeta %s u %s\n" #: libsylph/imap.c:2283 msgid "can't delete mailbox\n" msgstr "ne mogu obrisati sanduče\n" #: libsylph/imap.c:2327 msgid "can't get envelope\n" msgstr "ne mogu dobiti omot\n" #: libsylph/imap.c:2340 #, fuzzy, c-format msgid "Getting message headers (%d / %d)" msgstr "Šaljem poruku (%d / %d bajtova)" #: libsylph/imap.c:2350 msgid "error occurred while getting envelope.\n" msgstr "došlo je do greške prilikom dobijanja omota.\n" #: libsylph/imap.c:2372 #, c-format msgid "can't parse envelope: %s\n" msgstr "ne mogu analizirati omot: %s\n" #: libsylph/imap.c:2496 #, c-format msgid "Can't connect to IMAP4 server: %s:%d\n" msgstr "Ne mogu se povezati sa IMAP4 serverom: %s:%d\n" #: libsylph/imap.c:2503 #, c-format msgid "Can't establish IMAP4 session with: %s:%d\n" msgstr "Ne mogu se povezati s IMAP4 serverom: %s:%d\n" #: libsylph/imap.c:2578 msgid "can't get namespace\n" msgstr "ne mogu dobiti namespace\n" #: libsylph/imap.c:3111 #, c-format msgid "can't select folder: %s\n" msgstr "ne mogu odabrati direktorijum: %s\n" #: libsylph/imap.c:3146 #, fuzzy msgid "error on imap command: STATUS\n" msgstr "greška prilikom imap naredbe: EXPUNGE\n" #: libsylph/imap.c:3269 libsylph/imap.c:3304 #, fuzzy msgid "IMAP4 authentication failed.\n" msgstr "Način provere identieta" #: libsylph/imap.c:3353 msgid "IMAP4 login failed.\n" msgstr "IMAP4 login nije uspeo.\n" #: libsylph/imap.c:3689 #, c-format msgid "can't append %s to %s\n" msgstr "ne mogu dodati %s na %s\n" #: libsylph/imap.c:3696 msgid "(sending file...)" msgstr "(šaljem datoteku...)" #: libsylph/imap.c:3725 #, fuzzy, c-format msgid "can't append message to %s\n" msgstr "ne mogu dodati poruku %s\n" #: libsylph/imap.c:3757 #, fuzzy, c-format msgid "can't copy %s to %s\n" msgstr "ne mogu kopirati %d u %s\n" #: libsylph/imap.c:3781 #, fuzzy, c-format msgid "error while imap command: STORE %s %s\n" msgstr "grečka prilikom imap naredbe: STORE %d:%d %s\n" #: libsylph/imap.c:3795 msgid "error while imap command: EXPUNGE\n" msgstr "greška prilikom imap naredbe: EXPUNGE\n" #: libsylph/imap.c:3808 #, fuzzy msgid "error while imap command: CLOSE\n" msgstr "greška prilikom imap naredbe: EXPUNGE\n" #: libsylph/imap.c:4084 #, c-format msgid "iconv cannot convert UTF-7 to %s\n" msgstr "iconv ne može prebaciti UTF-7 to %s\n" #: libsylph/imap.c:4114 #, c-format msgid "iconv cannot convert %s to UTF-7\n" msgstr "iconv ne može prebaciti %s to UTF-7\n" #: libsylph/mbox.c:50 libsylph/mbox.c:196 msgid "can't write to temporary file\n" msgstr "ne mogu pisati u privremenu datoteku\n" #: libsylph/mbox.c:69 #, c-format msgid "Getting messages from %s into %s...\n" msgstr "Primam poruke sa %s u %s...\n" #: libsylph/mbox.c:79 msgid "can't read mbox file.\n" msgstr "ne mogu čitati mbox datoteku.\n" #: libsylph/mbox.c:86 #, c-format msgid "invalid mbox format: %s\n" msgstr "pogrešan mbox format: %s\n" #: libsylph/mbox.c:93 #, c-format msgid "malformed mbox: %s\n" msgstr "pokvaren mbox: %s\n" #: libsylph/mbox.c:110 msgid "can't open temporary file\n" msgstr "ne mogu otvoriti privremenu datoteku\n" #: libsylph/mbox.c:161 #, c-format msgid "" "unescaped From found:\n" "%s" msgstr "" "neizbežan Od pronađen:\n" "%s" #: libsylph/mbox.c:250 #, c-format msgid "%d messages found.\n" msgstr "%d poruka pronađeno.\n" #: libsylph/mbox.c:268 #, c-format msgid "can't create lock file %s\n" msgstr "ne mogu napraviti zaključanu datoteku %s\n" #: libsylph/mbox.c:269 msgid "use 'flock' instead of 'file' if possible.\n" msgstr "koristi 'flock' umesto 'file' ako je moguće.\n" #: libsylph/mbox.c:281 #, c-format msgid "can't create %s\n" msgstr "ne mogu napraviti %s\n" #: libsylph/mbox.c:287 msgid "mailbox is owned by another process, waiting...\n" msgstr "neki drugi proces koristi sanduče, čekam...\n" #: libsylph/mbox.c:316 #, c-format msgid "can't lock %s\n" msgstr "ne mogu zaključati %s\n" #: libsylph/mbox.c:323 libsylph/mbox.c:373 msgid "invalid lock type\n" msgstr "neispravan tip zaključavanja\n" #: libsylph/mbox.c:359 #, c-format msgid "can't unlock %s\n" msgstr "ne mogu otključati %s\n" #: libsylph/mbox.c:394 msgid "can't truncate mailbox to zero.\n" msgstr "ne mogu skratiti sanduče na nulu.\n" #: libsylph/mbox.c:418 #, c-format msgid "Exporting messages from %s into %s...\n" msgstr "Izvozim poruke iz %s u %s...\n" #: libsylph/mh.c:427 #, c-format msgid "can't copy message %s to %s\n" msgstr "ne mogu kopirati poruku %s u %s\n" #: libsylph/mh.c:502 libsylph/mh.c:625 msgid "Can't open mark file.\n" msgstr "Ne mogu otvoriti označenu datoteku.\n" #: libsylph/mh.c:509 libsylph/mh.c:631 msgid "the src folder is identical to the dest.\n" msgstr "izvorni direktorijum jednak je destinaciji.\n" #: libsylph/mh.c:634 #, c-format msgid "Copying message %s%c%d to %s ...\n" msgstr "Kopiram poruke %s%c%d u %s ...\n" #: libsylph/mh.c:965 libsylph/mh.c:978 #, c-format msgid "" "File `%s' already exists.\n" "Can't create folder." msgstr "" "Datoteka `%s' već postoji.\n" "Ne mogu napraviti direktorijum." #: libsylph/mh.c:1500 #, c-format msgid "" "Directory name\n" "'%s' is not a valid UTF-8 string.\n" "Maybe the locale encoding is used for filename.\n" "If that is the case, you must set the following environmental variable\n" "(see README for detail):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" msgstr "" #: libsylph/news.c:207 #, c-format msgid "creating NNTP connection to %s:%d ...\n" msgstr "uspostavljam NNTP vezu sa %s:%d ...\n" #: libsylph/news.c:276 #, c-format msgid "NNTP connection to %s:%d has been disconnected. Reconnecting...\n" msgstr "NNTP veza sa %s:%d je prekinuta. Povezujem se ponovo...\n" #: libsylph/news.c:377 #, c-format msgid "article %d has been already cached.\n" msgstr "članak %d već je pohranjen.\n" #: libsylph/news.c:397 #, c-format msgid "getting article %d...\n" msgstr "primam članak %d...\n" #: libsylph/news.c:401 #, c-format msgid "can't read article %d\n" msgstr "ne mogu pročitati članak %d\n" #: libsylph/news.c:676 msgid "can't post article.\n" msgstr "ne mogu poslati članak.\n" #: libsylph/news.c:702 #, c-format msgid "can't retrieve article %d\n" msgstr "ne mogu primiti članak %d\n" #: libsylph/news.c:759 #, fuzzy, c-format msgid "can't select group: %s\n" msgstr "ne mogu odabrati grupu %s\n" #: libsylph/news.c:796 #, c-format msgid "invalid article range: %d - %d\n" msgstr "pogrešan opseg članaka: %d - %d\n" #: libsylph/news.c:809 msgid "no new articles.\n" msgstr "nema novih članaka.\n" #: libsylph/news.c:819 #, c-format msgid "getting xover %d - %d in %s...\n" msgstr "primam xover %d - %d u %s...\n" #: libsylph/news.c:823 msgid "can't get xover\n" msgstr "ne mogu primiti xover\n" #: libsylph/news.c:833 msgid "error occurred while getting xover.\n" msgstr "došlo je do greške prilikom primanja xovera.\n" #: libsylph/news.c:843 #, c-format msgid "invalid xover line: %s\n" msgstr "pogrešna xover linija: %s\n" #: libsylph/news.c:862 libsylph/news.c:894 msgid "can't get xhdr\n" msgstr "ne mogu dobiti xhdr\n" #: libsylph/news.c:874 libsylph/news.c:906 msgid "error occurred while getting xhdr.\n" msgstr "došlo je do greške prilikom primanja xhdra.\n" #: libsylph/nntp.c:68 #, c-format msgid "Can't connect to NNTP server: %s:%d\n" msgstr "Ne mogu uspostaviti vezu sa NNTP serverom: %s:%d\n" #: libsylph/nntp.c:164 libsylph/nntp.c:227 #, c-format msgid "protocol error: %s\n" msgstr "protokol greška: %s\n" #: libsylph/nntp.c:187 libsylph/nntp.c:233 msgid "protocol error\n" msgstr "protokol greška\n" #: libsylph/nntp.c:283 msgid "Error occurred while posting\n" msgstr "Došlo je do greške prilikom slanja\n" #: libsylph/nntp.c:363 #, fuzzy msgid "Error occurred while sending command\n" msgstr "Došlo je do greške pri radu s poštom." #: libsylph/pop.c:155 msgid "Required APOP timestamp not found in greeting\n" msgstr "Potrebni APOP timestamp nije pronađen u pozdravu\n" #: libsylph/pop.c:162 msgid "Timestamp syntax error in greeting\n" msgstr "Syntax greška u timestampu kod pozdrava\n" #: libsylph/pop.c:170 #, fuzzy msgid "Invalid timestamp in greeting\n" msgstr "Potrebni APOP timestamp nije pronađen u pozdravu\n" #: libsylph/pop.c:198 libsylph/pop.c:225 msgid "POP3 protocol error\n" msgstr "greška POP3 protokola \n" #: libsylph/pop.c:270 #, fuzzy, c-format msgid "invalid UIDL response: %s\n" msgstr "pogrešna xover linija: %s\n" #: libsylph/pop.c:631 #, c-format msgid "POP3: Deleting expired message %d\n" msgstr "POP3: Brianje pouka koje su istekle %d\n" #: libsylph/pop.c:640 #, c-format msgid "POP3: Skipping message %d (%d bytes)\n" msgstr "POP3: Preskakanje poruke %d (%d byte-ova)\n" #: libsylph/pop.c:673 msgid "mailbox is locked\n" msgstr "sanduče je zaključano\n" #: libsylph/pop.c:676 msgid "session timeout\n" msgstr "" #: libsylph/pop.c:682 libsylph/smtp.c:561 msgid "can't start TLS session\n" msgstr "ne mogu pokrenuti TLS sesiju\n" #: libsylph/pop.c:689 libsylph/smtp.c:496 msgid "error occurred on authentication\n" msgstr "greška prilikom provere identiteta\n" #: libsylph/pop.c:694 #, fuzzy msgid "command not supported\n" msgstr "Naredba" #: libsylph/pop.c:698 #, fuzzy msgid "error occurred on POP3 session\n" msgstr "greška prilikom provere identiteta\n" #: libsylph/prefs.c:196 libsylph/prefs.c:224 libsylph/prefs.c:269 #: libsylph/prefs_account.c:217 libsylph/prefs_account.c:231 msgid "failed to write configuration to file\n" msgstr "neuspeh pri pisanju konfiguracije u datoteku\n" #: libsylph/prefs.c:239 #, c-format msgid "Found %s\n" msgstr "Pronađeno %s\n" #: libsylph/prefs.c:272 msgid "Configuration is saved.\n" msgstr "Konfiguracija je spremljena.\n" #: libsylph/prefs_common.c:503 #, fuzzy msgid "Junk mail filter (manual)" msgstr "Direktorijum" #: libsylph/prefs_common.c:506 #, fuzzy msgid "Junk mail filter" msgstr "Direktorijum" #: libsylph/procmime.c:1142 msgid "procmime_get_text_content(): Code conversion failed.\n" msgstr "procmime_get_text_content(): Promena koda nije uspjela.\n" #: libsylph/procmsg.c:655 msgid "can't open mark file\n" msgstr "ne mogu otvoriti obeleženu datoteku\n" #: libsylph/procmsg.c:1107 #, c-format msgid "can't fetch message %d\n" msgstr "ne mogu dohvatiti poruku %d\n" #: libsylph/procmsg.c:1423 #, c-format msgid "Print command line is invalid: `%s'\n" msgstr "Naredba za štampanje nije dobra: `%s'\n" #: libsylph/recv.c:141 msgid "error occurred while retrieving data.\n" msgstr "došlo je do greške prilikom dohvatanja podataka.\n" #: libsylph/recv.c:183 libsylph/recv.c:215 libsylph/recv.c:230 msgid "Can't write to file.\n" msgstr "Ne mogu pisati u datoteku.\n" #: libsylph/smtp.c:157 msgid "SMTP AUTH not available\n" msgstr "SMTP AUTH nije dostupan\n" #: libsylph/smtp.c:466 libsylph/smtp.c:516 msgid "bad SMTP response\n" msgstr "" #: libsylph/smtp.c:487 libsylph/smtp.c:505 libsylph/smtp.c:602 #, fuzzy msgid "error occurred on SMTP session\n" msgstr "greška prilikom provere identiteta\n" #: libsylph/ssl.c:54 msgid "SSLv23 not available\n" msgstr "SSLv23 nije dostupan\n" #: libsylph/ssl.c:56 msgid "SSLv23 available\n" msgstr "SSLv23 dostupan\n" #: libsylph/ssl.c:65 msgid "TLSv1 not available\n" msgstr "TLSv1 nije dostupan\n" #: libsylph/ssl.c:67 msgid "TLSv1 available\n" msgstr "TLSv1 dostupan\n" #: libsylph/ssl.c:101 libsylph/ssl.c:108 msgid "SSL method not available\n" msgstr "SSL metod nije dostupna\n" #: libsylph/ssl.c:114 msgid "Unknown SSL method *PROGRAM BUG*\n" msgstr "Nepoznat SSL metod *BUG PROGRAMA*\n" #: libsylph/ssl.c:120 msgid "Error creating ssl context\n" msgstr "Greška pri kreiranju ssl konteksta\n" #. Get the cipher #: libsylph/ssl.c:139 #, c-format msgid "SSL connection using %s\n" msgstr "SSL veza koristeći %s\n" #: libsylph/ssl.c:148 msgid "Server certificate:\n" msgstr "Sertifikat servera:\n" #: libsylph/ssl.c:151 #, c-format msgid " Subject: %s\n" msgstr " Tema: %s\n" #: libsylph/ssl.c:156 #, c-format msgid " Issuer: %s\n" msgstr " Izdavač: %s\n" #: libsylph/utils.c:2682 libsylph/utils.c:2804 #, c-format msgid "writing to %s failed.\n" msgstr "pisanje u %s nije uspelo.\n" #~ msgid "can't change file mode\n" #~ msgstr "ne mogu promeniti atribut datoteke\n" libsylph-1.1.0/po/sv.po0000644000175000017500000003617010756432605011705 00000000000000# Swedish translation of Sylpheed # Copyright (C) 2001 Joakim Andreasson # Joakim Andreasson , 2001 # Mattias Ostergren , 2004 # Roger Lindmark , 2005 msgid "" msgstr "" "Project-Id-Version: sylpheed\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-02-19 10:48+0900\n" "PO-Revision-Date: 2004-12-05 14:40+0100\n" "Last-Translator: Roger Lindmark \n" "Language-Team: Swedish \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: libsylph/account.c:56 msgid "Reading all config for each account...\n" msgstr "Läser all konfiguration för varje konto...\n" #: libsylph/imap.c:465 #, c-format msgid "IMAP4 connection to %s has been disconnected. Reconnecting...\n" msgstr "IMAP4-förbindelse till %s har avbrutits. Återuppkopplar...\n" #: libsylph/imap.c:520 libsylph/imap.c:526 msgid "IMAP4 server disables LOGIN.\n" msgstr "IMAP-server stänger av LOGIN.\n" #: libsylph/imap.c:602 #, c-format msgid "creating IMAP4 connection to %s:%d ...\n" msgstr "skapar IMAP4-förbindelse till %s:%d...\n" #: libsylph/imap.c:646 msgid "Can't start TLS session.\n" msgstr "Kan inte starta TLS-session.\n" #: libsylph/imap.c:1120 #, c-format msgid "Getting message %d" msgstr "Hämtar meddelande %d" #: libsylph/imap.c:1236 #, c-format msgid "Appending messages to %s (%d / %d)" msgstr "Lägger till meddelande till %s (%d / %d)" #: libsylph/imap.c:1328 #, c-format msgid "Moving messages %s to %s ..." msgstr "Flyttar meddelande %s till %s..." #: libsylph/imap.c:1334 #, c-format msgid "Copying messages %s to %s ..." msgstr "Kopierar meddelanden %s till %s..." #: libsylph/imap.c:1473 #, c-format msgid "Removing messages %s" msgstr "Tar bort meddelanden %s" #: libsylph/imap.c:1479 #, c-format msgid "can't set deleted flags: %s\n" msgstr "kan inte sätta borttaget-flaggor: %s\n" #: libsylph/imap.c:1487 libsylph/imap.c:1582 msgid "can't expunge\n" msgstr "kan inte utplåna\n" #: libsylph/imap.c:1570 #, c-format msgid "Removing all messages in %s" msgstr "Tar bort alla meddelanden i %s" #: libsylph/imap.c:1576 msgid "can't set deleted flags: 1:*\n" msgstr "kan inte sätta borttaget-flaggor: 1:*\n" #: libsylph/imap.c:1624 msgid "can't close folder\n" msgstr "kan inte stänga mapp\n" #: libsylph/imap.c:1702 #, c-format msgid "root folder %s not exist\n" msgstr "rotmapp %s finns inte\n" #: libsylph/imap.c:1891 libsylph/imap.c:1899 msgid "error occurred while getting LIST.\n" msgstr "fel uppstod vid hämtning av LIST.\n" #: libsylph/imap.c:2013 #, c-format msgid "Can't create '%s'\n" msgstr "Kan inte skapa \"%s\"\n" #: libsylph/imap.c:2018 #, c-format msgid "Can't create '%s' under INBOX\n" msgstr "kan inte skapa \"%s\" under INBOX\n" #: libsylph/imap.c:2079 msgid "can't create mailbox: LIST failed\n" msgstr "kan inte skapa brevlåda: LIST misslyckades\n" #: libsylph/imap.c:2099 msgid "can't create mailbox\n" msgstr "kan inte skapa brevlåda\n" #: libsylph/imap.c:2203 #, c-format msgid "can't rename mailbox: %s to %s\n" msgstr "kan inte byta namn på brevlåda %s till %s\n" #: libsylph/imap.c:2283 msgid "can't delete mailbox\n" msgstr "kan inte ta bort brevlåda\n" #: libsylph/imap.c:2327 msgid "can't get envelope\n" msgstr "kan inte hämta kuvert\n" #: libsylph/imap.c:2340 #, c-format msgid "Getting message headers (%d / %d)" msgstr "Hämtar meddelandehuvuden (%d / %d)" #: libsylph/imap.c:2350 msgid "error occurred while getting envelope.\n" msgstr "fel uppstod vid hämtning av kuvert.\n" #: libsylph/imap.c:2372 #, c-format msgid "can't parse envelope: %s\n" msgstr "kan inte tolka kuvert: %s\n" #: libsylph/imap.c:2496 #, c-format msgid "Can't connect to IMAP4 server: %s:%d\n" msgstr "Kan inte ansluta till IMAP4-server: %s:%d\n" #: libsylph/imap.c:2503 #, c-format msgid "Can't establish IMAP4 session with: %s:%d\n" msgstr "Kan inte skapa IMAP4-session med: %s:%d\n" #: libsylph/imap.c:2578 msgid "can't get namespace\n" msgstr "kan inte hämta namnutrymme\n" #: libsylph/imap.c:3111 #, c-format msgid "can't select folder: %s\n" msgstr "kan inte välja mapp: %s\n" #: libsylph/imap.c:3146 msgid "error on imap command: STATUS\n" msgstr "fel vid imapkommando: STATUS\n" #: libsylph/imap.c:3269 libsylph/imap.c:3304 msgid "IMAP4 authentication failed.\n" msgstr "IMAP4-autentisering misslyckades.\n" #: libsylph/imap.c:3353 msgid "IMAP4 login failed.\n" msgstr "IMAP4-inloggning misslyckades.\n" #: libsylph/imap.c:3689 #, c-format msgid "can't append %s to %s\n" msgstr "kan inte lägga till %s till %s\n" #: libsylph/imap.c:3696 msgid "(sending file...)" msgstr "(skickar fil...)" #: libsylph/imap.c:3725 #, c-format msgid "can't append message to %s\n" msgstr "kan inte lägga till meddelande till %s\n" #: libsylph/imap.c:3757 #, c-format msgid "can't copy %s to %s\n" msgstr "kan inte kopiera %s till %s\n" #: libsylph/imap.c:3781 #, c-format msgid "error while imap command: STORE %s %s\n" msgstr "fel vid imapkommando: STORE %s %s\n" #: libsylph/imap.c:3795 msgid "error while imap command: EXPUNGE\n" msgstr "fel vid imapkommando: EXPUNGE\n" #: libsylph/imap.c:3808 msgid "error while imap command: CLOSE\n" msgstr "fel vid imapkommando: CLOSE\n" #: libsylph/imap.c:4084 #, c-format msgid "iconv cannot convert UTF-7 to %s\n" msgstr "iconv kan inte konvertera UTF-7 till %s\n" #: libsylph/imap.c:4114 #, c-format msgid "iconv cannot convert %s to UTF-7\n" msgstr "iconv kan inte konvertera %s till UTF-7\n" #: libsylph/mbox.c:50 libsylph/mbox.c:196 msgid "can't write to temporary file\n" msgstr "kan inte skriva till temporär fil\n" #: libsylph/mbox.c:69 #, c-format msgid "Getting messages from %s into %s...\n" msgstr "Hämtar meddelanden från %s till %s...\n" #: libsylph/mbox.c:79 msgid "can't read mbox file.\n" msgstr "kan inte läsa mboxfil.\n" #: libsylph/mbox.c:86 #, c-format msgid "invalid mbox format: %s\n" msgstr "felaktigt mboxformat: %s\n" #: libsylph/mbox.c:93 #, c-format msgid "malformed mbox: %s\n" msgstr "felformad mbox: %s\n" #: libsylph/mbox.c:110 msgid "can't open temporary file\n" msgstr "kan inte öppna temporär fil\n" #: libsylph/mbox.c:161 #, c-format msgid "" "unescaped From found:\n" "%s" msgstr "" "o-esc:at Från-fält funnet:\n" "%s" #: libsylph/mbox.c:250 #, c-format msgid "%d messages found.\n" msgstr "%d meddelanden funna.\n" #: libsylph/mbox.c:268 #, c-format msgid "can't create lock file %s\n" msgstr "kan inte skapa låsfil %s\n" #: libsylph/mbox.c:269 msgid "use 'flock' instead of 'file' if possible.\n" msgstr "använd \"flock\" istället för \"file\" om möjligt.\n" #: libsylph/mbox.c:281 #, c-format msgid "can't create %s\n" msgstr "kan inte skapa %s\n" #: libsylph/mbox.c:287 msgid "mailbox is owned by another process, waiting...\n" msgstr "brevlådan ägs av en annan process, väntar...\n" #: libsylph/mbox.c:316 #, c-format msgid "can't lock %s\n" msgstr "kan inte låsa %s\n" #: libsylph/mbox.c:323 libsylph/mbox.c:373 msgid "invalid lock type\n" msgstr "felaktig låstyp\n" #: libsylph/mbox.c:359 #, c-format msgid "can't unlock %s\n" msgstr "kan inte låsa upp %s\n" #: libsylph/mbox.c:394 msgid "can't truncate mailbox to zero.\n" msgstr "kan inte korta av brevlåda till noll.\n" #: libsylph/mbox.c:418 #, c-format msgid "Exporting messages from %s into %s...\n" msgstr "Exporterar meddelanden från %s till %s...\n" #: libsylph/mh.c:427 #, c-format msgid "can't copy message %s to %s\n" msgstr "kan inte kopiera meddelande %s till %s\n" #: libsylph/mh.c:502 libsylph/mh.c:625 msgid "Can't open mark file.\n" msgstr "Kan inte öppna markeringsfil.\n" #: libsylph/mh.c:509 libsylph/mh.c:631 msgid "the src folder is identical to the dest.\n" msgstr "ursprungsmappen är identisk med dest.\n" #: libsylph/mh.c:634 #, c-format msgid "Copying message %s%c%d to %s ...\n" msgstr "Kopierar meddelande %s%c%d till %s...\n" #: libsylph/mh.c:965 libsylph/mh.c:978 #, c-format msgid "" "File `%s' already exists.\n" "Can't create folder." msgstr "" "Filen \"%s\" finns redan.\n" "Kan inte skapa mapp." #: libsylph/mh.c:1500 #, c-format msgid "" "Directory name\n" "'%s' is not a valid UTF-8 string.\n" "Maybe the locale encoding is used for filename.\n" "If that is the case, you must set the following environmental variable\n" "(see README for detail):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" msgstr "" "Katalognamn\n" "'%s' är inte en giltig UTF-8 sträng.\n" "Kanske lokala kodningen används för filnamn.\n" "Om detta är fallet, måste du sätta följande miljövariabel\n" "(se README för detalj):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" #: libsylph/news.c:207 #, c-format msgid "creating NNTP connection to %s:%d ...\n" msgstr "skapar NNTP-förbindelse till %s:%d ...\n" #: libsylph/news.c:276 #, c-format msgid "NNTP connection to %s:%d has been disconnected. Reconnecting...\n" msgstr "NNTP-förbindelse till %s:%d har avbrutits. Återuppkopplar...\n" #: libsylph/news.c:377 #, c-format msgid "article %d has been already cached.\n" msgstr "inlägget %d har redan cachats.\n" #: libsylph/news.c:397 #, c-format msgid "getting article %d...\n" msgstr "hämtar inlägg %d...\n" #: libsylph/news.c:401 #, c-format msgid "can't read article %d\n" msgstr "kan inte läsa inlägg %d\n" #: libsylph/news.c:676 msgid "can't post article.\n" msgstr "kan inte posta inlägg.\n" #: libsylph/news.c:702 #, c-format msgid "can't retrieve article %d\n" msgstr "kan inte hämta inlägg %d\n" #: libsylph/news.c:759 #, c-format msgid "can't select group: %s\n" msgstr "kan inte välja grupp %s\n" #: libsylph/news.c:796 #, c-format msgid "invalid article range: %d - %d\n" msgstr "felaktigt inläggsomfång: %d - %d\n" #: libsylph/news.c:809 msgid "no new articles.\n" msgstr "inga nya inlägg.\n" #: libsylph/news.c:819 #, c-format msgid "getting xover %d - %d in %s...\n" msgstr "hämtar xover %d - %d i %s...\n" #: libsylph/news.c:823 msgid "can't get xover\n" msgstr "kan inte hämta xover\n" #: libsylph/news.c:833 msgid "error occurred while getting xover.\n" msgstr "fel uppstod vid hämtning av xover.\n" #: libsylph/news.c:843 #, c-format msgid "invalid xover line: %s\n" msgstr "felaktig xover-rad: %s\n" #: libsylph/news.c:862 libsylph/news.c:894 msgid "can't get xhdr\n" msgstr "kan inte hämta xhdr\n" #: libsylph/news.c:874 libsylph/news.c:906 msgid "error occurred while getting xhdr.\n" msgstr "fel uppstod vid hämtning av xhdr.\n" #: libsylph/nntp.c:68 #, c-format msgid "Can't connect to NNTP server: %s:%d\n" msgstr "Kan inte ansluta till NNTP-server: %s:%d\n" #: libsylph/nntp.c:164 libsylph/nntp.c:227 #, c-format msgid "protocol error: %s\n" msgstr "protokollfel: %s\n" #: libsylph/nntp.c:187 libsylph/nntp.c:233 msgid "protocol error\n" msgstr "protokollfel\n" #: libsylph/nntp.c:283 msgid "Error occurred while posting\n" msgstr "Fel uppstod vid postning\n" #: libsylph/nntp.c:363 msgid "Error occurred while sending command\n" msgstr "Fel uppstod när kommandot skickades\n" #: libsylph/pop.c:155 msgid "Required APOP timestamp not found in greeting\n" msgstr "Nödvändig APOP-tidsmarkering inte funnen i hälsning\n" #: libsylph/pop.c:162 msgid "Timestamp syntax error in greeting\n" msgstr "Syntaxfel på tidsmarkering i hälsning\n" #: libsylph/pop.c:170 #, fuzzy msgid "Invalid timestamp in greeting\n" msgstr "Nödvändig APOP-tidsmarkering inte funnen i hälsning\n" #: libsylph/pop.c:198 libsylph/pop.c:225 msgid "POP3 protocol error\n" msgstr "POP3-protokollfel\n" #: libsylph/pop.c:270 #, c-format msgid "invalid UIDL response: %s\n" msgstr "felaktigt UIDL-svar: %s\n" #: libsylph/pop.c:631 #, c-format msgid "POP3: Deleting expired message %d\n" msgstr "POP3: Tar bort utgånget meddelande %d\n" #: libsylph/pop.c:640 #, c-format msgid "POP3: Skipping message %d (%d bytes)\n" msgstr "POP3: Hoppar över meddelande %d (%d byte)\n" #: libsylph/pop.c:673 msgid "mailbox is locked\n" msgstr "brevlådan är låst\n" #: libsylph/pop.c:676 msgid "session timeout\n" msgstr "sessionens väntetid tog slut\n" #: libsylph/pop.c:682 libsylph/smtp.c:561 msgid "can't start TLS session\n" msgstr "kan inte starta TLS-session\n" #: libsylph/pop.c:689 libsylph/smtp.c:496 msgid "error occurred on authentication\n" msgstr "fel uppstod vid autentisering\n" #: libsylph/pop.c:694 msgid "command not supported\n" msgstr "kommando är inte stött\n" #: libsylph/pop.c:698 msgid "error occurred on POP3 session\n" msgstr "fel uppstod vid POP3-session\n" #: libsylph/prefs.c:196 libsylph/prefs.c:224 libsylph/prefs.c:269 #: libsylph/prefs_account.c:217 libsylph/prefs_account.c:231 msgid "failed to write configuration to file\n" msgstr "misslyckades skriva konfiguration till fil\n" #: libsylph/prefs.c:239 #, c-format msgid "Found %s\n" msgstr "Fann %s\n" #: libsylph/prefs.c:272 msgid "Configuration is saved.\n" msgstr "Konfigurationen är sparad.\n" #: libsylph/prefs_common.c:503 #, fuzzy msgid "Junk mail filter (manual)" msgstr "Skräppostfilter" #: libsylph/prefs_common.c:506 msgid "Junk mail filter" msgstr "Skräppostfilter" #: libsylph/procmime.c:1142 msgid "procmime_get_text_content(): Code conversion failed.\n" msgstr "procmime_get_text_content(): Kodkonvertering misslyckades.\n" #: libsylph/procmsg.c:655 msgid "can't open mark file\n" msgstr "kan inte öppna markeringsfil\n" #: libsylph/procmsg.c:1107 #, c-format msgid "can't fetch message %d\n" msgstr "kan inte hämta meddelande %d\n" #: libsylph/procmsg.c:1423 #, c-format msgid "Print command line is invalid: `%s'\n" msgstr "Utskriftskommando är felaktigt: \"%s\"\n" #: libsylph/recv.c:141 msgid "error occurred while retrieving data.\n" msgstr "fel uppstod vid inhämtning av data.\n" #: libsylph/recv.c:183 libsylph/recv.c:215 libsylph/recv.c:230 msgid "Can't write to file.\n" msgstr "Kan inte skriva till fil.\n" #: libsylph/smtp.c:157 msgid "SMTP AUTH not available\n" msgstr "SMTP AUTH ej tillgängligt\n" #: libsylph/smtp.c:466 libsylph/smtp.c:516 msgid "bad SMTP response\n" msgstr "felaktigt SMTP-svar\n" #: libsylph/smtp.c:487 libsylph/smtp.c:505 libsylph/smtp.c:602 msgid "error occurred on SMTP session\n" msgstr "fel uppstod vid SMTP-session\n" #: libsylph/ssl.c:54 msgid "SSLv23 not available\n" msgstr "SSLv23 ej tillgängligt\n" #: libsylph/ssl.c:56 msgid "SSLv23 available\n" msgstr "SSLv23 tillgängligt\n" #: libsylph/ssl.c:65 msgid "TLSv1 not available\n" msgstr "TLSv1 ej tillgängligt\n" #: libsylph/ssl.c:67 msgid "TLSv1 available\n" msgstr "TLSv1 tillgängligt\n" #: libsylph/ssl.c:101 libsylph/ssl.c:108 msgid "SSL method not available\n" msgstr "SSL-metod ej tillgänglig\n" #: libsylph/ssl.c:114 msgid "Unknown SSL method *PROGRAM BUG*\n" msgstr "Okänd SSL-metod *PROGRAMFEL*\n" #: libsylph/ssl.c:120 msgid "Error creating ssl context\n" msgstr "Fel vid skapande av SSL-kontext\n" #. Get the cipher #: libsylph/ssl.c:139 #, c-format msgid "SSL connection using %s\n" msgstr "SSL-anslutning med %s\n" #: libsylph/ssl.c:148 msgid "Server certificate:\n" msgstr "Servercertifikat:\n" #: libsylph/ssl.c:151 #, c-format msgid " Subject: %s\n" msgstr " Ärende: %s\n" #: libsylph/ssl.c:156 #, c-format msgid " Issuer: %s\n" msgstr " Utfärdare: %s\n" #: libsylph/utils.c:2682 libsylph/utils.c:2804 #, c-format msgid "writing to %s failed.\n" msgstr "skrivning till %s misslyckades.\n" #~ msgid "can't change file mode\n" #~ msgstr "kan inte ändra filrättigheter\n" libsylph-1.1.0/po/tr.po0000644000175000017500000003627710756432605011712 00000000000000# translation of tr.po to # Turkish translation of Sylpheed # Copyright (C) 2001, 2004 Free Software Foundation, Inc. # From 'oh what a po file' # # Edited by # Arman Aksoy (Armish) # Görkem Çetin , 2001-2002. # Arman Aksoy , 2004. msgid "" msgstr "" "Project-Id-Version: tr\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-02-19 10:48+0900\n" "PO-Revision-Date: 2004-12-03 11:44+0200\n" "Last-Translator: Arman Aksoy \n" "Language-Team: \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: KBabel 1.3.1\n" #: libsylph/account.c:56 msgid "Reading all config for each account...\n" msgstr "Her hesap için yapılandırma dosyaları okunuyor...\n" #: libsylph/imap.c:465 #, c-format msgid "IMAP4 connection to %s has been disconnected. Reconnecting...\n" msgstr "%s adresine yapılmış IMAP4 bağlantısı koptu. Yeniden bağlanılıyor...\n" #: libsylph/imap.c:520 libsylph/imap.c:526 #, fuzzy msgid "IMAP4 server disables LOGIN.\n" msgstr "IMAP sunucu dizini" #: libsylph/imap.c:602 #, c-format msgid "creating IMAP4 connection to %s:%d ...\n" msgstr "%s:%d adresine IMAP4 bağlantısı yapılıyor ...\n" #: libsylph/imap.c:646 msgid "Can't start TLS session.\n" msgstr "TLS oturumuna bağlantı kurulamadı.\n" #: libsylph/imap.c:1120 #, fuzzy, c-format msgid "Getting message %d" msgstr "%d. ileti siliniyor" #: libsylph/imap.c:1236 #, fuzzy, c-format msgid "Appending messages to %s (%d / %d)" msgstr "İleti gönderiliyor (%d / %d bayt)" #: libsylph/imap.c:1328 #, fuzzy, c-format msgid "Moving messages %s to %s ..." msgstr "%s%c%d mesajı %s içine kopyalanıyor...\n" #: libsylph/imap.c:1334 #, fuzzy, c-format msgid "Copying messages %s to %s ..." msgstr "%s%c%d mesajı %s içine kopyalanıyor...\n" #: libsylph/imap.c:1473 #, fuzzy, c-format msgid "Removing messages %s" msgstr "%s konumundan iletiler alınıyor..." #: libsylph/imap.c:1479 #, c-format msgid "can't set deleted flags: %s\n" msgstr "silinen işaretler atanamıyor: %s\n" #: libsylph/imap.c:1487 libsylph/imap.c:1582 msgid "can't expunge\n" msgstr "silinemiyor\n" #: libsylph/imap.c:1570 #, fuzzy, c-format msgid "Removing all messages in %s" msgstr "%s konumundan iletiler alınıyor..." #: libsylph/imap.c:1576 msgid "can't set deleted flags: 1:*\n" msgstr "silinen işaretler atanamıyor: 1:*\n" #: libsylph/imap.c:1624 msgid "can't close folder\n" msgstr "dizin kapatılamadı\n" #: libsylph/imap.c:1702 #, c-format msgid "root folder %s not exist\n" msgstr "%s kök dizini bulunamadı\n" #: libsylph/imap.c:1891 libsylph/imap.c:1899 msgid "error occurred while getting LIST.\n" msgstr "LIST alınırken hata oluştu.\n" #: libsylph/imap.c:2013 #, c-format msgid "Can't create '%s'\n" msgstr "%s oluşturulamadı\n" #: libsylph/imap.c:2018 #, c-format msgid "Can't create '%s' under INBOX\n" msgstr "%s Gelen altında oluşturulamadı\n" #: libsylph/imap.c:2079 msgid "can't create mailbox: LIST failed\n" msgstr "posta kutusu yaratılamıyor: Liste hatası\n" #: libsylph/imap.c:2099 msgid "can't create mailbox\n" msgstr "posta kutusu oluşturulamadı\n" #: libsylph/imap.c:2203 #, c-format msgid "can't rename mailbox: %s to %s\n" msgstr "%s posta kutusunun adı %s olarak değiştirilemedi \n" #: libsylph/imap.c:2283 msgid "can't delete mailbox\n" msgstr "posta kutusu silinemedi\n" #: libsylph/imap.c:2327 msgid "can't get envelope\n" msgstr "zarf alınamadı\n" #: libsylph/imap.c:2340 #, fuzzy, c-format msgid "Getting message headers (%d / %d)" msgstr "İleti gönderiliyor (%d / %d bayt)" #: libsylph/imap.c:2350 msgid "error occurred while getting envelope.\n" msgstr "zarf alınırken bir hata oluştu.\n" #: libsylph/imap.c:2372 #, c-format msgid "can't parse envelope: %s\n" msgstr "zarf ayrıştırılamadı: %s\n" #: libsylph/imap.c:2496 #, c-format msgid "Can't connect to IMAP4 server: %s:%d\n" msgstr "IMAP4 sunucuya bağlantı kurulamadı: %s:%d\n" #: libsylph/imap.c:2503 #, c-format msgid "Can't establish IMAP4 session with: %s:%d\n" msgstr "IMAP4 oturumuna %s:%d ile bağlantı kurulamadı\n" #: libsylph/imap.c:2578 msgid "can't get namespace\n" msgstr "alanadına erişilemedi\n" #: libsylph/imap.c:3111 #, c-format msgid "can't select folder: %s\n" msgstr "dizin seçilemedi: %s\n" #: libsylph/imap.c:3146 #, fuzzy msgid "error on imap command: STATUS\n" msgstr "imap komutu sırasında hata oluştu: CLOSE\n" #: libsylph/imap.c:3269 libsylph/imap.c:3304 msgid "IMAP4 authentication failed.\n" msgstr "IMAP4 yetkilendirmesi başarısız.\n" #: libsylph/imap.c:3353 msgid "IMAP4 login failed.\n" msgstr "IMAP4 girişinde hata.\n" #: libsylph/imap.c:3689 #, c-format msgid "can't append %s to %s\n" msgstr "%s, %s üzerine eklenemedi\n" #: libsylph/imap.c:3696 msgid "(sending file...)" msgstr "(dosya gönderiliyor...)" #: libsylph/imap.c:3725 #, c-format msgid "can't append message to %s\n" msgstr "ileti %s'ye eklenemiyor\n" #: libsylph/imap.c:3757 #, c-format msgid "can't copy %s to %s\n" msgstr "%s, %s konumuna kopyalanamadı\n" #: libsylph/imap.c:3781 #, c-format msgid "error while imap command: STORE %s %s\n" msgstr "imap komutu sırasında hata oluştu: STORE %s %s\n" #: libsylph/imap.c:3795 msgid "error while imap command: EXPUNGE\n" msgstr "EXPUNGE komutu sırasında hata oluştu\n" #: libsylph/imap.c:3808 msgid "error while imap command: CLOSE\n" msgstr "imap komutu sırasında hata oluştu: CLOSE\n" #: libsylph/imap.c:4084 #, c-format msgid "iconv cannot convert UTF-7 to %s\n" msgstr "iconv, UTF-7 yi %s'e çeviremedi\n" #: libsylph/imap.c:4114 #, c-format msgid "iconv cannot convert %s to UTF-7\n" msgstr "iconv %s yi UTF-7'ye çeviremedi\n" #: libsylph/mbox.c:50 libsylph/mbox.c:196 msgid "can't write to temporary file\n" msgstr "geçici dosyaya yazılamadı\n" #: libsylph/mbox.c:69 #, c-format msgid "Getting messages from %s into %s...\n" msgstr "%s daki mesajlar %s e alınıyor...\n" #: libsylph/mbox.c:79 msgid "can't read mbox file.\n" msgstr "Posta kutusu dosyası okunamıyor.\n" #: libsylph/mbox.c:86 #, c-format msgid "invalid mbox format: %s\n" msgstr "geçersiz posta kutusu biçimi: %s\n" #: libsylph/mbox.c:93 #, c-format msgid "malformed mbox: %s\n" msgstr "bozuk posta kutusu: %s\n" #: libsylph/mbox.c:110 msgid "can't open temporary file\n" msgstr "geçici dosya açılamadı\n" #: libsylph/mbox.c:161 #, c-format msgid "" "unescaped From found:\n" "%s" msgstr "" "uygun olmayan Kimden:\n" "%s" #: libsylph/mbox.c:250 #, c-format msgid "%d messages found.\n" msgstr "%d ileti bulundu.\n" #: libsylph/mbox.c:268 #, c-format msgid "can't create lock file %s\n" msgstr "kilit dosyası yaratılamadı: %s\n" #: libsylph/mbox.c:269 msgid "use 'flock' instead of 'file' if possible.\n" msgstr "file yerine flock kullanmayı deneyin.\n" #: libsylph/mbox.c:281 #, c-format msgid "can't create %s\n" msgstr "%s oluşturulamadı\n" #: libsylph/mbox.c:287 msgid "mailbox is owned by another process, waiting...\n" msgstr "" "posta kutusu başka bir süreç tarafından kullanıldığı için bekleniyor...\n" #: libsylph/mbox.c:316 #, c-format msgid "can't lock %s\n" msgstr "%s kilitlenemedi\n" #: libsylph/mbox.c:323 libsylph/mbox.c:373 msgid "invalid lock type\n" msgstr "geçersiz kilit türü\n" #: libsylph/mbox.c:359 #, c-format msgid "can't unlock %s\n" msgstr "%s açılamadı\n" #: libsylph/mbox.c:394 msgid "can't truncate mailbox to zero.\n" msgstr "posta kutusu sıfırlanamıyor.\n" #: libsylph/mbox.c:418 #, c-format msgid "Exporting messages from %s into %s...\n" msgstr "%s daki mesajlar %s a aktarılıyor...\n" #: libsylph/mh.c:427 #, c-format msgid "can't copy message %s to %s\n" msgstr "mesaj %s dan %s a kopyalanamadı\n" #: libsylph/mh.c:502 libsylph/mh.c:625 msgid "Can't open mark file.\n" msgstr "işaretli dosya açılamadı.\n" #: libsylph/mh.c:509 libsylph/mh.c:631 msgid "the src folder is identical to the dest.\n" msgstr "kaynak dizini hedef dizinle aynı.\n" #: libsylph/mh.c:634 #, c-format msgid "Copying message %s%c%d to %s ...\n" msgstr "%s%c%d mesajı %s içine kopyalanıyor...\n" #: libsylph/mh.c:965 libsylph/mh.c:978 #, c-format msgid "" "File `%s' already exists.\n" "Can't create folder." msgstr "" "%s dosyası zaten bulunuyor.\n" "Dizin oluşturulamadı." #: libsylph/mh.c:1500 #, c-format msgid "" "Directory name\n" "'%s' is not a valid UTF-8 string.\n" "Maybe the locale encoding is used for filename.\n" "If that is the case, you must set the following environmental variable\n" "(see README for detail):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" msgstr "" #: libsylph/news.c:207 #, c-format msgid "creating NNTP connection to %s:%d ...\n" msgstr "%s:%d adresine NNTP bağlantısı yapılıyor...\n" #: libsylph/news.c:276 #, c-format msgid "NNTP connection to %s:%d has been disconnected. Reconnecting...\n" msgstr "%s:%d konumuna yapılan NNTP bağlantısı koptu.Yeniden bağlanılıyor...\n" #: libsylph/news.c:377 #, c-format msgid "article %d has been already cached.\n" msgstr "%d iletisi zaten önbelleklendi.\n" #: libsylph/news.c:397 #, c-format msgid "getting article %d...\n" msgstr "%d. makale alınıyor...\n" #: libsylph/news.c:401 #, c-format msgid "can't read article %d\n" msgstr "%d. makale okunamadı\n" #: libsylph/news.c:676 msgid "can't post article.\n" msgstr "makale postalanamıyor.\n" #: libsylph/news.c:702 #, c-format msgid "can't retrieve article %d\n" msgstr "makale alınamıyor : %d\n" #: libsylph/news.c:759 #, c-format msgid "can't select group: %s\n" msgstr "grup seçilemiyor: %s\n" #: libsylph/news.c:796 #, c-format msgid "invalid article range: %d - %d\n" msgstr "geçersiz makale aralığı: %d - %d\n" #: libsylph/news.c:809 msgid "no new articles.\n" msgstr "yeni makale yok.\n" #: libsylph/news.c:819 #, c-format msgid "getting xover %d - %d in %s...\n" msgstr "%d - %d haber grubu alınıyor (%s)...\n" #: libsylph/news.c:823 msgid "can't get xover\n" msgstr "haber grupları alınamadı\n" #: libsylph/news.c:833 msgid "error occurred while getting xover.\n" msgstr "haber grupları alınırken hata.\n" #: libsylph/news.c:843 #, c-format msgid "invalid xover line: %s\n" msgstr "hatalı haber grubu satırı %s\n" #: libsylph/news.c:862 libsylph/news.c:894 msgid "can't get xhdr\n" msgstr "X başlıkları alınamıyor\n" #: libsylph/news.c:874 libsylph/news.c:906 msgid "error occurred while getting xhdr.\n" msgstr "x başlıkları alınırken hata oluştu.\n" #: libsylph/nntp.c:68 #, c-format msgid "Can't connect to NNTP server: %s:%d\n" msgstr "NNTP sunucuya bağlantı yapılamadı: %s:%d\n" #: libsylph/nntp.c:164 libsylph/nntp.c:227 #, c-format msgid "protocol error: %s\n" msgstr "protokol hatası: %s\n" #: libsylph/nntp.c:187 libsylph/nntp.c:233 msgid "protocol error\n" msgstr "protokol hatası\n" #: libsylph/nntp.c:283 msgid "Error occurred while posting\n" msgstr "Postalama sırasında hata\n" #: libsylph/nntp.c:363 msgid "Error occurred while sending command\n" msgstr "Komut gönderilirken hata oluştu\n" #: libsylph/pop.c:155 msgid "Required APOP timestamp not found in greeting\n" msgstr "Gerekli olan APOP zaman etiketi görüşmede bulunamadı\n" #: libsylph/pop.c:162 msgid "Timestamp syntax error in greeting\n" msgstr "Zaman etiketi yazım hatası\n" #: libsylph/pop.c:170 #, fuzzy msgid "Invalid timestamp in greeting\n" msgstr "Gerekli olan APOP zaman etiketi görüşmede bulunamadı\n" #: libsylph/pop.c:198 libsylph/pop.c:225 msgid "POP3 protocol error\n" msgstr "POP3 protokol hatası\n" #: libsylph/pop.c:270 #, c-format msgid "invalid UIDL response: %s\n" msgstr "hatalı UIDL cevabı: %s\n" #: libsylph/pop.c:631 #, c-format msgid "POP3: Deleting expired message %d\n" msgstr "POP3: Eski postalar siliniyor %d\n" #: libsylph/pop.c:640 #, c-format msgid "POP3: Skipping message %d (%d bytes)\n" msgstr "POP3: Posta atlanıyor %d (%d byte)\n" #: libsylph/pop.c:673 msgid "mailbox is locked\n" msgstr "posta kutusu kilitli\n" #: libsylph/pop.c:676 msgid "session timeout\n" msgstr "oturum zaman aşımına uğradı\n" #: libsylph/pop.c:682 libsylph/smtp.c:561 msgid "can't start TLS session\n" msgstr "TLS oturumu başlatılamıyor\n" #: libsylph/pop.c:689 libsylph/smtp.c:496 msgid "error occurred on authentication\n" msgstr "yetkilendirme sırasında hata oluştu\n" #: libsylph/pop.c:694 msgid "command not supported\n" msgstr "komut desteklenmiyor\n" #: libsylph/pop.c:698 msgid "error occurred on POP3 session\n" msgstr "POP3 oturumunda hata oluştu\n" #: libsylph/prefs.c:196 libsylph/prefs.c:224 libsylph/prefs.c:269 #: libsylph/prefs_account.c:217 libsylph/prefs_account.c:231 msgid "failed to write configuration to file\n" msgstr "Yapılandırma dosyasına kayıt yapılamadı\n" #: libsylph/prefs.c:239 #, c-format msgid "Found %s\n" msgstr "%s bulundu\n" #: libsylph/prefs.c:272 msgid "Configuration is saved.\n" msgstr "Yapılandırma kaydedildi.\n" #: libsylph/prefs_common.c:503 #, fuzzy msgid "Junk mail filter (manual)" msgstr "dizin:" #: libsylph/prefs_common.c:506 #, fuzzy msgid "Junk mail filter" msgstr "dizin:" #: libsylph/procmime.c:1142 msgid "procmime_get_text_content(): Code conversion failed.\n" msgstr "procmime_get_text_content(): Kod çevriminde hata.\n" #: libsylph/procmsg.c:655 msgid "can't open mark file\n" msgstr "işaret dosyası açılamadı\n" #: libsylph/procmsg.c:1107 #, c-format msgid "can't fetch message %d\n" msgstr "%d. ileti alınamadı\n" #: libsylph/procmsg.c:1423 #, c-format msgid "Print command line is invalid: `%s'\n" msgstr "Yazdırma komutu geçersiz: `%s'\n" #: libsylph/recv.c:141 msgid "error occurred while retrieving data.\n" msgstr "veri alınırken bir hata oluştu.\n" #: libsylph/recv.c:183 libsylph/recv.c:215 libsylph/recv.c:230 msgid "Can't write to file.\n" msgstr "Dosyaya yazılamadı.\n" #: libsylph/smtp.c:157 msgid "SMTP AUTH not available\n" msgstr "SMTP AUTH kullanılamıyor\n" #: libsylph/smtp.c:466 libsylph/smtp.c:516 msgid "bad SMTP response\n" msgstr "kötü SMTP cevabı\n" #: libsylph/smtp.c:487 libsylph/smtp.c:505 libsylph/smtp.c:602 msgid "error occurred on SMTP session\n" msgstr "SMTP oturumunda hata oluştu\n" #: libsylph/ssl.c:54 msgid "SSLv23 not available\n" msgstr "SSLv23 kullanılamıyor\n" #: libsylph/ssl.c:56 msgid "SSLv23 available\n" msgstr "SSLv23 etkin\n" #: libsylph/ssl.c:65 msgid "TLSv1 not available\n" msgstr "TLSv1 kullanılamıyor\n" #: libsylph/ssl.c:67 msgid "TLSv1 available\n" msgstr "TLSv1 etkin\n" #: libsylph/ssl.c:101 libsylph/ssl.c:108 msgid "SSL method not available\n" msgstr "SSL yöntemi kullanılamıyor\n" #: libsylph/ssl.c:114 msgid "Unknown SSL method *PROGRAM BUG*\n" msgstr "Bilinmeyen SSL yöntemi: Program hatası\n" #: libsylph/ssl.c:120 msgid "Error creating ssl context\n" msgstr "SSL metni oluşturulurken hata\n" #. Get the cipher #: libsylph/ssl.c:139 #, c-format msgid "SSL connection using %s\n" msgstr "SSL bağlantısı %s kullanarak yapıldı\n" #: libsylph/ssl.c:148 msgid "Server certificate:\n" msgstr "Sunucu sertifikası:\n" #: libsylph/ssl.c:151 #, c-format msgid " Subject: %s\n" msgstr " Konu: %s\n" #: libsylph/ssl.c:156 #, c-format msgid " Issuer: %s\n" msgstr " Veren: %s\n" #: libsylph/utils.c:2682 libsylph/utils.c:2804 #, c-format msgid "writing to %s failed.\n" msgstr "yazarken hata oluştu: %s\n" #~ msgid "can't change file mode\n" #~ msgstr "dosya modu değiştirilemedi\n" libsylph-1.1.0/po/uk.po0000644000175000017500000004423510756432605011675 00000000000000# Ukrainian translation for Sylpheed # Copyright (C) 2002 Free Software Foundation, Inc. # O. Nykyforchyn , 2002, 2004. # Some ideas borrowed from Russian translation. # So thanks to Aleksey Novodvorsky , # Sergey Vlasov , # Dmitry S. Sivachenko . # msgid "" msgstr "" "Project-Id-Version: Sylpheed 2.2.4\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-02-19 10:48+0900\n" "PO-Revision-Date: 2006-04-13 00:34+0300\n" "Last-Translator: O.R. Nykyforchyn \n" "Language-Team: Ukrainian\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Poedit-Language: Ukrainian\n" "X-Poedit-Country: UKRAINE\n" #: libsylph/account.c:56 msgid "Reading all config for each account...\n" msgstr "Читаємо конфігурацію для кожного запису...\n" #: libsylph/imap.c:465 #, c-format msgid "IMAP4 connection to %s has been disconnected. Reconnecting...\n" msgstr "З'єднання IMAP4 до %s втрачено. Відновлюємо...\n" #: libsylph/imap.c:520 libsylph/imap.c:526 msgid "IMAP4 server disables LOGIN.\n" msgstr "Сервер IMAP4 відключив LOGIN.\n" #: libsylph/imap.c:602 #, c-format msgid "creating IMAP4 connection to %s:%d ...\n" msgstr "створення з'єднання INAP4 до %s:%d ...\n" #: libsylph/imap.c:646 msgid "Can't start TLS session.\n" msgstr "Не вдалось почати сесію TLS.\n" #: libsylph/imap.c:1120 #, c-format msgid "Getting message %d" msgstr "Отримуємо лист %d" #: libsylph/imap.c:1236 #, c-format msgid "Appending messages to %s (%d / %d)" msgstr "Приєднуємо листи до %s (%d / %d)" #: libsylph/imap.c:1328 #, c-format msgid "Moving messages %s to %s ..." msgstr "Переносимо листи %s в %s ..." #: libsylph/imap.c:1334 #, c-format msgid "Copying messages %s to %s ..." msgstr "Копіюємо листи %s в %s ..." #: libsylph/imap.c:1473 #, c-format msgid "Removing messages %s" msgstr "Видаляємо листи від %s" #: libsylph/imap.c:1479 #, c-format msgid "can't set deleted flags: %s\n" msgstr "не вдалось встановити прапорець видалення: %s\n" #: libsylph/imap.c:1487 libsylph/imap.c:1582 msgid "can't expunge\n" msgstr "не вдалось очистити папку від видалених листів\n" #: libsylph/imap.c:1570 #, c-format msgid "Removing all messages in %s" msgstr "Видаляємо всі листи у %s" #: libsylph/imap.c:1576 msgid "can't set deleted flags: 1:*\n" msgstr "не вдалось встановити прапорець видалення: 1:*\n" #: libsylph/imap.c:1624 msgid "can't close folder\n" msgstr "не вдалось закрити папку\n" #: libsylph/imap.c:1702 #, c-format msgid "root folder %s not exist\n" msgstr "коренева папка %s не існує\n" #: libsylph/imap.c:1891 libsylph/imap.c:1899 msgid "error occurred while getting LIST.\n" msgstr "помилка при отриманні LIST'а.\n" #: libsylph/imap.c:2013 #, c-format msgid "Can't create '%s'\n" msgstr "Не вдалось створити '%s'\n" #: libsylph/imap.c:2018 #, c-format msgid "Can't create '%s' under INBOX\n" msgstr "Не вдалось створити '%s' всередині INBOX\n" #: libsylph/imap.c:2079 msgid "can't create mailbox: LIST failed\n" msgstr "не вдалось створити скриньку: невдача LIST\n" #: libsylph/imap.c:2099 msgid "can't create mailbox\n" msgstr "не вдалось створити скриньку\n" #: libsylph/imap.c:2203 #, c-format msgid "can't rename mailbox: %s to %s\n" msgstr "не вдалось перейменувати скриньку: %s на %s\n" #: libsylph/imap.c:2283 msgid "can't delete mailbox\n" msgstr "не вдалось видалити скриньку\n" #: libsylph/imap.c:2327 msgid "can't get envelope\n" msgstr "не вдалось отримати конверт\n" #: libsylph/imap.c:2340 #, c-format msgid "Getting message headers (%d / %d)" msgstr "Отримуємо заголовки листів (%d / %d)" #: libsylph/imap.c:2350 msgid "error occurred while getting envelope.\n" msgstr "трапилась помилка при отриманні конверта.\n" #: libsylph/imap.c:2372 #, c-format msgid "can't parse envelope: %s\n" msgstr "не вдалось розібрати конверт: %s\n" #: libsylph/imap.c:2496 #, c-format msgid "Can't connect to IMAP4 server: %s:%d\n" msgstr "Не вдалось з'єднатись з сервером IMAP4: %s:%d\n" #: libsylph/imap.c:2503 #, c-format msgid "Can't establish IMAP4 session with: %s:%d\n" msgstr "Не вдалось встановити сесію IMAP4 з: %s:%d\n" #: libsylph/imap.c:2578 msgid "can't get namespace\n" msgstr "не вдалось отримати простір імен\n" #: libsylph/imap.c:3111 #, c-format msgid "can't select folder: %s\n" msgstr "не вдалось отримати папку: %s\n" #: libsylph/imap.c:3146 msgid "error on imap command: STATUS\n" msgstr "помилка при виконанні команди imap: STATUS\n" #: libsylph/imap.c:3269 libsylph/imap.c:3304 msgid "IMAP4 authentication failed.\n" msgstr "Невдача авторизації IMAP4.\n" #: libsylph/imap.c:3353 msgid "IMAP4 login failed.\n" msgstr "Невдача авторизації IMAP4.\n" #: libsylph/imap.c:3689 #, c-format msgid "can't append %s to %s\n" msgstr "не вдалось додати %s до %s\n" #: libsylph/imap.c:3696 msgid "(sending file...)" msgstr "(посилаємо файл...)" #: libsylph/imap.c:3725 #, c-format msgid "can't append message to %s\n" msgstr "не вдалось приєднати лист до %s\n" #: libsylph/imap.c:3757 #, c-format msgid "can't copy %s to %s\n" msgstr "не вдалось скопіювати %s в %s\n" #: libsylph/imap.c:3781 #, c-format msgid "error while imap command: STORE %s %s\n" msgstr "помилка при виконанні команди imap: STORE %s %s\n" #: libsylph/imap.c:3795 msgid "error while imap command: EXPUNGE\n" msgstr "помилка при виконанні команди imap: EXPUNGE\n" #: libsylph/imap.c:3808 msgid "error while imap command: CLOSE\n" msgstr "помилка при виконанні команди imap: CLOSE\n" #: libsylph/imap.c:4084 #, c-format msgid "iconv cannot convert UTF-7 to %s\n" msgstr "iconv не може конвертувати UTF-7 в %s\n" #: libsylph/imap.c:4114 #, c-format msgid "iconv cannot convert %s to UTF-7\n" msgstr "iconv не може конвертувати %s в UTF-7\n" #: libsylph/mbox.c:50 libsylph/mbox.c:196 msgid "can't write to temporary file\n" msgstr "неможливо писати в тимчасовий файл\n" #: libsylph/mbox.c:69 #, c-format msgid "Getting messages from %s into %s...\n" msgstr "Отримуємо листи від %s в %s...\n" #: libsylph/mbox.c:79 msgid "can't read mbox file.\n" msgstr "не вдалось прочитати файл mbox.\n" #: libsylph/mbox.c:86 #, c-format msgid "invalid mbox format: %s\n" msgstr "неправильний формат файла mbox: %s\n" #: libsylph/mbox.c:93 #, c-format msgid "malformed mbox: %s\n" msgstr "неправильно збудований mbox: %s\n" #: libsylph/mbox.c:110 msgid "can't open temporary file\n" msgstr "неможливо відкрити тимчасовий файл\n" #: libsylph/mbox.c:161 #, c-format msgid "" "unescaped From found:\n" "%s" msgstr "" "знайдено незахищений рядок From:\n" "%s" #: libsylph/mbox.c:250 #, c-format msgid "%d messages found.\n" msgstr "знайдено %d листів.\n" #: libsylph/mbox.c:268 #, c-format msgid "can't create lock file %s\n" msgstr "не вдалось створити lock-файл %s\n" #: libsylph/mbox.c:269 msgid "use 'flock' instead of 'file' if possible.\n" msgstr "якщо можливо, вживайте 'flock' замість 'file'\n" #: libsylph/mbox.c:281 #, c-format msgid "can't create %s\n" msgstr "не вдалось створити %s\n" #: libsylph/mbox.c:287 msgid "mailbox is owned by another process, waiting...\n" msgstr "скринька зайнята іншим процесом, чекаємо...\n" #: libsylph/mbox.c:316 #, c-format msgid "can't lock %s\n" msgstr "не вдалось заблокувати %s\n" #: libsylph/mbox.c:323 libsylph/mbox.c:373 msgid "invalid lock type\n" msgstr "неправильний тип блокування\n" #: libsylph/mbox.c:359 #, c-format msgid "can't unlock %s\n" msgstr "не вдалось розблокувати %s\n" #: libsylph/mbox.c:394 msgid "can't truncate mailbox to zero.\n" msgstr "не вдалось обрізати скриньку до нуля.\n" #: libsylph/mbox.c:418 #, c-format msgid "Exporting messages from %s into %s...\n" msgstr "Експортуємо листи з %s в %s...\n" #: libsylph/mh.c:427 #, c-format msgid "can't copy message %s to %s\n" msgstr "не вдалось копіювати %s в %s\n" #: libsylph/mh.c:502 libsylph/mh.c:625 msgid "Can't open mark file.\n" msgstr "Не вдалось відкрити файл позначок.\n" #: libsylph/mh.c:509 libsylph/mh.c:631 msgid "the src folder is identical to the dest.\n" msgstr "папка призначення ідентична до вихідної.\n" #: libsylph/mh.c:634 #, c-format msgid "Copying message %s%c%d to %s ...\n" msgstr "Копіюємо лист %s%c%d в %s ...\n" #: libsylph/mh.c:965 libsylph/mh.c:978 #, c-format msgid "" "File `%s' already exists.\n" "Can't create folder." msgstr "" "Файл `%s' вже існує.\n" "Неможливо створити папку." #: libsylph/mh.c:1500 #, c-format msgid "" "Directory name\n" "'%s' is not a valid UTF-8 string.\n" "Maybe the locale encoding is used for filename.\n" "If that is the case, you must set the following environmental variable\n" "(see README for detail):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" msgstr "" "Назва папки\n" "'%s'\n" "не є придатним рядком UTF-8.\n" "\n" "Якщо для імен файлів вживається кодування\n" "локалі, Ви повинні встановити змінну\n" "середовища (див. README щодо подробиць):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" #: libsylph/news.c:207 #, c-format msgid "creating NNTP connection to %s:%d ...\n" msgstr "створюємо з'єднання NNTP до %s:%d ...\n" #: libsylph/news.c:276 #, c-format msgid "NNTP connection to %s:%d has been disconnected. Reconnecting...\n" msgstr "З'єднання NNTP до %s:%d було розірвано. Відновлюємо...\n" #: libsylph/news.c:377 #, c-format msgid "article %d has been already cached.\n" msgstr "статтю %d вже кешовано.\n" #: libsylph/news.c:397 #, c-format msgid "getting article %d...\n" msgstr "отримуємо статтю %d...\n" #: libsylph/news.c:401 #, c-format msgid "can't read article %d\n" msgstr "не вдалось прочитати статтю %d\n" #: libsylph/news.c:676 msgid "can't post article.\n" msgstr "не вдалось послати статтю.\n" #: libsylph/news.c:702 #, c-format msgid "can't retrieve article %d\n" msgstr "не вдалось отримати статтю %d\n" #: libsylph/news.c:759 #, c-format msgid "can't select group: %s\n" msgstr "не вдалось обрати конференцію: %s\n" #: libsylph/news.c:796 #, c-format msgid "invalid article range: %d - %d\n" msgstr "невірний діапазон статей: %d - %d\n" #: libsylph/news.c:809 msgid "no new articles.\n" msgstr "нових статтей нема.\n" #: libsylph/news.c:819 #, c-format msgid "getting xover %d - %d in %s...\n" msgstr "отримуємо xover %d - %d в %s...\n" #: libsylph/news.c:823 msgid "can't get xover\n" msgstr "не вдалось отримати xover\n" #: libsylph/news.c:833 msgid "error occurred while getting xover.\n" msgstr "трапилась помилка при отриманні xover.\n" #: libsylph/news.c:843 #, c-format msgid "invalid xover line: %s\n" msgstr "невірний рядок xover: %s\n" #: libsylph/news.c:862 libsylph/news.c:894 msgid "can't get xhdr\n" msgstr "не вдалось отримати xhdr\n" #: libsylph/news.c:874 libsylph/news.c:906 msgid "error occurred while getting xhdr.\n" msgstr "трапилась помилка при отриманні xhdr.\n" #: libsylph/nntp.c:68 #, c-format msgid "Can't connect to NNTP server: %s:%d\n" msgstr "Не вдалось з'єднатись з сервером NNTP: %s:%d\n" #: libsylph/nntp.c:164 libsylph/nntp.c:227 #, c-format msgid "protocol error: %s\n" msgstr "помилка протоколу: %s\n" #: libsylph/nntp.c:187 libsylph/nntp.c:233 msgid "protocol error\n" msgstr "помилка протоколу\n" #: libsylph/nntp.c:283 msgid "Error occurred while posting\n" msgstr "Трапилась помилка при відсиланні\n" #: libsylph/nntp.c:363 msgid "Error occurred while sending command\n" msgstr "При відсиланні команди трапилась помилка\n" #: libsylph/pop.c:155 msgid "Required APOP timestamp not found in greeting\n" msgstr "У привітанні не знайдено обов'язкового APOP timestamp\n" #: libsylph/pop.c:162 msgid "Timestamp syntax error in greeting\n" msgstr "Синтаксична помилка в timestamp у привітанні\n" #: libsylph/pop.c:170 #, fuzzy msgid "Invalid timestamp in greeting\n" msgstr "У привітанні не знайдено обов'язкового APOP timestamp\n" #: libsylph/pop.c:198 libsylph/pop.c:225 msgid "POP3 protocol error\n" msgstr "Помилка протоколу POP3\n" #: libsylph/pop.c:270 #, c-format msgid "invalid UIDL response: %s\n" msgstr "невірна відповідь UIDL: %s\n" #: libsylph/pop.c:631 #, c-format msgid "POP3: Deleting expired message %d\n" msgstr "POP3: Вилучаємо застарілий лист %d\n" #: libsylph/pop.c:640 #, c-format msgid "POP3: Skipping message %d (%d bytes)\n" msgstr "POP3: Пропускаємо лист %d (%d байтів)\n" #: libsylph/pop.c:673 msgid "mailbox is locked\n" msgstr "скриньку заблоковано\n" #: libsylph/pop.c:676 msgid "session timeout\n" msgstr "таймаут сесії\n" #: libsylph/pop.c:682 libsylph/smtp.c:561 msgid "can't start TLS session\n" msgstr "не вдалось почати сесію TLS\n" #: libsylph/pop.c:689 libsylph/smtp.c:496 msgid "error occurred on authentication\n" msgstr "помилка при аутентифікації\n" #: libsylph/pop.c:694 msgid "command not supported\n" msgstr "команда не підтримується\n" #: libsylph/pop.c:698 msgid "error occurred on POP3 session\n" msgstr "помилка під час сесії POP3\n" #: libsylph/prefs.c:196 libsylph/prefs.c:224 libsylph/prefs.c:269 #: libsylph/prefs_account.c:217 libsylph/prefs_account.c:231 msgid "failed to write configuration to file\n" msgstr "не вдалось записати конфігурацію в файл\n" #: libsylph/prefs.c:239 #, c-format msgid "Found %s\n" msgstr "Знайдено %s\n" #: libsylph/prefs.c:272 msgid "Configuration is saved.\n" msgstr "Конфігурацію збережено.\n" #: libsylph/prefs_common.c:503 #, fuzzy msgid "Junk mail filter (manual)" msgstr "фільтр мотлоху" #: libsylph/prefs_common.c:506 msgid "Junk mail filter" msgstr "фільтр мотлоху" #: libsylph/procmime.c:1142 msgid "procmime_get_text_content(): Code conversion failed.\n" msgstr "procmime_get_text_content(): Перетворення кодів не вдалось.\n" #: libsylph/procmsg.c:655 msgid "can't open mark file\n" msgstr "не вдалось відкрити файл позначок\n" #: libsylph/procmsg.c:1107 #, c-format msgid "can't fetch message %d\n" msgstr "не вдалось стягти лист %d\n" #: libsylph/procmsg.c:1423 #, c-format msgid "Print command line is invalid: `%s'\n" msgstr "Невірна команда друку: `%s'\n" #: libsylph/recv.c:141 msgid "error occurred while retrieving data.\n" msgstr "трапилась помилка при отриманні даних.\n" #: libsylph/recv.c:183 libsylph/recv.c:215 libsylph/recv.c:230 msgid "Can't write to file.\n" msgstr "Не вдалось писати в файл.\n" #: libsylph/smtp.c:157 msgid "SMTP AUTH not available\n" msgstr "SMTP AUTH недоступна\n" #: libsylph/smtp.c:466 libsylph/smtp.c:516 msgid "bad SMTP response\n" msgstr "погана відпоідь SMTP\n" #: libsylph/smtp.c:487 libsylph/smtp.c:505 libsylph/smtp.c:602 msgid "error occurred on SMTP session\n" msgstr "помилка під час сесії SMTP\n" #: libsylph/ssl.c:54 msgid "SSLv23 not available\n" msgstr "SSLv23 недоступний\n" #: libsylph/ssl.c:56 msgid "SSLv23 available\n" msgstr "SSLv23 доступний\n" #: libsylph/ssl.c:65 msgid "TLSv1 not available\n" msgstr "TLSv1 недоступний\n" #: libsylph/ssl.c:67 msgid "TLSv1 available\n" msgstr "TLSv1 доступний\n" #: libsylph/ssl.c:101 libsylph/ssl.c:108 msgid "SSL method not available\n" msgstr "Метод SSL недоступний\n" #: libsylph/ssl.c:114 msgid "Unknown SSL method *PROGRAM BUG*\n" msgstr "Невідомий метод SSL *ПОМИЛКА В ПРОГРАМІ*\n" #: libsylph/ssl.c:120 msgid "Error creating ssl context\n" msgstr "Помилка у створенні контексту ssl\n" #. Get the cipher #: libsylph/ssl.c:139 #, c-format msgid "SSL connection using %s\n" msgstr "З'єднання SSL з вживанням %s\n" #: libsylph/ssl.c:148 msgid "Server certificate:\n" msgstr "Сертифікат сервера:\n" #: libsylph/ssl.c:151 #, c-format msgid " Subject: %s\n" msgstr " Суб'єкт %s\n" #: libsylph/ssl.c:156 #, c-format msgid " Issuer: %s\n" msgstr " Видав: %s\n" #: libsylph/utils.c:2682 libsylph/utils.c:2804 #, c-format msgid "writing to %s failed.\n" msgstr "Невдача запису в %s.\n" #~ msgid "can't change file mode\n" #~ msgstr "не вдалось змінити права доступу файла\n" libsylph-1.1.0/po/vi.po0000644000175000017500000003746610756432605011704 00000000000000# translation of sylpheed.po to Vietnamese # This file is distributed under the same license as the Sylpheed package. # Copyright (C) 2006 Pham Thanh Long. # Pham Thanh Long , 2006. # msgid "" msgstr "" "Project-Id-Version: sylpheed\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-02-19 10:48+0900\n" "PO-Revision-Date: 2006-04-16 22:05+0700\n" "Last-Translator: Pham Thanh Long \n" "Language-Team: Vietnamese \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: libsylph/account.c:56 msgid "Reading all config for each account...\n" msgstr "Đang đọc mọi cấu hình cho mỗi tài khoản...\n" #: libsylph/imap.c:465 #, c-format msgid "IMAP4 connection to %s has been disconnected. Reconnecting...\n" msgstr "Kết nối IMAP4 tới %s đã bị ngắt. Đang kết nối lại...\n" #: libsylph/imap.c:520 libsylph/imap.c:526 msgid "IMAP4 server disables LOGIN.\n" msgstr "Máy chủ IMAP4 cấm ĐĂNG NHẬP.\n" #: libsylph/imap.c:602 #, c-format msgid "creating IMAP4 connection to %s:%d ...\n" msgstr "đang tạo kết nối IMAP4 tới %s:%d ...\n" #: libsylph/imap.c:646 msgid "Can't start TLS session.\n" msgstr "Không thể khởi động phiên TLS.\n" #: libsylph/imap.c:1120 #, c-format msgid "Getting message %d" msgstr "Đang lấy thư %d" #: libsylph/imap.c:1236 #, c-format msgid "Appending messages to %s (%d / %d)" msgstr "Đang ghép thư vào %s (%d / %d)" #: libsylph/imap.c:1328 #, c-format msgid "Moving messages %s to %s ..." msgstr "Đang chuyển thư %s tới %s ..." #: libsylph/imap.c:1334 #, c-format msgid "Copying messages %s to %s ..." msgstr "Đang chép thư %s tới %s ..." #: libsylph/imap.c:1473 #, c-format msgid "Removing messages %s" msgstr "Đang xoá thư %s" #: libsylph/imap.c:1479 #, c-format msgid "can't set deleted flags: %s\n" msgstr "không thể đặt cờ đã xoá: %s\n" #: libsylph/imap.c:1487 libsylph/imap.c:1582 msgid "can't expunge\n" msgstr "không thể xoá\n" #: libsylph/imap.c:1570 #, c-format msgid "Removing all messages in %s" msgstr "Xoá mọi thư trong %s" #: libsylph/imap.c:1576 msgid "can't set deleted flags: 1:*\n" msgstr "không thể đặt cờ đã xoá: 1:*\n" #: libsylph/imap.c:1624 msgid "can't close folder\n" msgstr "không thể đóng thư mục\n" #: libsylph/imap.c:1702 #, c-format msgid "root folder %s not exist\n" msgstr "thư mục gốc %s không tồn tại\n" #: libsylph/imap.c:1891 libsylph/imap.c:1899 msgid "error occurred while getting LIST.\n" msgstr "xảy ra lỗi khi lấy LIST.\n" #: libsylph/imap.c:2013 #, c-format msgid "Can't create '%s'\n" msgstr "Không thể tạo '%s'\n" #: libsylph/imap.c:2018 #, c-format msgid "Can't create '%s' under INBOX\n" msgstr "Không thể tạo '%s' ở INBOX\n" #: libsylph/imap.c:2079 msgid "can't create mailbox: LIST failed\n" msgstr "không thể tạo hộp thư: LIST thất bại\n" #: libsylph/imap.c:2099 msgid "can't create mailbox\n" msgstr "không thể tạo hộp thư\n" #: libsylph/imap.c:2203 #, c-format msgid "can't rename mailbox: %s to %s\n" msgstr "không thể đổi tên hộp thư: %s thành %s\n" #: libsylph/imap.c:2283 msgid "can't delete mailbox\n" msgstr "không thể xoá hộp thư\n" #: libsylph/imap.c:2327 msgid "can't get envelope\n" msgstr "không thể lấy phong bì\n" #: libsylph/imap.c:2340 #, c-format msgid "Getting message headers (%d / %d)" msgstr "Đang lấy header của thư (%d / %d)" #: libsylph/imap.c:2350 msgid "error occurred while getting envelope.\n" msgstr "xảy ra lỗi khi lấy phong bì.\n" #: libsylph/imap.c:2372 #, c-format msgid "can't parse envelope: %s\n" msgstr "không thể phân tích phong bì: %s\n" #: libsylph/imap.c:2496 #, c-format msgid "Can't connect to IMAP4 server: %s:%d\n" msgstr "Không thể kết nối tới máy chủ IMAP4: %s:%d\n" #: libsylph/imap.c:2503 #, c-format msgid "Can't establish IMAP4 session with: %s:%d\n" msgstr "Không thể tạo phiên IMAP4 với: %s:%d\n" #: libsylph/imap.c:2578 msgid "can't get namespace\n" msgstr "không thể lấy khoảng định danh (namespace)\n" #: libsylph/imap.c:3111 #, c-format msgid "can't select folder: %s\n" msgstr "không thể chọn thư mục: %s\n" #: libsylph/imap.c:3146 msgid "error on imap command: STATUS\n" msgstr "có lỗi khi chạy lệnh imap: STATUS\n" #: libsylph/imap.c:3269 libsylph/imap.c:3304 msgid "IMAP4 authentication failed.\n" msgstr "Xác thực IMAP4 thất bại:\n" #: libsylph/imap.c:3353 msgid "IMAP4 login failed.\n" msgstr "Đăng nhập IMAP4 thất bại.\n" #: libsylph/imap.c:3689 #, c-format msgid "can't append %s to %s\n" msgstr "không thể ghep %s vào %s\n" #: libsylph/imap.c:3696 msgid "(sending file...)" msgstr "(đang gửi tập tin...)" #: libsylph/imap.c:3725 #, c-format msgid "can't append message to %s\n" msgstr "không thể ghép thư vào %s\n" #: libsylph/imap.c:3757 #, c-format msgid "can't copy %s to %s\n" msgstr "không thể chép %s tới %s\n" #: libsylph/imap.c:3781 #, c-format msgid "error while imap command: STORE %s %s\n" msgstr "có lỗi khi chạy lệnh imap: STORE %s %s\n" #: libsylph/imap.c:3795 msgid "error while imap command: EXPUNGE\n" msgstr "có lỗi khi chạy lệnh imap: EXPUNGE\n" #: libsylph/imap.c:3808 msgid "error while imap command: CLOSE\n" msgstr "có lỗi khi chạy lệnh imap: CLOSE\n" #: libsylph/imap.c:4084 #, c-format msgid "iconv cannot convert UTF-7 to %s\n" msgstr "iconv không thể chuyển UTF-7 sang %s\n" #: libsylph/imap.c:4114 #, c-format msgid "iconv cannot convert %s to UTF-7\n" msgstr "iconv không thể chuyển %s sang UTF-7\n" #: libsylph/mbox.c:50 libsylph/mbox.c:196 msgid "can't write to temporary file\n" msgstr "không ghi được vào tập tin tạm\n" #: libsylph/mbox.c:69 #, c-format msgid "Getting messages from %s into %s...\n" msgstr "Lấy thư từ %s vào %s...\n" #: libsylph/mbox.c:79 msgid "can't read mbox file.\n" msgstr "không đọc được tập tin mbox.\n" #: libsylph/mbox.c:86 #, c-format msgid "invalid mbox format: %s\n" msgstr "định dạng mbox không hợp lệ: %s\n" #: libsylph/mbox.c:93 #, c-format msgid "malformed mbox: %s\n" msgstr "mbox có lỗi: %s\n" #: libsylph/mbox.c:110 msgid "can't open temporary file\n" msgstr "không mở được tập tin tạm\n" #: libsylph/mbox.c:161 #, c-format msgid "" "unescaped From found:\n" "%s" msgstr "" #: libsylph/mbox.c:250 #, c-format msgid "%d messages found.\n" msgstr "Tìm thấy %d thư.\n" #: libsylph/mbox.c:268 #, c-format msgid "can't create lock file %s\n" msgstr "không tạo được tập tin khoá %s\n" #: libsylph/mbox.c:269 msgid "use 'flock' instead of 'file' if possible.\n" msgstr "dùng lệnh 'flock' thay vì 'file' nếu có thể\n" #: libsylph/mbox.c:281 #, c-format msgid "can't create %s\n" msgstr "không tạo được %s\n" #: libsylph/mbox.c:287 msgid "mailbox is owned by another process, waiting...\n" msgstr "hộp thư bị chiếm dụng bởi một tiến trình khác, đang chờ...\n" #: libsylph/mbox.c:316 #, c-format msgid "can't lock %s\n" msgstr "không thể khoá %s\n" #: libsylph/mbox.c:323 libsylph/mbox.c:373 msgid "invalid lock type\n" msgstr "kiểu khoá không hợp lệ\n" #: libsylph/mbox.c:359 #, c-format msgid "can't unlock %s\n" msgstr "không thể mở khoá %s\n" #: libsylph/mbox.c:394 msgid "can't truncate mailbox to zero.\n" msgstr "không thể giảm số lượng hộp thư xuống 0.\n" #: libsylph/mbox.c:418 #, c-format msgid "Exporting messages from %s into %s...\n" msgstr "Xuất thư từ %s sang %s...\n" #: libsylph/mh.c:427 #, c-format msgid "can't copy message %s to %s\n" msgstr "không thể chép thư %s tới %s\n" #: libsylph/mh.c:502 libsylph/mh.c:625 msgid "Can't open mark file.\n" msgstr "Không thể mở tập tin đánh đấu.\n" #: libsylph/mh.c:509 libsylph/mh.c:631 msgid "the src folder is identical to the dest.\n" msgstr "thư mục nguồn cũng chính là thư mục gốc.\n" #: libsylph/mh.c:634 #, c-format msgid "Copying message %s%c%d to %s ...\n" msgstr "Đang chép thư %s%c%d tới %s ...\n" #: libsylph/mh.c:965 libsylph/mh.c:978 #, c-format msgid "" "File `%s' already exists.\n" "Can't create folder." msgstr "" "Tập tin `%s' đã có trước.\n" "Không thể tạo thư mục." #: libsylph/mh.c:1500 #, c-format msgid "" "Directory name\n" "'%s' is not a valid UTF-8 string.\n" "Maybe the locale encoding is used for filename.\n" "If that is the case, you must set the following environmental variable\n" "(see README for detail):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" msgstr "" "Tên thư mục\n" "'%s' không phải là một chuối UTF-8 hợp lệ.\n" "Có thể mã kí tự bản địa được dùng trong tên tập tin.\n" "Nếu ở trong trường hợp đó, bạn phải đặt biến môi trường sau\n" "(đọc README để biết thêm thông tin):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" #: libsylph/news.c:207 #, c-format msgid "creating NNTP connection to %s:%d ...\n" msgstr "đang tạo kết nối NNTP tới %s:%d ...\n" #: libsylph/news.c:276 #, c-format msgid "NNTP connection to %s:%d has been disconnected. Reconnecting...\n" msgstr "Kết nối NNTP tới %s:%d đã bị ngắt. Đang kết nối lại...\n" #: libsylph/news.c:377 #, c-format msgid "article %d has been already cached.\n" msgstr "văn bản %d vừa được đưa vào bộ đệm.\n" #: libsylph/news.c:397 #, c-format msgid "getting article %d...\n" msgstr "đang lấy văn bản %d...\n" #: libsylph/news.c:401 #, c-format msgid "can't read article %d\n" msgstr "không thể đọc văn bản %d\n" #: libsylph/news.c:676 msgid "can't post article.\n" msgstr "không thể gửi bài viết.\n" #: libsylph/news.c:702 #, c-format msgid "can't retrieve article %d\n" msgstr "không thể lấy bài viết %d\n" #: libsylph/news.c:759 #, c-format msgid "can't select group: %s\n" msgstr "không chọn được nhóm: %s\n" #: libsylph/news.c:796 #, c-format msgid "invalid article range: %d - %d\n" msgstr "phạm vi bài không hợp lệ: %d - %d\n" #: libsylph/news.c:809 msgid "no new articles.\n" msgstr "không có bài mới.\n" #: libsylph/news.c:819 #, c-format msgid "getting xover %d - %d in %s...\n" msgstr "đang lấy xover %d - %d trong %s...\n" #: libsylph/news.c:823 msgid "can't get xover\n" msgstr "không lấy được vover\n" #: libsylph/news.c:833 msgid "error occurred while getting xover.\n" msgstr "có lỗi khi lấy xover.\n" #: libsylph/news.c:843 #, c-format msgid "invalid xover line: %s\n" msgstr "dòng xover không hợp lệ: %s\n" #: libsylph/news.c:862 libsylph/news.c:894 msgid "can't get xhdr\n" msgstr "không lấy được xhdr\n" #: libsylph/news.c:874 libsylph/news.c:906 msgid "error occurred while getting xhdr.\n" msgstr "có lỗi khi lấy xhdr.\n" #: libsylph/nntp.c:68 #, c-format msgid "Can't connect to NNTP server: %s:%d\n" msgstr "Không kết nối được với máy chủ NNTP: %s:%d\n" #: libsylph/nntp.c:164 libsylph/nntp.c:227 #, c-format msgid "protocol error: %s\n" msgstr "lỗi giao thức: %s\n" #: libsylph/nntp.c:187 libsylph/nntp.c:233 msgid "protocol error\n" msgstr "lỗi giao thức\n" #: libsylph/nntp.c:283 msgid "Error occurred while posting\n" msgstr "Có lỗi khi gửi\n" #: libsylph/nntp.c:363 msgid "Error occurred while sending command\n" msgstr "Có gỗi khi gửi lệnh\n" #: libsylph/pop.c:155 msgid "Required APOP timestamp not found in greeting\n" msgstr "Không thấy nhãn thời gian trong lời chào hỏi như yêu cầu\n" #: libsylph/pop.c:162 msgid "Timestamp syntax error in greeting\n" msgstr "Lỗi cú pháp nhãn thời gian trong lời chào hỏi\n" #: libsylph/pop.c:170 #, fuzzy msgid "Invalid timestamp in greeting\n" msgstr "Không thấy nhãn thời gian trong lời chào hỏi như yêu cầu\n" #: libsylph/pop.c:198 libsylph/pop.c:225 msgid "POP3 protocol error\n" msgstr "Lỗi giao thức POP3\n" #: libsylph/pop.c:270 #, c-format msgid "invalid UIDL response: %s\n" msgstr "hồi đáp UIDL không hợp lệ: %s\n" #: libsylph/pop.c:631 #, c-format msgid "POP3: Deleting expired message %d\n" msgstr "POP3: Đang xoá các thư hết hạn %d\n" #: libsylph/pop.c:640 #, c-format msgid "POP3: Skipping message %d (%d bytes)\n" msgstr "POP3: Đang bỏ qua thư %d (%d byte)\n" #: libsylph/pop.c:673 msgid "mailbox is locked\n" msgstr "hộp thư đã bị khoá\n" #: libsylph/pop.c:676 msgid "session timeout\n" msgstr "phiên làm việc hết giờ\n" #: libsylph/pop.c:682 libsylph/smtp.c:561 msgid "can't start TLS session\n" msgstr "không thể khởi động phiên TLS\n" #: libsylph/pop.c:689 libsylph/smtp.c:496 msgid "error occurred on authentication\n" msgstr "có lỗi khi xác thực\n" #: libsylph/pop.c:694 msgid "command not supported\n" msgstr "lệnh không được hỗ trợ\n" #: libsylph/pop.c:698 msgid "error occurred on POP3 session\n" msgstr "có lỗi trong phiên làm việc POP3\n" #: libsylph/prefs.c:196 libsylph/prefs.c:224 libsylph/prefs.c:269 #: libsylph/prefs_account.c:217 libsylph/prefs_account.c:231 msgid "failed to write configuration to file\n" msgstr "lỗi khi lưu cấu hình vào tập tin\n" #: libsylph/prefs.c:239 #, c-format msgid "Found %s\n" msgstr "Tìm thấy %s\n" #: libsylph/prefs.c:272 msgid "Configuration is saved.\n" msgstr "Cấu hình đã được lưu.\n" #: libsylph/prefs_common.c:503 #, fuzzy msgid "Junk mail filter (manual)" msgstr "Lọc thư rác" #: libsylph/prefs_common.c:506 msgid "Junk mail filter" msgstr "Lọc thư rác" #: libsylph/procmime.c:1142 msgid "procmime_get_text_content(): Code conversion failed.\n" msgstr "procmime_get_text_content(): Chuyển đổi mã thất bại.\n" #: libsylph/procmsg.c:655 msgid "can't open mark file\n" msgstr "không thể mở tập tin đánh dấu\n" #: libsylph/procmsg.c:1107 #, c-format msgid "can't fetch message %d\n" msgstr "không thể lấy thư %d\n" #: libsylph/procmsg.c:1423 #, c-format msgid "Print command line is invalid: `%s'\n" msgstr "Lệnh in không hợp lệ: `%s'\n" #: libsylph/recv.c:141 msgid "error occurred while retrieving data.\n" msgstr "có lỗi trong khi lấy dữ liệu.\n" #: libsylph/recv.c:183 libsylph/recv.c:215 libsylph/recv.c:230 msgid "Can't write to file.\n" msgstr "Không thể ghi vào tập tin.\n" #: libsylph/smtp.c:157 msgid "SMTP AUTH not available\n" msgstr "SMTP AUTH không sẵn có\n" #: libsylph/smtp.c:466 libsylph/smtp.c:516 msgid "bad SMTP response\n" msgstr "phản hồi SMTP tồi\n" #: libsylph/smtp.c:487 libsylph/smtp.c:505 libsylph/smtp.c:602 msgid "error occurred on SMTP session\n" msgstr "có lỗi trong phiên SMTP\n" #: libsylph/ssl.c:54 msgid "SSLv23 not available\n" msgstr "SSLv23 không sẵn có\n" #: libsylph/ssl.c:56 msgid "SSLv23 available\n" msgstr "SSLv23 hiện có\n" #: libsylph/ssl.c:65 msgid "TLSv1 not available\n" msgstr "TLSv1 không sẵn có\n" #: libsylph/ssl.c:67 msgid "TLSv1 available\n" msgstr "TLSv1 hiện có\n" #: libsylph/ssl.c:101 libsylph/ssl.c:108 msgid "SSL method not available\n" msgstr "Phương thức SSL không sẵn có\n" #: libsylph/ssl.c:114 msgid "Unknown SSL method *PROGRAM BUG*\n" msgstr "Phương thức SSL không xác định *PROGRAM BUG*\n" #: libsylph/ssl.c:120 msgid "Error creating ssl context\n" msgstr "Lỗi khi tạo ngữ cảnh ssl\n" #. Get the cipher #: libsylph/ssl.c:139 #, c-format msgid "SSL connection using %s\n" msgstr "Kết nối SSL sử dụng %s\n" #: libsylph/ssl.c:148 msgid "Server certificate:\n" msgstr "Máy chủ chứng nhận:\n" #: libsylph/ssl.c:151 #, c-format msgid " Subject: %s\n" msgstr " Tiêu đề: %s\n" #: libsylph/ssl.c:156 #, c-format msgid " Issuer: %s\n" msgstr " Người phát hành: %s\n" #: libsylph/utils.c:2682 libsylph/utils.c:2804 #, c-format msgid "writing to %s failed.\n" msgstr "thất bại khi ghi vào %s.\n" #~ msgid "can't change file mode\n" #~ msgstr "không thể đổi chế độ tập tin\n" libsylph-1.1.0/po/zh_CN.po0000644000175000017500000003525710756432605012263 00000000000000# Chinese translation of Sylpheed. # Copyright (C) 2000 Free Software Foundation, Inc. # Xiangxin Luo , 2000 for initial GB2312 translation # Updated by : Zhangtao , 2002-5-14 # Updated by : Wang Jian , 2002,2005 # msgid "" msgstr "" "Project-Id-Version: sylpheed\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-02-19 10:48+0900\n" "PO-Revision-Date: 2005-03-17 09:22+0800\n" "Last-Translator: Wang Jian \n" "Language-Team: zh_CN \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" #: libsylph/account.c:56 msgid "Reading all config for each account...\n" msgstr "正在读取所有帐号的配置...\n" #: libsylph/imap.c:465 #, c-format msgid "IMAP4 connection to %s has been disconnected. Reconnecting...\n" msgstr "到 %s 的 IMAP4 连接已断开。正在重新连接...\n" #: libsylph/imap.c:520 libsylph/imap.c:526 #, fuzzy msgid "IMAP4 server disables LOGIN.\n" msgstr "IMAP4 服务器目录" #: libsylph/imap.c:602 #, c-format msgid "creating IMAP4 connection to %s:%d ...\n" msgstr "正在创建到 %s:%d 的 IMAP4 连接...\n" #: libsylph/imap.c:646 msgid "Can't start TLS session.\n" msgstr "无法启动 TLS 会话。\n" #: libsylph/imap.c:1120 #, fuzzy, c-format msgid "Getting message %d" msgstr "正在删除邮件 %d" #: libsylph/imap.c:1236 #, fuzzy, c-format msgid "Appending messages to %s (%d / %d)" msgstr "正在发送邮件 (%d / %d 字节)" #: libsylph/imap.c:1328 #, fuzzy, c-format msgid "Moving messages %s to %s ..." msgstr "正在移动邮件 %s%c%d 到 %s ...\n" #: libsylph/imap.c:1334 #, fuzzy, c-format msgid "Copying messages %s to %s ..." msgstr "正在复制邮件 %s%c%d 到 %s ...\n" #: libsylph/imap.c:1473 #, fuzzy, c-format msgid "Removing messages %s" msgstr "正在从 %s 获取邮件..." #: libsylph/imap.c:1479 #, c-format msgid "can't set deleted flags: %s\n" msgstr "无法设置删除标志:%s\n" #: libsylph/imap.c:1487 libsylph/imap.c:1582 msgid "can't expunge\n" msgstr "无法清除\n" #: libsylph/imap.c:1570 #, fuzzy, c-format msgid "Removing all messages in %s" msgstr "正在从 %s 获取邮件..." #: libsylph/imap.c:1576 msgid "can't set deleted flags: 1:*\n" msgstr "无法设置删除标志:1:*\n" #: libsylph/imap.c:1624 msgid "can't close folder\n" msgstr "无法关闭文件夹\n" #: libsylph/imap.c:1702 #, c-format msgid "root folder %s not exist\n" msgstr "根文件夹 %s 不存在\n" #: libsylph/imap.c:1891 libsylph/imap.c:1899 msgid "error occurred while getting LIST.\n" msgstr "获取列表时发生错误。\n" #: libsylph/imap.c:2013 #, c-format msgid "Can't create '%s'\n" msgstr "无法创建“%s”\n" #: libsylph/imap.c:2018 #, c-format msgid "Can't create '%s' under INBOX\n" msgstr "无法在收件箱中创建“%s”\n" #: libsylph/imap.c:2079 msgid "can't create mailbox: LIST failed\n" msgstr "无法创建邮箱:LIST 失败\n" #: libsylph/imap.c:2099 msgid "can't create mailbox\n" msgstr "无法创建邮箱\n" #: libsylph/imap.c:2203 #, c-format msgid "can't rename mailbox: %s to %s\n" msgstr "无法将邮箱 %s 重命名为 %s\n" #: libsylph/imap.c:2283 msgid "can't delete mailbox\n" msgstr "无法删除邮箱\n" #: libsylph/imap.c:2327 msgid "can't get envelope\n" msgstr "无法获取信封\n" #: libsylph/imap.c:2340 #, fuzzy, c-format msgid "Getting message headers (%d / %d)" msgstr "正在发送邮件 (%d / %d 字节)" #: libsylph/imap.c:2350 msgid "error occurred while getting envelope.\n" msgstr "获取信封时发生错误。\n" #: libsylph/imap.c:2372 #, c-format msgid "can't parse envelope: %s\n" msgstr "无法解析信封:%s\n" #: libsylph/imap.c:2496 #, c-format msgid "Can't connect to IMAP4 server: %s:%d\n" msgstr "无法连接到IMAP4服务器:%s:%d\n" #: libsylph/imap.c:2503 #, c-format msgid "Can't establish IMAP4 session with: %s:%d\n" msgstr "无法连接到IMAP4服务器:%s:%d\n" #: libsylph/imap.c:2578 msgid "can't get namespace\n" msgstr "无法获得名字空间\n" #: libsylph/imap.c:3111 #, c-format msgid "can't select folder: %s\n" msgstr "无法选择文件夹:%s\n" #: libsylph/imap.c:3146 #, fuzzy msgid "error on imap command: STATUS\n" msgstr "执行IMAP命令时发生错误:CLOSE\n" #: libsylph/imap.c:3269 libsylph/imap.c:3304 msgid "IMAP4 authentication failed.\n" msgstr "IMAP4 验证失败。\n" #: libsylph/imap.c:3353 msgid "IMAP4 login failed.\n" msgstr "IMAP4 登录失败。\n" #: libsylph/imap.c:3689 #, c-format msgid "can't append %s to %s\n" msgstr "无法把 %s 添加到 %s\n" #: libsylph/imap.c:3696 msgid "(sending file...)" msgstr "(正在发送文件...)" #: libsylph/imap.c:3725 #, c-format msgid "can't append message to %s\n" msgstr "无法追加邮件到 %s\n" #: libsylph/imap.c:3757 #, c-format msgid "can't copy %s to %s\n" msgstr "无法将 %s 复制到 %s\n" #: libsylph/imap.c:3781 #, c-format msgid "error while imap command: STORE %s %s\n" msgstr "执行IMAP命令时发生错误:STORE %s %s\n" #: libsylph/imap.c:3795 msgid "error while imap command: EXPUNGE\n" msgstr "执行IMAP命令时发生错误:EXPUNGE\n" #: libsylph/imap.c:3808 msgid "error while imap command: CLOSE\n" msgstr "执行IMAP命令时发生错误:CLOSE\n" #: libsylph/imap.c:4084 #, c-format msgid "iconv cannot convert UTF-7 to %s\n" msgstr "iconv 无法转换 UTF-7 到 %s\n" #: libsylph/imap.c:4114 #, c-format msgid "iconv cannot convert %s to UTF-7\n" msgstr "iconv 无法转换 %s 到 UTF-7\n" #: libsylph/mbox.c:50 libsylph/mbox.c:196 msgid "can't write to temporary file\n" msgstr "无法写入临时文件\n" #: libsylph/mbox.c:69 #, c-format msgid "Getting messages from %s into %s...\n" msgstr "正在从 %s 获取邮件到 %s...\n" #: libsylph/mbox.c:79 msgid "can't read mbox file.\n" msgstr "无法读取 mbox 文件。\n" #: libsylph/mbox.c:86 #, c-format msgid "invalid mbox format: %s\n" msgstr "无效的 mbox 格式:%s\n" #: libsylph/mbox.c:93 #, c-format msgid "malformed mbox: %s\n" msgstr "格式不正确的 mbox:%s\n" #: libsylph/mbox.c:110 msgid "can't open temporary file\n" msgstr "无法打开临时文件\n" #: libsylph/mbox.c:161 #, c-format msgid "" "unescaped From found:\n" "%s" msgstr "" "找到没有转码的发件人:\n" "%s" #: libsylph/mbox.c:250 #, c-format msgid "%d messages found.\n" msgstr "找到 %d 封邮件。\n" #: libsylph/mbox.c:268 #, c-format msgid "can't create lock file %s\n" msgstr "无法创建锁文件 %s\n" #: libsylph/mbox.c:269 msgid "use 'flock' instead of 'file' if possible.\n" msgstr "如果可能,用“flock”代替“file”。\n" #: libsylph/mbox.c:281 #, c-format msgid "can't create %s\n" msgstr "无法创建 %s\n" #: libsylph/mbox.c:287 msgid "mailbox is owned by another process, waiting...\n" msgstr "另一个进程拥有该邮箱,等待...\n" #: libsylph/mbox.c:316 #, c-format msgid "can't lock %s\n" msgstr "无法锁住 %s\n" #: libsylph/mbox.c:323 libsylph/mbox.c:373 msgid "invalid lock type\n" msgstr "无效的锁类型\n" #: libsylph/mbox.c:359 #, c-format msgid "can't unlock %s\n" msgstr "无法解锁 %s\n" #: libsylph/mbox.c:394 msgid "can't truncate mailbox to zero.\n" msgstr "无法将邮箱删除为空。\n" #: libsylph/mbox.c:418 #, c-format msgid "Exporting messages from %s into %s...\n" msgstr "正在从 %s 导出信件到 %s...\n" #: libsylph/mh.c:427 #, c-format msgid "can't copy message %s to %s\n" msgstr "无法复制邮件 %s 到 %s\n" #: libsylph/mh.c:502 libsylph/mh.c:625 msgid "Can't open mark file.\n" msgstr "无法打开标记文件。\n" #: libsylph/mh.c:509 libsylph/mh.c:631 msgid "the src folder is identical to the dest.\n" msgstr "源文件夹与目的文件夹是同一个。\n" #: libsylph/mh.c:634 #, c-format msgid "Copying message %s%c%d to %s ...\n" msgstr "正在复制邮件 %s%c%d 到 %s ...\n" #: libsylph/mh.c:965 libsylph/mh.c:978 #, c-format msgid "" "File `%s' already exists.\n" "Can't create folder." msgstr "" "文件“%s”已存在。\n" "无法创建文件件。" #: libsylph/mh.c:1500 #, c-format msgid "" "Directory name\n" "'%s' is not a valid UTF-8 string.\n" "Maybe the locale encoding is used for filename.\n" "If that is the case, you must set the following environmental variable\n" "(see README for detail):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" msgstr "" #: libsylph/news.c:207 #, c-format msgid "creating NNTP connection to %s:%d ...\n" msgstr "正在创建到 %s:%d 的NNTP连接...\n" #: libsylph/news.c:276 #, c-format msgid "NNTP connection to %s:%d has been disconnected. Reconnecting...\n" msgstr "到 %s:%d 的NNTP连接已断开。正在重新连接...\n" #: libsylph/news.c:377 #, c-format msgid "article %d has been already cached.\n" msgstr "文章 %d 已被缓存。\n" #: libsylph/news.c:397 #, c-format msgid "getting article %d...\n" msgstr "正在下载文章 %d...\n" #: libsylph/news.c:401 #, c-format msgid "can't read article %d\n" msgstr "无法读取文章 %d\n" #: libsylph/news.c:676 msgid "can't post article.\n" msgstr "无法发表文章。\n" #: libsylph/news.c:702 #, c-format msgid "can't retrieve article %d\n" msgstr "无法获取文章 %d\n" #: libsylph/news.c:759 #, c-format msgid "can't select group: %s\n" msgstr "无法选择组:%s\n" #: libsylph/news.c:796 #, c-format msgid "invalid article range: %d - %d\n" msgstr "无效的文章范围:%d - %d\n" #: libsylph/news.c:809 msgid "no new articles.\n" msgstr "没有新文章。\n" #: libsylph/news.c:819 #, c-format msgid "getting xover %d - %d in %s...\n" msgstr "正在获取 %3$s 里的 xover %1$d - %2$d...\n" #: libsylph/news.c:823 msgid "can't get xover\n" msgstr "无法获取 xover\n" #: libsylph/news.c:833 msgid "error occurred while getting xover.\n" msgstr "获取 xover 时发生错误。\n" #: libsylph/news.c:843 #, c-format msgid "invalid xover line: %s\n" msgstr "无效的 xover 行:%s\n" #: libsylph/news.c:862 libsylph/news.c:894 msgid "can't get xhdr\n" msgstr "无法获取 xhdr\n" #: libsylph/news.c:874 libsylph/news.c:906 msgid "error occurred while getting xhdr.\n" msgstr "获取 xhdr 时发生错误。\n" #: libsylph/nntp.c:68 #, c-format msgid "Can't connect to NNTP server: %s:%d\n" msgstr "无法连接到NNTP服务器:%s:%d\n" #: libsylph/nntp.c:164 libsylph/nntp.c:227 #, c-format msgid "protocol error: %s\n" msgstr "协议错误:%s\n" #: libsylph/nntp.c:187 libsylph/nntp.c:233 msgid "protocol error\n" msgstr "协议错误\n" #: libsylph/nntp.c:283 msgid "Error occurred while posting\n" msgstr "发表文章时发生错误\n" #: libsylph/nntp.c:363 msgid "Error occurred while sending command\n" msgstr "发送命令时发生错误\n" #: libsylph/pop.c:155 msgid "Required APOP timestamp not found in greeting\n" msgstr "在问候信息中没有发现需要的APOP时戳\n" #: libsylph/pop.c:162 msgid "Timestamp syntax error in greeting\n" msgstr "在问候信息中时间戳语法错误\n" #: libsylph/pop.c:170 #, fuzzy msgid "Invalid timestamp in greeting\n" msgstr "在问候信息中没有发现需要的APOP时戳\n" #: libsylph/pop.c:198 libsylph/pop.c:225 msgid "POP3 protocol error\n" msgstr "POP3 协议错误\n" #: libsylph/pop.c:270 #, c-format msgid "invalid UIDL response: %s\n" msgstr "无效的 UIDL 回应:%s\n" #: libsylph/pop.c:631 #, c-format msgid "POP3: Deleting expired message %d\n" msgstr "POP3: 正在删除过期邮件 %d\n" #: libsylph/pop.c:640 #, c-format msgid "POP3: Skipping message %d (%d bytes)\n" msgstr "POP3:跳过邮件 %d (%d 字节)\n" #: libsylph/pop.c:673 msgid "mailbox is locked\n" msgstr "信箱被锁住了\n" #: libsylph/pop.c:676 msgid "session timeout\n" msgstr "会话超时\n" #: libsylph/pop.c:682 libsylph/smtp.c:561 msgid "can't start TLS session\n" msgstr "无法启动 TLS 会话\n" #: libsylph/pop.c:689 libsylph/smtp.c:496 msgid "error occurred on authentication\n" msgstr "验证时发生错误\n" #: libsylph/pop.c:694 msgid "command not supported\n" msgstr "不支持的命令\n" #: libsylph/pop.c:698 msgid "error occurred on POP3 session\n" msgstr "POP3 会话发生错误\n" #: libsylph/prefs.c:196 libsylph/prefs.c:224 libsylph/prefs.c:269 #: libsylph/prefs_account.c:217 libsylph/prefs_account.c:231 msgid "failed to write configuration to file\n" msgstr "无法写入配置文件\n" #: libsylph/prefs.c:239 #, c-format msgid "Found %s\n" msgstr "发现 %s\n" #: libsylph/prefs.c:272 msgid "Configuration is saved.\n" msgstr "配置已经保存。\n" #: libsylph/prefs_common.c:503 #, fuzzy msgid "Junk mail filter (manual)" msgstr "文件夹:" #: libsylph/prefs_common.c:506 #, fuzzy msgid "Junk mail filter" msgstr "文件夹:" #: libsylph/procmime.c:1142 msgid "procmime_get_text_content(): Code conversion failed.\n" msgstr "procmime_get_text_content():代码转换失败。\n" #: libsylph/procmsg.c:655 msgid "can't open mark file\n" msgstr "无法打开标记文件\n" #: libsylph/procmsg.c:1107 #, c-format msgid "can't fetch message %d\n" msgstr "无法获取邮件 %d\n" #: libsylph/procmsg.c:1423 #, c-format msgid "Print command line is invalid: `%s'\n" msgstr "打印命令行无效:“%s”\n" #: libsylph/recv.c:141 msgid "error occurred while retrieving data.\n" msgstr "下载数据时发生错误。\n" #: libsylph/recv.c:183 libsylph/recv.c:215 libsylph/recv.c:230 msgid "Can't write to file.\n" msgstr "无法写入文件。\n" #: libsylph/smtp.c:157 msgid "SMTP AUTH not available\n" msgstr "SMTP验证不可用\n" #: libsylph/smtp.c:466 libsylph/smtp.c:516 msgid "bad SMTP response\n" msgstr "错误的 SMTP 回应\n" #: libsylph/smtp.c:487 libsylph/smtp.c:505 libsylph/smtp.c:602 msgid "error occurred on SMTP session\n" msgstr "SMTP 会话发生错误\n" #: libsylph/ssl.c:54 msgid "SSLv23 not available\n" msgstr "SSLv23不可用\n" #: libsylph/ssl.c:56 msgid "SSLv23 available\n" msgstr "SSLv23可用\n" #: libsylph/ssl.c:65 msgid "TLSv1 not available\n" msgstr "TLSv1不可用\n" #: libsylph/ssl.c:67 msgid "TLSv1 available\n" msgstr "TLSv1可用\n" #: libsylph/ssl.c:101 libsylph/ssl.c:108 msgid "SSL method not available\n" msgstr "SSL方法不可用\n" #: libsylph/ssl.c:114 msgid "Unknown SSL method *PROGRAM BUG*\n" msgstr "不知道的SSL方法 *程序错误*\n" #: libsylph/ssl.c:120 msgid "Error creating ssl context\n" msgstr "创建SSL上下文时发生错误\n" #. Get the cipher #: libsylph/ssl.c:139 #, c-format msgid "SSL connection using %s\n" msgstr "使用 %s 的SSL连接\n" #: libsylph/ssl.c:148 msgid "Server certificate:\n" msgstr "服务器证书:\n" #: libsylph/ssl.c:151 #, c-format msgid " Subject: %s\n" msgstr " 标题:%s\n" #: libsylph/ssl.c:156 #, c-format msgid " Issuer: %s\n" msgstr " 签发者:%s\n" #: libsylph/utils.c:2682 libsylph/utils.c:2804 #, c-format msgid "writing to %s failed.\n" msgstr "写入 %s 时失败。\n" #~ msgid "can't change file mode\n" #~ msgstr "无法改变文件属性\n" libsylph-1.1.0/po/zh_TW.po0000644000175000017500000003574110756432605012313 00000000000000# Traditional Chinese Messages for sylpheed # Copyright (C) 2000, 04, 05 Free Software Foundation, Inc. # Xiangxin Luo , 2000 # Frank J. J. Weng , 2004 # Wei-Lun Chao , 2005 # msgid "" msgstr "" "Project-Id-Version: sylpheed 2.1.4\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2008-02-19 10:48+0900\n" "PO-Revision-Date: 2005-10-25 16:23+0800\n" "Last-Translator: Wei-Lun Chao \n" "Language-Team: Chinese (traditional) \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" #: libsylph/account.c:56 msgid "Reading all config for each account...\n" msgstr "讀取所有帳號的設定中...\n" #: libsylph/imap.c:465 #, c-format msgid "IMAP4 connection to %s has been disconnected. Reconnecting...\n" msgstr "到 %s 的 IMAP4 連線被中斷了。重新連線中...\n" #: libsylph/imap.c:520 libsylph/imap.c:526 msgid "IMAP4 server disables LOGIN.\n" msgstr "IMAP4 伺服器停用登入。\n" #: libsylph/imap.c:602 #, c-format msgid "creating IMAP4 connection to %s:%d ...\n" msgstr "正在產生 IMAP4 連線到 %s:%d ...\n" #: libsylph/imap.c:646 msgid "Can't start TLS session.\n" msgstr "無法開啟 TLS 連線\n" #: libsylph/imap.c:1120 #, c-format msgid "Getting message %d" msgstr "擷取第 %d 號郵件" #: libsylph/imap.c:1236 #, c-format msgid "Appending messages to %s (%d / %d)" msgstr "附加郵件至 %s (%d / %d)" #: libsylph/imap.c:1328 #, c-format msgid "Moving messages %s to %s ..." msgstr "正在移動郵件 %s 到 %s ..." #: libsylph/imap.c:1334 #, c-format msgid "Copying messages %s to %s ..." msgstr "正在複製郵件 %s 到 %s ..." #: libsylph/imap.c:1473 #, c-format msgid "Removing messages %s" msgstr "正在移除郵件 %s" #: libsylph/imap.c:1479 #, c-format msgid "can't set deleted flags: %s\n" msgstr "無法設定刪除的旗標:%s\n" #: libsylph/imap.c:1487 libsylph/imap.c:1582 msgid "can't expunge\n" msgstr "無法刪除\n" #: libsylph/imap.c:1570 #, c-format msgid "Removing all messages in %s" msgstr "正在移除 %s 中的所有郵件" #: libsylph/imap.c:1576 msgid "can't set deleted flags: 1:*\n" msgstr "無法設定刪除的旗標:1:*\n" #: libsylph/imap.c:1624 msgid "can't close folder\n" msgstr "無法選擇資料夾\n" #: libsylph/imap.c:1702 #, c-format msgid "root folder %s not exist\n" msgstr "根資料夾 %s 不存在。\n" #: libsylph/imap.c:1891 libsylph/imap.c:1899 msgid "error occurred while getting LIST.\n" msgstr "取得 LIST 時發生錯誤。\n" #: libsylph/imap.c:2013 #, c-format msgid "Can't create '%s'\n" msgstr "無法產生 %s\n" #: libsylph/imap.c:2018 #, c-format msgid "Can't create '%s' under INBOX\n" msgstr "無法在收件夾下產生 %s\n" #: libsylph/imap.c:2079 msgid "can't create mailbox: LIST failed\n" msgstr "無法產生信箱:LIST 失敗\n" #: libsylph/imap.c:2099 msgid "can't create mailbox\n" msgstr "無法產生信箱\n" #: libsylph/imap.c:2203 #, c-format msgid "can't rename mailbox: %s to %s\n" msgstr "信箱 %s 無法更名為 %s\n" #: libsylph/imap.c:2283 msgid "can't delete mailbox\n" msgstr "無法刪除信箱\n" #: libsylph/imap.c:2327 msgid "can't get envelope\n" msgstr "無法取得信封。\n" #: libsylph/imap.c:2340 #, c-format msgid "Getting message headers (%d / %d)" msgstr "擷取郵件表頭 (%d / %d)" #: libsylph/imap.c:2350 msgid "error occurred while getting envelope.\n" msgstr "取得信封時發生錯誤。\n" #: libsylph/imap.c:2372 #, c-format msgid "can't parse envelope: %s\n" msgstr "無法解析信封:%s\n" #: libsylph/imap.c:2496 #, c-format msgid "Can't connect to IMAP4 server: %s:%d\n" msgstr "無法連線到 IMAP4 伺服器:%s:%d\n" #: libsylph/imap.c:2503 #, c-format msgid "Can't establish IMAP4 session with: %s:%d\n" msgstr "無法產生 IMAP4 連線:%s:%d\n" #: libsylph/imap.c:2578 msgid "can't get namespace\n" msgstr "無法取得信封。\n" #: libsylph/imap.c:3111 #, c-format msgid "can't select folder: %s\n" msgstr "無法選擇資料夾:%s\n" #: libsylph/imap.c:3146 msgid "error on imap command: STATUS\n" msgstr "發生錯誤的 imap 命令: STATUS\n" #: libsylph/imap.c:3269 libsylph/imap.c:3304 msgid "IMAP4 authentication failed.\n" msgstr "IMAP4 認證失敗\n" #: libsylph/imap.c:3353 msgid "IMAP4 login failed.\n" msgstr "IMAP4 登入失敗。\n" #: libsylph/imap.c:3689 #, c-format msgid "can't append %s to %s\n" msgstr "無法將郵件從 %s 搬移到 %s。\n" #: libsylph/imap.c:3696 msgid "(sending file...)" msgstr "(送出檔案 ...)" #: libsylph/imap.c:3725 #, c-format msgid "can't append message to %s\n" msgstr "無法附加訊息到 %s\n" #: libsylph/imap.c:3757 #, c-format msgid "can't copy %s to %s\n" msgstr "無法將郵件 %s 移到 %s\n" #: libsylph/imap.c:3781 #, c-format msgid "error while imap command: STORE %s %s\n" msgstr "imap 發生錯誤,命令為: STORE %s %s\n" #: libsylph/imap.c:3795 msgid "error while imap command: EXPUNGE\n" msgstr "imap 發生錯誤,命令為: EXPUNGE\n" #: libsylph/imap.c:3808 msgid "error while imap command: CLOSE\n" msgstr "imap 發生錯誤,命令為: CLOSE\n" #: libsylph/imap.c:4084 #, c-format msgid "iconv cannot convert UTF-7 to %s\n" msgstr "無法將 UTF-7 轉換為 %s\n" #: libsylph/imap.c:4114 #, c-format msgid "iconv cannot convert %s to UTF-7\n" msgstr "無法轉換 %s 為 UTF-7\n" #: libsylph/mbox.c:50 libsylph/mbox.c:196 msgid "can't write to temporary file\n" msgstr "無法寫入暫存檔。\n" #: libsylph/mbox.c:69 #, c-format msgid "Getting messages from %s into %s...\n" msgstr "從 %s 中取得郵件放入 %s...\n" #: libsylph/mbox.c:79 msgid "can't read mbox file.\n" msgstr "無法讀取 mbox 檔案。\n" #: libsylph/mbox.c:86 #, c-format msgid "invalid mbox format: %s\n" msgstr "不合法的 mbox 格式:%s\n" #: libsylph/mbox.c:93 #, c-format msgid "malformed mbox: %s\n" msgstr "損壞的 mbox: %s\n" #: libsylph/mbox.c:110 msgid "can't open temporary file\n" msgstr "無法開啟暫存檔。\n" #: libsylph/mbox.c:161 #, c-format msgid "" "unescaped From found:\n" "%s" msgstr "" "不完整的 From 格式:\n" "%s" #: libsylph/mbox.c:250 #, c-format msgid "%d messages found.\n" msgstr "共有 %d 封郵件。\n" #: libsylph/mbox.c:268 #, c-format msgid "can't create lock file %s\n" msgstr "無法開啟檔案 %s\n" #: libsylph/mbox.c:269 msgid "use 'flock' instead of 'file' if possible.\n" msgstr "如果可以,請使用「flock」替代「file」。\n" #: libsylph/mbox.c:281 #, c-format msgid "can't create %s\n" msgstr "無法產生 %s\n" #: libsylph/mbox.c:287 msgid "mailbox is owned by another process, waiting...\n" msgstr "信箱正被其他的行程讀取中, 請稍候...\n" #: libsylph/mbox.c:316 #, c-format msgid "can't lock %s\n" msgstr "無法鎖住 %s\n" #: libsylph/mbox.c:323 libsylph/mbox.c:373 msgid "invalid lock type\n" msgstr "不合法的 lock 型態。\n" #: libsylph/mbox.c:359 #, c-format msgid "can't unlock %s\n" msgstr "%s 無法打開 \n" #: libsylph/mbox.c:394 msgid "can't truncate mailbox to zero.\n" msgstr "無法清除信箱。\n" #: libsylph/mbox.c:418 #, c-format msgid "Exporting messages from %s into %s...\n" msgstr "將郵件由 %s 匯出到 %s 中...\n" #: libsylph/mh.c:427 #, c-format msgid "can't copy message %s to %s\n" msgstr "無法將郵件從 %s 搬移到 %s。\n" #: libsylph/mh.c:502 libsylph/mh.c:625 msgid "Can't open mark file.\n" msgstr "無法開啟標記的檔案。\n" #: libsylph/mh.c:509 libsylph/mh.c:631 msgid "the src folder is identical to the dest.\n" msgstr "來源與目的資料夾相同。\n" #: libsylph/mh.c:634 #, c-format msgid "Copying message %s%c%d to %s ...\n" msgstr "正在複製訊息 %s%c%d 到 %s ...\n" #: libsylph/mh.c:965 libsylph/mh.c:978 #, c-format msgid "" "File `%s' already exists.\n" "Can't create folder." msgstr "" "檔案「%s」已存在。\n" "無法產生資料夾。" #: libsylph/mh.c:1500 #, c-format msgid "" "Directory name\n" "'%s' is not a valid UTF-8 string.\n" "Maybe the locale encoding is used for filename.\n" "If that is the case, you must set the following environmental variable\n" "(see README for detail):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" msgstr "" "目錄名稱\n" "「%s」並非有效的 UTF-8 字串。\n" "也許語區編碼是用於檔案名稱。\n" "此種情況下,您必須設定下述的環境變數 (參看 README 以獲得詳細資料):\n" "\n" "\tG_FILENAME_ENCODING=@locale\n" #: libsylph/news.c:207 #, c-format msgid "creating NNTP connection to %s:%d ...\n" msgstr "產生新聞通訊協定連線到 %s:%d , 請稍候...\n" #: libsylph/news.c:276 #, c-format msgid "NNTP connection to %s:%d has been disconnected. Reconnecting...\n" msgstr "到 %s:%d 的新聞通訊協定連線被中斷了。重新連線中...\n" #: libsylph/news.c:377 #, c-format msgid "article %d has been already cached.\n" msgstr "文章 %d 已經被暫存於快取之中。\n" #: libsylph/news.c:397 #, c-format msgid "getting article %d...\n" msgstr "正在擷取文章 %d...\n" #: libsylph/news.c:401 #, c-format msgid "can't read article %d\n" msgstr "無法讀取文章 %d\n" #: libsylph/news.c:676 msgid "can't post article.\n" msgstr "無法發表文章。\n" #: libsylph/news.c:702 #, c-format msgid "can't retrieve article %d\n" msgstr "無法取得文章 %d\n" #: libsylph/news.c:759 #, c-format msgid "can't select group: %s\n" msgstr "無法選擇新聞群組:%s\n" #: libsylph/news.c:796 #, c-format msgid "invalid article range: %d - %d\n" msgstr "錯誤的文章範圍:%d - %d\n" #: libsylph/news.c:809 msgid "no new articles.\n" msgstr "沒有新文章。\n" #: libsylph/news.c:819 #, c-format msgid "getting xover %d - %d in %s...\n" msgstr "正在擷取 xover %d - %d 於 %s...\n" #: libsylph/news.c:823 msgid "can't get xover\n" msgstr "無法取得 xover\n" #: libsylph/news.c:833 msgid "error occurred while getting xover.\n" msgstr "取得 xover 時發生錯誤。\n" #: libsylph/news.c:843 #, c-format msgid "invalid xover line: %s\n" msgstr "xover 內容錯誤:%s\n" #: libsylph/news.c:862 libsylph/news.c:894 msgid "can't get xhdr\n" msgstr "無法取得 xhdr\n" #: libsylph/news.c:874 libsylph/news.c:906 msgid "error occurred while getting xhdr.\n" msgstr "取得 xhdr 時發生錯誤。\n" #: libsylph/nntp.c:68 #, c-format msgid "Can't connect to NNTP server: %s:%d\n" msgstr "無法連線到新聞伺服器:%s:%d\n" #: libsylph/nntp.c:164 libsylph/nntp.c:227 #, c-format msgid "protocol error: %s\n" msgstr "通訊協定有錯誤:%s\n" #: libsylph/nntp.c:187 libsylph/nntp.c:233 msgid "protocol error\n" msgstr "通訊協定有錯誤\n" #: libsylph/nntp.c:283 msgid "Error occurred while posting\n" msgstr "發表文章時發生錯誤\n" #: libsylph/nntp.c:363 msgid "Error occurred while sending command\n" msgstr "送出命令時發生錯誤。\n" #: libsylph/pop.c:155 msgid "Required APOP timestamp not found in greeting\n" msgstr "在接觸通訊中找不到 APOP 的時間戳記。\n" #: libsylph/pop.c:162 msgid "Timestamp syntax error in greeting\n" msgstr "接觸通訊中的時間戳記語法錯誤\n" #: libsylph/pop.c:170 #, fuzzy msgid "Invalid timestamp in greeting\n" msgstr "在接觸通訊中找不到 APOP 的時間戳記。\n" #: libsylph/pop.c:198 libsylph/pop.c:225 msgid "POP3 protocol error\n" msgstr "POP3 協定有錯誤\n" #: libsylph/pop.c:270 #, c-format msgid "invalid UIDL response: %s\n" msgstr "UIDL 回應錯誤:%s\n" #: libsylph/pop.c:631 #, c-format msgid "POP3: Deleting expired message %d\n" msgstr "POP3: 刪除過期的郵件 %d\n" #: libsylph/pop.c:640 #, c-format msgid "POP3: Skipping message %d (%d bytes)\n" msgstr "POP3: 略過郵件 %d (%d 位元組)\n" #: libsylph/pop.c:673 msgid "mailbox is locked\n" msgstr "信箱已被鎖定,可能前一次擷取未完成。\n" #: libsylph/pop.c:676 msgid "session timeout\n" msgstr "作業逾時\n" #: libsylph/pop.c:682 libsylph/smtp.c:561 msgid "can't start TLS session\n" msgstr "無法啟動 TLS 工作階段\n" #: libsylph/pop.c:689 libsylph/smtp.c:496 msgid "error occurred on authentication\n" msgstr "認證時發生錯誤\n" #: libsylph/pop.c:694 msgid "command not supported\n" msgstr "命令未支援\n" #: libsylph/pop.c:698 msgid "error occurred on POP3 session\n" msgstr "使用 POP3 通訊協定時發生錯誤\n" #: libsylph/prefs.c:196 libsylph/prefs.c:224 libsylph/prefs.c:269 #: libsylph/prefs_account.c:217 libsylph/prefs_account.c:231 msgid "failed to write configuration to file\n" msgstr "寫入組態設定時失敗。\n" #: libsylph/prefs.c:239 #, c-format msgid "Found %s\n" msgstr "找到 %s\n" #: libsylph/prefs.c:272 msgid "Configuration is saved.\n" msgstr "組態設定已儲存。\n" #: libsylph/prefs_common.c:503 #, fuzzy msgid "Junk mail filter (manual)" msgstr "垃圾郵件資料夾" #: libsylph/prefs_common.c:506 msgid "Junk mail filter" msgstr "垃圾郵件資料夾" #: libsylph/procmime.c:1142 msgid "procmime_get_text_content(): Code conversion failed.\n" msgstr "procmime_get_text_content(): 轉碼失敗。\n" #: libsylph/procmsg.c:655 msgid "can't open mark file\n" msgstr "無法開啟標示的檔案 \n" #: libsylph/procmsg.c:1107 #, c-format msgid "can't fetch message %d\n" msgstr "無法擷取郵件 %d\n" #: libsylph/procmsg.c:1423 #, c-format msgid "Print command line is invalid: `%s'\n" msgstr "列印命令錯誤:「%s」\n" #: libsylph/recv.c:141 msgid "error occurred while retrieving data.\n" msgstr "擷取資料時發生錯誤。\n" #: libsylph/recv.c:183 libsylph/recv.c:215 libsylph/recv.c:230 msgid "Can't write to file.\n" msgstr "無法寫入檔案。\n" #: libsylph/smtp.c:157 msgid "SMTP AUTH not available\n" msgstr "不支援 SMTP 認證\n" #: libsylph/smtp.c:466 libsylph/smtp.c:516 msgid "bad SMTP response\n" msgstr "SMTP 回覆錯誤\n" #: libsylph/smtp.c:487 libsylph/smtp.c:505 libsylph/smtp.c:602 msgid "error occurred on SMTP session\n" msgstr "SMTP 認證時發生錯誤\n" #: libsylph/ssl.c:54 msgid "SSLv23 not available\n" msgstr "不支援 SSLv23\n" #: libsylph/ssl.c:56 msgid "SSLv23 available\n" msgstr "支援 SSLv23\n" #: libsylph/ssl.c:65 msgid "TLSv1 not available\n" msgstr "不支援 TLSv1\n" #: libsylph/ssl.c:67 msgid "TLSv1 available\n" msgstr "支援 TLSv1\n" #: libsylph/ssl.c:101 libsylph/ssl.c:108 msgid "SSL method not available\n" msgstr "不支援 SSL\n" #: libsylph/ssl.c:114 msgid "Unknown SSL method *PROGRAM BUG*\n" msgstr "未知的 SSL 操作錯誤\n" #: libsylph/ssl.c:120 msgid "Error creating ssl context\n" msgstr "SSL 傳輸發生錯誤\n" #. Get the cipher #: libsylph/ssl.c:139 #, c-format msgid "SSL connection using %s\n" msgstr "使用 %s 進行 SSL 連線\n" #: libsylph/ssl.c:148 msgid "Server certificate:\n" msgstr "伺服器認證:\n" #: libsylph/ssl.c:151 #, c-format msgid " Subject: %s\n" msgstr " 主旨: %s\n" #: libsylph/ssl.c:156 #, c-format msgid " Issuer: %s\n" msgstr " 發信人: %s\n" #: libsylph/utils.c:2682 libsylph/utils.c:2804 #, c-format msgid "writing to %s failed.\n" msgstr "寫入到 %s 的動作失敗。\n" #~ msgid "can't change file mode\n" #~ msgstr "無法改變檔案型態\n" libsylph-1.1.0/po/bg.gmo0000644000175000017500000002700510756432605012006 00000000000000l|0 1 ? N b %t $   *  3 M c !|   & . . $8 ] >{  @  "% %H $n ' .    6 H ^ s  # ! $ .J^s" 2F[k|9Tm ')&Qx!#'#&$J&o "&&(?!_!0+?Qau)+< J`(t%SR,jBEO 9p6.>AO;>g tB7L)QV{'NFIAKe!+(*1\rc..#!R4tH-. IO * F C !]O!A!%!=",S"R"*"+"**#NU#?#8#9$7W$6$U$7%4T%O%P%8*&Vc&*&F&.,':['9'('('1"(4T(2(8(9(K/)/{)1)5)R*'f*1*>*>*/>+)n+$+6+Y+N, m,",&,;,'-M<-O-*-)'RQ5Hf/O2J$-iT0S j9 3d*EFPcGk1!7 V\_;^U h"<.DINgaBX?K&Z]8,(>#Ae[:C%Y =l4W+ 6M`L@b Issuer: %s Subject: %s %d messages found. (sending file...)Can't connect to IMAP4 server: %s:%d Can't connect to NNTP server: %s:%d Can't create '%s' Can't create '%s' under INBOX Can't establish IMAP4 session with: %s:%d Can't open mark file. Can't start TLS session. Can't write to file. Configuration is saved. Copying message %s%c%d to %s ... Error creating ssl context Error occurred while posting Exporting messages from %s into %s... File `%s' already exists. Can't create folder.Found %s Getting messages from %s into %s... IMAP4 authentication failed. IMAP4 connection to %s has been disconnected. Reconnecting... IMAP4 login failed. NNTP connection to %s:%d has been disconnected. Reconnecting... POP3 protocol error POP3: Deleting expired message %d POP3: Skipping message %d (%d bytes) Print command line is invalid: `%s' Reading all config for each account... Required APOP timestamp not found in greeting SMTP AUTH not available SSL connection using %s SSL method not available SSLv23 available SSLv23 not available Server certificate: TLSv1 available TLSv1 not available Timestamp syntax error in greeting Unknown SSL method *PROGRAM BUG* article %d has been already cached. bad SMTP response can't append %s to %s can't append message to %s can't close folder can't copy %s to %s can't copy message %s to %s can't create %s can't create lock file %s can't create mailbox can't create mailbox: LIST failed can't delete mailbox can't expunge can't fetch message %d can't get envelope can't get namespace can't get xhdr can't get xover can't lock %s can't open mark file can't open temporary file can't parse envelope: %s can't post article. can't read article %d can't read mbox file. can't rename mailbox: %s to %s can't retrieve article %d can't select folder: %s can't set deleted flags: %s can't set deleted flags: 1:* can't start TLS session can't truncate mailbox to zero. can't unlock %s can't write to temporary file command not supported creating IMAP4 connection to %s:%d ... creating NNTP connection to %s:%d ... error occurred on POP3 session error occurred on SMTP session error occurred on authentication error occurred while getting LIST. error occurred while getting envelope. error occurred while getting xhdr. error occurred while getting xover. error occurred while retrieving data. error while imap command: CLOSE error while imap command: EXPUNGE error while imap command: STORE %s %s failed to write configuration to file getting article %d... getting xover %d - %d in %s... iconv cannot convert %s to UTF-7 iconv cannot convert UTF-7 to %s invalid lock type invalid mbox format: %s invalid xover line: %s mailbox is locked mailbox is owned by another process, waiting... malformed mbox: %s no new articles. protocol error protocol error: %s root folder %s not exist session timeout the src folder is identical to the dest. use 'flock' instead of 'file' if possible. writing to %s failed. Project-Id-Version: Sylpheed 0.9.8 Report-Msgid-Bugs-To: POT-Creation-Date: 2008-02-19 10:48+0900 PO-Revision-Date: 2004-01-09 02:06+0200 Last-Translator: Pavel Pyuter Language-Team: Bulgarian MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Издател: %s Субект: %s %d намерени съобщения. (изпращане на файл...)Не може да се установи връзка с IMAP4 сървър: %s:%d Не може да се установи връзка с NNTP сървър: %s:%d Не може да се създаде '%s' Не може да се създаде '%s' под Входящи Не може да се установи IMAP4 сесия с: %s:%d Не може да се отвори файлът с маркировките. Не може да се стартира TLS сесия. Не може да се запише във файл. Настройките са запазени. Копиране на съобщение %s%c%d във %s ... Грешка при създаване на ssl контекст Появи се грешка при публикуване Изнасяне на съобщения от %s във %s... Файлът `%s' вече съществува. Папката не може да се създаде.Намерени %s Получаване на съобщения от %s във %s... IMAP4 удостоверяване провалено. IMAP4 връзката до %s се разпадна. Свързване... IMAP4 влизане провалено. NNTP връзката до %s:%d беше прекъсната. Свързване... POP3 протоколна грешка POP3: Изтриване на съобщениe с изтекъл срок %d POP3: Прескачане на съобщение %d (%d байта) Невалиден команден ред за печат: `%s' Четене на конфигурация за всеки акаунт... Не е намерен необходим APOP времеви отпечатък в поздрава SMTP AUTH не е наличен SSL връзка използвайки %s не е наличен SSL метода наличен SSLv23 не е наличен SSLv23 Сертификат на сървъра: наличен TLSv1 не е наличен TLSv1 Синтактична грешка във времевия отпечатък в поздрава Непознат SSL метод *PROGRAM BUG* статия %d е вече кеширана. грешен SMTP отговор не може да се прибави %s към %s съобщението не може да се прибави към %s не може да затвори папка не може да се копира %s в %s не може да се копира съобщението %s във %s не може да се създаде %s не може да се създаде заключващ файл %s Не може да се създаде пощенска кутия Не може да се създаде пощенска кутия: LIST се провали Не може да се изтрие пощенска кутия не може да се заличи не може да се вземе съобщението %d не може да се вземе envelope не може да се получи пространството от имена не може да се получи xhdr не може да се получи xover не може да се заключи %s не може да се отвори файлът с маркировките не може да се отвори временен файл не може да се анализира envelope: %s не може да се публикува статия. не може да се прочете статия %d не може да се прочете mbox файл. Не може да се преименува пощенска кутия: %s до %s не може да се извлече статия %d не може да се избере папка: %s не могат да се установят изтрити флагове: %s не могат да се установят изтрити флагове: 1:* не може да се стартира TLS сесия пощенската кутия не може да се съкрати до нула. не може да се отключи %s не може да се запише във временен файл командата не се поддържа създаване на IMAP4 връзка до %s:%d ... създаване на NNTP връзка до %s:%d ... грешка при POP3 сесията грешка при SMTP сесията грешка при удостоверяване грешка при получаване на LIST. грешка при вземане на envelope. грешка при получаването на xhdr. грешка при получаването на xover. възникна грешка при получаване на данни. грешка при imap команда: CLOSE грешка при imap команда: EXPUNGE грешка при imap команда: STORE %s %s неуспешно записване на настройките във файл взимане на статия %d... получаване на xover %d - %d в %s... iconv не може да преобразува %s до UTF-7 iconv не може да преобразува UTF-7 до %s невалиден тип заключване невалиден mbox формат: %s невалиден xover ред: %s пощенската кутия е заключена кутията се притежава от друг процес, изчакване... деформиран mbox: %s няма нови статии. протоколна грешка протоколна грешка: %s коренната папка %s не съществува сесията е просрочена изходната папка е еднаква с назначението. използвайте 'flock' вместо 'file' ако е възможно. записът в %s се провали. libsylph-1.1.0/po/cs.gmo0000644000175000017500000002077510756432605012032 00000000000000d<\ %$ " *A l    !   &( .O ~ $  @  " %; $a ' .    ) ; Q f w # ! $   ! > O j "       *9Oj 4Uf'& !+#M'q#$&" &,Sj!!20Ev5)+1]Tt)(@i+.$:"T%w& 3 "'&J;q$(+-=1k0D1Z#'$ 2&G%n;"8Ocx""2/2b &(&O'k&  )/A.q.%&.K"k''( + I !f @ #  ; !G!X!m!,!/!!+7E[A9=WB5S`:8#1YIJ3%/$')] &b0!>ac4TM;*C@K6F_HX-VUd "G,^?Q <RPNO.D2 (\ZL Issuer: %s Subject: %s %d messages found. (sending file...)Can't connect to IMAP4 server: %s:%d Can't connect to NNTP server: %s:%d Can't create '%s' Can't create '%s' under INBOX Can't establish IMAP4 session with: %s:%d Can't open mark file. Can't start TLS session. Can't write to file. Configuration is saved. Copying message %s%c%d to %s ... Error creating ssl context Error occurred while posting Exporting messages from %s into %s... File `%s' already exists. Can't create folder.Found %s Getting messages from %s into %s... IMAP4 login failed. NNTP connection to %s:%d has been disconnected. Reconnecting... POP3 protocol error POP3: Deleting expired message %d POP3: Skipping message %d (%d bytes) Print command line is invalid: `%s' Reading all config for each account... Required APOP timestamp not found in greeting SMTP AUTH not available SSL connection using %s SSL method not available SSLv23 available SSLv23 not available Server certificate: TLSv1 available TLSv1 not available Timestamp syntax error in greeting Unknown SSL method *PROGRAM BUG* article %d has been already cached. bad SMTP response can't append %s to %s can't copy message %s to %s can't create %s can't create lock file %s can't create mailbox can't create mailbox: LIST failed can't delete mailbox can't expunge can't fetch message %d can't get envelope can't get namespace can't get xhdr can't get xover can't lock %s can't open mark file can't open temporary file can't parse envelope: %s can't post article. can't read article %d can't read mbox file. can't rename mailbox: %s to %s can't retrieve article %d can't select folder: %s can't start TLS session can't truncate mailbox to zero. can't unlock %s can't write to temporary file command not supported creating IMAP4 connection to %s:%d ... creating NNTP connection to %s:%d ... error occurred on POP3 session error occurred on SMTP session error occurred on authentication error occurred while getting LIST. error occurred while getting envelope. error occurred while getting xhdr. error occurred while getting xover. error occurred while retrieving data. error while imap command: EXPUNGE failed to write configuration to file getting article %d... getting xover %d - %d in %s... iconv cannot convert %s to UTF-7 iconv cannot convert UTF-7 to %s invalid article range: %d - %d invalid lock type invalid mbox format: %s invalid xover line: %s mailbox is locked mailbox is owned by another process, waiting... malformed mbox: %s no new articles. procmime_get_text_content(): Code conversion failed. protocol error protocol error: %s session timeout the src folder is identical to the dest. use 'flock' instead of 'file' if possible. writing to %s failed. Project-Id-Version: sylpheed Report-Msgid-Bugs-To: POT-Creation-Date: 2008-02-19 10:48+0900 PO-Revision-Date: 2003-05-30 13:31GMT+0100 Last-Translator: Radek Vybíral Language-Team: Czech MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Generator: KBabel 0.9.6 Vydavatel: %s Předmět: %s %d zpráv nalezeno. (posílám soubor...)Nemohu se spojit s IMAP4 serverem: %s:%d Nemohu se spojit s NNTP serverem: %s:%d Nemohu vytvořit '%s' Nemohu vytvořit '%s' v Doručené poště Nelze navázat relaci s IMAP4 serverem: %s:%d Nemohu otevřít označený soubor. Nelze spustit TLS sezení. Nemohu zapisovat do souboru. Konfigurace je uložena. Kopíruji zprávu %s%c%d do %s... Chyba při vytváření ssl kontextu Během odesílání se vyskytla chyba Exportuji zprávy z %s do %s... Soubor '%s' už existuje. Nemohu vytvořit složku.Nalezený %s Získávám zprávy z %s do %s... Neúspěšné přihlášení k IMAP4. NNTP spojení %s:%d bylo přerušeno. Obnovuji spojení... Chyba protokolu POP3 POP3: Vymazávám starou zprávu %d POP3: Přeskakuji zprávu %d (%d bytů) Neplatný příkazový řádek tisku: '%s' Načítám nastavení pro všechny účty... V pozdravu nebyla nalezena APOP časová značka SMTP AUTH je nedostupná SSL spojení používá %s SSL metoda je nedostupná SSLv23 je dostupné SSLv23 je nedostupné Certifikát serveru: TLSv1 je dostupná TLSv1 je nedostupná Chyba syntaxe pro časovou značku při pozdravu Neznámá SSL metoda *PROGRAM BUG* příspěvek %d už byl v mezipaměti. špatná odpověď od SMTP Nemohu přidat %s do %s Nemohu zkopírovat zprávu %s do %s Nemohu vytvořit %s Nemohu vytvořit uzamčený soubor %s nelze vytvořit poštovní schránku nelze vytvořit poštovní schránku: selhal příkaz LIST nelze smazat poštovní schránku nelze odstranit nelze načíst zprávu %d Nemohu načíst obálku nemohu najít obálku nelze získat xhdr nelze získat xover Nemohu uzamknout %s nelze otevřít označený soubor Nemohu otevřít dočasný soubor Nemohu analyzovat obálku: %s Nemohu odeslat příspěvek. Nemohu číst příspěvek %d Nemohu přečíst soubor s poštovní schránkou. nelze přejmenovat poštovní schránku: %s na %s Nemohu načíst příspěvek %d nelze vybrat složku: %s Nelze spustit TLS relaci nemůžu smazat poštovní schránku. Nemohu odemknout %s Nemohu zapisovat do dočasného souboru Příkaz není podporován vytvářím spojení IMAP4 s %s:%d ... Vytvářím NNTP spojení s %s:%d ... v POP3 relaci se vyskytla v SMTP relaci se vyskytla chyba Vyskytla se chyba v autentizaci Během příkazu LIST se vyskytla chyba. Během načítání obálky se vyskytla chyba. Během získávání xhdr se vyskytla chyba . Během získávání xover se vyskytla chyba. Během obnovy dat se vyskytla chyba. chyba příkazu služby imap: EXPUNGE Selhání při zápisu konfigurace do souboru Získávám příspěvek %d... získávám xover %d - %d v %s... iconv nemůže konvertovat %s na UTF-7 iconv nemůže konvertovat UTF-7 na %s neplatný rozsah příspěvků: %d - %d Neplatný typ zámku Neplatný formát poštovní schránky: %s Neplatná xover řádka: %s poštovní schránka je zamčena poštovní schránka je vlastněna jiným procesem, čekejte... Selhání poštovní schránky: %s Žádný nový příspěvek. procmime_get_text_content(): Neúspěšná konverze kódu. Chyba protokolu Chyba protokolu: %s vypršel čas relace zdrojová složka je stejná jako cílová. pokud to jde, použijte 'flock' místo 'file'. Neúspěšný zápis do %s. libsylph-1.1.0/po/da.gmo0000644000175000017500000002074610756432605012007 00000000000000id    2 %D $j   *    3 !L n  & . $ - >K  @  " % $> 'c .      . C T #i ! $    0A\"r +A\v * Cdu'&!#%'I#q$& "&%&Ls!!!:R0e5)'Q+j! *)=g~*&/#Vz(7 %!4=r9%(#$%H0n "6Ia!}& 0Ec&}!8Pc$ 0M"g$'($Mf|3$S'x'' "( K ^ x  ,   9!:!I! \!j!!/!!)'ML3bE-YZ0G$ReO.N f7 1`*CDKg_h/!5 QW[9P ":BFJd]@S=H&UX6,(<#?V8A%T ;i2a+ 4I\c>^ Issuer: %s Subject: %s %d messages found. (sending file...)Can't connect to IMAP4 server: %s:%d Can't connect to NNTP server: %s:%d Can't create '%s' Can't create '%s' under INBOX Can't establish IMAP4 session with: %s:%d Can't open mark file. Can't start TLS session. Can't write to file. Configuration is saved. Copying message %s%c%d to %s ... Error creating ssl context Error occurred while posting Exporting messages from %s into %s... File `%s' already exists. Can't create folder.Found %s Getting messages from %s into %s... IMAP4 authentication failed. IMAP4 connection to %s has been disconnected. Reconnecting... IMAP4 login failed. NNTP connection to %s:%d has been disconnected. Reconnecting... POP3 protocol error POP3: Deleting expired message %d POP3: Skipping message %d (%d bytes) Print command line is invalid: `%s' Reading all config for each account... Required APOP timestamp not found in greeting SMTP AUTH not available SSL connection using %s SSL method not available SSLv23 available SSLv23 not available Server certificate: TLSv1 available TLSv1 not available Timestamp syntax error in greeting Unknown SSL method *PROGRAM BUG* article %d has been already cached. bad SMTP response can't append %s to %s can't copy %s to %s can't copy message %s to %s can't create %s can't create lock file %s can't create mailbox can't create mailbox: LIST failed can't delete mailbox can't expunge can't fetch message %d can't get envelope can't get namespace can't get xhdr can't get xover can't lock %s can't open mark file can't open temporary file can't parse envelope: %s can't post article. can't read article %d can't read mbox file. can't rename mailbox: %s to %s can't retrieve article %d can't select folder: %s can't set deleted flags: %s can't start TLS session can't truncate mailbox to zero. can't unlock %s can't write to temporary file creating IMAP4 connection to %s:%d ... creating NNTP connection to %s:%d ... error occurred on SMTP session error occurred on authentication error occurred while getting LIST. error occurred while getting envelope. error occurred while getting xhdr. error occurred while getting xover. error occurred while retrieving data. error while imap command: CLOSE error while imap command: EXPUNGE error while imap command: STORE %s %s failed to write configuration to file getting article %d... getting xover %d - %d in %s... iconv cannot convert %s to UTF-7 iconv cannot convert UTF-7 to %s invalid article range: %d - %d invalid lock type invalid mbox format: %s invalid xover line: %s mailbox is locked mailbox is owned by another process, waiting... malformed mbox: %s no new articles. procmime_get_text_content(): Code conversion failed. protocol error protocol error: %s session timeout the src folder is identical to the dest. unescaped From found: %suse 'flock' instead of 'file' if possible. writing to %s failed. Project-Id-Version: sylpheed Report-Msgid-Bugs-To: POT-Creation-Date: 2008-02-19 10:48+0900 PO-Revision-Date: 2003-07-29 09:05+0200 Last-Translator: Andreas Hinz Language-Team: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Afsender: %s Emne: %s %d meddelelse fundet. (sender fil...)Ingen forbindelse med IMAP4 server: %s:%d Kan ikke forbinde til NNTP server: %s:%d kan ikke oprette '%s' kan ikke oprette '%s' Ingen forbindelse med IMAP4 server: %s:%d Kan ikke åbne markéret fil. Kan ikke starte TLS session. Kan ikke skrive til fil. Konfiguration er gemt. Kopierer meddelelse %s%c%d til %s ... Fejl ved oprettelse af SSL kontext Fejl ved afsendelse Eksporterer meddelelse fra %s til %s... Filen `%s' eksisterer allerede. Kan ikke oprette mappe.Fundet %s Modtager meddelelse fra %s til %s... IMAP4 godkendelse fejlede. IMAP4 forbindelse til %s blev afbrudt. Forbinder... IMAP4-Login fejlet. NNTP forbindelse til %s:%d blev afbrudt. Genforbinder... POP3 protokol fejl POP3: Sletter udløben meddelelse %d POP3: Sender meddelelse (%d / %d bytes) Udskrift kommando er ugyldig: `%s' Læs konfiguration for hver konto... Nødvendig APOP tid blev ikke fundet i velkomst SMTP AUTH ikke tilgænglig SSL forbindelse benytter %s SSL metode ikke tilgænglig SSLv23 tilgænglig SSLv23 ikke tilgænglig Server certifikat: TLSv1 tilgænglig TLSv1 ikke tilgænglig Tid syntax fejl i velkomst Ukendt SSL metode *PROGRAM FEJL* Artikel %d er allerede gemt. forkert SMTP svar kan ikke tilføje %s til %s kan ikke kopiere %s til %s kan ikke kopiere meddelelse %s til %s kan ikke oprette %s kan ikke oprette lock fil %s kan ikke oprette mailbox kan ikke oprette mailbox: LIST fejlet kan ikke slette mailbox kan ikke slette kan ikke hente meddelelse %d kan ikke modtage kovert kan ikke modtage namespace kan ikke modtage XHDR kan ikke modtage XOVER kan ikke låse %s kan ikke åbne markéret fil kan ikke åbne midlertidig fil kan ikke læse kuvert: %s kan ikke sende artikel. kann ikke læse artikel %d Kan ikke læse mbox fil. kan ikke omdøbe mailbox: %s til %s kan ikke modtage artikel %d kan ikke vælge mappe %s kan ikke sætte slettede flag: %s kan ikke starte TLS session kan ikke tømme mailbox. kan ikke låse %s op kan ikke skrive til midlertidig fil erstelle IMAP4-Verbindung zu %s:%d ... oprettet NNTP forbindelse til %s:%d ... fejl under SMTP session fejl ved godkendelse fejl ved modtagelse af LIST. fejl ved modtagelse af kuvert. fejl ved modtagelse af XHDR. fejl ved modtagelse af XOVER. fejl ved modtagelse af data. fejl ved IMAP kommand: CLOSE fejl ved IMAP kommand: EXPUNGE fejl ved IMAP kommando: STORE %s %s kunne ikke gemme konfiguration til fil modtager artikel %d... modtager XOVER %d - %d i %s... iconv can ikke konvertere %s til UTF-7 iconv kan ikke konvertere UTF-7 til %s ugyldigt artikel område: %d - %d ugyldig lock type ugyldigt mbox format: %s ugyldig XOVER linie: %s postkasse er låst mailbox hører til anden process, venter... ugyldig mbox format: %s ingen nye artikler. procmime_get_text_content(): Tegnsæt konverteringsfejl. protokol fejl protokol fejl: %s tid udløbet fra og til mappe er ens. ukodet Fra fundet: %sbenyt 'flock' i stedet for 'file' hvis muligt. fejl ved skrivning til %s. libsylph-1.1.0/po/de.gmo0000644000175000017500000002616410756432605012013 00000000000000}    " % $ : M *l     !  7  3 %Q &w .  ! $ 1>O@0"E%h$'. ;Tm#!$0Uh "#F\k '<Sj *K\{'&!!#C'g#$& "?&b&!! +Ffy05JZn)+  )?(i#,$!#E!e%"(- '7:_ *&# >/n%@" '8 ,` ' . " !B&!i!!!!!!!")(")R",|"""%"#&#)F#p####2##$0$2O$ $$#$$#$$%7A%y%%%'% % &":&']&(& &$&&) '7''W'&'#'#'!'(2/(b(((( ((! )%-)2S))()-),)"*$?*d*z*$**1*++B0+s++%++,+,0", S,2<. /k&RX 1j;vLW%90n{JC4 UqKg-t B5(h?Pb>z"c@_D]xFl6ZN=SeYO+ H*'opT8Mm7!G#rE,[\|ay}Vdus3fw QI:$)^A`i Issuer: %s Subject: %s %d messages found. (sending file...)Appending messages to %s (%d / %d)Can't connect to IMAP4 server: %s:%d Can't connect to NNTP server: %s:%d Can't create '%s' Can't create '%s' under INBOX Can't establish IMAP4 session with: %s:%d Can't open mark file. Can't start TLS session. Can't write to file. Configuration is saved. Copying message %s%c%d to %s ... Copying messages %s to %s ...Directory name '%s' is not a valid UTF-8 string. Maybe the locale encoding is used for filename. If that is the case, you must set the following environmental variable (see README for detail): G_FILENAME_ENCODING=@locale Error creating ssl context Error occurred while posting Error occurred while sending command Exporting messages from %s into %s... File `%s' already exists. Can't create folder.Found %s Getting message %dGetting message headers (%d / %d)Getting messages from %s into %s... IMAP4 authentication failed. IMAP4 connection to %s has been disconnected. Reconnecting... IMAP4 login failed. IMAP4 server disables LOGIN. Junk mail filterMoving messages %s to %s ...NNTP connection to %s:%d has been disconnected. Reconnecting... POP3 protocol error POP3: Deleting expired message %d POP3: Skipping message %d (%d bytes) Print command line is invalid: `%s' Reading all config for each account... Removing all messages in %sRemoving messages %sRequired APOP timestamp not found in greeting SMTP AUTH not available SSL connection using %s SSL method not available SSLv23 available SSLv23 not available Server certificate: TLSv1 available TLSv1 not available Timestamp syntax error in greeting Unknown SSL method *PROGRAM BUG* article %d has been already cached. bad SMTP response can't append %s to %s can't append message to %s can't close folder can't copy %s to %s can't copy message %s to %s can't create %s can't create lock file %s can't create mailbox can't create mailbox: LIST failed can't delete mailbox can't expunge can't fetch message %d can't get envelope can't get namespace can't get xhdr can't get xover can't lock %s can't open mark file can't open temporary file can't parse envelope: %s can't post article. can't read article %d can't read mbox file. can't rename mailbox: %s to %s can't retrieve article %d can't select folder: %s can't select group: %s can't set deleted flags: %s can't set deleted flags: 1:* can't start TLS session can't truncate mailbox to zero. can't unlock %s can't write to temporary file command not supported creating IMAP4 connection to %s:%d ... creating NNTP connection to %s:%d ... error occurred on POP3 session error occurred on SMTP session error occurred on authentication error occurred while getting LIST. error occurred while getting envelope. error occurred while getting xhdr. error occurred while getting xover. error occurred while retrieving data. error on imap command: STATUS error while imap command: CLOSE error while imap command: EXPUNGE error while imap command: STORE %s %s failed to write configuration to file getting article %d... getting xover %d - %d in %s... iconv cannot convert %s to UTF-7 iconv cannot convert UTF-7 to %s invalid UIDL response: %s invalid article range: %d - %d invalid lock type invalid mbox format: %s invalid xover line: %s mailbox is locked mailbox is owned by another process, waiting... malformed mbox: %s no new articles. procmime_get_text_content(): Code conversion failed. protocol error protocol error: %s root folder %s not exist session timeout the src folder is identical to the dest. unescaped From found: %suse 'flock' instead of 'file' if possible. writing to %s failed. Project-Id-Version: sylpheed Report-Msgid-Bugs-To: POT-Creation-Date: 2008-02-19 10:48+0900 PO-Revision-Date: 2006-07-30 17:35+0100 Last-Translator: Enrico Troeger Language-Team: German MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Poedit-Language: German X-Poedit-Country: GERMANY X-Poedit-Basepath: /home/enrico/src/sylpheed-svn/ Aussteller(in): %s Betreff: %s %d Nachrichten gefunden. (Datei versenden...)Hänge Nachricht an %s (%d / %d)Keine Verbindung mit IMAP4-Server: %s:%d keine Verbindung mit NNTP-Server: %s:%d Kann '%s' nicht erstellen Kann '%s' in INBOX nicht erstellen Kann IMAP4-Sitzung mit %s:%d nicht aufbauen Kann markierte Datei nicht öffnen. Kann TLS-Sitzung nicht beginnen. Kann nicht in Datei schreiben. Konfiguration wurde gespeichert. Kopiere Nachricht %s%c%d nach %s ... Kopiere Nachrichten %s nach %s ...Verzeichnisname '%s' ist keine gültige UTF-8 Zeichenkette. Vielleicht ist der lokale Zeichensatz im Dateinamen verwendet worden. In diesem Fall musst Du die folgende Umgebungsvariable setzen (siehe README für Details): G_FILENAME_ENCODING=@locale Fehler beim Erstellen des SSL-Kontextes Fehler beim Senden Fehler aufgetreten beim Senden eines Befehls Exportiere Nachrichten von %s in %s... Datei '%s' existiert bereits. Kann Ablage nicht erstellen.Gefunden %s Hole Nachricht %dHole Nachrichtenkopfzeilen (%d / %d bytes)Erhaltene Nachrichten von %s in %s... IMAP4-Beglaubigung fehlgeschlagen. IMAP4-Verbindung zu %s wurde unterbrochen. Verbinde erneut... IMAP4-Login fehlgeschlagen. IMAP-Server verhindert LOGIN. Spam-Mail FilterVerschiebe Nachrichten %s nach %s ...NNTP-Verbindung mit %s:%d wurde aufgehoben. Erneut verbinden... POP3-Protokollfehler POP3: Lösche abgelaufene Nachricht %d POP3: Nachricht %d überspringen (%d bytes) Druck-Befehlszeile ist ungültig: `%s' Lese alle Einstellungen für jeden Account... Entferne alle Nachrichten in %s...Entferne Nachrichten von %s...Erforderlichen APOP-Zeitstempel in der Begrüßung nicht gefunden SMTP AUTH nicht verfügbar SSL-Verbindung benutzt %s SSL-Methode nicht verfügbar SSLv23 verfügbar SSLv23 nicht verfügbar Server-Zertifikat: TLSv1 verfügbar TLSv1 nicht verfügbar Zeitstempel-Syntax-Fehler in Begrüßung Unbekannte SSL-Methode *PROGRAMM FEHLER* Artikel %d wurde schon zwischengespeichert. fehlerhafte SMTP-Antwort kann %s nicht an %s anhängen kann Nachricht nicht anhängen an %s kann Ablage nicht schließen kann %s nicht nach %s kopieren kann Nachricht %s nicht nach %s kopieren Kann %s nicht erstellen kann Sperrdatei %s nicht erstellen kann Mailbox nicht erstellen kann Mailbox nicht erstellen: LIST fehlgeschlagen kann Mailbox nicht löschen kann nicht löschen kann Nachricht %d nicht holen kann die Nachrichteneigenschaften nicht empfangen kann Namensraum nicht empfangen kann XHDR nicht bekommen kann Newsübersicht nicht bekommen kann %s nicht sperren kann markierte Datei nicht öffnen kann temporäre Datei nicht öffnen kann die Nachrichteneigenschaften nicht bearbeiten: %s kann Artikel nicht senden. kann Artikel %d nicht lesen Kann Mbox-Datei nicht lesen. kann Mailbox %s nicht in %s umbenennen kann Artikel %d nicht empfangen kann Ablage %s nicht auswählen kann die Gruppe: %s nicht wählen kann gelöschte Flags nicht setzen: %s kann gelöschte Flags nicht setzen: 1:* kann TLS-Sitzung nicht beginnen Kann Mailbox nicht auf null setzen. kann %s nicht entperren kann nicht in temporäre Datei schreiben Befehl wird nicht unterstützt erstelle IMAP4-Verbindung zu %s:%d ... erstelle NNTP-Verbindung zu %s:%d ... Fehler während einer POP3-Sitzung Fehler während einer SMTP-Sitzung Fehler während der Beglaubigung Fehler beim Empfang von LIST. Fehler beim Empfang der Nachrichteneigenschaften. Fehler beim Empfang von XHDR. Fehler beim Empfang der Newsübersicht. Fehler beim Empfang von Daten. Fehler beim IMAP-Befehl: STATUS Fehler beim IMAP-Befehl: CLOSE Fehler beim IMAP-Befehl: EXPUNGE Fehler beim IMAP-Befehl: STORE %s %s konnte nicht in die Konfigurationsdatei schreiben empfange Artikel %d... bekomme Newsübersicht %d - %d in %s... iconv kann %s nicht nach UTF-7 konvertieren iconv kann UTF-7 nicht nach %s konvertieren ungültige UIDL-Antwort: %s ungültiger Artikelbereich: %d - %d ungültiger Sperrtyp Ungültiges Mbox-Format: %s ungültige Newsübersichtszeile: %s Mailbox ist blockiert Mailbox gehört einem anderen Prozess, warten... zerstörte Mbox: %s Keine neuen Artikel. procmime_get_text_content(): Zeichensatzumsetzung fehlgeschlagen. Protokollfehler Protokollfehler: %s Wurzelverzeichnis %s existiert nicht Sitzungszeit abgelaufen Die Quellablage ist identisch mit dem Ziel. uncodiertes Von gefunden: %sBenutze, wenn möglich, 'flock' anstatt 'file'. Schreiben in %s fehlgeschlagen. libsylph-1.1.0/po/el.gmo0000644000175000017500000003237110756432605012020 00000000000000t\    % $: _ r *     ! > \ %z & .  ! $5 Z >x      @2 s " % $ ' :.O~#-!Q$s4"Jm #8Of  <'S&{!#'(#P$t& "&#&Jq!!':Sk0~)$+Nz}%&5$\\BC!jeWJ(MsF4;=6y?U>F{858n9R14If@Y8KT)> >B ? > =!&>!^e!4!&!; "*\"1"1")"0#HF#K#Q#)-$KW$K$I$I9%A%`%X&&}&5&-3'Ha'A'%'&(?9(_y(K(5%)J[)R)m)3g*B*I*L(+ru+C+Y,,2,=,8,;0-7l-E-T-V?.:.;.? /0M//~/1/5/H0_0*|0\0\1,a1;141&1)&2DP2e2*2+&3$R3(w39343d4Wt4,4 ps:#q8k)Nrb CS^&F*c0'Rm $dP`]5<J12+Y,V oQ!6eXOB_/-T;jH(4E%[\Wi>g MU3@ AKLa.f=7"h?lnIZ9DGt Issuer: %s Subject: %s %d messages found. (sending file...)Can't connect to IMAP4 server: %s:%d Can't connect to NNTP server: %s:%d Can't create '%s' Can't create '%s' under INBOX Can't establish IMAP4 session with: %s:%d Can't open mark file. Can't start TLS session. Can't write to file. Configuration is saved. Copying message %s%c%d to %s ... Copying messages %s to %s ...Error occurred while posting Error occurred while sending command Exporting messages from %s into %s... File `%s' already exists. Can't create folder.Found %s Getting message %dGetting message headers (%d / %d)Getting messages from %s into %s... IMAP4 authentication failed. IMAP4 connection to %s has been disconnected. Reconnecting... IMAP4 login failed. IMAP4 server disables LOGIN. Junk mail filterJunk mail filter (manual)Moving messages %s to %s ...NNTP connection to %s:%d has been disconnected. Reconnecting... POP3 protocol error POP3: Deleting expired message %d POP3: Skipping message %d (%d bytes) Print command line is invalid: `%s' Reading all config for each account... Removing all messages in %sRemoving messages %sRequired APOP timestamp not found in greeting SMTP AUTH not available SSL connection using %s SSL method not available SSLv23 available SSLv23 not available Server certificate: TLSv1 available TLSv1 not available Timestamp syntax error in greeting Unknown SSL method *PROGRAM BUG* article %d has been already cached. bad SMTP response can't append %s to %s can't close folder can't copy %s to %s can't copy message %s to %s can't create %s can't create lock file %s can't create mailbox can't create mailbox: LIST failed can't delete mailbox can't expunge can't fetch message %d can't get envelope can't get xhdr can't get xover can't lock %s can't open temporary file can't parse envelope: %s can't post article. can't read article %d can't read mbox file. can't rename mailbox: %s to %s can't retrieve article %d can't select folder: %s can't select group: %s can't start TLS session can't truncate mailbox to zero. can't unlock %s can't write to temporary file command not supported creating IMAP4 connection to %s:%d ... creating NNTP connection to %s:%d ... error occurred on POP3 session error occurred on SMTP session error occurred on authentication error occurred while getting LIST. error occurred while getting envelope. error occurred while getting xhdr. error occurred while getting xover. error occurred while retrieving data. error on imap command: STATUS error while imap command: CLOSE error while imap command: EXPUNGE error while imap command: STORE %s %s failed to write configuration to file getting article %d... getting xover %d - %d in %s... iconv cannot convert %s to UTF-7 iconv cannot convert UTF-7 to %s invalid UIDL response: %s invalid article range: %d - %d invalid lock type invalid mbox format: %s invalid xover line: %s mailbox is locked mailbox is owned by another process, waiting... malformed mbox: %s no new articles. protocol error protocol error: %s root folder %s not exist session timeout the src folder is identical to the dest. use 'flock' instead of 'file' if possible. writing to %s failed. Project-Id-Version: libsylph 1.0.0beta1 Report-Msgid-Bugs-To: POT-Creation-Date: 2008-02-19 10:48+0900 PO-Revision-Date: 2006-11-22 19:05+0200 Last-Translator: Stavros Giannouris Language-Team: Greek MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=2; plural=(n != 1); Εκδότης: %s Θέμα: %s Βρέθηκαν %d μηνύματα. (αποστολή αρχείου...)Δεν είναι δυνατή η σύνδεση στον διακομιστή IMAP4: %s:%d Δεν μπορώ να συνδεθώ στον NNTP server: %s:%d Δεν είναι δυνατή η δημιουργία του '%s' Δεν είναι δυνατή η δημιουργία του '%s' μέσα στα εισερχόμενα Δεν είναι δυνατή η δημιουργία συνεδρίας IMAP4: %s:%d Δεν είναι δυνατή η σημείωση του αρχείου. Δεν είναι δυνατό να ξεκινήσει συνεδρία TLS. Δεν είναι δυνατή η εγγραφή στο αρχείο. Οι ρυθμίσεις αποθηκεύτηκαν. Αντιγραφή μηνύματος %s%c%d στο %s ... Αντιγραφή μηνυμάτων %s στο %s ...Προέκυψε σφάλμα κατά την αποστολή Προέκυψε σφάλμα κατά την αποστολή της εντολής Εξαγωγή μηνυμάτων από το %s στο %s... Το αρχείο '%s' υπάρχει ήδη. Δεν είναι δυνατή η δημιουργία του φακέλου.Βρέθηκαν %s Λήψη μηνύματος %dΛήψη κεφαλίδων μηνυμάτων (%d / %d)Λήψη μηνυμάτων από το %s στο %s... Η πιστοποίηση στον IMAP4 απέτυχε. Η IMAP4 σύνδεση στο %s διακόπηκε. Επανασύνδεση... Η είσοδος στον IMAP4 απέτυχε. Ο διακομιστής IMAP4 απενεργοποίησε το LOGIN. Φίλτρο ανεπιθύμητης αλληλογραφίαςΦίλτρο ανεπιθύμητης αλληλογραφίας (χειροκίνητο)Μετακίνηση μηνυμάτων %s στο %s ...Η NNTP σύνδεση στο %s:%d διακόπηκε. Επανασύνδεση... Σφάλμα πρωτοκόλλου POP3 POP3: Διαγραφή ληγμένου μηνύματος %d POP3: Προσπέραση μηνύματος (%d / %d bytes) Η εντολή εκτύπωσης είναι άκυρη: '%s' Ανάγνωση ρυθμίσεων λογαριασμών... Διαγραφή όλων των μηνυμάτων στο %sΔιαγραφή μηνυμάτων %sΠροαπαιτούμενη timestamp APOP δεν βρέθηκε στο χαιρετισμό Το SMTP AUTH δεν είναι διαθέσιμο Σύνδεση SSL με χρήση %s Η μέθοδος SSL δεν είναι διαθέσιμη Το SSLv23 είναι διαθέσιμο Το SSLv23 δεν είναι διαθέσιμο Πιστοποιητικό διακομιστή: Το TLSv1 είναι διαθέσιμο Το TLSv1 δεν είναι διαθέσιμο Συντακτικό σφάλμα timestamp στο χαιρετισμό Άγνωστη μέθοδος SSL *ΣΦΑΛΜΑ ΣΤΟ ΠΡΟΓΡΑΜΜΑ* το άρθρο %d υπάρχει ήδη στην προσωρινή μνήμη. εσφαλμένη απάντηση SMTP δεν είναι δυνατή η προσάρτηση του %s στο %s δεν είναι δυνατό το κλείσιμο του φακέλου δεν είναι δυνατή η αντιγραφή του %s στο %s δεν μπορώ να αντιγράψω το μήνυμα %s στο %s Δεν είναι δυνατή η δημιουργία του %s Δεν είναι δυνατή η δημιουργία αρχείου κλειδώματος %s δεν είναι δυνατή η δημιουργία γραμματοκιβωτίου δεν είναι δυνατή η δημιουργία γραμματοκιβωτίου: η εντολή LIST απέτυχε δεν μπορώ να διαγράψω το mailbox δεν μπορώ να τα απαλείψω δεν είναι δυνατή η λήψη του μηνύματος %d δεν είναι δυνατή η λήψη του φακέλου δεν μπορώ να λάβω xhdr δεν μπορώ να λάβω xover δεν είναι δυνατό το κλείδωμα του %s δεν είναι δυνατό το άνοιγμα του προσωρινού αρχείου. δεν είναι δυνατή η ανάλυση του φακέλου: %s δεν μπορώ να στείλω το άρθρο. δεν είναι δυνατή η ανάγνωση του άρθρου %d δεν είναι δυνατή η ανάγνωση από το αρχείο mbox. Δεν είναι δυνατή η μετονομασία του γραμματοκιβωτίου: %s σε %s δεν μπορώ να λάβω το άρθρο %d δεν μπορώ να επιλέξω τον κατάλογο: %s δεν είναι δυνατή η επιλογή της ομάδας: %s δεν είναι δυνατό να ξεκινήσει συνεδρία TLS Δεν είναι δυνατή η περικοπή του γραμματοκιβωτίου σε μηδενικό. δεν είναι δυνατό το ξεκλείδωμα του %s δεν είναι δυνατή η εγγραφή στο προσωρινό αρχείο. η εντολή δεν υποστηρίζεται Δημιουργία σύνδεσης IMAP4 στο %s:%d ... δημιουργώ NNTP σύνδεση στο %s:%d ... Προέκυψε σφάλμα στη συνεδρία POP3 προέκυψε σφάλμα στη σύνοδο SMTP προέκυψε σφάλμα κατά την πιστοποίηση δημιουργήθηκε σφάλμα κατά τη λήψη της λίστας. Δημιουργήθηκε σφάλμα κατά τη λήψη του φακέλου. συνέβη σφάλμα καθώς λάμβανα xhdr. συνέβη σφάλμα καθώς λάμβανα xover. σφάλμα κατά τη λήψη των δεδομένων. σφάλμα στην εντολή imap: STATUS σφάλμα στην εντολή imap: CLOSE σφάλμα στην εντολή imap: EXPUNGE σφάλμα στην εντολή imap: STORE %s %s Η εγγραφή στο αρχείο ρυθμίσεων απέτυχε λήψη άρθρου %d... λαμβάνω xover %d - %d στο %s... Δεν είναι δυνατή η μετατροπή του %s σε UTF-7 από το iconv Δεν είναι δυνατή η μετατροπή του UTF-7 σε %s από το iconv Μη έγκυρη απάντηση UIDL: %s μη έγκυρη ακολουθία άρθρων: %d - %d μη έκυρος τύπος κλειδώματος μη έγκυρη μορφή mbox: %s μη έγκυρη γραμμή xover: %s το γραμματοκιβώτιο είναι κλειδωμένο το γραμματοκιβώτιο ανήκει σε άλλη διεργασία, αναμονή... κακοσχηματισμένο mbox: %s δεν υπάρχουν νέα άρθρα. σφάλμα πρωτοκόλλου σφάλμα πρωτοκόλλου: %s ο ριζικός φάκελος%s δεν υπάρχει λήξη ορίου χρόνου συνεδρίας ο πηγαίος φάκελος είναι ίδιος με το φάκελο προορισμού. χρήση της εντολής 'flock' αντί 'file' αν είναι δυνατό. η εγγραφή στο %s απέτυχε. libsylph-1.1.0/po/es.gmo0000644000175000017500000002602110756432605012022 00000000000000}    " % $ : M *l     !  7  3 %Q &w .  ! $ 1>O@0"E%h$'. ;Tm#!$0Uh "#F\k '<Sj *K\{'&!!#C'g#$& "?&b&!! +Ffy05JZn)+C c q!216#M,q(!! !%Gei"""7)8-N&|!6 %C[:y#&, )F !p  =  !!8!K!g!!!8!/!#"<"U"$o"""#""+#/#&I#p##"#.#*#$3$N$'g$&$6$!$%.%&N%!u%'%"%+%,& ;&&\&&)&&&&%'%,'%R')x'','' (*0(![( }("(&(/()"4)$W)$|))())*$*A*;\***>*++5+)T+)~+ +-++2<. /k&RX 1j;vLW%90n{JC4 UqKg-t B5(h?Pb>z"c@_D]xFl6ZN=SeYO+ H*'opT8Mm7!G#rE,[\|ay}Vdus3fw QI:$)^A`i Issuer: %s Subject: %s %d messages found. (sending file...)Appending messages to %s (%d / %d)Can't connect to IMAP4 server: %s:%d Can't connect to NNTP server: %s:%d Can't create '%s' Can't create '%s' under INBOX Can't establish IMAP4 session with: %s:%d Can't open mark file. Can't start TLS session. Can't write to file. Configuration is saved. Copying message %s%c%d to %s ... Copying messages %s to %s ...Directory name '%s' is not a valid UTF-8 string. Maybe the locale encoding is used for filename. If that is the case, you must set the following environmental variable (see README for detail): G_FILENAME_ENCODING=@locale Error creating ssl context Error occurred while posting Error occurred while sending command Exporting messages from %s into %s... File `%s' already exists. Can't create folder.Found %s Getting message %dGetting message headers (%d / %d)Getting messages from %s into %s... IMAP4 authentication failed. IMAP4 connection to %s has been disconnected. Reconnecting... IMAP4 login failed. IMAP4 server disables LOGIN. Junk mail filterMoving messages %s to %s ...NNTP connection to %s:%d has been disconnected. Reconnecting... POP3 protocol error POP3: Deleting expired message %d POP3: Skipping message %d (%d bytes) Print command line is invalid: `%s' Reading all config for each account... Removing all messages in %sRemoving messages %sRequired APOP timestamp not found in greeting SMTP AUTH not available SSL connection using %s SSL method not available SSLv23 available SSLv23 not available Server certificate: TLSv1 available TLSv1 not available Timestamp syntax error in greeting Unknown SSL method *PROGRAM BUG* article %d has been already cached. bad SMTP response can't append %s to %s can't append message to %s can't close folder can't copy %s to %s can't copy message %s to %s can't create %s can't create lock file %s can't create mailbox can't create mailbox: LIST failed can't delete mailbox can't expunge can't fetch message %d can't get envelope can't get namespace can't get xhdr can't get xover can't lock %s can't open mark file can't open temporary file can't parse envelope: %s can't post article. can't read article %d can't read mbox file. can't rename mailbox: %s to %s can't retrieve article %d can't select folder: %s can't select group: %s can't set deleted flags: %s can't set deleted flags: 1:* can't start TLS session can't truncate mailbox to zero. can't unlock %s can't write to temporary file command not supported creating IMAP4 connection to %s:%d ... creating NNTP connection to %s:%d ... error occurred on POP3 session error occurred on SMTP session error occurred on authentication error occurred while getting LIST. error occurred while getting envelope. error occurred while getting xhdr. error occurred while getting xover. error occurred while retrieving data. error on imap command: STATUS error while imap command: CLOSE error while imap command: EXPUNGE error while imap command: STORE %s %s failed to write configuration to file getting article %d... getting xover %d - %d in %s... iconv cannot convert %s to UTF-7 iconv cannot convert UTF-7 to %s invalid UIDL response: %s invalid article range: %d - %d invalid lock type invalid mbox format: %s invalid xover line: %s mailbox is locked mailbox is owned by another process, waiting... malformed mbox: %s no new articles. procmime_get_text_content(): Code conversion failed. protocol error protocol error: %s root folder %s not exist session timeout the src folder is identical to the dest. unescaped From found: %suse 'flock' instead of 'file' if possible. writing to %s failed. Project-Id-Version: sylpheed Report-Msgid-Bugs-To: POT-Creation-Date: 2008-02-19 10:48+0900 PO-Revision-Date: 2006-07-29 00:32+0100 Last-Translator: Ricardo Mones Language-Team: Ricardo Mones MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Emisor: %s Asunto: %s %d mensajes encontrados. (enviando fichero...)Agregando mensajes a %s (%d / %d)No se puede conectar con el servidor IMAP4: %s:%d No se puede conectar con el servidor NNTP: %s:%d No puedo crear «%s» No puedo crear «%s» bajo Entrada No puedo establecer la sesión IMAP4: %s:%d No se puede abrir el fichero de marcas. No puedo iniciar la sesión TLS. No se puede escribir al fichero. Configuración guardada. Copiando mensaje %s%c%d a %s ... Copiando mensajes %s a %s ...El nombre de directorio «%s» no es una cadena UTF-8 válida. Quizás se este usando la codificación local para el nombre. Si esto es así debería establecer la siguiente variable de entorno (Vea el README para los detalles): G_FILENAME_ENCODING=@locale Error creando el contexto SSL Hubo un error mientras se enviaba Hubo un error enviando el mandato Exportando mensajes de %s a %s... El fichero «%s» ya existe. No puedo crear la carpeta.Encontrado %s Obteniendo mensaje %dObteniendo las cabeceras de mensaje (%d / %d)Obteniendo mensajes desde %s en %s... La autentificación IMAP falló. La conexión IMAP4 con %s se ha roto. Reconectando... Autentificación IMAP4 fallida. El servidor IMAP4 deshabilita LOGIN. Filtro de correo basuraMoviendo mensajes %s a %s ...La conexión NNTP con %s:%d ha sido rota. Reconectando... Error del protocolo POP3 POP3: Borrando mensaje caducado %d POP3: Ignorando mensaje %d (%d bytes) La orden para imprimir es inválida: «%s» Leyendo configuración de cada cuenta... Borrando todos los mensajes en %sBorrando mensajes %sNo se encontro en el saludo la marca temporal APOP requerida SMTP AUTH no está disponible Conexión SSL usando %s Método SSL no disponible SSLv23 disponible SSLv23 no está disponible Certificado del servidor: TLSv1 disponible TLSv1 no está disponible La marca temporal del saludo tiene un error de sintaxis Método SSL desconocido *ERROR EN EL PROGRAMA* el artículo %d ya esta en caché. respuesta SMTP errónea no puedo añadir %s a %s no se puede añadir el mensaje a %s no se puede cerrar la carpeta no puedo copiar %s a %s no se puede copiar mensaje %s a %s no puedo crear %s no se puede crear el fichero de bloqueo %s no puedo crear el buzón no puedo crear el buzón: LIST falló no puedo borrar el buzón no puedo vaciar no se puede obtener el mensaje %d no se puede obtener la estructura del mensaje no se puede obtener el espacio de nombres no se puede obtener xhdr no se puede obtener xover no se puede bloquear %s no se puede abrir el fichero de marcas no se puede abrir el fichero temporal No se puede interpretar la estructura del mensaje: %s no se puede enviar el artículo. no puedo leer el artículo %d no puedo leer el fichero mbox. no puedo renombrar el buzón: %s a %s no puedo obtener el artículo %d no se puede seleccionar la carpeta: %s no puedo seleccionar el grupo: %s no puedo establecer los flags borrados: %s no puedo establecer los flags borrados: 1:* no puedo iniciar la sesión TLs no se puede truncar a cero el buzón. no se puede desbloquear %s no se puede escribir el fichero temporal mandato no soportado creando conexión IMAP4 con %s:%d ... creando conexión NNTP con %s:%d ... hubo algún error en la sesión POP3 hubo algún error en la sesión SMTP hubo algún error en la autentificación hubo un error obteniendo LIST. error obteniendo la estructura del mensaje. hubo un error obteniendo xhdr. hubo un error obteniendo xover. hubo un error mientras se obtenian datos. error en el mandato imap: STATUS error en el mandato imap: CLOSE error en el mandato imap: EXPUNGE error en el mandato imap: STORE %s %s fallo escribiendo la configuración al fichero obteniendo artículo %d... obteniendo xover %d - %d en %s... iconv no puede convertir %s a UTF-7 iconv no puede convertir UTF-7 a %s respuesta UIDL no válida: %s rango de artículos no válido: %d - %d tipo de bloqueo no válido formato de mbox inválido: %s línea xover no válida: %s el buzón está bloqueado el buzón esta siendo usado por otro proceso, esperando... mbox malformada: %s no hay artículos nuevos. procmime_get_text_content(): Conversión de códigos fallida. error del protocolo error del protocolo: %s la carpeta raíz %s no existe tiempo de espera agotado para la sesión carpetas de origen y destino idénticas. Encontrado Desde sin escapar: %susar 'flock' en vez de 'file' si es posible. fallo escribiendo en %s. libsylph-1.1.0/po/et.gmo0000644000175000017500000001742710756432605012035 00000000000000_  &:%L$r* % ; !T v  & .  $ 5 @J  " % $ ' .6 e ~       # !8 $Z      "  . = U i ~       %<\w '&"!I'k#$&"&&Md!!,0?p5)+3_6v*)I#]*$!Fc"+ $"7!Y o*"1/Fa(/Ec"~/6Lf1L c0$$:"X"{!%$D,d'+,$Gl ~,<Zk%!.5LNEM6YG+C<.I\9J'X Q[=)HU*PO#:,D]VA7(_^"8%@F1;T-> !4W & / K2R$ 03?BZS Issuer: %s Subject: %s %d messages found. (sending file...)Can't connect to IMAP4 server: %s:%d Can't connect to NNTP server: %s:%d Can't create '%s' Can't create '%s' under INBOX Can't establish IMAP4 session with: %s:%d Can't open mark file. Can't start TLS session. Can't write to file. Configuration is saved. Copying message %s%c%d to %s ... Error creating ssl context Error occurred while posting Exporting messages from %s into %s... File `%s' already exists. Can't create folder.Found %s Getting messages from %s into %s... IMAP4 login failed. NNTP connection to %s:%d has been disconnected. Reconnecting... POP3 protocol error POP3: Deleting expired message %d POP3: Skipping message %d (%d bytes) Print command line is invalid: `%s' Reading all config for each account... Required APOP timestamp not found in greeting SMTP AUTH not available SSL connection using %s SSL method not available SSLv23 available SSLv23 not available Server certificate: TLSv1 available TLSv1 not available Timestamp syntax error in greeting Unknown SSL method *PROGRAM BUG* article %d has been already cached. can't append %s to %s can't copy message %s to %s can't create %s can't create lock file %s can't create mailbox can't create mailbox: LIST failed can't delete mailbox can't expunge can't fetch message %d can't get envelope can't get namespace can't get xhdr can't get xover can't lock %s can't open mark file can't open temporary file can't parse envelope: %s can't post article. can't read article %d can't read mbox file. can't rename mailbox: %s to %s can't retrieve article %d can't select folder: %s can't start TLS session can't truncate mailbox to zero. can't unlock %s can't write to temporary file creating IMAP4 connection to %s:%d ... creating NNTP connection to %s:%d ... error occurred on authentication error occurred while getting envelope. error occurred while getting xhdr. error occurred while getting xover. error occurred while retrieving data. error while imap command: EXPUNGE failed to write configuration to file getting article %d... getting xover %d - %d in %s... iconv cannot convert %s to UTF-7 iconv cannot convert UTF-7 to %s invalid article range: %d - %d invalid lock type invalid mbox format: %s invalid xover line: %s mailbox is locked mailbox is owned by another process, waiting... malformed mbox: %s no new articles. procmime_get_text_content(): Code conversion failed. protocol error protocol error: %s the src folder is identical to the dest. unescaped From found: %suse 'flock' instead of 'file' if possible. writing to %s failed. Project-Id-Version: sylpheed Report-Msgid-Bugs-To: POT-Creation-Date: 2008-02-19 10:48+0900 PO-Revision-Date: 2002-10-02 09:08+0300 Last-Translator: Peeter Vois Language-Team: Estonian MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Väljalaskja: %s Pealkiri: %s leiti %d kirju. (saadan faili...)Ei suuda ühendada IMAP4 serveriga: %s:%d Ei saanud NNTP serveriga %s:%d ühendust Ei suuda luua '%s' Ei suuda luua '%s' Sisendkasti all Ei suuda ühendada IMAP4 serveriga: %s:%d Ei suutnud avada märgi faili. Ei suuda avada TLS sessiooni. Ei saa kirjutada faili. Häälestus on salvestatud. Kopeerin kirja %s%c%d kausta %s ... Viga ssl konteksti loomisel Kirja saatmisel tekkis viga Ekspordime teated %s-ist %s-i ... Fail %s on juba olemas. Ei saa kausta luua.Leiti %s Võtan kirju %s-st ja panen %s-i... IMAP4 sissekirjutus ebaõnnestus. NNTP ühendus %s:%d-ga on katkestatud. Taasühendan... POP3 protokolli viga POP3: Kustutan aegunud kirja %d POP3: Jätan kirja (%d / %d baiti) vahele Trükkimise käsurida on vale: %s Loen kõigi kontode seaded... Nõutud APOP'i ajatemplit ei leidunud tervituses SMTP AUTH pole saadav SSL ühendus kasutab %s-i SSL-i meetodit ei saa kasutada SSLv23 on kättesaadav SSLv23 pole kättesaadav Serveri srtifikaat: TLSv1 on saadav TLSv1 pole saadav *Tervituses on ajamärgi süntaksi viga ssl.c:94: Tundmatu SSL meetod *PROGRAMMI VIGA* artikkel %d on juba hoidlas. ei suuda %s-d lisada %s-i ei saa kirja kopeerida %s-st %s-i ei suuda luua %s ei saa luua lukufaili %s ei suuda luua kirjakasti ei suuda luua kirjakasti: Nimistu ebaõnnestus ei suuda kustutada kirjakasti ei suuda väljastada ei suuda võtta kirja %d ei suuda võtta ümbrikut ei suutnud leida nime asukohta *ei saa xhdr-i *ei saa xover'it ei suuda lukustada %s Ei suuda avada märgifaili ei saa avada ajutist fili ei suutnud avada ümbrikut: %s ei saanud saata artiklit. ei saanud artiklit %d Ei saa lugeda kirjakasti faili. ei suuda kirjakasti %s-lt ümber nimetada %s-le ei saanud artiklit %d kohale ei suuuda valida kausta: %s ei suutnud käivitada TLS sessiooni kirjakasti ei saa lõigata nulliks. ei saa lukku eemaldada %s-lt ei suuda kirjutada ajutisse faili loon IMAP4 ühendust %s:%d-ga ... loon NNTP ühendust %s:%d-ga ... autoriseerimisel tekkis viga ümbriku võtmisel tekis viga. xhdr-i võtmise käigus tekkis viga. *xover'i võtmisel tekkis viga tekkis viga andmete võtmisel. imapi käsu täitmisel tekkis viga: EXPUNGE Häälestuse salvestamine ebaõnnestus võtan artikli %d... *võtan xover-i %d - %d %s-is iconv ei suuda konverteerida %s-i UTF-7-ks iconv ei suuda konversteerida UTF-7-t %s-ks ebasobiv artiklite vahemik: %d - %d vale luku tüüp sobimatu kirjakasti formaat: %s *vigane xover rida: %s kirjakast on lukus kirjakasti kasutab teine protsess, ootan... paha mbox: %s uusi artikelid pole. procmime_get_text_content(): Koodi muundamine ebaõnnestus. protokolli viga protokolli viga: %s lähtekaust on identne sihtkaustale. Vabanematuid (kellelt) leitud: %skasuta 'flock'-i 'file' asemel kui võimalik. %s-i kirjutamine ebaõnnestus. libsylph-1.1.0/po/fr.gmo0000644000175000017500000002706010756432605012026 00000000000000}    " % $ : M *l     !  7  3 %Q &w .  ! $ 1>O@0"E%h$'. ;Tm#!$0Uh "#F\k '<Sj *K\{'&!!#C'g#$& "?&b&!! +Ffy05JZn)+Aa w"43 >/]5,%&#=$a$+,7*UC -)%C?i#"+ =4 r ( % : +!'B!j!(!!!!""#"<" N"3\")"$""!"&# @# a#,##*#+#<$.\$$($"$"$%+%I%+g%*%'% % &$(&5M&'&,&+&/'24'-g'+' '0'(/,(.\(0(0(<(7*)*b)&)2)@)&(*%O**u*+*7*"+&'+)N+)x++)++,,'8,5`,,,?,,-",-;O-,--9- .2<. /k&RX 1j;vLW%90n{JC4 UqKg-t B5(h?Pb>z"c@_D]xFl6ZN=SeYO+ H*'opT8Mm7!G#rE,[\|ay}Vdus3fw QI:$)^A`i Issuer: %s Subject: %s %d messages found. (sending file...)Appending messages to %s (%d / %d)Can't connect to IMAP4 server: %s:%d Can't connect to NNTP server: %s:%d Can't create '%s' Can't create '%s' under INBOX Can't establish IMAP4 session with: %s:%d Can't open mark file. Can't start TLS session. Can't write to file. Configuration is saved. Copying message %s%c%d to %s ... Copying messages %s to %s ...Directory name '%s' is not a valid UTF-8 string. Maybe the locale encoding is used for filename. If that is the case, you must set the following environmental variable (see README for detail): G_FILENAME_ENCODING=@locale Error creating ssl context Error occurred while posting Error occurred while sending command Exporting messages from %s into %s... File `%s' already exists. Can't create folder.Found %s Getting message %dGetting message headers (%d / %d)Getting messages from %s into %s... IMAP4 authentication failed. IMAP4 connection to %s has been disconnected. Reconnecting... IMAP4 login failed. IMAP4 server disables LOGIN. Junk mail filterMoving messages %s to %s ...NNTP connection to %s:%d has been disconnected. Reconnecting... POP3 protocol error POP3: Deleting expired message %d POP3: Skipping message %d (%d bytes) Print command line is invalid: `%s' Reading all config for each account... Removing all messages in %sRemoving messages %sRequired APOP timestamp not found in greeting SMTP AUTH not available SSL connection using %s SSL method not available SSLv23 available SSLv23 not available Server certificate: TLSv1 available TLSv1 not available Timestamp syntax error in greeting Unknown SSL method *PROGRAM BUG* article %d has been already cached. bad SMTP response can't append %s to %s can't append message to %s can't close folder can't copy %s to %s can't copy message %s to %s can't create %s can't create lock file %s can't create mailbox can't create mailbox: LIST failed can't delete mailbox can't expunge can't fetch message %d can't get envelope can't get namespace can't get xhdr can't get xover can't lock %s can't open mark file can't open temporary file can't parse envelope: %s can't post article. can't read article %d can't read mbox file. can't rename mailbox: %s to %s can't retrieve article %d can't select folder: %s can't select group: %s can't set deleted flags: %s can't set deleted flags: 1:* can't start TLS session can't truncate mailbox to zero. can't unlock %s can't write to temporary file command not supported creating IMAP4 connection to %s:%d ... creating NNTP connection to %s:%d ... error occurred on POP3 session error occurred on SMTP session error occurred on authentication error occurred while getting LIST. error occurred while getting envelope. error occurred while getting xhdr. error occurred while getting xover. error occurred while retrieving data. error on imap command: STATUS error while imap command: CLOSE error while imap command: EXPUNGE error while imap command: STORE %s %s failed to write configuration to file getting article %d... getting xover %d - %d in %s... iconv cannot convert %s to UTF-7 iconv cannot convert UTF-7 to %s invalid UIDL response: %s invalid article range: %d - %d invalid lock type invalid mbox format: %s invalid xover line: %s mailbox is locked mailbox is owned by another process, waiting... malformed mbox: %s no new articles. procmime_get_text_content(): Code conversion failed. protocol error protocol error: %s root folder %s not exist session timeout the src folder is identical to the dest. unescaped From found: %suse 'flock' instead of 'file' if possible. writing to %s failed. Project-Id-Version: sylpheed Report-Msgid-Bugs-To: POT-Creation-Date: 2008-02-19 10:48+0900 PO-Revision-Date: 2006-02-23 00:32+0100 Last-Translator: Nicolas Boos Language-Team: French MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Délivré par : %s Sujet : %s %d messages trouvés. (envoi du fichier...)Ajout des messages à %s (%d / %d)Impossible de se connecter au serveur IMAP4 : %s:%d Impossible de se connecter au serveur NNTP : %s:%d Impossible de créer « %s » Impossible de créer « %s » sous Réception Impossible d'établir une session IMAP4 avec : %s:%d Impossible d'ouvrir le fichier des marques. Impossible d'initier la session TLS. Impossible d'écrire dans le fichier. La configuration est enregistrée. Copie du message %s%c%d vers %s ... Copie des messages de %s vers %s ...Le nom de dossier « %s » n'est pas une chaîne UTF-8 correcte. Peut-être que le jeu de caracères local est utilisé pour le nom de fichier. Dans ce cas de figure, vous devez définir la variable d'environnement suivante (voir le fichier README pour les détails) : G_FILENAME_ENCODING=@locale Erreur lors de la création du contexte SSL Erreur lors de l'envoi. Une erreur est survenue pendant l'envoi de la commande Exportation des messages de %s vers %s... Le fichier « %s » existe déjà. Impossible de créer le dossier.Trouvé : %s Réception du message %dRéception des en-têtes de message (%d / %d)Réception des messages de %s dans %s... L'authentification IMAP4 a échoué. La connexion IMAP4 vers %s a été interrompue. Reconnexion... Échec au login IMAP4. Le serveur IMAP4 désactive LOGIN. Dossier des messages indésirablesDéplacement des messages de %s vers %s ...La connexion NNTP vers %s:%d a été coupée. Reconnexion... Erreur de protocole POP3 POP3: Suppression du message expiré %d POP3: Message ignoré %d (%d octets) La ligne de commande d'impression est invalide : « %s » Lecture de la configuration des comptes... Effacement de tous les messages dans %sEffacement des messages %sLe 'timestamp' APOP n'a pas été reçu SMTP AUTH pas disponible Connexion SSL utilisant %s Méthode SSL non disponible SSLv23 disponible SSLv23 absent Serveur de certificat : TLSv1 disponible TLSv1 absent Erreur de syntaxe du 'timestamp' dans la bannière Méthode SSL inconnue *BUG DU PROGRAMME* L'article %d a déjà été caché. mauvaise réponse SMTP Impossible de d'ajouter %s à %s impossible d'ajouter le message à %s impossible de fermer le dossier impossible de copier %s vers %s Impossible de copier le message de %s à %s Impossible de créer %s Impossible de créer le fichier verrou %s impossible de créer la boîte aux lettres Impossible de créer la boîte aux lettres : LIST échoué. impossible de supprimer la boîte aux lettres impossible de purger impossible de récupérer le message %d Impossible de faire une enveloppe Impossible d'obtenir l'espace nom Impossible d'obtenir xhdr Impossible de faire un xover Impossible de verrouiller %s Impossible d'ouvrir le fichier des marques Impossible d'ouvrir un fichier temporaire impossible d'analyser l'enveloppe : %s Impossible de poster l'article. Impossible de lire l'article %d Impossible de lire le fichier mbox. impossible de renomer la boîte aux lettres %s en %s Impossible de récupérer l'article %d Impossible de sélectionner le dossier : %s impossible de sélectionner le groupe : %s impossible de marquer pour la suppression : %s impossible de marquer pour la suppression : 1 : * échec lors de l'ouverture de la session TLS Impossible de vider la boîte aux lettres. Impossible de déverrouiller %s Impossible d'écrire dans le fichier temporaire commande non supportée création de la connexion IMAP4 vers %s:%d ... Création de la connexion NNTP vers %s:%d ... une erreur est survenue pendant la session POP3 Une erreur est survenue pendant la session SMTP une erreur est survenue pendant la phase d'authentification Une erreur est survenue lors de la réception de LIST. erreur lors de la lecture de l'enveloppe. Erreur lors de la réception de xhdr. Une erreur a eu lieu pendant la lecture du xover. Une erreur est survenue pendant la récupération des données. erreur avec la commande IMAP : STATUS erreur avec la commande IMAP : CLOSE erreur lors de la commande IMAP : EXPUNGE erreur avec la commande IMAP : STORE %s %s Échec d'écriture de la configuration dans le fichier Récupération de l'article %d... Exécution de xover %d - %d sur %s... iconv ne peut convertir de %s vers UTF-7 iconv ne peut convertir de UTF-7 vers %s réponse UIDL invalide : %s Intervalle d'articles invalide : %d - %d Type de verrou invalide Format mbox invalide : %s Ligne xover invalide : %s La boîte aux lettres est verrouillée mailbox utilisée par un autre processus, attente... mbox mal formée : %s Pas d'article. procmime_get_text_content(): la conversion de code a échoué. Erreur de protocole Erreur de protocole : %s le dossier racine %s n'existe pas dépassement du délai de réponse (timeout) de la session dossier source identique à la destination. From 'unescaped' trouvé: %sUtilisation de 'flock' à la place de 'file' si possible L'écriture dans %s a échoué. libsylph-1.1.0/po/gl.gmo0000644000175000017500000002061610756432605012021 00000000000000c4Lp q%$ *1 \ s   !   & .? n $x  @  " %+ $Q 'v .     + A V g #| ! $    , G "]        ,Gav 2Cb'y&!#*'N#v$&"& 0G!g!0"Sg5y)+BYq 10!!62X( "!3$Q"v4 # 6V#n&-&7Ff2,Fs#+!2"Qt*$)&B&i4-!O&m.)'&>%e$$&&Ba*."$3$X(}"C" f { >   * )!-G!u!*6DZ@8<VA4R_97#0XHI2%$a'.\ &`/!=b3SL:)B?J5E^GW,UTc "F+]>P ;QOMN-C1 ([YK Issuer: %s Subject: %s %d messages found. (sending file...)Can't connect to IMAP4 server: %s:%d Can't connect to NNTP server: %s:%d Can't create '%s' Can't create '%s' under INBOX Can't establish IMAP4 session with: %s:%d Can't open mark file. Can't start TLS session. Can't write to file. Configuration is saved. Copying message %s%c%d to %s ... Error creating ssl context Error occurred while posting Exporting messages from %s into %s... File `%s' already exists. Can't create folder.Found %s Getting messages from %s into %s... IMAP4 login failed. NNTP connection to %s:%d has been disconnected. Reconnecting... POP3 protocol error POP3: Deleting expired message %d POP3: Skipping message %d (%d bytes) Print command line is invalid: `%s' Reading all config for each account... Required APOP timestamp not found in greeting SMTP AUTH not available SSL connection using %s SSL method not available SSLv23 available SSLv23 not available Server certificate: TLSv1 available TLSv1 not available Timestamp syntax error in greeting Unknown SSL method *PROGRAM BUG* article %d has been already cached. can't append %s to %s can't copy message %s to %s can't create %s can't create lock file %s can't create mailbox can't create mailbox: LIST failed can't delete mailbox can't expunge can't fetch message %d can't get envelope can't get namespace can't get xhdr can't get xover can't lock %s can't open mark file can't open temporary file can't parse envelope: %s can't post article. can't read article %d can't read mbox file. can't rename mailbox: %s to %s can't retrieve article %d can't select folder: %s can't start TLS session can't truncate mailbox to zero. can't unlock %s can't write to temporary file command not supported creating IMAP4 connection to %s:%d ... creating NNTP connection to %s:%d ... error occurred on POP3 session error occurred on SMTP session error occurred on authentication error occurred while getting LIST. error occurred while getting envelope. error occurred while getting xhdr. error occurred while getting xover. error occurred while retrieving data. error while imap command: EXPUNGE failed to write configuration to file getting article %d... getting xover %d - %d in %s... iconv cannot convert %s to UTF-7 iconv cannot convert UTF-7 to %s invalid article range: %d - %d invalid lock type invalid mbox format: %s invalid xover line: %s mailbox is locked mailbox is owned by another process, waiting... malformed mbox: %s no new articles. procmime_get_text_content(): Code conversion failed. protocol error protocol error: %s the src folder is identical to the dest. unescaped From found: %suse 'flock' instead of 'file' if possible. writing to %s failed. Project-Id-Version: sylpheed Report-Msgid-Bugs-To: POT-Creation-Date: 2008-02-19 10:48+0900 PO-Revision-Date: 2003-01-17 10:05+0100 Last-Translator: Jorge Rivas Language-Team: Jorge Rivas MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Xenerador: %s Asunto: %s %d mensaxes atopados. (enviando ficheiro...)Non se pode conectar con o servidor IMAP4: %s:%d Non se pode conectar con o servidor NNTP: %s:%d Non podo crear '%s' Non podo crear '%s' bajo Entrada Non podo establecer unha sesión IMAP4 con: %s:%d Non se pode abrir o ficheiro de marcas. Non podo iniciar a sesión TLS. Non se pode escribir ó ficheiro. Configuración gardada. Copiando mensaxe %s%c%d a %s ... Error creando o contexto SSL Ocurríu un erro mentras se enviaba Exportando mensaxes de %s a %s... o Ficheiro `%s' xa existe. Non podo crear a carpeta.Atopado %s Obtendo mensaxes dende %s en %s... Autentificación IMAP4 fallida. perdeuse a conexión NNTP con %s:%d . Reconectando... Erro do protocolo POP3 POP3: Borrando mensaxe expirado %d POP3: Ignorando mensaxe %d (%d bytes) o comando de impresión non é válido: `%s' Lendo configuración de cada conta... Non se atopou no saudo a marca temporal APOP requerida SMTP AUTH non está disponible Conexión SSL usando %s Método SSL non disponible SSLv23 disponible SSLv23 non está disponible Certificado do servidor: TLSv1 disponible TLSv1 non está disponible a marca temporal do saudo ten un erro de sintaxis Método SSL desconocido *ERROR no PROGRAMA* o artigo %d xa esta en caché. non podo engadir %s a %s non se pode copiar mensaxe %s a %s non podo crear %s non se pode crear o ficheiro de bloqueo %s non podo crear a caixa de correo non podo crear a: LIST falló non podo borrar a caixa de correo non podo baleirar non se pode obter o mensaxe %d non se pode obter a estructura da mensaxe no se pode obter o espacio de nomes non se pode obter xhdr no se pode obtener xover non se pode bloquear %s no se pode abrir o ficheiro de marcas non se pode abrir o ficheiro temporal Non se pode interpretar a estructura da mensaxe: %s no se pode enviar o artículo. no podo leer o artículo %d non podo ler o ficheiro mbox. non podo renomear a caixa de correo: %s a %s no podo obter o artículo %d non se pode seleccionar a carpeta: %s non podo abrir a sesión TLs non se pode truncar a cero a caixa de correo. non se pode desbloquear %s non se pode escribir o ficheiro temporal Comando non soportado creando conexión IMAP4 con %s:%d ... creando conexión NNTP con %s:%d ... ocurriu algún erro na sesión POP3 ocurriu algún erro na sesión SMTP ocurriu algún erro na autenticación ocurriu un erro obtendo LIST. Erro obtendo a estructura da mensaxe. ocurriu un erro obtendo xhdr. ocurriu un erro obtendo xover. ocurriu un erro mentras se obtían datos. erro no comando imap: EXPUNGE fallo escribiendo a configuración a ficheiro obtendo artigo %d... obteniendo xover %d - %d en %s... iconv non pode convertir %s a UTF-7 iconv non pode convertir UTF-7 a %s rango de artículos no válido: %d - %d tipo de bloqueo non válido formato de mbox inválido: %s linea xover non válida: %s a caixa de correo está bloqueado a caixa de correo esta sendo usada por outro proceso, esperando... mbox malformada: %s no hai artículos novos. procmime_get_text_content(): Conversión de códigos fallida. erro do protocolo erro do protocolo: %s carpetas de orixen e destiño idénticas. Atopado Dende sin escapar: %susar 'flock' en vez de 'file' si é posible. fallo escribindo en %s. libsylph-1.1.0/po/hr.gmo0000644000175000017500000001551210756432605012027 00000000000000Rm< %"$Hm!&.6 e$o@$'$ .L {       # !5 $W |     "  + : R f {        " 9 T m   ' & ! '/ #W ${ & " & (Hh{059I)]+D( 8D1[6%$$D%i2  0 Q"h(0(>Yi)~$ ,"Ad-*?U&m%1M%h%&#/5/e05'.$Si"01D9Z$/.%BN+ #.D=9; 6 AP,?EGMKRC*I5Q '<$)F@"1/L07:2!OJ43(& >-H8 Issuer: %s Subject: %s %d messages found. Can't connect to IMAP4 server: %s:%d Can't connect to NNTP server: %s:%d Can't open mark file. Can't write to file. Configuration is saved. Copying message %s%c%d to %s ... Error creating ssl context Error occurred while posting Exporting messages from %s into %s... File `%s' already exists. Can't create folder.Found %s Getting messages from %s into %s... IMAP4 login failed. NNTP connection to %s:%d has been disconnected. Reconnecting... POP3 protocol error Print command line is invalid: `%s' Reading all config for each account... Required APOP timestamp not found in greeting SSL connection using %s SSL method not available SSLv23 available SSLv23 not available Server certificate: TLSv1 available TLSv1 not available Timestamp syntax error in greeting Unknown SSL method *PROGRAM BUG* article %d has been already cached. can't append %s to %s can't copy message %s to %s can't create %s can't create lock file %s can't create mailbox can't create mailbox: LIST failed can't delete mailbox can't expunge can't fetch message %d can't get envelope can't get namespace can't get xhdr can't get xover can't lock %s can't open mark file can't open temporary file can't parse envelope: %s can't post article. can't read article %d can't read mbox file. can't retrieve article %d can't select folder: %s can't truncate mailbox to zero. can't unlock %s can't write to temporary file creating IMAP4 connection to %s:%d ... creating NNTP connection to %s:%d ... error occurred on authentication error occurred while getting envelope. error occurred while getting xhdr. error occurred while getting xover. error occurred while retrieving data. error while imap command: EXPUNGE failed to write configuration to file getting article %d... getting xover %d - %d in %s... invalid article range: %d - %d invalid lock type invalid mbox format: %s invalid xover line: %s mailbox is owned by another process, waiting... malformed mbox: %s no new articles. procmime_get_text_content(): Code conversion failed. protocol error protocol error: %s the src folder is identical to the dest. unescaped From found: %suse 'flock' instead of 'file' if possible. writing to %s failed. Project-Id-Version: sylpheed Report-Msgid-Bugs-To: POT-Creation-Date: 2008-02-19 10:48+0900 PO-Revision-Date: 2001-09-17 13:22+0100 Last-Translator: Ante Karamatić Language-Team: Croatian MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Izdavač: %s Tema: %s %d poruka pronađeno. Ne mogu se povezati s IMAP4 poslužiteljom: %s%d Ne mogu uspostaviti vezu s NNTP poslužiteljem: %s:%d Ne mogu otvoriti označenu datoteku. Ne mogu pisati u datoteku. Konfiguracija je spremljena. Kopiram poruke %s%c%d u %s ... Greška pri kreiranju ssl konteksta Došlo je do greške prilikom slanja Izvozim poruke iz %s u %s... Datoteka `%s' već postoji. Ne mogu stvoriti spis.Pronađen %s Primam poruke sa %s u %s... IMAP4 login propao. NNTP veza s %s:%d je pukla. Povezujem ponovo... POP3 protokol greška Naredba za ispis nije dobra: `%s' Čitam konfiguracije za svaki račun... Nužni APOP timestamp nije pronađen u pozdravu SSL veza koristeći %s SSL metoda nije dostupna SSLv23 dostupan SSLv23 nije dostupan Certifikat poslužitelja: TLSv1 dostupan TLSv1 nije dostupan Syntax greška u timestampu kod pozdrava Nepoznata SSL metoda *BUG PROGRAMA* članak %d već je pohranjen. ne mogu pričvrstiti %s na %s ne mogu kopirati poruku %s u %s ne mogu kreirati %s ne mogu kreirati lock datoteku %s ne mogu kreirati sandučić ne mogu kreirati sandučić: LIST nije uspio ne mogu obrisati sandučić ne mogu obrisati ne mogu dohvatiti poruku %d ne mogu dobiti omot ne mogu dobiti namespace ne mogu dobiti xhdr ne mogu dobiti xover ne mogu zaključati %s ne mogu otvoriti obilježenu datoteku ne mogu otvoriti privremenu datoteku ne mogu analizirati omot: %s ne mogu poslati članak. ne mogu pročitati članak %d ne mogu čitati mbox datoteku. ne mogu primiti članak %d ne mogu odabrati spis: %s ne mogu skratiti sandučić na nulu. ne mogu otključati %s ne mogu pisati u privremenu datoteku ostvarujem IMAP4 vezu prema %s:%d ... uspostavljam NNTP vezu s %s:%d ... greška prilikom ovjeravanja došlo je do greške prilikom dobivanja omota. došlo je do greške prilikom dobivanja xhdra. došlo je do greške prilikom dobivanja xovera. došlo je do greške prilikom prihvaćanja podataka. greška prilikom imap naredbe: EXPUNGE neuspjeh pri pisanju konfiguracije u datoteku primam članak %d... primam xover %d - %d u %s... pogrešan opseg članaka: %d - %d neispravan tip zaključavanja pogrešan mbox format: %s pogrešna xover linija: %s neki drugi proces koristi sandučić, čekam... pokvaren mbox: %s nema novih članaka. procmime_get_text_content(): Promjena koda nije uspjela. protokol greška protokol greška: %s izvorni spis jednak je destinaciji. neizbježan Od pronađen: %skoristi 'flock' umjesto 'file' ako je moguće. pisanje u %s nije uspjelo. libsylph-1.1.0/po/hu.gmo0000644000175000017500000002616610756432605012041 00000000000000}    " % $ : M *l     !  7  3 %Q &w .  ! $ 1>O@0"E%h$'. ;Tm#!$0Uh "#F\k '<Sj *K\{'&!!#C'g#$& "?&b&!! +Ffy05JZn)+0P _m*.1'0A3r'! &&#M q-|'-4 LY&p)%>!& Hi&:%' &C :j *  @ .!!H!j!!!!!!/!( "!I"k"""'"""##+#)C##m#4####!#$!$F$_$t$$$$&$($%7%"O%.r%%&% %/&06& g&8&&&&'(#''L'(t')'"'-'.(%G('m("(%($(&)**)*U))*)1)2)&*'F*n*!*#**=*'+:+4Q+++++!+#,.&, U,2<. /k&RX 1j;vLW%90n{JC4 UqKg-t B5(h?Pb>z"c@_D]xFl6ZN=SeYO+ H*'opT8Mm7!G#rE,[\|ay}Vdus3fw QI:$)^A`i Issuer: %s Subject: %s %d messages found. (sending file...)Appending messages to %s (%d / %d)Can't connect to IMAP4 server: %s:%d Can't connect to NNTP server: %s:%d Can't create '%s' Can't create '%s' under INBOX Can't establish IMAP4 session with: %s:%d Can't open mark file. Can't start TLS session. Can't write to file. Configuration is saved. Copying message %s%c%d to %s ... Copying messages %s to %s ...Directory name '%s' is not a valid UTF-8 string. Maybe the locale encoding is used for filename. If that is the case, you must set the following environmental variable (see README for detail): G_FILENAME_ENCODING=@locale Error creating ssl context Error occurred while posting Error occurred while sending command Exporting messages from %s into %s... File `%s' already exists. Can't create folder.Found %s Getting message %dGetting message headers (%d / %d)Getting messages from %s into %s... IMAP4 authentication failed. IMAP4 connection to %s has been disconnected. Reconnecting... IMAP4 login failed. IMAP4 server disables LOGIN. Junk mail filterMoving messages %s to %s ...NNTP connection to %s:%d has been disconnected. Reconnecting... POP3 protocol error POP3: Deleting expired message %d POP3: Skipping message %d (%d bytes) Print command line is invalid: `%s' Reading all config for each account... Removing all messages in %sRemoving messages %sRequired APOP timestamp not found in greeting SMTP AUTH not available SSL connection using %s SSL method not available SSLv23 available SSLv23 not available Server certificate: TLSv1 available TLSv1 not available Timestamp syntax error in greeting Unknown SSL method *PROGRAM BUG* article %d has been already cached. bad SMTP response can't append %s to %s can't append message to %s can't close folder can't copy %s to %s can't copy message %s to %s can't create %s can't create lock file %s can't create mailbox can't create mailbox: LIST failed can't delete mailbox can't expunge can't fetch message %d can't get envelope can't get namespace can't get xhdr can't get xover can't lock %s can't open mark file can't open temporary file can't parse envelope: %s can't post article. can't read article %d can't read mbox file. can't rename mailbox: %s to %s can't retrieve article %d can't select folder: %s can't select group: %s can't set deleted flags: %s can't set deleted flags: 1:* can't start TLS session can't truncate mailbox to zero. can't unlock %s can't write to temporary file command not supported creating IMAP4 connection to %s:%d ... creating NNTP connection to %s:%d ... error occurred on POP3 session error occurred on SMTP session error occurred on authentication error occurred while getting LIST. error occurred while getting envelope. error occurred while getting xhdr. error occurred while getting xover. error occurred while retrieving data. error on imap command: STATUS error while imap command: CLOSE error while imap command: EXPUNGE error while imap command: STORE %s %s failed to write configuration to file getting article %d... getting xover %d - %d in %s... iconv cannot convert %s to UTF-7 iconv cannot convert UTF-7 to %s invalid UIDL response: %s invalid article range: %d - %d invalid lock type invalid mbox format: %s invalid xover line: %s mailbox is locked mailbox is owned by another process, waiting... malformed mbox: %s no new articles. procmime_get_text_content(): Code conversion failed. protocol error protocol error: %s root folder %s not exist session timeout the src folder is identical to the dest. unescaped From found: %suse 'flock' instead of 'file' if possible. writing to %s failed. Project-Id-Version: Sylpheed-2.2.6 Report-Msgid-Bugs-To: POT-Creation-Date: 2008-02-19 10:48+0900 PO-Revision-Date: 2006-07-15 17:27+0100 Last-Translator: Németh Tamás Language-Team: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Szerző: %s Tárgy: %s %d üzenet található. (fájl küldése...)Üzenetek hozzáfűzése ide: %s (%d / %d)%s:%d IMAP4 szerverhez nem lehet kapcsolódni %s:%d NNTP szerverhez nem sikerült kapcsolódni '%s' nem hozható létre '%s' nem hozható létre a BEJÖVŐ mappa alatt IMAP4 szerverhez nem sikerült kapcsolódni: %s:%d A jelölő fájlt nem lehet megnyitni. Nem lehet TLS menetet indítani. Nem lehet a fájlba írni. Beállítások tárolva. %s%c%d üzenet másolása ide: %s ... %s üzenetek másolása ide: %s ...Könyvtár neve A(z) '%s' nem valós UTF-8 sztring. Lehetséges, hogy helyi karakterkódolást használ a fájlnevekre. Ha ez a helyzet, akkor be kell állítania a következő környezeti változót (lásd a README-t a részletekhez): G_FILENAME_ENCODING=@locale Hiba az ssl környezet létrehozása közben Hiba küldés közben Hiba történt parancsküldés közben Üzenetek exportálása innen: %s ide: %s... `%s' fájl már létezik. Mappa nem hozható létre.Találat %s %d üzenet letöltéseÜzenetfejlécek letöltése (%d / %d)Üzenetek fogadása innen: %s ide: %s... Az IMAP4 azonosítás nem sikerült. Az IMAP4 kapcsolat %s felé megszakadt. Újrakapcsolódás... IMAP4 bejelentkezés sikertelen. IMAP szerver LOGIN kikapcsolva. Levélszemét szűrő%s üzenetek áthelyezése ide: %s ...Az NNTP kapcsolat %s:%d megszakadt. Újrakapcsolódás... POP3 protokollhiba POP3: Lejárt üzenetek törlése %d POP3: üzenet átugrása %d (%d bájt) Érvénytelen nyomtató parancs: `%s' Beállítások beolvasása az összes hozzáféréshez... Minden üzenet eltávolítása ebből: %s?%s üzenetek eltávolításaA szükséges APOP időpecsét nem található az üdvözletben SMTP AUTH nem elérhető SSL kapcsolat %s használatával SSL eljárás nem elérhető SSLv23 elérhető SSLv23 nem elérhető Szerver igazolvány: TLSv1 elérhető TLSv1 nem elérhető Időpecsét szintaktikai hiba az üdvözletben Ismeretlen SSL eljárás *PROGRAM HIBA* %d cikk már a gyorstárban van. hibás SMTP válasz %s nem fűzhető hozzá ehhez: %s üzenet nem fűzhető hozzá ehhez: %s mappa bezárása nem sikerült %s nem másolható ide: %s %s üzenet nem másolható ide: %s %s nem hozható létre %s zároló fájlt nem lehet létrehozni nem lehet létrehozni postaládát nem lehet létrehozni postaládát: LIST sikertelen nem lehet törölni a postaládát nem lehet törölni %d üzenet vétele nem sikerült a borítékot nem lehet megszerezni névtér nem elérhető xhdr nem elérhető A hírjegyzék nem elérhető %s nem zárolható A kijelölt fájl nem nyitható meg nem lehet ideiglenes fájlt megnyitni nem lehet értelmezni a borítékot: %s A cikk nem küldhető el. %d cikk nem olvasható az mbox fájlt nem lehet olvasni. nem lehet a postaládát átnevezni: %s -> %s %d cikket nem lehet fogadni %s mappa kiválasztása nem sikerült %s csoport nem választható ki nem lehet beállítani a törölt jelzést: %s nem lehet beállítani a törölt jelzést: 1:* nem lehet TLS menetet indítani nem lehet nulla méretűre változtatni a postafiókot. %s zárolása nem oldható fel nem lehet az ideiglenes fájlba írni A parancs nem támogatott %s:%d IMAP4 kapcsolat létrehozása ... NNTP kapcsolat létesítése %s:%d ... hiba történt a POP3 kapcsolat közben hiba történt az SMTP kapcsolat közben Hiba történt az azonosításkor hiba történt a LIST lekérdezése közben. hiba történt a boríték fogadása közben. Hiba történt xhdr vétele közben. Hiba a hírjegyzék fogadása közben. hiba az adatok fogadása közben. hiba az IMAP parancs közben: STATUS hiba az IMAP parancs közben: CLOSE hiba az IMAP parancs közben: EXPUNGE hiba az IMAP parancs közben: STORE %s %s a beállításokat nem lehetett elmenteni %d cikk fogadása... %d - %d hírjegyzék fogadása ide: %s... az iconv nem tudja UTF-7-re konvertálni ezt: %s az iconv nem tud UTF-7-ből konvertálni ebbe: %s érvénytelen UIDL válasz: %s érvénytelen cikk tartomány: %d - %d érvénytelen zároló típus érvénytelen mbox formátum: %s érvénytelen hírjegyzék sor: %s a postafiók zárolt A postaláda egy másik processzhez tartozik, várakozás... sérült mbox: %s Nincsenek új cikkek. procmime_get_text_content(): Kód konverziós hiba. Protokollhiba Protokollhiba: %s %s root mappa nem létezik kapcsolat időtúllépése A forrás- és célmappa azonos. Kódolatlan feladó található: %s'flock' használata 'file' helyett, ha lehet. %s fájlba nem sikerült írni. libsylph-1.1.0/po/it.gmo0000644000175000017500000002675410756432605012044 00000000000000}    " % $ : M *l     !  7  3 %Q &w .  ! $ 1>O@0"E%h$'. ;Tm#!$0Uh "#F\k '<Sj *K\{'&!!#C'g#$& "?&b&!! +Ffy05JZn)+Gg{$/.=+X3,% $+%P"v 97)5;_ .&@7x%(B7 ,S & 3 1 # !1!<G!!!!!!""."-E"+s"#""""!#;#*Y##&#&#4#)$H$&`$$"$$$"%+#%&O%$v% %"%"%4&%7&(]&&&+&,&$'0+'#\')''.'/'4!(4V(4(9(=(98):r)9)')&*(6*,_*6**$*&+&.+U++s+++++@,Q,f,=,,,!,-;.--j-3--2<. /k&RX 1j;vLW%90n{JC4 UqKg-t B5(h?Pb>z"c@_D]xFl6ZN=SeYO+ H*'opT8Mm7!G#rE,[\|ay}Vdus3fw QI:$)^A`i Issuer: %s Subject: %s %d messages found. (sending file...)Appending messages to %s (%d / %d)Can't connect to IMAP4 server: %s:%d Can't connect to NNTP server: %s:%d Can't create '%s' Can't create '%s' under INBOX Can't establish IMAP4 session with: %s:%d Can't open mark file. Can't start TLS session. Can't write to file. Configuration is saved. Copying message %s%c%d to %s ... Copying messages %s to %s ...Directory name '%s' is not a valid UTF-8 string. Maybe the locale encoding is used for filename. If that is the case, you must set the following environmental variable (see README for detail): G_FILENAME_ENCODING=@locale Error creating ssl context Error occurred while posting Error occurred while sending command Exporting messages from %s into %s... File `%s' already exists. Can't create folder.Found %s Getting message %dGetting message headers (%d / %d)Getting messages from %s into %s... IMAP4 authentication failed. IMAP4 connection to %s has been disconnected. Reconnecting... IMAP4 login failed. IMAP4 server disables LOGIN. Junk mail filterMoving messages %s to %s ...NNTP connection to %s:%d has been disconnected. Reconnecting... POP3 protocol error POP3: Deleting expired message %d POP3: Skipping message %d (%d bytes) Print command line is invalid: `%s' Reading all config for each account... Removing all messages in %sRemoving messages %sRequired APOP timestamp not found in greeting SMTP AUTH not available SSL connection using %s SSL method not available SSLv23 available SSLv23 not available Server certificate: TLSv1 available TLSv1 not available Timestamp syntax error in greeting Unknown SSL method *PROGRAM BUG* article %d has been already cached. bad SMTP response can't append %s to %s can't append message to %s can't close folder can't copy %s to %s can't copy message %s to %s can't create %s can't create lock file %s can't create mailbox can't create mailbox: LIST failed can't delete mailbox can't expunge can't fetch message %d can't get envelope can't get namespace can't get xhdr can't get xover can't lock %s can't open mark file can't open temporary file can't parse envelope: %s can't post article. can't read article %d can't read mbox file. can't rename mailbox: %s to %s can't retrieve article %d can't select folder: %s can't select group: %s can't set deleted flags: %s can't set deleted flags: 1:* can't start TLS session can't truncate mailbox to zero. can't unlock %s can't write to temporary file command not supported creating IMAP4 connection to %s:%d ... creating NNTP connection to %s:%d ... error occurred on POP3 session error occurred on SMTP session error occurred on authentication error occurred while getting LIST. error occurred while getting envelope. error occurred while getting xhdr. error occurred while getting xover. error occurred while retrieving data. error on imap command: STATUS error while imap command: CLOSE error while imap command: EXPUNGE error while imap command: STORE %s %s failed to write configuration to file getting article %d... getting xover %d - %d in %s... iconv cannot convert %s to UTF-7 iconv cannot convert UTF-7 to %s invalid UIDL response: %s invalid article range: %d - %d invalid lock type invalid mbox format: %s invalid xover line: %s mailbox is locked mailbox is owned by another process, waiting... malformed mbox: %s no new articles. procmime_get_text_content(): Code conversion failed. protocol error protocol error: %s root folder %s not exist session timeout the src folder is identical to the dest. unescaped From found: %suse 'flock' instead of 'file' if possible. writing to %s failed. Project-Id-Version: Sylpheed 2.2.4 Report-Msgid-Bugs-To: POT-Creation-Date: 2008-02-19 10:48+0900 PO-Revision-Date: 2006-03-31 18:46+0200 Last-Translator: Danilo Bodei Language-Team: Italian MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Distributore: %s Oggetto: %s trovati %d messaggi. (spedizione del file...)Aggiunta di messaggi in %s (%d / %d)Impossibile connettersi al server IMAP4: %s:%d Impossibile connettersi al server NNTP: %s:%d Impossibile creare «%s» Impossibile creare «%s» sotto IN ENTRATA Impossibile stabilire la sessione IMAP4 con: %s:%d impossibile aprire il file delle segnature. Impossibile avviare la sessione TLS. Impossibile scrivere sul file. La configurazione è stata salvata. Copia del messaggio %s%c%d in %s ... Copia dei messaggi da %s in %s ...Il nome della directory «%s» non è una stringa UTF-8 valida. Probabilmente la codifica locale è usata per il nome del file. Se è questo il caso, si deve impostare la seguente variabile di ambiente (vedere README per i dettagli): G_FILENAME_ENCODING=@locale Errore creando il contesto ssl Si è verificato un errore durante l'invio dell'articolo Si è verificato un errore durante l'invio del comando Esportazione dei messaggi da %s in %s... Il file «%s» esiste già. Impossibile creare la cartella.Trovato %s Ricezione del messaggio %dRicezione intestazioni del messaggio (%d / %d)Ricezione in %s dei messaggi da %s... Autenticazione IMAP4 fallita. La connessione IMAP4 a %s è stata interrotta. Riconnessione... Login IMAP4 fallito. Il server IMAP4 disabilita il LOGIN. Filtro mail spazzaturaSpostamento dei messaggi da %s in %s ...La connessione NNTP a %s:%d è stata interrotta. Riconnessione... Errore nel protocollo POP3 POP3: Eliminazione del messaggio scaduto %d POP3: Salto il messaggio %d (%d byte) La riga di comando di stampa non è valida: «%s» Lettura della configurazione per ogni account... Rimozione di tutti i messaggi in %sRimozione messaggi %sNel saluto non è stata trovata la necessaria data/ora APOP SMTP AUTH non disponibile Connessione SSL usando %s Metodo SSL non disponibile SSLv23 disponibile SSLv23 non disponibile Certificato del server: TLSv1 disponibile TLSv1 non disponibile Errore di sintassi nella data/ora del saluto Metodo SSL sconosciuto *BUG DEL PROGRAMMA* l'articolo %d è già nella cache. risposta SMTP difettosa impossibile aggiungere %s a %s impossibile aggiungere a %s impossibile chiudere la cartella impossibile copiare %s in %s impossibile copiare il messaggio %s in %s impossibile creare %s impossibile creare il file di lock %s impossibile creare la casella postale impossibile creare la casella postale: LIST fallito impossibile eliminare la casella postale impossibile cancellare impossibile prelevare il messaggio %d impossibile ricevere la busta impossibile ricevere il namespace impossibile ricevere xhdr impossibile ricevere xover impossibile effettuare il lock %s Impossibile aprire il file delle segnature impossibile aprire il file temporaneo impossibile analizzare la busta: %s impossibile inviare l'articolo. impossibile leggere l'articolo %d impossibile leggere il file mbox. impossibile rinominare la casella postale: %s in %s impossibile recuperare l'articolo %d impossibile selezionare la cartella: %s impossibile selezionare il gruppo: %s impossibile impostare i flag eliminati: %s impossibile impostare i flag eliminati: 1:* impossibile avviare la sessione TLS impossibile troncare a zero la casella postale. impossibile liberare il lock su %s impossibile scrivere sul file temporaneo comando non supportato creazione della connessione IMAP4 a %s:%d ... Creazione della connessione NNTP con %s:%d ... si è verificato un errore durante la sessione POP3 si è verificato un errore durante la sessione SMTP si è verificato un errore durante l'autenticazione si è verificato un errore durante la ricezione di LIST. si è verificato un errore durante la ricezione della busta. si è verificato un errore durante la ricezione di xhdr. si è verificato un errore durante la ricezione di xover. si è verificato un errore durante il recupero dei dati. errore durante il comando imap: STATUS errore durante il comando imap: CLOSE errore durante il comando imap: EXPUNGE errore durante il comando imap: STORE %s %s la scrittura della configurazione sul file è fallita ricezione dell'articolo %d... ricezione di xover %d - %d in %s... iconv non può convertire %s in UTF-7 iconv non può convertire UTF-7 in %s risposta UIDL non valida: %s intervallo di articoli non valido: %d - %d tipo di lock non valido formato mbox non valido: %s riga xover non valida: %s la casella postale è bloccata la casella postale è occupata da un altro processo, attendo... mbox non valida: %s non ci sono nuovi articoli. procmime_get_text_content(): Conversione del codice fallita. errore del protocollo errore del protocollo: %s la cartella radice %s non esiste timeout della sessione la cartella sorgente é identica a quella di destinazione. trovato un Da senza la sequenza di escape: %sse possibile usare «flock» al posto di «file». la scrittura su %s è fallita. libsylph-1.1.0/po/ja.gmo0000644000175000017500000003124410756432605012010 00000000000000~     " % $= b u *     ! A _ ? [ %y & .  !$4Y>w@1r"%$'9.N}#,!P$r#4O"e4Oi~5S l'&#C!c#'#$&A `"&& !)!Km00D5V)+J.a480<.m!1;+,/X(=8BH2.:?(Xh1?0 (p E - 6 !D!$`!5!I!";$"=`"4"="9#+K#Mw####)$/$ M$n$$$@$)%@+%l%#%/%+%& &60&g&,&.&>&."'Q',j'+'#'$'% (2((R(%{(/(%("(=)>X)()))))1*2F*,y*@*%*+ +19+*k+++9+9++6,6b,C,<,=-:X-)-(-*-..=@.+~.#.0.0. 0/(Q/"z/,//4/^0)}0"0E01*1/H11x141C1Q#2.u2s05j;%6I}LT nKUC< pkrlh3Aiz{w XyVf #= |"edB2 ?7/WQ,q'xP+:SmR@ED9a*v1Y)tFHN!_&J[c]o-8g$\(O~Z^`MG4.b>u Issuer: %s Subject: %s %d messages found. (sending file...)Appending messages to %s (%d / %d)Can't connect to IMAP4 server: %s:%d Can't connect to NNTP server: %s:%d Can't create '%s' Can't create '%s' under INBOX Can't establish IMAP4 session with: %s:%d Can't open mark file. Can't start TLS session. Can't write to file. Configuration is saved. Copying message %s%c%d to %s ... Copying messages %s to %s ...Directory name '%s' is not a valid UTF-8 string. Maybe the locale encoding is used for filename. If that is the case, you must set the following environmental variable (see README for detail): G_FILENAME_ENCODING=@locale Error creating ssl context Error occurred while posting Error occurred while sending command Exporting messages from %s into %s... File `%s' already exists. Can't create folder.Found %s Getting message %dGetting message headers (%d / %d)Getting messages from %s into %s... IMAP4 authentication failed. IMAP4 connection to %s has been disconnected. Reconnecting... IMAP4 login failed. IMAP4 server disables LOGIN. Junk mail filterJunk mail filter (manual)Moving messages %s to %s ...NNTP connection to %s:%d has been disconnected. Reconnecting... POP3 protocol error POP3: Deleting expired message %d POP3: Skipping message %d (%d bytes) Print command line is invalid: `%s' Reading all config for each account... Removing all messages in %sRemoving messages %sRequired APOP timestamp not found in greeting SMTP AUTH not available SSL connection using %s SSL method not available SSLv23 available SSLv23 not available Server certificate: TLSv1 available TLSv1 not available Timestamp syntax error in greeting Unknown SSL method *PROGRAM BUG* article %d has been already cached. bad SMTP response can't append %s to %s can't append message to %s can't close folder can't copy %s to %s can't copy message %s to %s can't create %s can't create lock file %s can't create mailbox can't create mailbox: LIST failed can't delete mailbox can't expunge can't fetch message %d can't get envelope can't get namespace can't get xhdr can't get xover can't lock %s can't open mark file can't open temporary file can't parse envelope: %s can't post article. can't read article %d can't read mbox file. can't rename mailbox: %s to %s can't retrieve article %d can't select folder: %s can't select group: %s can't set deleted flags: %s can't set deleted flags: 1:* can't start TLS session can't truncate mailbox to zero. can't unlock %s can't write to temporary file command not supported creating IMAP4 connection to %s:%d ... creating NNTP connection to %s:%d ... error occurred on POP3 session error occurred on SMTP session error occurred on authentication error occurred while getting LIST. error occurred while getting envelope. error occurred while getting xhdr. error occurred while getting xover. error occurred while retrieving data. error on imap command: STATUS error while imap command: CLOSE error while imap command: EXPUNGE error while imap command: STORE %s %s failed to write configuration to file getting article %d... getting xover %d - %d in %s... iconv cannot convert %s to UTF-7 iconv cannot convert UTF-7 to %s invalid UIDL response: %s invalid article range: %d - %d invalid lock type invalid mbox format: %s invalid xover line: %s mailbox is locked mailbox is owned by another process, waiting... malformed mbox: %s no new articles. procmime_get_text_content(): Code conversion failed. protocol error protocol error: %s root folder %s not exist session timeout the src folder is identical to the dest. unescaped From found: %suse 'flock' instead of 'file' if possible. writing to %s failed. Project-Id-Version: sylpheed Report-Msgid-Bugs-To: POT-Creation-Date: 2008-02-19 10:48+0900 PO-Revision-Date: 1999-10-12 Last-Translator: Hiroyuki Yamamoto Language-Team: Japanese MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 発行者: %s Subject: %s %d 通のメッセージが見つかりました。 (ファイルを送信中...)メッセージを %s に追加しています (%d / %d)IMAP4 サーバ: %s:%d に接続できません NNTPサーバ: %s:%d に接続できません '%s' を作成できません。 INBOX の下に '%s' を作成できません。 %s:%d との IMAP4 セッションを確立できません マークファイルを開けません。 TLS セッションを開始できません。 ファイルに書き込めません。 設定を保存しました。 メッセージ %s%c%d を %s にコピーしています... メッセージ %s を %s にコピーしています...ディレクトリ名 '%s' は有効な UTF-8 文字列ではありません。 ファイル名にロケールエンコーディングが使用されている可能性があります。 その場合は、以下の環境変数を指定する必要があります (詳細は README を参照): G_FILENAME_ENCODING=@locale ssl コンテキスト生成中にエラー発生 ポスト中にエラーが発生しました コマンドの送信中にエラーが発生しました メッセージを %s から %s に書き出しています... ファイル `%s' がすでに存在します。 フォルダを作成できません。%s が見つかりました メッセージ %d を取得中メッセージのヘッダを取得中 (%d / %d)メッセージを %s から %s に取り込んでいます... IMAP4 の認証に失敗しました。 %s へのIMAP4の接続が切れています。再接続します... IMAP4のログインに失敗しました。 IMAPサーバは LOGIN を無効にしています。 迷惑メールフィルタ迷惑メールフィルタ (手動)メッセージ %s を %s に移動しています...%s:%d への NNTP の接続が切れています。再接続します... POP3 プロトコルエラー POP3: 期限切れのメッセージ %d を削除します POP3: メッセージ %d をスキップします (%d bytes) 印刷のコマンドラインが無効です: `%s' すべてのアカウント毎の設定を読み込み中... %s のすべてのメッセージを削除していますメッセージ %s を削除しています必要なAPOPタイムスタンプが応答メッセージにありません SMTP AUTH が利用できません %s を用いて SSL 接続 SSL メソッドが利用できません SSLv23 は利用可能です SSLv23 は利用できません サーバ証明書: TLSv1 は利用可能です TLSv1 は利用できません 応答メッセージのタイムスタンプの文法エラー 未知の SSL メソッド *PROGRAM BUG* %d 番の記事はすでにキャッシュされています。 不正な SMTP 応答です %s を %s に追加できません メッセージを %s に追加できません フォルダをクローズできません %s を %s にコピーできません メッセージ %s を %s にコピーできません %s を作成できません。 ロックファイル %s を開けません メールボックスを作成できません メールボックスを作成できません: LIST に失敗 メールボックスを削除できません expunge できません メッセージ %d を取り込めません エンベロープを取得できません namespace を取得できません xhdr 情報を取得できません xover 情報を取得できません %s をロックできません マークファイルを開けません 一時ファイルを開けません エンベロープを解析できません: %s 記事をポストできません。 %d 番の記事を読めません メールボックスファイルを読み込めません。 メールボックスを名称変更できません: %s -> %s %d 番の記事を取得できません フォルダ %s を選択できません グループを選択できません: %s deleted フラグをセットできません: %s deleted フラグをセットできません: 1:* TLS セッションを開始できません メールボックスをゼロに切り詰められません。 %s をロック解除できません 一時ファイルに書き込めません コマンドがサポートされていません %s:%d へのIMAP4の接続を確立中... %s:%d への NNTP の接続を確立中... POP3 セッション中にエラーが発生しました SMTP セッション中にエラーが発生しました 認証中にエラーが発生しました LIST の取得中にエラーが発生しました。 エンベロープを取得中にエラーが発生しました。 xhdr 情報を取得中にエラーが発生しました。 xover 情報を取得中にエラーが発生しました。 データの取得中にエラーが発生しました。 imap コマンド中のエラー: STATUS imap コマンド中のエラー: CLOSE imap コマンド中のエラー: EXPUNGE imap コマンド中のエラー: STORE %s %s 設定のファイルへの書き込みに失敗しました %d 番の記事を取得しています... xover %d - %d を取得中 (%s)... iconv が %s を UTF-7 に変換できません iconv が UTF-7 を %s に変換できません 無効な UIDL 応答です: %s 無効な記事の範囲です: %d - %d 無効なロックタイプです 無効なメールボックスの形式: %s 無効な xover 行です: %s メールボックスはロックされています メールボックスは別のプロセスによって所有されています。待機中... メールボックスが異常です: %s 新着記事はありません。 procmime_get_text_content(): コード変換に失敗しました。 プロトコルエラー プロトコルエラー: %s ルートフォルダ %s が存在しません セッションがタイムアウトしました 移動元フォルダが移動先と同一です。 エスケープされていない From が見つかりました: %s可能であれば 'file' の代わりに 'flock' を使用してください。 %s への書き込みに失敗しました。 libsylph-1.1.0/po/ko.gmo0000644000175000017500000002162610756432605012032 00000000000000_  &:%L$r* % ; !T v  & .  $ 5 @J  " % $ ' .6 e ~       # !8 $Z      "  . = U i ~       %<\w '&"!I'k#$&"&&Md!!,0?p5)+3_Xv -483m&60*0*[#!1&,?Ol 2'I%o0535$EZ*"% %0V$f$1$+$34X$.(5 (@i.'%&')%Q(w(.&(+H8t+,)=0&n)0+&9(`)<)1 L -j 3 3 *!!+!#M!"q! !U!% "1"BN"""3"C"97#$q#5LNEM6YG+C<.I\9J'X Q[=)HU*PO#:,D]VA7(_^"8%@F1;T-> !4W & / K2R$ 03?BZS Issuer: %s Subject: %s %d messages found. (sending file...)Can't connect to IMAP4 server: %s:%d Can't connect to NNTP server: %s:%d Can't create '%s' Can't create '%s' under INBOX Can't establish IMAP4 session with: %s:%d Can't open mark file. Can't start TLS session. Can't write to file. Configuration is saved. Copying message %s%c%d to %s ... Error creating ssl context Error occurred while posting Exporting messages from %s into %s... File `%s' already exists. Can't create folder.Found %s Getting messages from %s into %s... IMAP4 login failed. NNTP connection to %s:%d has been disconnected. Reconnecting... POP3 protocol error POP3: Deleting expired message %d POP3: Skipping message %d (%d bytes) Print command line is invalid: `%s' Reading all config for each account... Required APOP timestamp not found in greeting SMTP AUTH not available SSL connection using %s SSL method not available SSLv23 available SSLv23 not available Server certificate: TLSv1 available TLSv1 not available Timestamp syntax error in greeting Unknown SSL method *PROGRAM BUG* article %d has been already cached. can't append %s to %s can't copy message %s to %s can't create %s can't create lock file %s can't create mailbox can't create mailbox: LIST failed can't delete mailbox can't expunge can't fetch message %d can't get envelope can't get namespace can't get xhdr can't get xover can't lock %s can't open mark file can't open temporary file can't parse envelope: %s can't post article. can't read article %d can't read mbox file. can't rename mailbox: %s to %s can't retrieve article %d can't select folder: %s can't start TLS session can't truncate mailbox to zero. can't unlock %s can't write to temporary file creating IMAP4 connection to %s:%d ... creating NNTP connection to %s:%d ... error occurred on authentication error occurred while getting envelope. error occurred while getting xhdr. error occurred while getting xover. error occurred while retrieving data. error while imap command: EXPUNGE failed to write configuration to file getting article %d... getting xover %d - %d in %s... iconv cannot convert %s to UTF-7 iconv cannot convert UTF-7 to %s invalid article range: %d - %d invalid lock type invalid mbox format: %s invalid xover line: %s mailbox is locked mailbox is owned by another process, waiting... malformed mbox: %s no new articles. procmime_get_text_content(): Code conversion failed. protocol error protocol error: %s the src folder is identical to the dest. unescaped From found: %suse 'flock' instead of 'file' if possible. writing to %s failed. Project-Id-Version: sylpheed 0.8.6 Report-Msgid-Bugs-To: POT-Creation-Date: 2008-02-19 10:48+0900 PO-Revision-Date: 2002-12-02 11:09+0900 Last-Translator: Nam SungHyun Language-Team: Korean MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 발행인: %s 제목: %s %d개의 메시지가 발견되었습니다. (파일을 보냅니다...)%s:%d IMAP4 서버에 연결할 수가 없습니다 %s:%d NNTP 서버에 연결할 수가 없습니다 '%s'를 생성할 수가 없습니다 INBOX 아래에 '%s'를 생성할 수가 없습니다 IMAP4 세션을 만들 수 없습니다: %s: %d 표시 파일을 열 수가 없습니다. TLS 세션을 시작할 수 없습니다. 파일에 쓸 수가 없습니다. 설정이 저장되었습니다. 메시지 %s%c%d를 %s로 복사중입니다 ... ssl 문맥 생성 에러 글을 올리는 도중 에러 발생 메시지를 %s에서 %s로 보냅니다... 파일 `%s'가 이미 존재합니다. 폴더를 생성할 수가 없습니다.%s을 발견 %s로부터 %s로 메시지를 가져옵니다... IMAP4 로그인을 실패했습니다. %s:%d로의 NNTP 연결이 끊어졌습니다. 다시 연결합니다... POP3 프로토콜 에러 POP3: 만료된 메시지 %d를 삭제합니다 POP3: 메시지 %d를 건너뜁니다 (%d 바이트) 인쇄 명령어가 올바르지않습니다: `%s' 각 계정에대한 모든 설정을 읽습니다... greeting에서 발견되지않은 APOP 타임 스탬프가 요구됨 SMTP 인증을 사용할 수 없습니다 %s 사용하여 SSL 연결 SSL를 사용할 수 없습니다 SSLv23을 사용할 수 있습니다 SSLv23을 사용할 수 없습니다 서버 증명: TLSv1을 사용할 수 있습니다 TLSv1을 사용할 수 없습니다 greeting에서 타임 스탬프에 문법 오류 모르는 SSL *프로그램 버그* 기사 %d는 이미 캐쉬되었습니다. %s를 %s에 붙일 수 없습니다 메시지 %s을 %s로 복사할 수가 없습니다 %s를 생성할 수가 없습니다 잠금 파일 %s을 만들수가 없습니다 우편함을 생성할 수 없습니다 우편함을 생성할 수 없습니다: LIST 실패 우편함을 삭제할 수 없습니다 지울 수가 없습니다 메시지 %d를 가져올 수가 없습니다 envelope를 얻을 수가 없습니다 namespace를 얻을 수 없습니다 xhdr을 가져올 수가 없습니다 xover를 가져올 수가 없습니다 %s에 lock를 걸수가 없습니다 표시 파일을 열수가 없습니다 임시파일을 열 수가 없습니다 envelope를 파싱할 수가 없습니다: %s 기사를 올릴 수가 없습니다. 기사 %d를 읽을 수가 없습니다 mbox 파일을 읽을 수가 없습니다. 우편함명을 바꿀 수 없습니다: %s에서 %s로 기사 %d를 가져올 수가 없습니다 폴더를 선택할 수가 없습니다: %s TLS 세션을 시작할 수 없습니다 메일박스의 크기를 0으로 만들수가 없습니다. %s에 lock를 풀 수가 없습니다 임시 파일에 쓸 수가 없습니다 %s:%d에대한 IMAP4 접속을 만듭니다 ... %s:%d로 NNTP 접속을 생성합니다... 인증 도중 에러 발생 envelope를 얻는 중 에러 발생. xhdr을 얻는 도중 에러가 발생. xover를 얻는 도중 에러가 발생. 데이타를 가져오는 중 에러가 발생했습니다. imap 명령어 실행중 에러: EXPUNGE 파일에 설정을 쓰기가 실패했습니다 기사 %d를 얻습니다... %3$s에서 %1$d - %2$d xover를 가져옴... iconv가 %s를 UTF-7로 변환할 수 없습니다 iconv가 UTF-7를 %s로 변환할 수 없습니다 올바르지않은 기사 범위: %d - %d 올바르지않은 잠금 타입 올바르지않은 mbox 포멧: %s 올바르지않은 xover line: %s 우편함이 잠겨있습니다 메일박스를 다른 프로세스가 읽고있습니다. 잠시 기다리세요... 제대로되어있지않은 mbox: %s 새 기사가 없습니다. procmime_get_text_content(): 코드 변환이 실패했습니다. 프로토콜 에러 프로토콜 에러: %s 옮길 폴더와 옮겨질 폴더가 같습니다. 메시지 본문중 From으로 시작하는 줄이 있습니다: %s가능하면 'file'대신에 'flock'를 사용하세요. %s로 쓰기가 실패했습니다. libsylph-1.1.0/po/lt.gmo0000644000175000017500000002533510756432605012041 00000000000000}    " % $ : M *l     !  7  3 %Q &w .  ! $ 1>O@0"E%h$'. ;Tm#!$0Uh "#F\k '<Sj *K\{'&!!#C'g#$& "?&b&!! +Ffy05JZn)+Tt "/.@"Z(} $!>` Xy'9 '1!Y){;  # ?F`!($ 1. ` { -    !'!z"c@_D]xFl6ZN=SeYO+ H*'opT8Mm7!G#rE,[\|ay}Vdus3fw QI:$)^A`i Issuer: %s Subject: %s %d messages found. (sending file...)Appending messages to %s (%d / %d)Can't connect to IMAP4 server: %s:%d Can't connect to NNTP server: %s:%d Can't create '%s' Can't create '%s' under INBOX Can't establish IMAP4 session with: %s:%d Can't open mark file. Can't start TLS session. Can't write to file. Configuration is saved. Copying message %s%c%d to %s ... Copying messages %s to %s ...Directory name '%s' is not a valid UTF-8 string. Maybe the locale encoding is used for filename. If that is the case, you must set the following environmental variable (see README for detail): G_FILENAME_ENCODING=@locale Error creating ssl context Error occurred while posting Error occurred while sending command Exporting messages from %s into %s... File `%s' already exists. Can't create folder.Found %s Getting message %dGetting message headers (%d / %d)Getting messages from %s into %s... IMAP4 authentication failed. IMAP4 connection to %s has been disconnected. Reconnecting... IMAP4 login failed. IMAP4 server disables LOGIN. Junk mail filterMoving messages %s to %s ...NNTP connection to %s:%d has been disconnected. Reconnecting... POP3 protocol error POP3: Deleting expired message %d POP3: Skipping message %d (%d bytes) Print command line is invalid: `%s' Reading all config for each account... Removing all messages in %sRemoving messages %sRequired APOP timestamp not found in greeting SMTP AUTH not available SSL connection using %s SSL method not available SSLv23 available SSLv23 not available Server certificate: TLSv1 available TLSv1 not available Timestamp syntax error in greeting Unknown SSL method *PROGRAM BUG* article %d has been already cached. bad SMTP response can't append %s to %s can't append message to %s can't close folder can't copy %s to %s can't copy message %s to %s can't create %s can't create lock file %s can't create mailbox can't create mailbox: LIST failed can't delete mailbox can't expunge can't fetch message %d can't get envelope can't get namespace can't get xhdr can't get xover can't lock %s can't open mark file can't open temporary file can't parse envelope: %s can't post article. can't read article %d can't read mbox file. can't rename mailbox: %s to %s can't retrieve article %d can't select folder: %s can't select group: %s can't set deleted flags: %s can't set deleted flags: 1:* can't start TLS session can't truncate mailbox to zero. can't unlock %s can't write to temporary file command not supported creating IMAP4 connection to %s:%d ... creating NNTP connection to %s:%d ... error occurred on POP3 session error occurred on SMTP session error occurred on authentication error occurred while getting LIST. error occurred while getting envelope. error occurred while getting xhdr. error occurred while getting xover. error occurred while retrieving data. error on imap command: STATUS error while imap command: CLOSE error while imap command: EXPUNGE error while imap command: STORE %s %s failed to write configuration to file getting article %d... getting xover %d - %d in %s... iconv cannot convert %s to UTF-7 iconv cannot convert UTF-7 to %s invalid UIDL response: %s invalid article range: %d - %d invalid lock type invalid mbox format: %s invalid xover line: %s mailbox is locked mailbox is owned by another process, waiting... malformed mbox: %s no new articles. procmime_get_text_content(): Code conversion failed. protocol error protocol error: %s root folder %s not exist session timeout the src folder is identical to the dest. unescaped From found: %suse 'flock' instead of 'file' if possible. writing to %s failed. Project-Id-Version: Sylpheed Report-Msgid-Bugs-To: POT-Creation-Date: 2008-02-19 10:48+0900 PO-Revision-Date: 2005-06-09 13:51+0300 Last-Translator: Vitalijus Valantiejus Language-Team: Lithuanian MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Leidėjas: %s Tema: %s Rasta laiškų: %d. (siunčiamas failas...)Pridedami laiškai į %s (%d / %d)Negaliu prisijungti prie IMAP4 serverio: %s:%d Negaliu prisijungti prie NNTP serverio: %s:%d Negaliu sukurti „%s“ negaliu sukurti „%s“ po INBOX Negaliu sukurti IMAP4 sesijos su: %s:%d Negaliu atidaryti žymų failo. Negaliu sukurti TLS sesijos. Negaliu rašyti į failą. Nustatymai išsaugoti. Kopijuoju laišką %s%c%d į %s ... Kopijuojami laiškai %s į %s ...Katalogo pavadinimas '%s' nėra teisingas UTF-8 tekstas. Galbūt failų pavadinimams naudojama lokalės koduotė. Tokiu atveju jūs turite nustatyti aplinkos kintamąjį (detalesnės instrukcijos faile „README“): G_FILENAME_ENCODING=@locale Klaida sukuriant SSL kontekstą Klaida skelbiant žinutę Klaida siunčiant komandą Eksportuojami laiškai iš %s į %s... Failas „%s“ jau egzistuoja. Negaliu sukurti katalogo.Rasta %s Gaunamas laiškas %dGaunamos laiškų antraštės (%d / %d)Gaunami laiškai iš %s į %s... IMAP4 autentiškumo tikrinimas nepavyko. IMAP4 prisijungimas prie %s buvo nutrauktas. Jungiamasi... nepavyko prisijungti prie IMAP4 IMAP4 serveris panaikina LOGIN. Nereikalingo pašto filtrasPerkeliami laiškai %s į %s ...NNTP prisijungimas prie %s:%d buvo nutrauktas. Jungiuosi iš naujo... POP3 protokolo klaida POP3: Trinamas senas laiškas %d POP3: praleidžiamas laiškas %d (%d B) Bloga spausdinimo komanda: „%s“ Skaitoma kiekvienos sąskaitos konfigūracija... Trinami laiškai iš %s...Šalinami laiškai %s...Reikalinga APOP žyma nerasta pasisveikinime SMTP AUTH neprieinamas SSL prisijungimas naudojant %s SSL metodas neprieinamas SSLv23 prieinamas SSLv23 neprieinamas Serverio sertifikatas: TLSv1 prieinamas TLSv1 neprieinamas Sintaksės klaida pasisveikinime Nežinomas SSL metodas PROGRAMOS KLAIDA žinutė %d jau buvo įkelta. blogas SMTP atsakymas negaliu prirašyti %s į %s negaliu pridėti laiško į %s negaliu uždaryti katalogo negaliu nukopijuoti %s į %s negaliu nukopijuoti laiško %s į %s negaliu sukurti %s negaliu sukurti užrakto failo %s negaliu sukurti dėžutės negaliu sukurti dėžutės: nepavyko LIST negaliu ištrinti dėžutės negaliu išbraukti negaliu gauti laiško %d nagaliu gauti voko negalių gauti vardų zonos negaliu gauti xhdr negaliu gauti xover negaliu užrakinti %s negali atidaryti žymų failo negaliu atverti laikinojo failo negaliu išanalizuoti voko: %s negaliu paskelbti žinutės. negaliu perskaityti žinutės %d negaliu perskaityti „mbox“ failo. negaliu pervadinti dėžutės: %s į %s negaliu gauti žinutės %d negaliu pasirinkti katalogo: %s negaliu pažymėti grupės: %s negaliu nustatyti ištrynimo žymų: %s negaliu nustatyti ištrynimo žymų: 1:* negaliu pradėti TLS sesijos negaliu sumažinti dėžutės iki nulio. negaliu atrakinti %s negaliu rašyti į laikinąjį failą komanda nepalaikoma sukuriamas IMAP4 prisijungimas prie %s:%d ... sukuriu NNTP prisijungimą prie %s:%d ... klaida POP3 sesijoje klaida SMTP sesijoje klaida tikrinant autentiškumą klaida gaunant LIST. klaida gaunant voką. klaida gaunant xhdr. klaida gaunant xover. kalaida gaunant duomenis. klaida vykdant imap komandą: STATUS klaida vykdant imap komandą: CLOSE klaida vykdant imap komandą: EXPUNGE klaida vykdant imap komandą: STORE %s %s nepavyko įrašyti konfigūracijos į failą gaunama žinutė %d... gaunamas xover %d - %d, %s... iconv negali konvertuoti %s į UTF-7 iconv negali konvertuoti UTF-7 į %s blogas UIDL atsakymas: %s neteisingas žinučių intervalas: %d - %d blogas užrakto tipas neteisingas „mbox“ formatas: %s bloga xover eilutė: %s dėžutė užrakinta dėžutę turi kitas procesas, laukiu... pažeistas „mbox“ failas: %s nėra naujų žinučių. procmime_get_text_content(): Nepavyko konvertuoti kodo. protokolo klaida protokolo klaida: %s šakninis katalogas %s neegzistuoja baigėsi sesijai skirtas laikas pradinis katalogas identiškas paskirties katalogui. unescaped From found: %snaudokite „flock“ vietoj „file“ jei įmanoma. nepavyko įrašyti į „%s“. libsylph-1.1.0/po/nl.gmo0000644000175000017500000002620010756432605012023 00000000000000}    " % $ : M *l     !  7  3 %Q &w .  ! $ 1>O@0"E%h$'. ;Tm#!$0Uh "#F\k '<Sj *K\{'&!!#C'g#$& "?&b&!! +Ffy05JZn)+Kk{$.-B!Y4{,#+<)h&|,+1/. ^k#-G:!P r*~M4 /? o * &  4!6!R!i!!!!!!,!%""H"e"}"""""*"##4#X#%p# ####$#$:$R$,f$"$"$ $$%-5% c%%!%*%.%&$:&$_&*&&-&9&12'1d'3'8'=(;A(<}(=(()$7)$\)'))()&)&*?* [*|****E*$+A+3Y+ ++++(+(,3-,a,2<. /k&RX 1j;vLW%90n{JC4 UqKg-t B5(h?Pb>z"c@_D]xFl6ZN=SeYO+ H*'opT8Mm7!G#rE,[\|ay}Vdus3fw QI:$)^A`i Issuer: %s Subject: %s %d messages found. (sending file...)Appending messages to %s (%d / %d)Can't connect to IMAP4 server: %s:%d Can't connect to NNTP server: %s:%d Can't create '%s' Can't create '%s' under INBOX Can't establish IMAP4 session with: %s:%d Can't open mark file. Can't start TLS session. Can't write to file. Configuration is saved. Copying message %s%c%d to %s ... Copying messages %s to %s ...Directory name '%s' is not a valid UTF-8 string. Maybe the locale encoding is used for filename. If that is the case, you must set the following environmental variable (see README for detail): G_FILENAME_ENCODING=@locale Error creating ssl context Error occurred while posting Error occurred while sending command Exporting messages from %s into %s... File `%s' already exists. Can't create folder.Found %s Getting message %dGetting message headers (%d / %d)Getting messages from %s into %s... IMAP4 authentication failed. IMAP4 connection to %s has been disconnected. Reconnecting... IMAP4 login failed. IMAP4 server disables LOGIN. Junk mail filterMoving messages %s to %s ...NNTP connection to %s:%d has been disconnected. Reconnecting... POP3 protocol error POP3: Deleting expired message %d POP3: Skipping message %d (%d bytes) Print command line is invalid: `%s' Reading all config for each account... Removing all messages in %sRemoving messages %sRequired APOP timestamp not found in greeting SMTP AUTH not available SSL connection using %s SSL method not available SSLv23 available SSLv23 not available Server certificate: TLSv1 available TLSv1 not available Timestamp syntax error in greeting Unknown SSL method *PROGRAM BUG* article %d has been already cached. bad SMTP response can't append %s to %s can't append message to %s can't close folder can't copy %s to %s can't copy message %s to %s can't create %s can't create lock file %s can't create mailbox can't create mailbox: LIST failed can't delete mailbox can't expunge can't fetch message %d can't get envelope can't get namespace can't get xhdr can't get xover can't lock %s can't open mark file can't open temporary file can't parse envelope: %s can't post article. can't read article %d can't read mbox file. can't rename mailbox: %s to %s can't retrieve article %d can't select folder: %s can't select group: %s can't set deleted flags: %s can't set deleted flags: 1:* can't start TLS session can't truncate mailbox to zero. can't unlock %s can't write to temporary file command not supported creating IMAP4 connection to %s:%d ... creating NNTP connection to %s:%d ... error occurred on POP3 session error occurred on SMTP session error occurred on authentication error occurred while getting LIST. error occurred while getting envelope. error occurred while getting xhdr. error occurred while getting xover. error occurred while retrieving data. error on imap command: STATUS error while imap command: CLOSE error while imap command: EXPUNGE error while imap command: STORE %s %s failed to write configuration to file getting article %d... getting xover %d - %d in %s... iconv cannot convert %s to UTF-7 iconv cannot convert UTF-7 to %s invalid UIDL response: %s invalid article range: %d - %d invalid lock type invalid mbox format: %s invalid xover line: %s mailbox is locked mailbox is owned by another process, waiting... malformed mbox: %s no new articles. procmime_get_text_content(): Code conversion failed. protocol error protocol error: %s root folder %s not exist session timeout the src folder is identical to the dest. unescaped From found: %suse 'flock' instead of 'file' if possible. writing to %s failed. Project-Id-Version: Sylpheed 0.8 Report-Msgid-Bugs-To: POT-Creation-Date: 2008-02-19 10:48+0900 PO-Revision-Date: 2006-04-30 01:11+0100 Last-Translator: Vincent van Adrighem Language-Team: Dutch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Uitgever: %s Onderwerp: %s %d berichten gevonden (bestand wordt verzonden...)Berichten toevoegen aan %s (%d / %d)Kan niet verbinden met de IMAP4 server: %s:%d Kan niet verbinden met de NNTP-server: %s:%d kan %s niet aanmaken kan %s niet aanmaken onder INBOX Kan gaan sessie opzetten met de IMAP4 server: %s:%d kan het bestand met markeringen niet openen Kan geen TLS sessie starten. Het bestand is niet beschrijfbaar. Configuratie is opgeslagen. Bericht %s%c%d wordt gekopieerd naar %s... Berichten %s worden gekopieerd naar %s...De naam '%s' is geen geldige UTF-8 tekenreeks. Misschien wordt de codering van de taalinstelling gebruikt. Als dit zo is, kunt u de volgende omgevingsvariabele instellen (lees de README voor meer info): G_FILENAME_ENCODING=@locale Fout bij het maken van de ssl context Er is een fout opgetreden bij het versturen Fout opgetreden bij sturen van de opdracht Berichten worden geëxporteerd van %s naar %s... Bestand '%s' bestaat al. Kan geen map aanmaken.%s gevonden Ophalen van bericht %dOphalen van berichtkoppen (%d / %d)Berichten worden van %s naar %s opgehaald... IMAP4-identificatie mislukt. IMAP4 verbinding naar %s is verbroken. Contact wordt opnieuw gelegd... IMAP4 login mislukt. IMAP4 server schakelt LOGIN uit. TroepfilterBerichten %s worden verplaatst naar %s ...De NNTP-verbinding met %s:%d is verbroken. Opnieuw contact aan het leggen... POP3 protocolfout POP3: Bezig met verwijderen van verlopen bericht %d POP3: Bericht %d wordt overgeslagen (%d bytes) Adrukopdracht is ongeldig: '%s' Configuratie inlezen van alle accounts... Alle berichten in %s worden verwijderdBerichten %s worden verwijderdEr is geen APOP timestamp gevonden in de begroeting SMTP AUTH niet beschikbaar SSL verbinding met %s SSL methode niet beschikbaar SSL v23 beschikbaar SSLv23 niet beschikbaar Server-certificaat: TLSv1 beschikbaar TLSv1 niet beschikbaar APOP Timestamp in de begroeting is ongeldig Onbekende SSL methode * PROGRAM BUG* artikel %d is al gebufferd. ongeldige SMTP-reactie kan %s niet toevoegen aan %s kan bericht niet toevoegen aan %s kan map niet sluiten kan %s niet naar %s kopiëren kan bericht niet kopiëren van %s naar %s kan %s niet aanmaken kan lock-bestand niet aanmaken: %s kan geen mailbox maken kan geen mailbox maken: LIST mislukt kan de mailbox niet verwijderen kan niet wissen kan bericht %d niet ophalen kan de envelop niet verkrijgen kan de NAMESPACE niet vinden Kan xhdr niet ophalen Kan xover niet ophalen kan %s niet locken kan het bestand met markeringen niet openen kan tijdelijk bestand niet openen kan de envelop niet verwerken: %s kan het ertikel niet versturen. kan artikel %d niet lezen kan mbox bestand niet inlezen. kan de mailbox niet hernoemen van %s naar %s kan het artikel %d niet ophalen kan map niet selecteren: %s kan de groep niet selecteren: %s kan verwijderd-vlaggen niet instellen: %s kan de verwijderd-vlaggen niet instellen: 1:* Kan TLS sessie niet starten kan de mailbox niet inkorten tot 0. kan de lock niet verwijderen van %s kan niet naar tijdelijk bestand schrijven opdracht niet ondersteund IMAP4 verbinding naar %s:%d wordt opgezet... verbinding met nieuwsserver (NNTP) %s%d wordt opgezet... er is een fout opgetreden tijdens de POP3-sessie er is een fout opgetreden tijdens de SMTP-sessie er is een fout opgetreden tijdens de identificatie er is een fout opgetreden bij het ophalen van de lijst. Er is een fout opgetreden bij het verkrijgen van de envelop. er is een fout opgetreden tijdens het ophalen van de xhdr. er is een fout opgetreden tijdens het ophalen van de xover. er is een fout opgetreden bij het ontvangen van de gegevens. Fout bij IMAP-opdracht: STATUS Fout bij IMAP-opdracht: CLOSE Fout tijdens IMAP opdracht: EXPUNGE Fout bij IMAP-opdracht: STORE %s %s opslaan van de configuratie is mislukt artikel %d wordt opgehaald... xover %d - %d uit %s wordt opgehaald... iconv kan %s niet naar UTF-7 omzetten iconv kan UTF-7 niet naar %s omzetten Ongeldige UIDL-reactie: %s ongeldig artikelbereik: %d - %d ongeldig locktype mbox formaat is onjuist: %s Ongeldige xover regel: %s postbusis vergrendeld mailbox wordt vastgehouden door een ander proces. we wachten even... onjuist formaat in mbox: %s geen nieuwe artikelen. procmime_get_text_content(): Codeconversie mislukt protocolfout protocolfout: %s De beginmap %s bestaat niet sessie time-out de bronmap is hetzelfde als de doelmap. Afzender zonder escapecodes gevonden: %sgebruik 'flock' in plaats van 'file' waar mogelijk schrijven naar %s is mislukt. libsylph-1.1.0/po/pl.gmo0000644000175000017500000002354410756432605012035 00000000000000q,    % $  * *I t    !   %0 &V .} $  > 8 @M  " % $ ' .9 h       #!;$]:"Ps :Ti > Wx'&.!N#p'#$& ,"M&p&!!9Yl05=Ma{)+I\ kv;3"3+V' (+'K$s(7% /RO-P!-9,g($= 8Xq2"''O o)+%#>b," $%Jc}&($ "- !P -r !  '!))! S!t!!*!!*!("%H"n"+"0"." #!;#"]#9#;#?#,6$c$!$?$?$&!%H%d%%%=%%&4*&_&r&&&0&&;'N' -XaJSi o0W) ;3Cm Q=4$fUV&_NB(R[.b OZg8:@I2cnlMd<,%'TpLq7k!\hA"K6F? *HD1/j>YEe5PG^#]`9+ Issuer: %s Subject: %s %d messages found. (sending file...)Can't connect to IMAP4 server: %s:%d Can't connect to NNTP server: %s:%d Can't create '%s' Can't create '%s' under INBOX Can't establish IMAP4 session with: %s:%d Can't open mark file. Can't start TLS session. Can't write to file. Configuration is saved. Copying message %s%c%d to %s ... Error creating ssl context Error occurred while posting Error occurred while sending command Exporting messages from %s into %s... File `%s' already exists. Can't create folder.Found %s Getting messages from %s into %s... IMAP4 authentication failed. IMAP4 connection to %s has been disconnected. Reconnecting... IMAP4 login failed. NNTP connection to %s:%d has been disconnected. Reconnecting... POP3 protocol error POP3: Deleting expired message %d POP3: Skipping message %d (%d bytes) Print command line is invalid: `%s' Reading all config for each account... Required APOP timestamp not found in greeting SMTP AUTH not available SSL connection using %s SSL method not available SSLv23 available SSLv23 not available Server certificate: TLSv1 available TLSv1 not available Timestamp syntax error in greeting Unknown SSL method *PROGRAM BUG* article %d has been already cached. bad SMTP response can't append %s to %s can't append message to %s can't close folder can't copy %s to %s can't copy message %s to %s can't create %s can't create lock file %s can't create mailbox can't create mailbox: LIST failed can't delete mailbox can't expunge can't fetch message %d can't get envelope can't get namespace can't get xhdr can't get xover can't lock %s can't open mark file can't open temporary file can't parse envelope: %s can't post article. can't read article %d can't read mbox file. can't rename mailbox: %s to %s can't retrieve article %d can't select folder: %s can't select group: %s can't set deleted flags: %s can't set deleted flags: 1:* can't start TLS session can't truncate mailbox to zero. can't unlock %s can't write to temporary file command not supported creating IMAP4 connection to %s:%d ... creating NNTP connection to %s:%d ... error occurred on POP3 session error occurred on SMTP session error occurred on authentication error occurred while getting LIST. error occurred while getting envelope. error occurred while getting xhdr. error occurred while getting xover. error occurred while retrieving data. error while imap command: CLOSE error while imap command: EXPUNGE error while imap command: STORE %s %s failed to write configuration to file getting article %d... getting xover %d - %d in %s... iconv cannot convert %s to UTF-7 iconv cannot convert UTF-7 to %s invalid article range: %d - %d invalid lock type invalid mbox format: %s invalid xover line: %s mailbox is locked mailbox is owned by another process, waiting... malformed mbox: %s no new articles. procmime_get_text_content(): Code conversion failed. protocol error protocol error: %s root folder %s not exist session timeout the src folder is identical to the dest. unescaped From found: %suse 'flock' instead of 'file' if possible. writing to %s failed. Project-Id-Version: sylpheed 1.9.8 Report-Msgid-Bugs-To: POT-Creation-Date: 2008-02-19 10:48+0900 PO-Revision-Date: 2005-03-05 18:57+0100 Last-Translator: Wit Wilinski Language-Team: POLISH MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Nadawca: %s Temat: %s znaleziono %d wiadomości. (wysyłanie pliku...)Nie można nawiązać połączenia z serwerem IMAP4: %s:%d Nie można połączyć się z serwerem NNTP: %s:%d nie można utworzyć "%s" nie można utworzyć "%s" w INBOX Nie można ustanowić sesji IMAP4 z: %s:%d Nie można otworzyć pliku zaznaczeń. Nie można uruchomić sesji TLS Nie można zapisać do pliku. Konfiguracja zapisana. Kopiowanie wiadomości %s%c%d do %s ... Błąd tworzenia kontekstu ssl Wystąpił błąd podczas publikowania Błąd podczas wysyłania polecenia Eksportowanie wiadomości z %s do %s... Plik "%s" już istnieje. Nie można utworzyć katalogu.Znaleziono: %s Pobieranie wiadomości z %s do %s... Błąd uwierzytelniania IMAP4. Połączenie IMAP4 z %s zostało przerwane. Ponowne nawiązywanie połączenia... Nie można zalogować się do serwera IMAP4. Połączenie NNTP %s:%d zostało zerwane. Ponowne nawiązywanie połączenia... Błąd protokołu POP3 POP3: Usuwanie przestarzałej wiadomości %d POP3: Pomijanie wiadomości %d (%d bajtów) Błędny wiersz polecenia wydruku: "%s" Odczyt ustawień wszystkich kont... Przy powitaniu zabrakło wymaganego znacznika czasowego APOP SMTP AUTH niedostępna Połączenie SSL z użyciem %s Niedostępna metoda SSL SSLv23 dostępny SSLv23 niedostępny Ceryfikat serwera: TLSv1 dostępny TLSv1 niedostępny Błąd składni przy znaczniku czasowym powitania Nieznana metoda SSL *PROGRAM BUG* artykuł %d został już zapamiętany. nieprawidłowa odpowiedź SMTP nie można dołączyć %s do %s nie można dołączyć wiadomości do %s nie można zamknąć katalogu nie można skopiować %s do %s nie można skopiować wiadomości %s do %s nie można utworzyć %s nie można utworzyć pliku lock %s nie można utworzyć skrzynki nie można utworzyć skrzynki: błąd LIST. nie można skasować skrzynki nie można zlikwidować nie można pobrać wiadomości %d nie można pobrać koperty nie można pobrać przestrzeni nazw nie można pobrać xhdr nie można pobrać xover nie można zablokować %s nie można otworzyć pliku zaznaczeń nie można otworzyć pliku tymczasowego nie można przetworzyć koperty: %s nie można wysłać artykułu. nie można odczytać artykułu %d nie można odczytać pliku mbox. nie można zmienić nazwy skrzynki: %s na %s nie można odebrać artykułu %d nie można wybrać katalogu: %s nie można wybrać grupy: %s nie można ustawić flag skasowany: %s nie można ustawić flagi skasowany: 1:* nie można uruchomić sesji TLS nie można skrócić do zera. nie można odblokować %s nie można zapisać do pliku tymczasowego nieobsługiwane polecenie tworzenie połączenia IMAP4 do %s:%d ... tworzenie połączenia NNTP z %s:%d ... wystąpił błąd podczas sesji POP3 wystąpił błąd w sesji SMTP wystąpił błąd podczas uwierzytelniania wystąpił błąd podczas przy pobieraniu LIST. wystąpił błąd podczas pobierania koperty. błąd podczas pobierania xhdr. błąd podczas pobierania xover. błąd podczas odbierania danych. wystąpił błąd przy wykonywaniu polecenia IMAP: CLOSE wystąpił błąd przy wykonywaniu polecenia IMAP: EXPUNGE wystąpił błąd przy wykonywaniu polecenia IMAP: STORE %s %s błąd podczas zapisu konfiguracji do pliku pobieranie artykułu %d... pobieranie xover %d - %d w %s... nie można skonwertować %s do UTF-7 za pomocą programu iconv nie można skonwertować UTF-7 do %s za pomocą programu iconv niepoprawny zakres artykułu: %d - %d nieprawidłowy typ blokady niepoprawny format mbox: %s niepoprawna linia xover: %s skrzynka jest zablokowana skrzynka jest kontrolowana przez inny proces, oczekiwanie... uszkodzona skrzynka: %s brak nowych artykułów. procmine_get_text_content(): Błąd konwersji kodu. błąd protokołu błąd protokołu: %s brak głównego katalogu %s przekroczenie czasu sesji katalog źródłowy jest taki sam jak docelowy. znaleziono "unescaped" From: %sjeśli to możliwe, należy użyć "flock" zamiast "file". błąd zapisu do %s. libsylph-1.1.0/po/pt_BR.gmo0000644000175000017500000002613210756432605012424 00000000000000}    " % $ : M *l     !  7  3 %Q &w .  ! $ 1>O@0"E%h$'. ;Tm#!$0Uh "#F\k '<Sj *K\{'&!!#C'g#$& "?&b&!! +Ffy05JZn)+] }%8:)d0<.( &Ip%!  $#<H,#2"M!p 4$ %4 +Z * "  5 !!=!U!s!!!!!!," /"P"0i"+"""0".#/K#"{#/####$&%$&L$s$$$-$/$4/%d%#%'%8%%& *&*K&#v&$&'&$& '0-'^'%v'$'''"'#($4( Y( z(0((()"&)-I)w))*)*)*( *I*b**!*>**+;++g+z+++,++0,C,2<. /k&RX 1j;vLW%90n{JC4 UqKg-t B5(h?Pb>z"c@_D]xFl6ZN=SeYO+ H*'opT8Mm7!G#rE,[\|ay}Vdus3fw QI:$)^A`i Issuer: %s Subject: %s %d messages found. (sending file...)Appending messages to %s (%d / %d)Can't connect to IMAP4 server: %s:%d Can't connect to NNTP server: %s:%d Can't create '%s' Can't create '%s' under INBOX Can't establish IMAP4 session with: %s:%d Can't open mark file. Can't start TLS session. Can't write to file. Configuration is saved. Copying message %s%c%d to %s ... Copying messages %s to %s ...Directory name '%s' is not a valid UTF-8 string. Maybe the locale encoding is used for filename. If that is the case, you must set the following environmental variable (see README for detail): G_FILENAME_ENCODING=@locale Error creating ssl context Error occurred while posting Error occurred while sending command Exporting messages from %s into %s... File `%s' already exists. Can't create folder.Found %s Getting message %dGetting message headers (%d / %d)Getting messages from %s into %s... IMAP4 authentication failed. IMAP4 connection to %s has been disconnected. Reconnecting... IMAP4 login failed. IMAP4 server disables LOGIN. Junk mail filterMoving messages %s to %s ...NNTP connection to %s:%d has been disconnected. Reconnecting... POP3 protocol error POP3: Deleting expired message %d POP3: Skipping message %d (%d bytes) Print command line is invalid: `%s' Reading all config for each account... Removing all messages in %sRemoving messages %sRequired APOP timestamp not found in greeting SMTP AUTH not available SSL connection using %s SSL method not available SSLv23 available SSLv23 not available Server certificate: TLSv1 available TLSv1 not available Timestamp syntax error in greeting Unknown SSL method *PROGRAM BUG* article %d has been already cached. bad SMTP response can't append %s to %s can't append message to %s can't close folder can't copy %s to %s can't copy message %s to %s can't create %s can't create lock file %s can't create mailbox can't create mailbox: LIST failed can't delete mailbox can't expunge can't fetch message %d can't get envelope can't get namespace can't get xhdr can't get xover can't lock %s can't open mark file can't open temporary file can't parse envelope: %s can't post article. can't read article %d can't read mbox file. can't rename mailbox: %s to %s can't retrieve article %d can't select folder: %s can't select group: %s can't set deleted flags: %s can't set deleted flags: 1:* can't start TLS session can't truncate mailbox to zero. can't unlock %s can't write to temporary file command not supported creating IMAP4 connection to %s:%d ... creating NNTP connection to %s:%d ... error occurred on POP3 session error occurred on SMTP session error occurred on authentication error occurred while getting LIST. error occurred while getting envelope. error occurred while getting xhdr. error occurred while getting xover. error occurred while retrieving data. error on imap command: STATUS error while imap command: CLOSE error while imap command: EXPUNGE error while imap command: STORE %s %s failed to write configuration to file getting article %d... getting xover %d - %d in %s... iconv cannot convert %s to UTF-7 iconv cannot convert UTF-7 to %s invalid UIDL response: %s invalid article range: %d - %d invalid lock type invalid mbox format: %s invalid xover line: %s mailbox is locked mailbox is owned by another process, waiting... malformed mbox: %s no new articles. procmime_get_text_content(): Code conversion failed. protocol error protocol error: %s root folder %s not exist session timeout the src folder is identical to the dest. unescaped From found: %suse 'flock' instead of 'file' if possible. writing to %s failed. Project-Id-Version: sylpheed Report-Msgid-Bugs-To: POT-Creation-Date: 2008-02-19 10:48+0900 PO-Revision-Date: 2006-08-03 14:50-0300 Last-Translator: Ricardo Nabinger Sanchez Language-Team: Ricardo Nabinger Sanchez MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Emissor: %s Assunto: %s %d mensagens encontradas. (enviando arquivo...)Adicionando mensagens em %s (%d / %d)Não foi possível se conectar ao servidor IMAP4: %s:%d Não foi possível se conectar com o servidor NNTP: %s:%d Não foi possível criar '%s' não foi possível criar '%s' em baixo da INBOX Não foi possível estabelecer uma sessão IMAP4 com: %s:%d Não foi possível abrir o arquivo de marcas. Não foi possível iniciar sessão TLS. Não foi possível gravar no arquivo. Configuração salva. Copiando mensagem %s%c%d para %s ... Copiando mensagesn %s para %s ...Diretório de nome '%s' não é uma string UTF-8 válida. Talvez a codificação local seja usada para o nome de arquivo. Se este for o caso, você deve definir a seguinte variável de ambiente (veja o README para detalhes): G_FILENAME_ENCODING=@locale Erro criando contexto SSL Ocorreu um erro quando postando Erro ao enviar comando Exportando mensagens de %s em %s... O arquivo `%s' já existe. Não foi possível criar a pasta.Encontrado %s Buscando mensagem %dBuscando cabeçalhos das mensagens (%d / %d)Obtendo Mensagens de %s até %s... Falha na autenticação IMAP4. A conexão IMAP4 com %s terminou. Reconectando... Falha ao logar no servidor IMAP4. servidor IMAP4 desabilita LOGIN. Filtro de spamMovendo mensagens %s para %s ...A conexão NNTP com %s:%d terminou. Reconectando... Erro do protocolo POP3 POP3: Apagando mensagem expirada %d POP3: Pulando mensagem %d (%d bytes) O comando de impressão é inválido: `%s' Lendo as configurações de cada conta... Removendo todas as mensagens em %sRemovendo mensagens %sTimestamp APOP requerida não encontrada no greeting SMTP AUTH não disponível Conexão SSL usando %s método SSL não disponível SSLv23 disponível SSLv23 não disponível Certificado do servidor: TLSv1 disponível TLSv1 não disponível Erro de sintaxe no greeting Método SSL desconhecido *ERRO DE PROGRAMA* o artigo %d já está no cache. resposta SMTP inválida não foi possível copiar a mensagem %s para %s não foi possível anexar a mensagem em %s não posso fechar pasta não posso copiar %s para %s não foi possível copiar a mensagem %s para %s não foi possível criar %s não foi possível criar o arquivo de trava %s não posso criar caixa de correio não posso criar caixa de correio: LIST falhou não posso apagar caixa de correio não posso eliminar não posso obter mensagem %d Não foi possível obter o 'envelope' Não foi possível obter o 'envelope' não foi possível obter xover não foi possível obter xover não foi possível travar %s não foi possível abrir o arquivo de marcas não foi possível abrir o arquivo temporário não foi possível realizar o parse no envelope: %s não posso postar artigo. não foi possível ler o artigo %d não foi possível ler o arquivo mbox. não é possível renomear caixa de correio: %s para %s não foi possível obter o artigo %d não posso selecionar pasta: %s não foi possível selecionar o grupo: %s não posso marcar como apagado: %s não posso marcar como apagado: 1:* não foi possível iniciar sessão TLS não foi possível zerar o mailbox. não foi possível destravar %s não é possível gravar no arquivo temporário comando não suportado criando conexão IMAP4 com %s:%d ... criando conexão NNTP com %s:%d ... Erro na sessão POP3 erro na sessão SMTP ocorreu um erro na autenticação erro recebendo resultados do LIST. Ocorreu um erro ao obter 'envelope' ocorreu um erro ao obter xover. ocorreu um erro ao obter xover. ocorreu um erro enquanto os dados eram obtidos. erro no comando imap: STATUS erro no comando imap: CLOSE erro no comando imap: EXPUNGE erro no comando imap: STORE %s %s falhou ao gravar a configuração no arquivo obtendo artigo %d... obtendo xover %d - %d en %s... o iconv não pode converter %s para UTF-7 o iconv não pode converter UTF-7 para %s resposta UIDL inválida: %s intervalo de artigos inválido: %d - %d tipo de trava inválido formato de mbox inválido: %s linha xover inválida: %s a caixa de correio está travada o correio está sendo usado por outro processo, aguardando... mbox corrompida: %s não há novos artigos. procmime_get_text_content(): Conversão de código falhou. erro do protocolo erro do protocolo: %s pasta raiz %s inexistente tempo limite da sessão pastas de origem e destino são idênticas. Encontrado De sem codificar: %susar 'flock' em vez de 'file' se for possível. erro ao gravar em %s. libsylph-1.1.0/po/ro.gmo0000644000175000017500000002617310756432605012043 00000000000000}    " % $ : M *l     !  7  3 %Q &w .  ! $ 1>O@0"E%h$'. ;Tm#!$0Uh "#F\k '<Sj *K\{'&!!#C'g#$& "?&b&!! +Ffy05JZn)+b 87)a x-* 3 St*3"7$ \g#z$;$? dp=#* 8. +g   7  !,!H![!p!!!!'!,!!"8""V"y""&""#"$#49#'n## #8#%$+$E$`$)v$&$=$%%%!D%3f%%%!%%+&,.&[&/{&&'&&$'#''%K'%q'%'1'O'0?(1p(8((()"7),Z))")-)-)*:*U*j**!*A*++90+j+~+++1+%,9&,`,2<. /k&RX 1j;vLW%90n{JC4 UqKg-t B5(h?Pb>z"c@_D]xFl6ZN=SeYO+ H*'opT8Mm7!G#rE,[\|ay}Vdus3fw QI:$)^A`i Issuer: %s Subject: %s %d messages found. (sending file...)Appending messages to %s (%d / %d)Can't connect to IMAP4 server: %s:%d Can't connect to NNTP server: %s:%d Can't create '%s' Can't create '%s' under INBOX Can't establish IMAP4 session with: %s:%d Can't open mark file. Can't start TLS session. Can't write to file. Configuration is saved. Copying message %s%c%d to %s ... Copying messages %s to %s ...Directory name '%s' is not a valid UTF-8 string. Maybe the locale encoding is used for filename. If that is the case, you must set the following environmental variable (see README for detail): G_FILENAME_ENCODING=@locale Error creating ssl context Error occurred while posting Error occurred while sending command Exporting messages from %s into %s... File `%s' already exists. Can't create folder.Found %s Getting message %dGetting message headers (%d / %d)Getting messages from %s into %s... IMAP4 authentication failed. IMAP4 connection to %s has been disconnected. Reconnecting... IMAP4 login failed. IMAP4 server disables LOGIN. Junk mail filterMoving messages %s to %s ...NNTP connection to %s:%d has been disconnected. Reconnecting... POP3 protocol error POP3: Deleting expired message %d POP3: Skipping message %d (%d bytes) Print command line is invalid: `%s' Reading all config for each account... Removing all messages in %sRemoving messages %sRequired APOP timestamp not found in greeting SMTP AUTH not available SSL connection using %s SSL method not available SSLv23 available SSLv23 not available Server certificate: TLSv1 available TLSv1 not available Timestamp syntax error in greeting Unknown SSL method *PROGRAM BUG* article %d has been already cached. bad SMTP response can't append %s to %s can't append message to %s can't close folder can't copy %s to %s can't copy message %s to %s can't create %s can't create lock file %s can't create mailbox can't create mailbox: LIST failed can't delete mailbox can't expunge can't fetch message %d can't get envelope can't get namespace can't get xhdr can't get xover can't lock %s can't open mark file can't open temporary file can't parse envelope: %s can't post article. can't read article %d can't read mbox file. can't rename mailbox: %s to %s can't retrieve article %d can't select folder: %s can't select group: %s can't set deleted flags: %s can't set deleted flags: 1:* can't start TLS session can't truncate mailbox to zero. can't unlock %s can't write to temporary file command not supported creating IMAP4 connection to %s:%d ... creating NNTP connection to %s:%d ... error occurred on POP3 session error occurred on SMTP session error occurred on authentication error occurred while getting LIST. error occurred while getting envelope. error occurred while getting xhdr. error occurred while getting xover. error occurred while retrieving data. error on imap command: STATUS error while imap command: CLOSE error while imap command: EXPUNGE error while imap command: STORE %s %s failed to write configuration to file getting article %d... getting xover %d - %d in %s... iconv cannot convert %s to UTF-7 iconv cannot convert UTF-7 to %s invalid UIDL response: %s invalid article range: %d - %d invalid lock type invalid mbox format: %s invalid xover line: %s mailbox is locked mailbox is owned by another process, waiting... malformed mbox: %s no new articles. procmime_get_text_content(): Code conversion failed. protocol error protocol error: %s root folder %s not exist session timeout the src folder is identical to the dest. unescaped From found: %suse 'flock' instead of 'file' if possible. writing to %s failed. Project-Id-Version: sylpheed 2.2.0 Report-Msgid-Bugs-To: POT-Creation-Date: 2008-02-19 10:48+0900 PO-Revision-Date: 2006-04-17 02:04+0200 Last-Translator: Cristian Secară Language-Team: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Poedit-Language: Romanian X-Poedit-Country: Romania Eliberat de: %s Subiect: %s %d mesaje găsite. (trimitere fişier...)Adăugare mesaje la %s (%d / %d)Nu se poate efectua conexiunea la serverul IMAP4: %s:%d Nu se poate efectua conexiunea la serverul NNTP: %s:%d Nu se poate crea '%s' Nu se poate crea '%s' în INBOX Nu se poate stabili sesiunea IMAP4 cu: %s:%d Nu se poate deschide fişierul de marcaj. Nu se poate lansa sesiunea TLS. Nu se poate scrie în fişier. Configuraţia a fost salvată. Copiere mesaj %s%c%d în %s ... Copiere mesaje %s la %s ...Numele directorului '%s' nu este un şir valid UTF-8. Este posibil ca numele să utilizeze codarea locale. Dacă acesta este cazul, va trebui să setaţi următoarea variabilă de mediu (vezi README pentru detalii): G_FILENAME_ENCODING=@locale Eroare creare context SSL A avut loc o eroare în timpul trimiterii A avut loc o eroare în timpul trimiterii comenzii Exportare mesaje din %s în %s... Fişierul '%s' există deja. Nu se poate crea folderul.Găsit %s Obţinere mesaj %dObţinere header-e mesaje (%d / %d)Obţinere mesaje de la %s în %s... Autentificarea IMAP4 a eşuat. Conexiunea IMAP4 la %s a fost întreruptă. Reconectare... Autentificarea IMAP4 a eşuat. Serverul IMAP4 dezactivează LOGIN. Filtru spamMutare mesaje %s la %s ...Conexiunea NNTP la %s:%d a fost întreruptă. Reconectare... Eroare protocol POP3 POP3: Ştergere mesaje expirate %d PO3: Trecere peste mesajul %d (%d bytes) Linia de comandă pentru imprimare este invalidă: '%s' Citire configurări pentru fiecare cont... Ştergere mesaje din %sŞtergere mesaje %sNu s-a găsit în salut marcajul de timp APOP necesar SMTP AUTH indisponibil Conexiune SSL utilizând %s Metodă SSL indisponibilă SSLv23 disponibil SSLv23 indisponibil Server de certificate: TLSv1 disponibil TLSv1 indisponibil Eroare de sintaxă timestamp Metodă SSL necunoscută *PROGRAM BUG* Articolul %d a fost deja memorat în cache. răspuns SMTP greşit nu se poate adăuga %s la %s nu se poate adăuga mesajul la %s nu se poate închide folderul nu se poate copia %s la %s nu se poate copia mesajului %s în %s nu se poate crea %s nu se poate crea fişierul lock %s nu se poate crea căsuţa poştală nu se poate crea căsuţa poştală: LIST a eşuat. nu se poate şterge căsuţa poştală nu se poate elimina nu se poate verifica mesajul %d nu se poate obţine 'envelope' (informaţia de routing) nu se poate obţine spaţiul de nume nu se poate obţine xhdr nu se poate obţine xover nu se poate bloca %s nu se poate deschide fişierul de marcaj nu se poate deschide fişier temporar 'envelope' (informaţia de routing) nu poate fi analizat: %s nu se poate trimite articolul. nu se poate citi articolul %d nu se poate citi fişierul mbox. nu se poate redenumi căsuţa poştală: %s în %s nu se poate recepţiona articolul %d nu se poate selecta folderul: %s nu se poate selecta grupul: %s nu se poate seta marcajul de ştergere: %s nu se poate seta marcajul de ştergere: 1:* nu se poate porni sesiunea TLS nu se poate reteza la zero căsuţa poştală. nu se poate debloca %s fişierul temporar nu a putut fi scris comandă nesuportată creare conexiune IMAP4 la %s:%d ... creare conexiune NNTP la %s:%d ... a avut loc o eroare la sesiunea POP3 a avut loc o eroare la sesiunea SMTP a avut loc o eroare la autentificare a avut loc o eroare în timpul obţineriii LIST. a avut loc o eroare în timpul obţinerii 'envelope' (informaţia de routing). a avut loc o eroare în timpul obţinerii xhdr. a avut loc o eroare în timpul obţinerii xover. a avut loc o eroare în timpul recepţionării datelor. eroare la comanda IMAP: STATUS eroare comandă IMAP: CLOSE eroare comandă IMAP: EXPUNGE eroare comandă IMAP: STORE:%s %s scrierea configuraţie în fişier a eşuat obţinere articol %d... obţinere xover %d - %d în %s... iconv nu poate efectua conversia %s la UTF-7 iconv nu poate efectua conversia UTF-7 la %s răspuns UIDL invalid: %s interval invalid: %d - %d tip blocare invalid format mbox invalid: %s linie xover invalidă: %s căsuţa poştală este blocată căsuţa poştală este folosită de alt proces, aşteaptaţi... mbox malformat: %s nu există articole noi. procmime_get_text_content(): conversia codului a eşuat. eroare de protocol eroare de protocol: %s folderul root %s nu există timpul sesiunii a expirat folderul sursă este identic cu cel destinaţie. s-a găsit câmp From 'unescaped': %sdacă este posibil, folosiţi 'flock' în loc de 'file'. scrierea în %s a eşuat. libsylph-1.1.0/po/ru.gmo0000644000175000017500000003320610756432605012044 00000000000000zH I W f z " % $   *, W n   !    % &7 .^  ! $  >Nc@"%($N's.-GYo#!$(?[o"+CWl|;Vo '2&Z!#'#/$S&x "&&)Pg!!70J{5)&P+i9& &# J7kLB*3=^G<1!'S'{;6<EH`3rP (c D 7 1 !h;!+!W!("6@"dw"%"D#CG#;#?#4$&<$kc$7$<%$D%i%%%%%%a%K[&$&!&.&>'/\'4'G'& (A0(=r(P(=)[?);)C)G*,c*-*8*F*E>+,+*+++R,0[,3,4,G,H=-0-N-;.1B.At.'...1/@P/F/@/A0H[0E0D0F/1Jv1>1&2('2AP2A2%282@33(t3%3Z354 T4[u4 4$495'Q5Uy5=5O 6(]6>_S$2G'C\#H gd4TUI=w(r5Bf<Jqtyan%M*8i`9hpe^o&!+PF?u;lYZ j EOVWLc"v/km7@R[N6sx : Xz1-b0QA]DK),3. Issuer: %s Subject: %s %d messages found. (sending file...)Appending messages to %s (%d / %d)Can't connect to IMAP4 server: %s:%d Can't connect to NNTP server: %s:%d Can't create '%s' Can't create '%s' under INBOX Can't establish IMAP4 session with: %s:%d Can't open mark file. Can't start TLS session. Can't write to file. Configuration is saved. Copying message %s%c%d to %s ... Copying messages %s to %s ...Directory name '%s' is not a valid UTF-8 string. Maybe the locale encoding is used for filename. If that is the case, you must set the following environmental variable (see README for detail): G_FILENAME_ENCODING=@locale Error creating ssl context Error occurred while posting Error occurred while sending command Exporting messages from %s into %s... File `%s' already exists. Can't create folder.Found %s Getting message %dGetting message headers (%d / %d)Getting messages from %s into %s... IMAP4 authentication failed. IMAP4 connection to %s has been disconnected. Reconnecting... IMAP4 login failed. IMAP4 server disables LOGIN. Junk mail filterMoving messages %s to %s ...NNTP connection to %s:%d has been disconnected. Reconnecting... POP3 protocol error POP3: Deleting expired message %d POP3: Skipping message %d (%d bytes) Print command line is invalid: `%s' Reading all config for each account... Removing all messages in %sRemoving messages %sRequired APOP timestamp not found in greeting SMTP AUTH not available SSL connection using %s SSL method not available SSLv23 available SSLv23 not available Server certificate: TLSv1 available TLSv1 not available Timestamp syntax error in greeting Unknown SSL method *PROGRAM BUG* article %d has been already cached. bad SMTP response can't append %s to %s can't append message to %s can't close folder can't copy %s to %s can't copy message %s to %s can't create %s can't create lock file %s can't create mailbox can't create mailbox: LIST failed can't delete mailbox can't expunge can't fetch message %d can't get envelope can't get namespace can't get xhdr can't get xover can't open mark file can't open temporary file can't parse envelope: %s can't post article. can't read article %d can't read mbox file. can't rename mailbox: %s to %s can't retrieve article %d can't select folder: %s can't select group: %s can't set deleted flags: %s can't set deleted flags: 1:* can't start TLS session can't truncate mailbox to zero. can't write to temporary file command not supported creating IMAP4 connection to %s:%d ... creating NNTP connection to %s:%d ... error occurred on POP3 session error occurred on SMTP session error occurred on authentication error occurred while getting LIST. error occurred while getting envelope. error occurred while getting xhdr. error occurred while getting xover. error occurred while retrieving data. error on imap command: STATUS error while imap command: CLOSE error while imap command: EXPUNGE error while imap command: STORE %s %s failed to write configuration to file getting article %d... getting xover %d - %d in %s... iconv cannot convert %s to UTF-7 iconv cannot convert UTF-7 to %s invalid UIDL response: %s invalid article range: %d - %d invalid mbox format: %s invalid xover line: %s mailbox is locked mailbox is owned by another process, waiting... malformed mbox: %s no new articles. procmime_get_text_content(): Code conversion failed. protocol error protocol error: %s root folder %s not exist session timeout the src folder is identical to the dest. unescaped From found: %suse 'flock' instead of 'file' if possible. writing to %s failed. Project-Id-Version: sylpheed 2.2.6 Report-Msgid-Bugs-To: POT-Creation-Date: 2008-02-19 10:48+0900 PO-Revision-Date: 2006-06-09 14:30+0400 Last-Translator: Sergey Vlasov Language-Team: Russian MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Сертификат выдал: %s Субъект: %s найдено %d сообщений. (передача файла...)Добавление сообщений в %s (%d / %d)Не удалось соединиться с сервером IMAP4: %s:%d Ошибка соединения с сервером NNTP: %s:%d Ошибка при создании "%s" Ошибка при создании "%s" внутри INBOX Не удалось открыть сеанс связи IMAP4 c %s:%d Не удалось открыть файл пометок. Не удалось начать сеанс TLS. Ошибка записи в файл. Настройки сохранены. Копирование сообщения %s%c%d в %s ... Копирование сообщений %s в %s ...Имя каталога "%s" не является допустимой строкой в кодировке UTF-8. Возможно, для этого имени используется кодировка локали. В этом случае необходимо установить следующую переменную окружения (см. более подробное описание в файле README): G_FILENAME_ENCODING=@locale Ошибка при создании контекста SSL Произошла ошибка при отправке статьи Произошла ошибка при передаче команды. Экспорт сообщений из %s в %s... Файл "%s" уже существует. Нельзя создать папку с таким же именем.Найдено %s Получение сообщения %dПолучение заголовков сообщений (%d / %d)Получение сообщений из %s в %s... Ошибка аутентификации IMAP4. Соединение IMAP4 с %s прервано. Восстановление соединения... Ошибка авторизации IMAP4. Сервер IMAP4 запрещает использование команды LOGIN. Фильтр спамаПеремещение сообщений %s в %s ...Потеряно соединение NNTP с %s:%d. Попытка восстановления... Ошибка протокола POP3 POP3: Удаление устаревшего сообщения %d POP3: Пропускается сообщение %d (%d байт) Неправильная команда печати: "%s" Чтение настроек учётных записей... Удаление всех сообщений из %sУдаление сообщений %sВ сообщении сервера не найдена требуемая метка времени APOP Аутентификация SMTP недоступна Соединение SSL с использованием %s Метод SSL недоступен SSLv23 доступен SSLv23 недоступен Сертификат сервера: TLSv1 доступен TLSv1 недоступен Ошибка синтаксиса метки времени в сообщении сервера Неизвестный метод SSL *ОШИБКА В ПРОГРАММЕ* статья %d уже в кеше. неверный ответ SMTP не удалось добавить %s к %s не удалось добавить сообщение к %s невозможно закрыть папку не удалось скопировать %s в %s не удалось скопировать сообщение %s в %s не удалось создать %s ошибка создания файла блокировки %s не удалось создать почтовый ящик не удалось создать почтовый ящик: ошибка LIST не удалось удалить почтовый ящик не удалось очистить папку от удалённых сообщений не удалось получить сообщение %d не удалось получить данные конверта не удалось получить пространство имён не удалось загрузить xhdr не удалось загрузить xover ошибка открытия файла пометок ошибка при открытии временного файла ошибка при разборе данных конверта: %s ошибка отправки статьи. ошибка чтения статьи %d ошибка чтения файла mbox. не удалось переименовать почтовый ящик %s в %s ошибка получения статьи %d невозможно выбрать папку: %s не удалось выбрать группу: %s не удалось установить флаг удаления: %s не удалось установить флаг удаления: 1:* не удалось начать сеанс TLS не удалось обрезать почтовый ящик до нуля. ошибка записи во временный файл команда не поддерживается установление соединения IMAP4 с %s:%d ... соединение NNTP с %s:%d ... ошибка сеанса POP3 ошибка сеанса SMTP ошибка при аутентификации произошла ошибка при получении LIST. ошибка при получении данных конверта. произошла ошибка при получении xhdr. произошла ошибка при получении xover. произошла ошибка при получении данных. ошибка при выполнении команды IMAP: STATUS ошибка при выполнении команды IMAP: CLOSE ошибка при выполнении команды IMAP: EXPUNGE ошибка при выполнении команды IMAP: STORE %s %s ошибка при записи настроек в файл получение статьи %d... загрузка xover %d - %d в %s... ошибка преобразования iconv из %s в UTF-7 ошибка преобразования iconv из UTF-7 в %s неверный ответ UIDL: %s неверный диапазон статей: %d - %d неверный формат почтового ящика: %s неверная строка xover: %s почтовый ящик занят почтовый ящик занят другим процессом, ожидание... испорченный почтовый ящик: %s новых статей нет. procmime_get_text_content(): Ошибка преобразования кодировки. ошибка протокола ошибка протокола: %s корневая папка %s не существует время сеанса истекло исходная папка совпадает с папкой назначения. найдена незащищённая строка From: %sиспользуйте "flock" вместо "file", если возможно. запись в %s не удалась. libsylph-1.1.0/po/sk.gmo0000644000175000017500000002271610756432605012037 00000000000000o ` a o ~  % $   *! L c }  !   & ./ ^ $h  >  @ @ "U %x $ ' .  3 L f x    # ! $4G^z"%;Jbv2Ii #B'Y&!# '.#V$z& "& &1Xo!!70J{5)&P+iX&>*S)~!+)!9 [|$/"! 8- f t'6#>W%m)--?Y&u$*&O#v '*R(j2 8Uo'$!("F#i)")*# !N 0p  ,  %!&*!$Q!$v!"!%!+!(")9"(c""!"%"."## =#)^#)#$### $%$);$e${$?$$$$$%17%i%2%%)'RQ5gHh/O_2J$-kT0S l9 3e*EFPmdGn1!7 V\`;^U j"<.DINibBX?K&Z]8,(>#Af[:C%Y =o4W+ 6MaL@c Issuer: %s Subject: %s %d messages found. (sending file...)Can't connect to IMAP4 server: %s:%d Can't connect to NNTP server: %s:%d Can't create '%s' Can't create '%s' under INBOX Can't establish IMAP4 session with: %s:%d Can't open mark file. Can't start TLS session. Can't write to file. Configuration is saved. Copying message %s%c%d to %s ... Error creating ssl context Error occurred while posting Exporting messages from %s into %s... File `%s' already exists. Can't create folder.Found %s Getting messages from %s into %s... IMAP4 authentication failed. IMAP4 connection to %s has been disconnected. Reconnecting... IMAP4 login failed. NNTP connection to %s:%d has been disconnected. Reconnecting... POP3 protocol error POP3: Deleting expired message %d POP3: Skipping message %d (%d bytes) Print command line is invalid: `%s' Reading all config for each account... Required APOP timestamp not found in greeting SMTP AUTH not available SSL connection using %s SSL method not available SSLv23 available SSLv23 not available Server certificate: TLSv1 available TLSv1 not available Timestamp syntax error in greeting Unknown SSL method *PROGRAM BUG* article %d has been already cached. bad SMTP response can't append %s to %s can't append message to %s can't close folder can't copy %s to %s can't copy message %s to %s can't create %s can't create lock file %s can't create mailbox can't create mailbox: LIST failed can't delete mailbox can't expunge can't fetch message %d can't get envelope can't get namespace can't get xhdr can't get xover can't lock %s can't open mark file can't open temporary file can't parse envelope: %s can't post article. can't read article %d can't read mbox file. can't rename mailbox: %s to %s can't retrieve article %d can't select folder: %s can't set deleted flags: %s can't set deleted flags: 1:* can't start TLS session can't truncate mailbox to zero. can't unlock %s can't write to temporary file command not supported creating IMAP4 connection to %s:%d ... creating NNTP connection to %s:%d ... error occurred on POP3 session error occurred on SMTP session error occurred on authentication error occurred while getting LIST. error occurred while getting envelope. error occurred while getting xhdr. error occurred while getting xover. error occurred while retrieving data. error while imap command: CLOSE error while imap command: EXPUNGE error while imap command: STORE %s %s failed to write configuration to file getting article %d... getting xover %d - %d in %s... iconv cannot convert %s to UTF-7 iconv cannot convert UTF-7 to %s invalid article range: %d - %d invalid lock type invalid mbox format: %s invalid xover line: %s mailbox is locked mailbox is owned by another process, waiting... malformed mbox: %s no new articles. procmime_get_text_content(): Code conversion failed. protocol error protocol error: %s root folder %s not exist session timeout the src folder is identical to the dest. unescaped From found: %suse 'flock' instead of 'file' if possible. writing to %s failed. Project-Id-Version: sylpheed Report-Msgid-Bugs-To: POT-Creation-Date: 2008-02-19 10:48+0900 PO-Revision-Date: 2004-01-22 17:46+0100 Last-Translator: Andrej Kacian Language-Team: Slovak MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Generator: KBabel 1.2 Vydavateľ: %s Predmet: %s nájdených %d správ. (posielam súbor...)Nedá sa pripojiť k serveru IMAP4: %s:%d Nedá sa pripojiŤ k serveru NNTP: %s:%d Nedá sa vytvoriť '%s' Nedá sa vytvoriť '%s' v INBOXe Nedá sa vytvoriť IMAP4 spojenie s: %s:%d Nemôžem označiť súbor so značkami. Nedá sa vytvoriť TLS spojenie. Do súboru sa nedá zapisovať. Nastavenie uložené. Kopírujem správu %s%c%d do %s ... Pri vytváraní SSL kontextu sa vyskytla chyba Pri odosielaní sa vyskytla chyba Exportujem správy z %s do %s... Súbor '%s' už existuje. Priečinok sa nedá vytvoriť.Nájdené %s Prijímam správy z %s do %s... IMAP4 autentizácia bola neúspešná. IMAP4 spojenie k %s sa prerušilo. Znovu pripájam... neúspešné prihlásenie k IMAP4. NNTP spojenie k %s:%d bolo prerušené. Obnovujem spojenie... Chyba protokolu POP3 POP3: Odstraňujem starú správu %d POP3: Preskakujem správu %d (%d bajtov) Príkazový riadok tlače je neplatný: '%s' Načítavam nastavenia pre všetky kontá... V pozdrave nebola nájdená vyžadovaná APOP časová značka SMTP AUTH nie je dostupné SSL spojenie pri použití %s zlyhalo Metóda SSL nie je dostupná SSLv23 je dostupné SSLv23 nie je dostupné Certifikát serveru: TLSv1 je dostupné TLSv1 nie je dostupné Chybná časová značka v pozdrave Neznáma metóda SSL *CHYBA PROGRAMU* článok %d už je v medzipamäti. neplatná odozva SMTP nedá sa napojiť %s k %s nedá sa napojiť správa k %s priečinok sa nedá zatvoriť nedá sa kopírovať %s do %s nemôžem kopírovať správu %s do %s nemôžem vytvoriť %s nemôžem vytvoriť zámkový súbor %s nedá sa vytvoriť schránka nedá sa vytvoriť schránka: príkaz LIST zlyhal schránka sa nedá odstrániť nedá sa odstrániť nedá sa prijať správa %d obálka sa nedá načítať nedá sa nájsť obálka nemôžem prijať xhdr nemôžem prijať xover nemôžem uzamknúť %s nemôžem otvoriť súbor so značkami nemôžem otvoriť dočasný súbor obálka sa nedá prečítať: %s nemôžem odoslať článok. nemôžem prečítať článok %d nemôžem prečítať súbor mbox. nedá sa premenovať schránka: %s na %s nemôžem prijať článok %d priečinok sa nedá vytvoriť: %s nedá sa nastaviť príznak zmazania: %s nedá sa nastaviť príznak zmazania: 1:* nemôžem vytvoriť TLS reláciu nemôžem skrátiť mailbox na nulovú dĺžku. nemôžem odomknúť %s nemôžem zapisovať do dočasného súboru príkaz nie je podporovaný vytváram IMAP4 spojenie k %s:%d ... nadväzujem NNTP spojenie k %s:%d ... vyskytla sa chyba pri POP3 spojení vyskytla sa chyba pri SMTP spojení vyskytla sa chyba v autentizácii pri príkaze LIST sa vyskytla chyba. pri získavaní obálky sa vyskytla chyba. pri prijímaní xhdr sa vyskytla chyba. pri prijímaní xover sa vyskytla chyba. pri prijímaní dát sa vyskytla chyba. chyba pri IMAP príkaze: CLOSE chyba pri IMAP príkaze: EXPUNGE chyba pri IMAP príkaze: STORE %s %s nepodarilo sa zapísať nastavenie do súboru prijímam článok %d... prijímam xover %d - %d v %s... iconv nemôže skonvertovať %s na UTF-7 iconv nemôže skonvertovať UTF-7 na %s neplatný rozsah článkov: %d - %d neplatný typ zámku neplatný formát mbox: %s neplatný xover riadok: %s mailbox je zamknutý iný proces vlastní mailbox, čakám... poškodený mbox: %s žiadne nové články. procmime_get_text_content(): Nepodarilo sa skonvertovať kód. chyba protokolu chyba protokolu: %s koreňový priečinok %s neexistuje čas spojenia vypršal zdrojový priečinok je ten istý ako cieľový. neukončené From: %sak je to možné, miesto 'file' použite 'flock'. nepodaril sa zápis do %s. libsylph-1.1.0/po/sl.gmo0000644000175000017500000002022510756432605012031 00000000000000_  &:%L$r* % ; !T v  & .  $ 5 @J  " % $ ' .6 e ~       # !8 $Z      "  . = U i ~       %<\w '&"!I'k#$&"&&Md!!,0?p5)+3_ov /6/f((%&C`#}%&"5 G#RvA$+-?'m;#;Sk/!$&+R,h$3% (I#c&#"@[!y10"S$j"%3. .;.j1$2# <$]$&!/>n<# , 0K | 5LNEM6YG+C<.I\9J'X Q[=)HU*PO#:,D]VA7(_^"8%@F1;T-> !4W & / K2R$ 03?BZS Issuer: %s Subject: %s %d messages found. (sending file...)Can't connect to IMAP4 server: %s:%d Can't connect to NNTP server: %s:%d Can't create '%s' Can't create '%s' under INBOX Can't establish IMAP4 session with: %s:%d Can't open mark file. Can't start TLS session. Can't write to file. Configuration is saved. Copying message %s%c%d to %s ... Error creating ssl context Error occurred while posting Exporting messages from %s into %s... File `%s' already exists. Can't create folder.Found %s Getting messages from %s into %s... IMAP4 login failed. NNTP connection to %s:%d has been disconnected. Reconnecting... POP3 protocol error POP3: Deleting expired message %d POP3: Skipping message %d (%d bytes) Print command line is invalid: `%s' Reading all config for each account... Required APOP timestamp not found in greeting SMTP AUTH not available SSL connection using %s SSL method not available SSLv23 available SSLv23 not available Server certificate: TLSv1 available TLSv1 not available Timestamp syntax error in greeting Unknown SSL method *PROGRAM BUG* article %d has been already cached. can't append %s to %s can't copy message %s to %s can't create %s can't create lock file %s can't create mailbox can't create mailbox: LIST failed can't delete mailbox can't expunge can't fetch message %d can't get envelope can't get namespace can't get xhdr can't get xover can't lock %s can't open mark file can't open temporary file can't parse envelope: %s can't post article. can't read article %d can't read mbox file. can't rename mailbox: %s to %s can't retrieve article %d can't select folder: %s can't start TLS session can't truncate mailbox to zero. can't unlock %s can't write to temporary file creating IMAP4 connection to %s:%d ... creating NNTP connection to %s:%d ... error occurred on authentication error occurred while getting envelope. error occurred while getting xhdr. error occurred while getting xover. error occurred while retrieving data. error while imap command: EXPUNGE failed to write configuration to file getting article %d... getting xover %d - %d in %s... iconv cannot convert %s to UTF-7 iconv cannot convert UTF-7 to %s invalid article range: %d - %d invalid lock type invalid mbox format: %s invalid xover line: %s mailbox is locked mailbox is owned by another process, waiting... malformed mbox: %s no new articles. procmime_get_text_content(): Code conversion failed. protocol error protocol error: %s the src folder is identical to the dest. unescaped From found: %suse 'flock' instead of 'file' if possible. writing to %s failed. Project-Id-Version: sylpheed Report-Msgid-Bugs-To: POT-Creation-Date: 2008-02-19 10:48+0900 PO-Revision-Date: 2003-01-24 20:39CET Last-Translator: Jernej Kovacic Language-Team: Slovenian MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Generator: KBabel 0.9.5 Izdajatelj: %s Zadeva: %s najdenih %d sporočil. (pošiljam datoteko...)Ne morem se povezati s strežnikom IMAP4: %s%d Ne morem se povezati s strežnikom NNTP: %s:%d Ne morem narediti '%s' Ne morem narediti '%s' pod mapo Prejeto Ne morem vzpostaviti seje IMAP4 z: %s%d Ne morem odpreti označene datoteke. Ne morem pričeti seje TLS. Ne morem pisati v datoteko. Konfiguracija je shranjena. Kopiram sporočilo %s%c%d v %s ... Napaka pri ustvarjanju konteksta ssl Med pošiljanjem je prišlo do napake Izvažam sporočila iz %s v %s... Datoteka `%s' že obstaja. Ne morem narediti imenika.Najden %s Sprejemam sporočila iz %s v %s... Prijava na IMAP4 ni uspela. Povezava NNTP do %s:%d je bila prekinjena. Povezujem se znova... Napaka v protokolu POP3 POP3: brišem poteklo sporočilo %d POP3: Izpuščam sporočilo %d (%d zlogov) Ukazna vrstica za tiskanje ni veljavna: `%s' Berem vse nastavitve za vsak račun... V pozdravu ni bila najdena zahtevana časovna značka APOP SMTP AUTH ni na razpolago Povezava SSL z uporabo %s Metoda SSL ni na razpolago SSLv23 je na razpolago SSLv23 ni na razpolago Certifikat strežnika: TLSv1 je na razpolago TLSv1 ni na razpolago Skladenjska napaka časovne značke v pozdravu Neznana metoda SSL *PROGRAM BUG* članek %d je že v predpomnilniku. ne morem pripeti %s na %s ne morem prepisati sporočila %s v %s ne morem narediti %s ne morem narediti datoteke za zaklepanje %s ne morem narediti poštnega predala ne morem narediti poštnega predala: LIST ni uspel ne morem izbrisati poštnega predala ne morem izbrisati ne morem prenesti sporočila %d ne morem dobiti ovojnice ne morem dobiti imenskega prostora ne morem prejeti xhdr-ja ne morem prejeti xoverja ne morem zakleniti %s Ne morem odpreti datoteke z oznakami. ne morem odpreti začasne datoteke ne morem razčleniti ovojnice: %s ne morem poslati članka. ne morem prebrati članka %d ne morem prebrati datoteke mbox. ne morem preimenovati poštnega predala: %s v %s ne morem sprejeti članka %d ne morem izbrati mape: %s ne morem pričeti seje TLS ne morem prisekati poštnega predala na ničlo. ne morem odkleniti %s ne morem pisati v začasno datoteko delam povezavo IMAP4 do %s:%d ... ustvarjam povezavo NNTP do %s:%d ... Med preverjanjem istovetnosti je prišlo do napake med dobivanjem ovojnice je prišlo do napake. med prejemanjem xhdr-ja je prišlo do napake. med prejemanjem xoverja je prišlo do napake. med popravljanjem podatkov je prišlo do napake. napaka med IMAPovim ukazom: EXPUNGE neuspešen poskus zapisa konfiguracije v datoteko sprejemam članek %d... sprejemam xover %d - %d v %s... iconv ne more pretvoriti %s v UTF-7 iconv ne more pretvoriti UTF-7 v %s neveljavno območje člankov: %d - %d neveljaven tip zaklepanja napačen format mbox: %s neveljavna vrstica xover: %s poštni predal je zaklenjen poštni predal si lasti drug proces, čakam... napačno oblikovan mbox: %s ni novih člankov. procmime_get_text_content(): Pretvorba kodiranja ni uspela. napaka v protokolu napaka v protokolu: %s Izvorna mapa je identična ciljni. najdeno neubežno polje Od: %sče je mogoče, uporabi 'flock' namesto 'file'. pisanje v %s ni uspelo. libsylph-1.1.0/po/sr.gmo0000644000175000017500000001764010756432605012046 00000000000000_  &:%L$r* % ; !T v  & .  $ 5 @J  " % $ ' .6 e ~       # !8 $Z      "  . = U i ~       %<\w '&"!I'k#$&"&&Md!!,0?p5)+3_<v -1*\"s,%$B$b%;38L'*')2Cv )!"Kn *+#Oj|% %2Xv)"8#Vz%&$$/).Y/3'-BX%v%";.T8, :.V5LNEM6YG+C<.I\9J'X Q[=)HU*PO#:,D]VA7(_^"8%@F1;T-> !4W & / K2R$ 03?BZS Issuer: %s Subject: %s %d messages found. (sending file...)Can't connect to IMAP4 server: %s:%d Can't connect to NNTP server: %s:%d Can't create '%s' Can't create '%s' under INBOX Can't establish IMAP4 session with: %s:%d Can't open mark file. Can't start TLS session. Can't write to file. Configuration is saved. Copying message %s%c%d to %s ... Error creating ssl context Error occurred while posting Exporting messages from %s into %s... File `%s' already exists. Can't create folder.Found %s Getting messages from %s into %s... IMAP4 login failed. NNTP connection to %s:%d has been disconnected. Reconnecting... POP3 protocol error POP3: Deleting expired message %d POP3: Skipping message %d (%d bytes) Print command line is invalid: `%s' Reading all config for each account... Required APOP timestamp not found in greeting SMTP AUTH not available SSL connection using %s SSL method not available SSLv23 available SSLv23 not available Server certificate: TLSv1 available TLSv1 not available Timestamp syntax error in greeting Unknown SSL method *PROGRAM BUG* article %d has been already cached. can't append %s to %s can't copy message %s to %s can't create %s can't create lock file %s can't create mailbox can't create mailbox: LIST failed can't delete mailbox can't expunge can't fetch message %d can't get envelope can't get namespace can't get xhdr can't get xover can't lock %s can't open mark file can't open temporary file can't parse envelope: %s can't post article. can't read article %d can't read mbox file. can't rename mailbox: %s to %s can't retrieve article %d can't select folder: %s can't start TLS session can't truncate mailbox to zero. can't unlock %s can't write to temporary file creating IMAP4 connection to %s:%d ... creating NNTP connection to %s:%d ... error occurred on authentication error occurred while getting envelope. error occurred while getting xhdr. error occurred while getting xover. error occurred while retrieving data. error while imap command: EXPUNGE failed to write configuration to file getting article %d... getting xover %d - %d in %s... iconv cannot convert %s to UTF-7 iconv cannot convert UTF-7 to %s invalid article range: %d - %d invalid lock type invalid mbox format: %s invalid xover line: %s mailbox is locked mailbox is owned by another process, waiting... malformed mbox: %s no new articles. procmime_get_text_content(): Code conversion failed. protocol error protocol error: %s the src folder is identical to the dest. unescaped From found: %suse 'flock' instead of 'file' if possible. writing to %s failed. Project-Id-Version: sylpheed Report-Msgid-Bugs-To: POT-Creation-Date: 2008-02-19 10:48+0900 PO-Revision-Date: 2002-11-29 21:08+0100 Last-Translator: garret Language-Team: Serbian MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Generator: KBabel 0.9.6 Izdavač: %s Tema: %s %d poruka pronađeno. (šaljem datoteku...)Ne mogu se povezati sa IMAP4 serverom: %s:%d Ne mogu uspostaviti vezu sa NNTP serverom: %s:%d ne mogu kreirati '%s' ne mogu kreirati '%s' ispod INBOX Ne mogu se povezati s IMAP4 serverom: %s:%d Ne mogu otvoriti označenu datoteku. Ne mogu pokrenuti TLS sesiju. Ne mogu pisati u datoteku. Konfiguracija je spremljena. Kopiram poruke %s%c%d u %s ... Greška pri kreiranju ssl konteksta Došlo je do greške prilikom slanja Izvozim poruke iz %s u %s... Datoteka `%s' već postoji. Ne mogu napraviti direktorijum.Pronađeno %s Primam poruke sa %s u %s... IMAP4 login nije uspeo. NNTP veza sa %s:%d je prekinuta. Povezujem se ponovo... greška POP3 protokola POP3: Brianje pouka koje su istekle %d POP3: Preskakanje poruke %d (%d byte-ova) Naredba za štampanje nije dobra: `%s' Čitanje konfiguracije za svaki nalog... Potrebni APOP timestamp nije pronađen u pozdravu SMTP AUTH nije dostupan SSL veza koristeći %s SSL metod nije dostupna SSLv23 dostupan SSLv23 nije dostupan Sertifikat servera: TLSv1 dostupan TLSv1 nije dostupan Syntax greška u timestampu kod pozdrava Nepoznat SSL metod *BUG PROGRAMA* članak %d već je pohranjen. ne mogu dodati %s na %s ne mogu kopirati poruku %s u %s ne mogu napraviti %s ne mogu napraviti zaključanu datoteku %s ne mogu kreirati sanduče ne mogu kreirati sanduče: LIST nije uspeo ne mogu obrisati sanduče ne mogu obrisati ne mogu dohvatiti poruku %d ne mogu dobiti omot ne mogu dobiti namespace ne mogu dobiti xhdr ne mogu primiti xover ne mogu zaključati %s ne mogu otvoriti obeleženu datoteku ne mogu otvoriti privremenu datoteku ne mogu analizirati omot: %s ne mogu poslati članak. ne mogu pročitati članak %d ne mogu čitati mbox datoteku. ne mogu promeniti ime sandučeta %s u %s ne mogu primiti članak %d ne mogu odabrati direktorijum: %s ne mogu pokrenuti TLS sesiju ne mogu skratiti sanduče na nulu. ne mogu otključati %s ne mogu pisati u privremenu datoteku ostvarujem IMAP4 vezu prema %s:%d ... uspostavljam NNTP vezu sa %s:%d ... greška prilikom provere identiteta došlo je do greške prilikom dobijanja omota. došlo je do greške prilikom primanja xhdra. došlo je do greške prilikom primanja xovera. došlo je do greške prilikom dohvatanja podataka. greška prilikom imap naredbe: EXPUNGE neuspeh pri pisanju konfiguracije u datoteku primam članak %d... primam xover %d - %d u %s... iconv ne može prebaciti %s to UTF-7 iconv ne može prebaciti UTF-7 to %s pogrešan opseg članaka: %d - %d neispravan tip zaključavanja pogrešan mbox format: %s pogrešna xover linija: %s sanduče je zaključano neki drugi proces koristi sanduče, čekam... pokvaren mbox: %s nema novih članaka. procmime_get_text_content(): Promena koda nije uspjela. protokol greška protokol greška: %s izvorni direktorijum jednak je destinaciji. neizbežan Od pronađen: %skoristi 'flock' umesto 'file' ako je moguće. pisanje u %s nije uspelo. libsylph-1.1.0/po/sv.gmo0000644000175000017500000002513710756432605012052 00000000000000}    " % $ : M *l     !  7  3 %Q &w .  ! $ 1>O@0"E%h$'. ;Tm#!$0Uh "#F\k '<Sj *K\{'&!!#C'g#$& "?&b&!! +Ffy05JZn)+@`r)*)) >(_&"%H !B%\+,#("G=j ?Z'm+&- 5 7M      !!*!(B!k! !! !(! "!"'>"f"y"",""" #)#A#^#t######$+$,D$q$$$&$'$%'-%U%#l%%(%(%%&8&#W&%{&#&$&%&'.'K'"j'+'''('((A(#Z(~((((0( ));0) l)z)))'))3 * >*2<. /k&RX 1j;vLW%90n{JC4 UqKg-t B5(h?Pb>z"c@_D]xFl6ZN=SeYO+ H*'opT8Mm7!G#rE,[\|ay}Vdus3fw QI:$)^A`i Issuer: %s Subject: %s %d messages found. (sending file...)Appending messages to %s (%d / %d)Can't connect to IMAP4 server: %s:%d Can't connect to NNTP server: %s:%d Can't create '%s' Can't create '%s' under INBOX Can't establish IMAP4 session with: %s:%d Can't open mark file. Can't start TLS session. Can't write to file. Configuration is saved. Copying message %s%c%d to %s ... Copying messages %s to %s ...Directory name '%s' is not a valid UTF-8 string. Maybe the locale encoding is used for filename. If that is the case, you must set the following environmental variable (see README for detail): G_FILENAME_ENCODING=@locale Error creating ssl context Error occurred while posting Error occurred while sending command Exporting messages from %s into %s... File `%s' already exists. Can't create folder.Found %s Getting message %dGetting message headers (%d / %d)Getting messages from %s into %s... IMAP4 authentication failed. IMAP4 connection to %s has been disconnected. Reconnecting... IMAP4 login failed. IMAP4 server disables LOGIN. Junk mail filterMoving messages %s to %s ...NNTP connection to %s:%d has been disconnected. Reconnecting... POP3 protocol error POP3: Deleting expired message %d POP3: Skipping message %d (%d bytes) Print command line is invalid: `%s' Reading all config for each account... Removing all messages in %sRemoving messages %sRequired APOP timestamp not found in greeting SMTP AUTH not available SSL connection using %s SSL method not available SSLv23 available SSLv23 not available Server certificate: TLSv1 available TLSv1 not available Timestamp syntax error in greeting Unknown SSL method *PROGRAM BUG* article %d has been already cached. bad SMTP response can't append %s to %s can't append message to %s can't close folder can't copy %s to %s can't copy message %s to %s can't create %s can't create lock file %s can't create mailbox can't create mailbox: LIST failed can't delete mailbox can't expunge can't fetch message %d can't get envelope can't get namespace can't get xhdr can't get xover can't lock %s can't open mark file can't open temporary file can't parse envelope: %s can't post article. can't read article %d can't read mbox file. can't rename mailbox: %s to %s can't retrieve article %d can't select folder: %s can't select group: %s can't set deleted flags: %s can't set deleted flags: 1:* can't start TLS session can't truncate mailbox to zero. can't unlock %s can't write to temporary file command not supported creating IMAP4 connection to %s:%d ... creating NNTP connection to %s:%d ... error occurred on POP3 session error occurred on SMTP session error occurred on authentication error occurred while getting LIST. error occurred while getting envelope. error occurred while getting xhdr. error occurred while getting xover. error occurred while retrieving data. error on imap command: STATUS error while imap command: CLOSE error while imap command: EXPUNGE error while imap command: STORE %s %s failed to write configuration to file getting article %d... getting xover %d - %d in %s... iconv cannot convert %s to UTF-7 iconv cannot convert UTF-7 to %s invalid UIDL response: %s invalid article range: %d - %d invalid lock type invalid mbox format: %s invalid xover line: %s mailbox is locked mailbox is owned by another process, waiting... malformed mbox: %s no new articles. procmime_get_text_content(): Code conversion failed. protocol error protocol error: %s root folder %s not exist session timeout the src folder is identical to the dest. unescaped From found: %suse 'flock' instead of 'file' if possible. writing to %s failed. Project-Id-Version: sylpheed Report-Msgid-Bugs-To: POT-Creation-Date: 2008-02-19 10:48+0900 PO-Revision-Date: 2004-12-05 14:40+0100 Last-Translator: Roger Lindmark Language-Team: Swedish MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Utfärdare: %s Ärende: %s %d meddelanden funna. (skickar fil...)Lägger till meddelande till %s (%d / %d)Kan inte ansluta till IMAP4-server: %s:%d Kan inte ansluta till NNTP-server: %s:%d Kan inte skapa "%s" kan inte skapa "%s" under INBOX Kan inte skapa IMAP4-session med: %s:%d Kan inte öppna markeringsfil. Kan inte starta TLS-session. Kan inte skriva till fil. Konfigurationen är sparad. Kopierar meddelande %s%c%d till %s... Kopierar meddelanden %s till %s...Katalognamn '%s' är inte en giltig UTF-8 sträng. Kanske lokala kodningen används för filnamn. Om detta är fallet, måste du sätta följande miljövariabel (se README för detalj): G_FILENAME_ENCODING=@locale Fel vid skapande av SSL-kontext Fel uppstod vid postning Fel uppstod när kommandot skickades Exporterar meddelanden från %s till %s... Filen "%s" finns redan. Kan inte skapa mapp.Fann %s Hämtar meddelande %dHämtar meddelandehuvuden (%d / %d)Hämtar meddelanden från %s till %s... IMAP4-autentisering misslyckades. IMAP4-förbindelse till %s har avbrutits. Återuppkopplar... IMAP4-inloggning misslyckades. IMAP-server stänger av LOGIN. SkräppostfilterFlyttar meddelande %s till %s...NNTP-förbindelse till %s:%d har avbrutits. Återuppkopplar... POP3-protokollfel POP3: Tar bort utgånget meddelande %d POP3: Hoppar över meddelande %d (%d byte) Utskriftskommando är felaktigt: "%s" Läser all konfiguration för varje konto... Tar bort alla meddelanden i %sTar bort meddelanden %sNödvändig APOP-tidsmarkering inte funnen i hälsning SMTP AUTH ej tillgängligt SSL-anslutning med %s SSL-metod ej tillgänglig SSLv23 tillgängligt SSLv23 ej tillgängligt Servercertifikat: TLSv1 tillgängligt TLSv1 ej tillgängligt Syntaxfel på tidsmarkering i hälsning Okänd SSL-metod *PROGRAMFEL* inlägget %d har redan cachats. felaktigt SMTP-svar kan inte lägga till %s till %s kan inte lägga till meddelande till %s kan inte stänga mapp kan inte kopiera %s till %s kan inte kopiera meddelande %s till %s kan inte skapa %s kan inte skapa låsfil %s kan inte skapa brevlåda kan inte skapa brevlåda: LIST misslyckades kan inte ta bort brevlåda kan inte utplåna kan inte hämta meddelande %d kan inte hämta kuvert kan inte hämta namnutrymme kan inte hämta xhdr kan inte hämta xover kan inte låsa %s kan inte öppna markeringsfil kan inte öppna temporär fil kan inte tolka kuvert: %s kan inte posta inlägg. kan inte läsa inlägg %d kan inte läsa mboxfil. kan inte byta namn på brevlåda %s till %s kan inte hämta inlägg %d kan inte välja mapp: %s kan inte välja grupp %s kan inte sätta borttaget-flaggor: %s kan inte sätta borttaget-flaggor: 1:* kan inte starta TLS-session kan inte korta av brevlåda till noll. kan inte låsa upp %s kan inte skriva till temporär fil kommando är inte stött skapar IMAP4-förbindelse till %s:%d... skapar NNTP-förbindelse till %s:%d ... fel uppstod vid POP3-session fel uppstod vid SMTP-session fel uppstod vid autentisering fel uppstod vid hämtning av LIST. fel uppstod vid hämtning av kuvert. fel uppstod vid hämtning av xhdr. fel uppstod vid hämtning av xover. fel uppstod vid inhämtning av data. fel vid imapkommando: STATUS fel vid imapkommando: CLOSE fel vid imapkommando: EXPUNGE fel vid imapkommando: STORE %s %s misslyckades skriva konfiguration till fil hämtar inlägg %d... hämtar xover %d - %d i %s... iconv kan inte konvertera %s till UTF-7 iconv kan inte konvertera UTF-7 till %s felaktigt UIDL-svar: %s felaktigt inläggsomfång: %d - %d felaktig låstyp felaktigt mboxformat: %s felaktig xover-rad: %s brevlådan är låst brevlådan ägs av en annan process, väntar... felformad mbox: %s inga nya inlägg. procmime_get_text_content(): Kodkonvertering misslyckades. protokollfel protokollfel: %s rotmapp %s finns inte sessionens väntetid tog slut ursprungsmappen är identisk med dest. o-esc:at Från-fält funnet: %sanvänd "flock" istället för "file" om möjligt. skrivning till %s misslyckades. libsylph-1.1.0/po/tr.gmo0000644000175000017500000002303710756432605012044 00000000000000r<    % $ ? R *q     !  : %X &~ . $  >! ` @u  " % $ '9 .a      *#?!c$6Gb"x"1Gb|+Hf '&6V!v#'#$&- T"u&&!!?a|0$85J)+>SU  --J#_1&+.Zz"'4 $"$GNlL !7$Y!~69*-X w )!!CXt!",<i  =Yx#5  3 #J $n    !3!1L!~!!'!!#"*&""Q"#t","("2".!#P#'j#!#!##%#$#.$ R$s$Q$$$3%9%K%a%!}%#%%'%& mq3n1!K5^ =.ZjA"p_(Oi `MY-E)*#V$Slo/aUL<B'>%rQ4fgC ,@XT7c: JR+9 ;FG]&b6e0[d8NhkDW2?\PHI Issuer: %s Subject: %s %d messages found. (sending file...)Can't connect to IMAP4 server: %s:%d Can't connect to NNTP server: %s:%d Can't create '%s' Can't create '%s' under INBOX Can't establish IMAP4 session with: %s:%d Can't open mark file. Can't start TLS session. Can't write to file. Configuration is saved. Copying message %s%c%d to %s ... Error creating ssl context Error occurred while posting Error occurred while sending command Exporting messages from %s into %s... File `%s' already exists. Can't create folder.Found %s Getting messages from %s into %s... IMAP4 authentication failed. IMAP4 connection to %s has been disconnected. Reconnecting... IMAP4 login failed. NNTP connection to %s:%d has been disconnected. Reconnecting... POP3 protocol error POP3: Deleting expired message %d POP3: Skipping message %d (%d bytes) Print command line is invalid: `%s' Reading all config for each account... Required APOP timestamp not found in greeting SMTP AUTH not available SSL connection using %s SSL method not available SSLv23 available SSLv23 not available Server certificate: TLSv1 available TLSv1 not available Timestamp syntax error in greeting Unknown SSL method *PROGRAM BUG* article %d has been already cached. bad SMTP response can't append %s to %s can't append message to %s can't close folder can't copy %s to %s can't copy message %s to %s can't create %s can't create lock file %s can't create mailbox can't create mailbox: LIST failed can't delete mailbox can't expunge can't fetch message %d can't get envelope can't get namespace can't get xhdr can't get xover can't lock %s can't open mark file can't open temporary file can't parse envelope: %s can't post article. can't read article %d can't read mbox file. can't rename mailbox: %s to %s can't retrieve article %d can't select folder: %s can't select group: %s can't set deleted flags: %s can't set deleted flags: 1:* can't start TLS session can't truncate mailbox to zero. can't unlock %s can't write to temporary file command not supported creating IMAP4 connection to %s:%d ... creating NNTP connection to %s:%d ... error occurred on POP3 session error occurred on SMTP session error occurred on authentication error occurred while getting LIST. error occurred while getting envelope. error occurred while getting xhdr. error occurred while getting xover. error occurred while retrieving data. error while imap command: CLOSE error while imap command: EXPUNGE error while imap command: STORE %s %s failed to write configuration to file getting article %d... getting xover %d - %d in %s... iconv cannot convert %s to UTF-7 iconv cannot convert UTF-7 to %s invalid UIDL response: %s invalid article range: %d - %d invalid lock type invalid mbox format: %s invalid xover line: %s mailbox is locked mailbox is owned by another process, waiting... malformed mbox: %s no new articles. procmime_get_text_content(): Code conversion failed. protocol error protocol error: %s root folder %s not exist session timeout the src folder is identical to the dest. unescaped From found: %suse 'flock' instead of 'file' if possible. writing to %s failed. Project-Id-Version: tr Report-Msgid-Bugs-To: POT-Creation-Date: 2008-02-19 10:48+0900 PO-Revision-Date: 2004-12-03 11:44+0200 Last-Translator: Arman Aksoy Language-Team: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Generator: KBabel 1.3.1 Veren: %s Konu: %s %d ileti bulundu. (dosya gönderiliyor...)IMAP4 sunucuya bağlantı kurulamadı: %s:%d NNTP sunucuya bağlantı yapılamadı: %s:%d %s oluşturulamadı %s Gelen altında oluşturulamadı IMAP4 oturumuna %s:%d ile bağlantı kurulamadı işaretli dosya açılamadı. TLS oturumuna bağlantı kurulamadı. Dosyaya yazılamadı. Yapılandırma kaydedildi. %s%c%d mesajı %s içine kopyalanıyor... SSL metni oluşturulurken hata Postalama sırasında hata Komut gönderilirken hata oluştu %s daki mesajlar %s a aktarılıyor... %s dosyası zaten bulunuyor. Dizin oluşturulamadı.%s bulundu %s daki mesajlar %s e alınıyor... IMAP4 yetkilendirmesi başarısız. %s adresine yapılmış IMAP4 bağlantısı koptu. Yeniden bağlanılıyor... IMAP4 girişinde hata. %s:%d konumuna yapılan NNTP bağlantısı koptu.Yeniden bağlanılıyor... POP3 protokol hatası POP3: Eski postalar siliniyor %d POP3: Posta atlanıyor %d (%d byte) Yazdırma komutu geçersiz: `%s' Her hesap için yapılandırma dosyaları okunuyor... Gerekli olan APOP zaman etiketi görüşmede bulunamadı SMTP AUTH kullanılamıyor SSL bağlantısı %s kullanarak yapıldı SSL yöntemi kullanılamıyor SSLv23 etkin SSLv23 kullanılamıyor Sunucu sertifikası: TLSv1 etkin TLSv1 kullanılamıyor Zaman etiketi yazım hatası Bilinmeyen SSL yöntemi: Program hatası %d iletisi zaten önbelleklendi. kötü SMTP cevabı %s, %s üzerine eklenemedi ileti %s'ye eklenemiyor dizin kapatılamadı %s, %s konumuna kopyalanamadı mesaj %s dan %s a kopyalanamadı %s oluşturulamadı kilit dosyası yaratılamadı: %s posta kutusu oluşturulamadı posta kutusu yaratılamıyor: Liste hatası posta kutusu silinemedi silinemiyor %d. ileti alınamadı zarf alınamadı alanadına erişilemedi X başlıkları alınamıyor haber grupları alınamadı %s kilitlenemedi işaret dosyası açılamadı geçici dosya açılamadı zarf ayrıştırılamadı: %s makale postalanamıyor. %d. makale okunamadı Posta kutusu dosyası okunamıyor. %s posta kutusunun adı %s olarak değiştirilemedi makale alınamıyor : %d dizin seçilemedi: %s grup seçilemiyor: %s silinen işaretler atanamıyor: %s silinen işaretler atanamıyor: 1:* TLS oturumu başlatılamıyor posta kutusu sıfırlanamıyor. %s açılamadı geçici dosyaya yazılamadı komut desteklenmiyor %s:%d adresine IMAP4 bağlantısı yapılıyor ... %s:%d adresine NNTP bağlantısı yapılıyor... POP3 oturumunda hata oluştu SMTP oturumunda hata oluştu yetkilendirme sırasında hata oluştu LIST alınırken hata oluştu. zarf alınırken bir hata oluştu. x başlıkları alınırken hata oluştu. haber grupları alınırken hata. veri alınırken bir hata oluştu. imap komutu sırasında hata oluştu: CLOSE EXPUNGE komutu sırasında hata oluştu imap komutu sırasında hata oluştu: STORE %s %s Yapılandırma dosyasına kayıt yapılamadı %d. makale alınıyor... %d - %d haber grubu alınıyor (%s)... iconv %s yi UTF-7'ye çeviremedi iconv, UTF-7 yi %s'e çeviremedi hatalı UIDL cevabı: %s geçersiz makale aralığı: %d - %d geçersiz kilit türü geçersiz posta kutusu biçimi: %s hatalı haber grubu satırı %s posta kutusu kilitli posta kutusu başka bir süreç tarafından kullanıldığı için bekleniyor... bozuk posta kutusu: %s yeni makale yok. procmime_get_text_content(): Kod çevriminde hata. protokol hatası protokol hatası: %s %s kök dizini bulunamadı oturum zaman aşımına uğradı kaynak dizini hedef dizinle aynı. uygun olmayan Kimden: %sfile yerine flock kullanmayı deneyin. yazarken hata oluştu: %s libsylph-1.1.0/po/uk.gmo0000644000175000017500000003272510756432605012042 00000000000000}    " % $ : M *l     !  7  3 %Q &w .  ! $ 1>O@0"E%h$'. ;Tm#!$0Uh "#F\k '<Sj *K\{'&!!#C'g#$& "?&b&!! +Ffy05JZn)+g" 1I$Hn*CD&@k1.- +;(g><> MK1P 1 <P 1 - L -:!-h!!,!Y!'9":a";"/"N#*W#'#W#$/"$&R$y$$%$$$K%G]%)%#%,%8 &.Y&2&0&(&6'6L'K'6'W(-^(4(=(*(+*).V)?)B):*1C*7u*6*L*51+4g+<+S+T-,0,E,0,A*-/l-:-9--.-?.3m.2.N.B#/Cf/H/E/D90F~0K0J1&\1*19191+"28N252:2&2(3OH353$3V3"J4&m4/44L4;,5Hh5#52<. /k&RX 1j;vLW%90n{JC4 UqKg-t B5(h?Pb>z"c@_D]xFl6ZN=SeYO+ H*'opT8Mm7!G#rE,[\|ay}Vdus3fw QI:$)^A`i Issuer: %s Subject: %s %d messages found. (sending file...)Appending messages to %s (%d / %d)Can't connect to IMAP4 server: %s:%d Can't connect to NNTP server: %s:%d Can't create '%s' Can't create '%s' under INBOX Can't establish IMAP4 session with: %s:%d Can't open mark file. Can't start TLS session. Can't write to file. Configuration is saved. Copying message %s%c%d to %s ... Copying messages %s to %s ...Directory name '%s' is not a valid UTF-8 string. Maybe the locale encoding is used for filename. If that is the case, you must set the following environmental variable (see README for detail): G_FILENAME_ENCODING=@locale Error creating ssl context Error occurred while posting Error occurred while sending command Exporting messages from %s into %s... File `%s' already exists. Can't create folder.Found %s Getting message %dGetting message headers (%d / %d)Getting messages from %s into %s... IMAP4 authentication failed. IMAP4 connection to %s has been disconnected. Reconnecting... IMAP4 login failed. IMAP4 server disables LOGIN. Junk mail filterMoving messages %s to %s ...NNTP connection to %s:%d has been disconnected. Reconnecting... POP3 protocol error POP3: Deleting expired message %d POP3: Skipping message %d (%d bytes) Print command line is invalid: `%s' Reading all config for each account... Removing all messages in %sRemoving messages %sRequired APOP timestamp not found in greeting SMTP AUTH not available SSL connection using %s SSL method not available SSLv23 available SSLv23 not available Server certificate: TLSv1 available TLSv1 not available Timestamp syntax error in greeting Unknown SSL method *PROGRAM BUG* article %d has been already cached. bad SMTP response can't append %s to %s can't append message to %s can't close folder can't copy %s to %s can't copy message %s to %s can't create %s can't create lock file %s can't create mailbox can't create mailbox: LIST failed can't delete mailbox can't expunge can't fetch message %d can't get envelope can't get namespace can't get xhdr can't get xover can't lock %s can't open mark file can't open temporary file can't parse envelope: %s can't post article. can't read article %d can't read mbox file. can't rename mailbox: %s to %s can't retrieve article %d can't select folder: %s can't select group: %s can't set deleted flags: %s can't set deleted flags: 1:* can't start TLS session can't truncate mailbox to zero. can't unlock %s can't write to temporary file command not supported creating IMAP4 connection to %s:%d ... creating NNTP connection to %s:%d ... error occurred on POP3 session error occurred on SMTP session error occurred on authentication error occurred while getting LIST. error occurred while getting envelope. error occurred while getting xhdr. error occurred while getting xover. error occurred while retrieving data. error on imap command: STATUS error while imap command: CLOSE error while imap command: EXPUNGE error while imap command: STORE %s %s failed to write configuration to file getting article %d... getting xover %d - %d in %s... iconv cannot convert %s to UTF-7 iconv cannot convert UTF-7 to %s invalid UIDL response: %s invalid article range: %d - %d invalid lock type invalid mbox format: %s invalid xover line: %s mailbox is locked mailbox is owned by another process, waiting... malformed mbox: %s no new articles. procmime_get_text_content(): Code conversion failed. protocol error protocol error: %s root folder %s not exist session timeout the src folder is identical to the dest. unescaped From found: %suse 'flock' instead of 'file' if possible. writing to %s failed. Project-Id-Version: Sylpheed 2.2.4 Report-Msgid-Bugs-To: POT-Creation-Date: 2008-02-19 10:48+0900 PO-Revision-Date: 2006-04-13 00:34+0300 Last-Translator: O.R. Nykyforchyn Language-Team: Ukrainian MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Poedit-Language: Ukrainian X-Poedit-Country: UKRAINE Видав: %s Суб'єкт %s знайдено %d листів. (посилаємо файл...)Приєднуємо листи до %s (%d / %d)Не вдалось з'єднатись з сервером IMAP4: %s:%d Не вдалось з'єднатись з сервером NNTP: %s:%d Не вдалось створити '%s' Не вдалось створити '%s' всередині INBOX Не вдалось встановити сесію IMAP4 з: %s:%d Не вдалось відкрити файл позначок. Не вдалось почати сесію TLS. Не вдалось писати в файл. Конфігурацію збережено. Копіюємо лист %s%c%d в %s ... Копіюємо листи %s в %s ...Назва папки '%s' не є придатним рядком UTF-8. Якщо для імен файлів вживається кодування локалі, Ви повинні встановити змінну середовища (див. README щодо подробиць): G_FILENAME_ENCODING=@locale Помилка у створенні контексту ssl Трапилась помилка при відсиланні При відсиланні команди трапилась помилка Експортуємо листи з %s в %s... Файл `%s' вже існує. Неможливо створити папку.Знайдено %s Отримуємо лист %dОтримуємо заголовки листів (%d / %d)Отримуємо листи від %s в %s... Невдача авторизації IMAP4. З'єднання IMAP4 до %s втрачено. Відновлюємо... Невдача авторизації IMAP4. Сервер IMAP4 відключив LOGIN. фільтр мотлохуПереносимо листи %s в %s ...З'єднання NNTP до %s:%d було розірвано. Відновлюємо... Помилка протоколу POP3 POP3: Вилучаємо застарілий лист %d POP3: Пропускаємо лист %d (%d байтів) Невірна команда друку: `%s' Читаємо конфігурацію для кожного запису... Видаляємо всі листи у %sВидаляємо листи від %sУ привітанні не знайдено обов'язкового APOP timestamp SMTP AUTH недоступна З'єднання SSL з вживанням %s Метод SSL недоступний SSLv23 доступний SSLv23 недоступний Сертифікат сервера: TLSv1 доступний TLSv1 недоступний Синтаксична помилка в timestamp у привітанні Невідомий метод SSL *ПОМИЛКА В ПРОГРАМІ* статтю %d вже кешовано. погана відпоідь SMTP не вдалось додати %s до %s не вдалось приєднати лист до %s не вдалось закрити папку не вдалось скопіювати %s в %s не вдалось копіювати %s в %s не вдалось створити %s не вдалось створити lock-файл %s не вдалось створити скриньку не вдалось створити скриньку: невдача LIST не вдалось видалити скриньку не вдалось очистити папку від видалених листів не вдалось стягти лист %d не вдалось отримати конверт не вдалось отримати простір імен не вдалось отримати xhdr не вдалось отримати xover не вдалось заблокувати %s не вдалось відкрити файл позначок неможливо відкрити тимчасовий файл не вдалось розібрати конверт: %s не вдалось послати статтю. не вдалось прочитати статтю %d не вдалось прочитати файл mbox. не вдалось перейменувати скриньку: %s на %s не вдалось отримати статтю %d не вдалось отримати папку: %s не вдалось обрати конференцію: %s не вдалось встановити прапорець видалення: %s не вдалось встановити прапорець видалення: 1:* не вдалось почати сесію TLS не вдалось обрізати скриньку до нуля. не вдалось розблокувати %s неможливо писати в тимчасовий файл команда не підтримується створення з'єднання INAP4 до %s:%d ... створюємо з'єднання NNTP до %s:%d ... помилка під час сесії POP3 помилка під час сесії SMTP помилка при аутентифікації помилка при отриманні LIST'а. трапилась помилка при отриманні конверта. трапилась помилка при отриманні xhdr. трапилась помилка при отриманні xover. трапилась помилка при отриманні даних. помилка при виконанні команди imap: STATUS помилка при виконанні команди imap: CLOSE помилка при виконанні команди imap: EXPUNGE помилка при виконанні команди imap: STORE %s %s не вдалось записати конфігурацію в файл отримуємо статтю %d... отримуємо xover %d - %d в %s... iconv не може конвертувати %s в UTF-7 iconv не може конвертувати UTF-7 в %s невірна відповідь UIDL: %s невірний діапазон статей: %d - %d неправильний тип блокування неправильний формат файла mbox: %s невірний рядок xover: %s скриньку заблоковано скринька зайнята іншим процесом, чекаємо... неправильно збудований mbox: %s нових статтей нема. procmime_get_text_content(): Перетворення кодів не вдалось. помилка протоколу помилка протоколу: %s коренева папка %s не існує таймаут сесії папка призначення ідентична до вихідної. знайдено незахищений рядок From: %sякщо можливо, вживайте 'flock' замість 'file' Невдача запису в %s. libsylph-1.1.0/po/vi.gmo0000644000175000017500000002640310756432605012035 00000000000000|x y    " % $ * = *\     !  '  # %A &g .  ! $ !>?~@ "5%X$~'.+D]w#!$ EXo"6L[s,CZz ;Lk'&!#3'W#$& "/&R&y!!6Vi05:J^x)+G>Zm"793"L-o+(! %5 [1|!@!br' H"7&Z#J * 'C "k 9   H =!Y!%y!!!!!!:"6L"5""" "#1#$Q#v#)##1# $)$<$X$5v$$$$)$%&%'L% t%"%'%2%"&#6&!Z&'|&(&'&8&.')J'"t'.'-'('(:(U($u((('()((#)*L).w)*))&)***A*'l******" +-+OI+++?+,,'/,W,6w,5,,2<. /k&RX 1j;vLW%90nJC4 UqKg-t B5(h?Pb>z"c@_D]xFl6ZN=SeYO+ H*'opT8Mm7!G#rE,[\{ay|Vdus3fw QI:$)^A`i Issuer: %s Subject: %s %d messages found. (sending file...)Appending messages to %s (%d / %d)Can't connect to IMAP4 server: %s:%d Can't connect to NNTP server: %s:%d Can't create '%s' Can't create '%s' under INBOX Can't establish IMAP4 session with: %s:%d Can't open mark file. Can't start TLS session. Can't write to file. Configuration is saved. Copying message %s%c%d to %s ... Copying messages %s to %s ...Directory name '%s' is not a valid UTF-8 string. Maybe the locale encoding is used for filename. If that is the case, you must set the following environmental variable (see README for detail): G_FILENAME_ENCODING=@locale Error creating ssl context Error occurred while posting Error occurred while sending command Exporting messages from %s into %s... File `%s' already exists. Can't create folder.Found %s Getting message %dGetting message headers (%d / %d)Getting messages from %s into %s... IMAP4 authentication failed. IMAP4 connection to %s has been disconnected. Reconnecting... IMAP4 login failed. IMAP4 server disables LOGIN. Junk mail filterMoving messages %s to %s ...NNTP connection to %s:%d has been disconnected. Reconnecting... POP3 protocol error POP3: Deleting expired message %d POP3: Skipping message %d (%d bytes) Print command line is invalid: `%s' Reading all config for each account... Removing all messages in %sRemoving messages %sRequired APOP timestamp not found in greeting SMTP AUTH not available SSL connection using %s SSL method not available SSLv23 available SSLv23 not available Server certificate: TLSv1 available TLSv1 not available Timestamp syntax error in greeting Unknown SSL method *PROGRAM BUG* article %d has been already cached. bad SMTP response can't append %s to %s can't append message to %s can't close folder can't copy %s to %s can't copy message %s to %s can't create %s can't create lock file %s can't create mailbox can't create mailbox: LIST failed can't delete mailbox can't expunge can't fetch message %d can't get envelope can't get namespace can't get xhdr can't get xover can't lock %s can't open mark file can't open temporary file can't parse envelope: %s can't post article. can't read article %d can't read mbox file. can't rename mailbox: %s to %s can't retrieve article %d can't select folder: %s can't select group: %s can't set deleted flags: %s can't set deleted flags: 1:* can't start TLS session can't truncate mailbox to zero. can't unlock %s can't write to temporary file command not supported creating IMAP4 connection to %s:%d ... creating NNTP connection to %s:%d ... error occurred on POP3 session error occurred on SMTP session error occurred on authentication error occurred while getting LIST. error occurred while getting envelope. error occurred while getting xhdr. error occurred while getting xover. error occurred while retrieving data. error on imap command: STATUS error while imap command: CLOSE error while imap command: EXPUNGE error while imap command: STORE %s %s failed to write configuration to file getting article %d... getting xover %d - %d in %s... iconv cannot convert %s to UTF-7 iconv cannot convert UTF-7 to %s invalid UIDL response: %s invalid article range: %d - %d invalid lock type invalid mbox format: %s invalid xover line: %s mailbox is locked mailbox is owned by another process, waiting... malformed mbox: %s no new articles. procmime_get_text_content(): Code conversion failed. protocol error protocol error: %s root folder %s not exist session timeout the src folder is identical to the dest. use 'flock' instead of 'file' if possible. writing to %s failed. Project-Id-Version: sylpheed Report-Msgid-Bugs-To: POT-Creation-Date: 2008-02-19 10:48+0900 PO-Revision-Date: 2006-04-16 22:05+0700 Last-Translator: Pham Thanh Long Language-Team: Vietnamese MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Người phát hành: %s Tiêu đề: %s Tìm thấy %d thư. (đang gửi tập tin...)Đang ghép thư vào %s (%d / %d)Không thể kết nối tới máy chủ IMAP4: %s:%d Không kết nối được với máy chủ NNTP: %s:%d Không thể tạo '%s' Không thể tạo '%s' ở INBOX Không thể tạo phiên IMAP4 với: %s:%d Không thể mở tập tin đánh đấu. Không thể khởi động phiên TLS. Không thể ghi vào tập tin. Cấu hình đã được lưu. Đang chép thư %s%c%d tới %s ... Đang chép thư %s tới %s ...Tên thư mục '%s' không phải là một chuối UTF-8 hợp lệ. Có thể mã kí tự bản địa được dùng trong tên tập tin. Nếu ở trong trường hợp đó, bạn phải đặt biến môi trường sau (đọc README để biết thêm thông tin): G_FILENAME_ENCODING=@locale Lỗi khi tạo ngữ cảnh ssl Có lỗi khi gửi Có gỗi khi gửi lệnh Xuất thư từ %s sang %s... Tập tin `%s' đã có trước. Không thể tạo thư mục.Tìm thấy %s Đang lấy thư %dĐang lấy header của thư (%d / %d)Lấy thư từ %s vào %s... Xác thực IMAP4 thất bại: Kết nối IMAP4 tới %s đã bị ngắt. Đang kết nối lại... Đăng nhập IMAP4 thất bại. Máy chủ IMAP4 cấm ĐĂNG NHẬP. Lọc thư rácĐang chuyển thư %s tới %s ...Kết nối NNTP tới %s:%d đã bị ngắt. Đang kết nối lại... Lỗi giao thức POP3 POP3: Đang xoá các thư hết hạn %d POP3: Đang bỏ qua thư %d (%d byte) Lệnh in không hợp lệ: `%s' Đang đọc mọi cấu hình cho mỗi tài khoản... Xoá mọi thư trong %sĐang xoá thư %sKhông thấy nhãn thời gian trong lời chào hỏi như yêu cầu SMTP AUTH không sẵn có Kết nối SSL sử dụng %s Phương thức SSL không sẵn có SSLv23 hiện có SSLv23 không sẵn có Máy chủ chứng nhận: TLSv1 hiện có TLSv1 không sẵn có Lỗi cú pháp nhãn thời gian trong lời chào hỏi Phương thức SSL không xác định *PROGRAM BUG* văn bản %d vừa được đưa vào bộ đệm. phản hồi SMTP tồi không thể ghep %s vào %s không thể ghép thư vào %s không thể đóng thư mục không thể chép %s tới %s không thể chép thư %s tới %s không tạo được %s không tạo được tập tin khoá %s không thể tạo hộp thư không thể tạo hộp thư: LIST thất bại không thể xoá hộp thư không thể xoá không thể lấy thư %d không thể lấy phong bì không thể lấy khoảng định danh (namespace) không lấy được xhdr không lấy được vover không thể khoá %s không thể mở tập tin đánh dấu không mở được tập tin tạm không thể phân tích phong bì: %s không thể gửi bài viết. không thể đọc văn bản %d không đọc được tập tin mbox. không thể đổi tên hộp thư: %s thành %s không thể lấy bài viết %d không thể chọn thư mục: %s không chọn được nhóm: %s không thể đặt cờ đã xoá: %s không thể đặt cờ đã xoá: 1:* không thể khởi động phiên TLS không thể giảm số lượng hộp thư xuống 0. không thể mở khoá %s không ghi được vào tập tin tạm lệnh không được hỗ trợ đang tạo kết nối IMAP4 tới %s:%d ... đang tạo kết nối NNTP tới %s:%d ... có lỗi trong phiên làm việc POP3 có lỗi trong phiên SMTP có lỗi khi xác thực xảy ra lỗi khi lấy LIST. xảy ra lỗi khi lấy phong bì. có lỗi khi lấy xhdr. có lỗi khi lấy xover. có lỗi trong khi lấy dữ liệu. có lỗi khi chạy lệnh imap: STATUS có lỗi khi chạy lệnh imap: CLOSE có lỗi khi chạy lệnh imap: EXPUNGE có lỗi khi chạy lệnh imap: STORE %s %s lỗi khi lưu cấu hình vào tập tin đang lấy văn bản %d... đang lấy xover %d - %d trong %s... iconv không thể chuyển %s sang UTF-7 iconv không thể chuyển UTF-7 sang %s hồi đáp UIDL không hợp lệ: %s phạm vi bài không hợp lệ: %d - %d kiểu khoá không hợp lệ định dạng mbox không hợp lệ: %s dòng xover không hợp lệ: %s hộp thư đã bị khoá hộp thư bị chiếm dụng bởi một tiến trình khác, đang chờ... mbox có lỗi: %s không có bài mới. procmime_get_text_content(): Chuyển đổi mã thất bại. lỗi giao thức lỗi giao thức: %s thư mục gốc %s không tồn tại phiên làm việc hết giờ thư mục nguồn cũng chính là thư mục gốc. dùng lệnh 'flock' thay vì 'file' nếu có thể thất bại khi ghi vào %s. libsylph-1.1.0/po/zh_CN.gmo0000644000175000017500000002212510756432605012415 00000000000000r<    % $ ? R *q     !  : %X &~ . $  >! ` @u  " % $ '9 .a      *#?!c$6Gb"x"1Gb|+Hf '&6V!v#'#$&- T"u&&!!?a|0$85J)+>IU&%=$S&x%",Ol#3 #9'a9x"#! %.2T  (%Ag/I!]  8Rk# #Bb{*' - F _ v    (!*@!.k!!!.! ! "?" ["|""""+"#$#48# m#{## #.#$#1 $=$ mq3n1!K5^ =.ZjA"p_(Oi `MY-E)*#V$Slo/aUL<B'>%rQ4fgC ,@XT7c: JR+9 ;FG]&b6e0[d8NhkDW2?\PHI Issuer: %s Subject: %s %d messages found. (sending file...)Can't connect to IMAP4 server: %s:%d Can't connect to NNTP server: %s:%d Can't create '%s' Can't create '%s' under INBOX Can't establish IMAP4 session with: %s:%d Can't open mark file. Can't start TLS session. Can't write to file. Configuration is saved. Copying message %s%c%d to %s ... Error creating ssl context Error occurred while posting Error occurred while sending command Exporting messages from %s into %s... File `%s' already exists. Can't create folder.Found %s Getting messages from %s into %s... IMAP4 authentication failed. IMAP4 connection to %s has been disconnected. Reconnecting... IMAP4 login failed. NNTP connection to %s:%d has been disconnected. Reconnecting... POP3 protocol error POP3: Deleting expired message %d POP3: Skipping message %d (%d bytes) Print command line is invalid: `%s' Reading all config for each account... Required APOP timestamp not found in greeting SMTP AUTH not available SSL connection using %s SSL method not available SSLv23 available SSLv23 not available Server certificate: TLSv1 available TLSv1 not available Timestamp syntax error in greeting Unknown SSL method *PROGRAM BUG* article %d has been already cached. bad SMTP response can't append %s to %s can't append message to %s can't close folder can't copy %s to %s can't copy message %s to %s can't create %s can't create lock file %s can't create mailbox can't create mailbox: LIST failed can't delete mailbox can't expunge can't fetch message %d can't get envelope can't get namespace can't get xhdr can't get xover can't lock %s can't open mark file can't open temporary file can't parse envelope: %s can't post article. can't read article %d can't read mbox file. can't rename mailbox: %s to %s can't retrieve article %d can't select folder: %s can't select group: %s can't set deleted flags: %s can't set deleted flags: 1:* can't start TLS session can't truncate mailbox to zero. can't unlock %s can't write to temporary file command not supported creating IMAP4 connection to %s:%d ... creating NNTP connection to %s:%d ... error occurred on POP3 session error occurred on SMTP session error occurred on authentication error occurred while getting LIST. error occurred while getting envelope. error occurred while getting xhdr. error occurred while getting xover. error occurred while retrieving data. error while imap command: CLOSE error while imap command: EXPUNGE error while imap command: STORE %s %s failed to write configuration to file getting article %d... getting xover %d - %d in %s... iconv cannot convert %s to UTF-7 iconv cannot convert UTF-7 to %s invalid UIDL response: %s invalid article range: %d - %d invalid lock type invalid mbox format: %s invalid xover line: %s mailbox is locked mailbox is owned by another process, waiting... malformed mbox: %s no new articles. procmime_get_text_content(): Code conversion failed. protocol error protocol error: %s root folder %s not exist session timeout the src folder is identical to the dest. unescaped From found: %suse 'flock' instead of 'file' if possible. writing to %s failed. Project-Id-Version: sylpheed Report-Msgid-Bugs-To: POT-Creation-Date: 2008-02-19 10:48+0900 PO-Revision-Date: 2005-03-17 09:22+0800 Last-Translator: Wang Jian Language-Team: zh_CN MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 签发者:%s 标题:%s 找到 %d 封邮件。 (正在发送文件...)无法连接到IMAP4服务器:%s:%d 无法连接到NNTP服务器:%s:%d 无法创建“%s” 无法在收件箱中创建“%s” 无法连接到IMAP4服务器:%s:%d 无法打开标记文件。 无法启动 TLS 会话。 无法写入文件。 配置已经保存。 正在复制邮件 %s%c%d 到 %s ... 创建SSL上下文时发生错误 发表文章时发生错误 发送命令时发生错误 正在从 %s 导出信件到 %s... 文件“%s”已存在。 无法创建文件件。发现 %s 正在从 %s 获取邮件到 %s... IMAP4 验证失败。 到 %s 的 IMAP4 连接已断开。正在重新连接... IMAP4 登录失败。 到 %s:%d 的NNTP连接已断开。正在重新连接... POP3 协议错误 POP3: 正在删除过期邮件 %d POP3:跳过邮件 %d (%d 字节) 打印命令行无效:“%s” 正在读取所有帐号的配置... 在问候信息中没有发现需要的APOP时戳 SMTP验证不可用 使用 %s 的SSL连接 SSL方法不可用 SSLv23可用 SSLv23不可用 服务器证书: TLSv1可用 TLSv1不可用 在问候信息中时间戳语法错误 不知道的SSL方法 *程序错误* 文章 %d 已被缓存。 错误的 SMTP 回应 无法把 %s 添加到 %s 无法追加邮件到 %s 无法关闭文件夹 无法将 %s 复制到 %s 无法复制邮件 %s 到 %s 无法创建 %s 无法创建锁文件 %s 无法创建邮箱 无法创建邮箱:LIST 失败 无法删除邮箱 无法清除 无法获取邮件 %d 无法获取信封 无法获得名字空间 无法获取 xhdr 无法获取 xover 无法锁住 %s 无法打开标记文件 无法打开临时文件 无法解析信封:%s 无法发表文章。 无法读取文章 %d 无法读取 mbox 文件。 无法将邮箱 %s 重命名为 %s 无法获取文章 %d 无法选择文件夹:%s 无法选择组:%s 无法设置删除标志:%s 无法设置删除标志:1:* 无法启动 TLS 会话 无法将邮箱删除为空。 无法解锁 %s 无法写入临时文件 不支持的命令 正在创建到 %s:%d 的 IMAP4 连接... 正在创建到 %s:%d 的NNTP连接... POP3 会话发生错误 SMTP 会话发生错误 验证时发生错误 获取列表时发生错误。 获取信封时发生错误。 获取 xhdr 时发生错误。 获取 xover 时发生错误。 下载数据时发生错误。 执行IMAP命令时发生错误:CLOSE 执行IMAP命令时发生错误:EXPUNGE 执行IMAP命令时发生错误:STORE %s %s 无法写入配置文件 正在下载文章 %d... 正在获取 %3$s 里的 xover %1$d - %2$d... iconv 无法转换 %s 到 UTF-7 iconv 无法转换 UTF-7 到 %s 无效的 UIDL 回应:%s 无效的文章范围:%d - %d 无效的锁类型 无效的 mbox 格式:%s 无效的 xover 行:%s 信箱被锁住了 另一个进程拥有该邮箱,等待... 格式不正确的 mbox:%s 没有新文章。 procmime_get_text_content():代码转换失败。 协议错误 协议错误:%s 根文件夹 %s 不存在 会话超时 源文件夹与目的文件夹是同一个。 找到没有转码的发件人: %s如果可能,用“flock”代替“file”。 写入 %s 时失败。 libsylph-1.1.0/po/zh_TW.gmo0000644000175000017500000002470310756432605012453 00000000000000}    " % $ : M *l     !  7  3 %Q &w .  ! $ 1>O@0"E%h$'. ;Tm#!$0Uh "#F\k '<Sj *K\{'&!!#C'g#$& "?&b&!! +Ffy05JZn)+~ ( '2Zk"% >_>Vs$3 #+O9c G Si%"" 4* _ v      + "!,>!k!&~!!!!&!","C"!W"y" """"""##6#P#i######$!$$"F$i$$$$$'$7%(<%e%%%%% %&&9&'`&)&-&&'%'@'['y' ''''7(3?(s((-(((( )"()K)7j) )2<. /k&RX 1j;vLW%90n{JC4 UqKg-t B5(h?Pb>z"c@_D]xFl6ZN=SeYO+ H*'opT8Mm7!G#rE,[\|ay}Vdus3fw QI:$)^A`i Issuer: %s Subject: %s %d messages found. (sending file...)Appending messages to %s (%d / %d)Can't connect to IMAP4 server: %s:%d Can't connect to NNTP server: %s:%d Can't create '%s' Can't create '%s' under INBOX Can't establish IMAP4 session with: %s:%d Can't open mark file. Can't start TLS session. Can't write to file. Configuration is saved. Copying message %s%c%d to %s ... Copying messages %s to %s ...Directory name '%s' is not a valid UTF-8 string. Maybe the locale encoding is used for filename. If that is the case, you must set the following environmental variable (see README for detail): G_FILENAME_ENCODING=@locale Error creating ssl context Error occurred while posting Error occurred while sending command Exporting messages from %s into %s... File `%s' already exists. Can't create folder.Found %s Getting message %dGetting message headers (%d / %d)Getting messages from %s into %s... IMAP4 authentication failed. IMAP4 connection to %s has been disconnected. Reconnecting... IMAP4 login failed. IMAP4 server disables LOGIN. Junk mail filterMoving messages %s to %s ...NNTP connection to %s:%d has been disconnected. Reconnecting... POP3 protocol error POP3: Deleting expired message %d POP3: Skipping message %d (%d bytes) Print command line is invalid: `%s' Reading all config for each account... Removing all messages in %sRemoving messages %sRequired APOP timestamp not found in greeting SMTP AUTH not available SSL connection using %s SSL method not available SSLv23 available SSLv23 not available Server certificate: TLSv1 available TLSv1 not available Timestamp syntax error in greeting Unknown SSL method *PROGRAM BUG* article %d has been already cached. bad SMTP response can't append %s to %s can't append message to %s can't close folder can't copy %s to %s can't copy message %s to %s can't create %s can't create lock file %s can't create mailbox can't create mailbox: LIST failed can't delete mailbox can't expunge can't fetch message %d can't get envelope can't get namespace can't get xhdr can't get xover can't lock %s can't open mark file can't open temporary file can't parse envelope: %s can't post article. can't read article %d can't read mbox file. can't rename mailbox: %s to %s can't retrieve article %d can't select folder: %s can't select group: %s can't set deleted flags: %s can't set deleted flags: 1:* can't start TLS session can't truncate mailbox to zero. can't unlock %s can't write to temporary file command not supported creating IMAP4 connection to %s:%d ... creating NNTP connection to %s:%d ... error occurred on POP3 session error occurred on SMTP session error occurred on authentication error occurred while getting LIST. error occurred while getting envelope. error occurred while getting xhdr. error occurred while getting xover. error occurred while retrieving data. error on imap command: STATUS error while imap command: CLOSE error while imap command: EXPUNGE error while imap command: STORE %s %s failed to write configuration to file getting article %d... getting xover %d - %d in %s... iconv cannot convert %s to UTF-7 iconv cannot convert UTF-7 to %s invalid UIDL response: %s invalid article range: %d - %d invalid lock type invalid mbox format: %s invalid xover line: %s mailbox is locked mailbox is owned by another process, waiting... malformed mbox: %s no new articles. procmime_get_text_content(): Code conversion failed. protocol error protocol error: %s root folder %s not exist session timeout the src folder is identical to the dest. unescaped From found: %suse 'flock' instead of 'file' if possible. writing to %s failed. Project-Id-Version: sylpheed 2.1.4 Report-Msgid-Bugs-To: POT-Creation-Date: 2008-02-19 10:48+0900 PO-Revision-Date: 2005-10-25 16:23+0800 Last-Translator: Wei-Lun Chao Language-Team: Chinese (traditional) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plural-Forms: nplurals=1; plural=0; 發信人: %s 主旨: %s 共有 %d 封郵件。 (送出檔案 ...)附加郵件至 %s (%d / %d)無法連線到 IMAP4 伺服器:%s:%d 無法連線到新聞伺服器:%s:%d 無法產生 %s 無法在收件夾下產生 %s 無法產生 IMAP4 連線:%s:%d 無法開啟標記的檔案。 無法開啟 TLS 連線 無法寫入檔案。 組態設定已儲存。 正在複製訊息 %s%c%d 到 %s ... 正在複製郵件 %s 到 %s ...目錄名稱 「%s」並非有效的 UTF-8 字串。 也許語區編碼是用於檔案名稱。 此種情況下,您必須設定下述的環境變數 (參看 README 以獲得詳細資料): G_FILENAME_ENCODING=@locale SSL 傳輸發生錯誤 發表文章時發生錯誤 送出命令時發生錯誤。 將郵件由 %s 匯出到 %s 中... 檔案「%s」已存在。 無法產生資料夾。找到 %s 擷取第 %d 號郵件擷取郵件表頭 (%d / %d)從 %s 中取得郵件放入 %s... IMAP4 認證失敗 到 %s 的 IMAP4 連線被中斷了。重新連線中... IMAP4 登入失敗。 IMAP4 伺服器停用登入。 垃圾郵件資料夾正在移動郵件 %s 到 %s ...到 %s:%d 的新聞通訊協定連線被中斷了。重新連線中... POP3 協定有錯誤 POP3: 刪除過期的郵件 %d POP3: 略過郵件 %d (%d 位元組) 列印命令錯誤:「%s」 讀取所有帳號的設定中... 正在移除 %s 中的所有郵件正在移除郵件 %s在接觸通訊中找不到 APOP 的時間戳記。 不支援 SMTP 認證 使用 %s 進行 SSL 連線 不支援 SSL 支援 SSLv23 不支援 SSLv23 伺服器認證: 支援 TLSv1 不支援 TLSv1 接觸通訊中的時間戳記語法錯誤 未知的 SSL 操作錯誤 文章 %d 已經被暫存於快取之中。 SMTP 回覆錯誤 無法將郵件從 %s 搬移到 %s。 無法附加訊息到 %s 無法選擇資料夾 無法將郵件 %s 移到 %s 無法將郵件從 %s 搬移到 %s。 無法產生 %s 無法開啟檔案 %s 無法產生信箱 無法產生信箱:LIST 失敗 無法刪除信箱 無法刪除 無法擷取郵件 %d 無法取得信封。 無法取得信封。 無法取得 xhdr 無法取得 xover 無法鎖住 %s 無法開啟標示的檔案 無法開啟暫存檔。 無法解析信封:%s 無法發表文章。 無法讀取文章 %d 無法讀取 mbox 檔案。 信箱 %s 無法更名為 %s 無法取得文章 %d 無法選擇資料夾:%s 無法選擇新聞群組:%s 無法設定刪除的旗標:%s 無法設定刪除的旗標:1:* 無法啟動 TLS 工作階段 無法清除信箱。 %s 無法打開 無法寫入暫存檔。 命令未支援 正在產生 IMAP4 連線到 %s:%d ... 產生新聞通訊協定連線到 %s:%d , 請稍候... 使用 POP3 通訊協定時發生錯誤 SMTP 認證時發生錯誤 認證時發生錯誤 取得 LIST 時發生錯誤。 取得信封時發生錯誤。 取得 xhdr 時發生錯誤。 取得 xover 時發生錯誤。 擷取資料時發生錯誤。 發生錯誤的 imap 命令: STATUS imap 發生錯誤,命令為: CLOSE imap 發生錯誤,命令為: EXPUNGE imap 發生錯誤,命令為: STORE %s %s 寫入組態設定時失敗。 正在擷取文章 %d... 正在擷取 xover %d - %d 於 %s... 無法轉換 %s 為 UTF-7 無法將 UTF-7 轉換為 %s UIDL 回應錯誤:%s 錯誤的文章範圍:%d - %d 不合法的 lock 型態。 不合法的 mbox 格式:%s xover 內容錯誤:%s 信箱已被鎖定,可能前一次擷取未完成。 信箱正被其他的行程讀取中, 請稍候... 損壞的 mbox: %s 沒有新文章。 procmime_get_text_content(): 轉碼失敗。 通訊協定有錯誤 通訊協定有錯誤:%s 根資料夾 %s 不存在。 作業逾時 來源與目的資料夾相同。 不完整的 From 格式: %s如果可以,請使用「flock」替代「file」。 寫入到 %s 的動作失敗。